1 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
10 PR tree-optimization/87022
11 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
12 bits in dist vector rather than the first one.
14 2018-10-15 Richard Biener <rguenther@suse.de>
17 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
18 (visit_loadstore): When a used restrict tag escaped verify that
19 the points-to solution of "other" pointers do not include
21 (compute_dependence_clique): If a used restrict tag escaped
22 communicated that down to visit_loadstore.
24 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
26 * config/s390/s390.c (s390_expand_vec_init): Force vector element
27 into reg if it isn't a general operand.
29 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
32 * config/i386/sse.md (*vec_dupv2di): Add register source to
35 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
38 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
39 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
40 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
41 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
43 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
45 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
46 (notice_args_size): Set it in the current trace if no insn that can
47 throw internally has been seen yet.
48 (connect_traces): When connecting args_size between traces, allow the
49 incoming values not to match if there is an insn setting it before the
50 first insn that can throw internally; in that case, force the creation
51 of a CFI note on this latter insn.
53 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
55 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
56 the base class, because using the injected-class-name was not clearly
57 specified until DR 176.
59 2018-10-12 Paul Koning <ni1d@arrl.net>
61 * config/pdp11/pdp11.md (doloop_end): New expander.
62 (doloop_end_insn): renamed from "doloop_end".
63 (addqi3): New pattern.
64 (subqi3): New pattern.
65 * config/pdp11/predicates.md (incdec_operand): New predicate.
67 2018-10-12 Yury Gribov <tetra2005@gmail.com>
70 * real.c (format_helper::can_represent_integral_type_p): New function
71 * real.h (format_helper::can_represent_integral_type_p): Ditto.
72 * match.pd: New pattern.
74 2018-10-12 Alexandre Oliva <oliva@adacore.com>
76 * configure.ac: Introduce --enable-large-address-aware
77 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
78 * doc/install.texi: Document it.
79 * configure, config.in: Rebuilt.
80 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
81 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
82 (LINK_SPEC): Insert it.
83 * config/i386/mingw-264.h: Likewise.
85 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
87 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
89 PR rtl-optimization/87600
90 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
92 2018-10-12 Paul Koning <ni1d@arrl.net>
94 * doc/md.texi (doloop_end): Document that the pattern code may
95 need to check operand mode.
97 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
99 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
100 to zero-extend between int and floating-point registers.
101 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
102 ldp into floating-point registers. Add type and arch attributes.
103 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
104 Use f_loads for type attribute.
106 2018-10-11 Martin Sebor <msebor@redhat.com>
108 * doc/extend.texi (attribute packed): Correct typos.
110 2018-10-11 Martin Sebor <msebor@redhat.com>
112 * doc/extend.texi (attribute flatten): Mention interaction with
115 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
118 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
119 Set new_decl virtual flag to zero.
121 2018-10-11 Martin Sebor <msebor@redhat.com>
124 * doc/extend.texi (attribute format_arg): Discuss using multiple
125 attributes on a single function.
127 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
129 PR tree-optimization/86829
130 * match.pd (sin (atan (x))): New simplification rules.
131 (cos (atan (x))): Likewise.
132 * real.c (build_sinatan_real): New function.
133 * real.h (build_sinatan_real): Prototype.
135 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
137 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
139 (fold_mergeeo_helper): New helper function.
140 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
141 intrinsics. Correct some whitespace indentation issues.
143 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
146 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
147 Use HOST_WIDE_INT_1U for shift.
149 2018-10-11 Doug Rupp <rupp@adacore.com>
150 Olivier Hainque <hainque@adacore.com>
152 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
153 Pass --relax to the linker for RTPs.
154 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
156 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
157 Jan Hubicka <jh@suse.cz>
158 Martin Jambor <mjambor@suse.cz>
160 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
161 the same elements are repeated rather than printing all of them.
162 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
164 * read-rtl-function.c (test_loading_repeat): New function.
165 (read_rtl_function_c_tests): Call test_loading_repeat.
166 * rtl-tests.c (test_dumping_repeat): New function.
167 (rtl_tests_c_tests): Call test_dumping_repeat.
169 2018-10-11 Richard Biener <rguenther@suse.de>
171 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
172 bdver?_cost): Unify to ...
173 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
174 * config/i386/i386.c (processor_cost_table): Adjust.
176 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
179 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
180 the thunk when expanding to GIMPLE.
182 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
184 * varasm.c (mergeable_string_section): Don't try to move zero-length
185 strings to the merge section.
187 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
190 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
192 2018-10-10 Jakub Jelinek <jakub@redhat.com>
195 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
198 2018-10-10 Richard Biener <rguenther@suse.de>
200 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
201 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
202 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
203 and recursing and pattern terminating the recursion on SSE
204 vector width using ix86_expand_reduc.
205 (reduc_sminmax_scal_<mode>): Split into part reducing to half
206 width and recursing and SSE2 vector variant doing the final
207 reduction with ix86_expand_reduc.
208 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
209 with terminating the recursion at AVX level, splitting that
212 2018-10-09 David Malcolm <dmalcolm@redhat.com>
214 * genmatch.c (error_cb): Rename to...
215 (diagnostic_cb): ...this, converting int params to enums.
216 (fatal_at): Update for renaming.
217 (warning_at): Likewise.
219 * input.c (selftest::ebcdic_execution_charset::apply):
220 Update for renaming of...
221 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
223 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
224 converting level and reason to enums.
225 (class selftest::lexer_error_sink): Rename to...
226 (class selftest::lexer_test_options): ...this, renaming field
227 "m_errors" to "m_diagnostics".
228 (selftest::lexer_test_options::apply): Update for renaming of...
229 (selftest::lexer_test_options::on_error): ...this, renaming to...
230 (selftest::lexer_test_options::on_diagnostic): ...this
231 converting level and reason to enums.
232 (selftest::test_lexer_string_locations_raw_string_unterminated):
233 Update for renamings.
234 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
237 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
239 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
240 * config/rs6000/pmmintrin.h: New file.
242 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
244 PR tree-optimization/86659
245 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
247 2018-10-09 Richard Biener <rguenther@suse.de>
249 PR tree-optimization/63155
250 * tree-ssa-structalias.c: Include tree-ssa.h.
251 (get_constraint_for_ssa_var): For undefs return nothing_id.
252 (find_func_aliases): Cleanup PHI handling.
254 2018-10-09 Richard Biener <rguenther@suse.de>
256 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
259 2018-10-09 Martin Liska <mliska@suse.cz>
261 * asan.c (asan_emit_stack_protection): If a stack variable
262 is located in a same file as current function, then emit
263 line info into variable definition string.
265 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
267 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
270 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
272 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
275 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
277 PR tree-optimization/86659
278 * gimple-match.h (struct gimple_match_op): Add reverse field.
279 (gimple_match_op::set_op): New overloaded method.
280 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
281 the REF_REVERSE_STORAGE_ORDER flag on the value.
282 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
283 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
285 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
288 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
289 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
291 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
294 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
295 Defined with __builtin_ia32_vfmaddsubpd512_mask.
297 2018-10-08 Richard Biener <rguenther@suse.de>
299 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
300 cost the same as AVX128 ones.
302 2018-10-08 Paul Koning <ni1d@arrl.net>
304 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
305 (expand_block_move): New function.
306 * config/pdp11/pdp11.c (output_block_move): Remove.
307 (expand_block_move): New function.
308 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
309 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
310 (*movmemhi1): Remove.
312 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
314 * config/s390/2827.md: Increase latencies for some FP instructions.
316 2018-10-08 Richard Biener <rguenther@suse.de>
318 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
320 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
321 * tree-vectorizer.h (dump_stmt_cost): Adjust.
322 (add_stmt_cost): Dump return value of the hook.
324 2018-10-08 Richard Biener <rguenther@suse.de>
326 PR tree-optimization/63155
327 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
328 (ssa_propagation_engine::ssa_propagate): Remove redundant
331 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
333 PR rtl-optimization/86939
334 PR rtl-optimization/87479
335 * ira.h (non_conflicting_reg_copy_p): New prototype.
336 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
337 (make_hard_regno_dead): Don't add conflicts for register
338 ignore_reg_for_conflicts.
339 (make_object_dead): Likewise.
340 (non_conflicting_reg_copy_p): New function.
341 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
342 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
343 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
344 (make_hard_regno_dead): Don't add conflicts for register
345 ignore_reg_for_conflicts. Remove special conflict handling of
346 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
347 check_pic_pseudo_p and update callers.
348 (mark_pseudo_dead): Don't add conflicts for register
349 ignore_reg_for_conflicts.
350 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
352 2018-10-05 Andrew Waterman <andrew@sifive.com>
353 Jim Wilson <jimw@sifive.com>
355 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
356 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
357 new pattern using HONOR_SNANS that emits one extra instruction.
359 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
361 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
362 patterns): Merge SI and DI patterns to a GPR pattern.
363 (unnamed define_insn and define_split for record form of that): Merge
364 to a single define_insn_and_split pattern.
366 2018-10-05 David Malcolm <dmalcolm@redhat.com>
369 * input.c (expand_location_to_spelling_point): Add param "aspect"
370 and use rather than hardcoding LOCATION_ASPECT_CARET.
371 (get_substring_ranges_for_loc): Handle the case of a single token
372 within a macro expansion.
373 * input.h (expand_location_to_spelling_point): Add "aspect" param,
374 defaulting to LOCATION_ASPECT_CARET.
376 2018-10-05 Paul Koning <ni1d@arrl.net>
378 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
379 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
380 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
381 (pdp11_guard_type): New function.
383 2018-10-05 Paul Koning <ni1d@arrl.net>
385 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
386 * config/pdp11/pdp11.opt (mfloat32): Remove.
388 * doc/invoke.texi (pdp11 -mfloat32): Remove:
389 (pdp11 -mfloat64): Remove.
391 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
393 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
394 (*cmp<mode>_cc_i387): Ditto.
395 (*cmpu<mode>_cc_i387): Ditto.
396 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
397 * config/i386/i386.c (ix86_expand_fp_compare): Remove
399 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
400 Emit x86_sahf_1 pattern.
401 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
402 (ix86_expand_carry_flag_compare): Ditto.
404 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
406 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
407 to reg_or_0_operand. Add "C" constraint.
408 (*cmpxf_cc_i387): Ditto.
409 (*cmp<mode>_i387): Change operand 2 predicate
410 to nonimm_or_0_operand. Add "C" constraint.
411 (*cmp<mode>_cc_i387): Ditto.
412 (*cmp<mode>_0_i387): Remove insn pattern.
413 (*cmp<mode>_0_cc_i387): Ditto.
415 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
417 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
418 * config/i386/predicates.md (nonimm_or_0_operand): Rename
419 from vector_move_operand. Update all uses.
421 2018-10-05 Martin Sebor <msebor@redhat.com>
423 PR tree-optimization/87490
424 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
427 2018-10-05 Richard Biener <rguenther@suse.de>
429 PR tree-optimization/63155
430 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
431 vertical space in dumpfiles.
432 * tree-ssa-propagate.h
433 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
434 * tree-ssa-propagate.c (cfg_blocks_back): New global.
435 (ssa_edge_worklist_back): Likewise.
436 (curr_order): Likewise.
437 (cfg_blocks_get): Remove abstraction.
438 (cfg_blocks_add): Likewise.
439 (cfg_blocks_empty_p): Likewise.
440 (add_ssa_edge): Add to current or next worklist based on
442 (add_control_edge): Likewise.
443 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
445 (ssa_propagation_engine::ssa_propagate): ... here. Unify
446 iteration from CFG and SSA edge worklist so we process
447 everything in RPO order, prioritizing forward progress
449 (ssa_prop_init): Allocate new worklists, do not dump
451 (ssa_prop_fini): Free new worklists.
453 2018-10-05 Richard Biener <rguenther@suse.de>
455 * tree-core.h (tree_block::abstract_flag): Remove.
456 (tree_block::block_num): Make full 32bits.
457 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
458 * tree.h (BLOCK_ABSTRACT): Remove.
459 * dwarf2out.c (gen_lexical_block_die): Remove dead code
460 resulting from BLOCK_ABSTRACT being always false.
461 (gen_inlined_subroutine_die): Likewise.
462 (gen_block_die): Likewise.
463 * tree.c (block_ultimate_origin): Likewise.
464 * tree-pretty-print.c (dump_block_node): Remove code dealing
466 * tree-ssa-live.c (dump_scope_block): Likewise.
467 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
468 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
470 2018-10-05 Richard Biener <rguenther@suse.de>
472 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
473 is asked for initialize mode to the component mode of the
476 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
479 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
481 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
483 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
486 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
488 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
489 to be DImode. When using mffscrn, force the operand to a register.
491 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
493 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
494 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
495 X87MODEF mode iterator.
496 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
497 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
498 X87MODEF mode iterator.
500 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
502 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
505 2018-10-04 David Malcolm <dmalcolm@redhat.com>
507 * Makefile.in (OBJS): Add opt-problem.o.
508 * dump-context.h: Include "selftest.h.
509 (selftest::temp_dump_context): New forward decl.
510 (class dump_context): Make friend of class
511 selftest::temp_dump_context.
512 (dump_context::dump_loc_immediate): New decl.
513 (class dump_pretty_printer): Move here from dumpfile.c.
514 (class temp_dump_context): Move to namespace selftest.
515 (temp_dump_context::temp_dump_context): Add param
516 "forcibly_enable_dumping".
517 (selftest::verify_dumped_text):
518 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
519 (selftest::verify_item):
520 (ASSERT_IS_TEXT): Move here from dumpfile.c.
521 (ASSERT_IS_TREE): Likewise.
522 (ASSERT_IS_GIMPLE): Likewise.
523 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
525 (dump_context::dump_loc_immediate): ...this new function.
526 (class dump_pretty_printer): Move to dump-context.h.
527 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
528 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
529 (temp_dump_context::temp_dump_context): Move to "selftest"
530 namespace. Add param "forcibly_enable_dumping", and use it to
531 conditionalize the use of m_pp;
532 (selftest::verify_dumped_text): Make non-static.
533 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
534 (selftest::verify_item): Make non-static.
535 (ASSERT_IS_TEXT): Move to dump-context.h.
536 (ASSERT_IS_TREE): Likewise.
537 (ASSERT_IS_GIMPLE): Likewise.
538 (selftest::test_capture_of_dump_calls): Pass "true" for new
539 param of temp_dump_context.
540 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
541 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
543 * opt-problem.cc: New file.
544 * opt-problem.h: New file.
545 * optinfo-emit-json.cc
546 (selftest::test_building_json_from_dump_calls): Pass "true" for
547 new param of temp_dump_context.
548 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
549 (optinfo::emit_for_opt_problem): New function.
550 (optinfo::emit): Clarity which emit_item is used.
551 * optinfo.h (optinfo::get_dump_location): New accessor.
552 (optinfo::emit_for_opt_problem): New decl.
553 (optinfo::emit): Make const.
554 * selftest-run-tests.c (selftest::run_tests): Call
555 selftest::opt_problem_cc_tests.
556 * selftest.h (selftest::opt_problem_cc_tests): New decl.
557 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
558 bool to opt_result, converting fprintf messages to
559 opt_result::failure_at calls. Add "stmt" param for use by the
561 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
562 (runtime_alias_check_p): Convert return type from bool to
563 opt_result, converting dump_printf calls to
564 opt_result::failure_at, using the statement DDR_A for their
566 (find_data_references_in_stmt): Convert return type from bool to
567 opt_result, converting "return false" to opt_result::failure_at
569 * tree-data-ref.h: Include "opt-problem.h".
570 (dr_analyze_innermost): Convert return type from bool to opt_result,
571 and add a const gimple * param.
572 (find_data_references_in_stmt): Convert return type from bool to
574 (runtime_alias_check_p): Likewise.
575 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
576 dr_analyze_innermost.
577 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
578 Convert return type from bool to opt_result, adding a message for
579 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
580 (vect_analyze_data_ref_dependence): Convert return type from bool
581 to opt_result. Change sense of return type from "false"
582 effectively meaning "no problems" to "false" meaning a problem,
583 so that "return false" becomes "return opt_result::success".
584 Convert "return true" calls to opt_result::failure_at, using
585 the location of statement A rather than vect_location.
586 (vect_analyze_data_ref_dependences): Convert return type from bool
588 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
589 calls to opt_result::failure_at, using the stmt location rather
591 (vect_verify_datarefs_alignment): Convert return type from bool
593 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
594 into multiple more-tightly-scoped copies.
595 (vect_analyze_data_refs_alignment): Convert return type from bool
597 (vect_analyze_data_ref_accesses): Likewise, converting a
598 "return false" to a "return opt_result::failure_at", adding a
600 (vect_prune_runtime_alias_test_list): Convert return type from
601 bool to opt_result, converting dump_printf_loc to
602 opt_result::failure_at. Add a %G to show the pertinent statement,
603 and use the stmt's location rather than vect_location.
604 (vect_find_stmt_data_reference): Convert return type from
605 bool to opt_result, converting dump_printf_loc to
606 opt_result::failure_at, using stmt's location.
607 (vect_analyze_data_refs): Convert return type from bool to
608 opt_result. Convert "return false" to "return
609 opt_result::failure_at", adding messages as needed.
610 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
611 type from bool to opt_result.
612 (vect_determine_vf_for_stmt): Likewise.
613 (vect_determine_vectorization_factor): Likewise, converting
614 dump_printf_loc to opt_result::failure_at, using location of phi
615 rather than vect_location.
616 (vect_analyze_loop_form_1): Convert return type from bool to
617 opt_result, converting dump_printf_loc calls, retaining the use of
619 (vect_analyze_loop_form): Convert return type from loop_vec_info
620 to opt_loop_vec_info.
621 (vect_analyze_loop_operations): Convert return type from bool to
622 opt_result, converting dump_printf_loc calls, using the location
623 of phi/stmt rather than vect_location where available. Convert
624 various "return false" to "return opt_result::failure_at" with
625 "unsupported phi" messages.
626 (vect_get_datarefs_in_loop): Convert return type from bool to
627 opt_result. Add a message for the
628 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
629 (vect_analyze_loop_2): Convert return type from bool to
630 opt_result. Ensure "ok" is set to a opt_result::failure_at before
631 each "goto again;", adding new messages where needed.
632 Add "unsupported grouped {store|load}" messages.
633 (vect_analyze_loop): Convert return type from loop_vec_info to
635 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
637 * tree-vect-stmts.c (process_use): Likewise, converting
638 dump_printf_loc call and using stmt location, rather than
640 (vect_mark_stmts_to_be_vectorized): Likeise.
641 (vect_analyze_stmt): Likewise, adding a %G.
642 (vect_get_vector_types_for_stmt): Convert return type from bool to
643 opt_result, converting dump_printf_loc calls and using stmt
644 location, rather than vect_location.
645 (vect_get_mask_type_for_stmt): Convert return type from tree to
646 opt_tree, converting dump_printf_loc calls and using stmt location.
647 * tree-vectorizer.c: Include "opt-problem.h.
648 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
649 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
650 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
651 enabled, use it to report at the top level "couldn't vectorize
652 loop" followed by the problem.
653 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
654 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
656 (vect_analyze_stmt): Likewise.
657 (vect_get_vector_types_for_stmt): Likewise.
658 (tree vect_get_mask_type_for_stmt): Likewise.
659 (vect_analyze_data_ref_dependences): Likewise.
660 (vect_enhance_data_refs_alignment): Likewise.
661 (vect_analyze_data_refs_alignment): Likewise.
662 (vect_verify_datarefs_alignment): Likewise.
663 (vect_analyze_data_ref_accesses): Likewise.
664 (vect_prune_runtime_alias_test_list): Likewise.
665 (vect_find_stmt_data_reference): Likewise.
666 (vect_analyze_data_refs): Likewise.
667 (vect_analyze_loop): Convert return type from loop_vec_info to
669 (vect_analyze_loop_form): Likewise.
670 (vect_analyze_slp): Convert return type from bool to opt_result.
672 2018-10-04 David Malcolm <dmalcolm@redhat.com>
674 * doc/invoke.texi (-fopt-info): Document new "internals"
676 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
677 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
679 (optinfo_verbosity_options): Add "internals".
680 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
681 (dump_context::apply_dump_filter_p): New member function.
682 (dump_context::dump_loc): Use apply_dump_filter_p rather than
683 explicitly masking the dump_kind.
684 (dump_context::begin_scope): Increment the scope depth first. Use
685 apply_dump_filter_p rather than explicitly masking the dump_kind.
686 (dump_context::emit_item): Use apply_dump_filter_p rather than
687 explicitly masking the dump_kind.
688 (dump_dec): Likewise.
689 (dump_hex): Likewise.
690 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
691 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
692 (opt_info_switch_p): Update handling of default
693 MSG_OPTIMIZED_LOCATIONS to cope with default of
694 MSG_PRIORITY_USER_FACING.
695 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
696 masking the dump_kind.
697 (selftest::test_capture_of_dump_calls): Update test_dump_context
698 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
699 than MSG_ALL. Generalize scope test to be run at all four
700 combinations of with/without MSG_PRIORITY_USER_FACING and
701 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
702 for each of the two values.
703 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
704 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
705 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
706 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
707 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
709 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
710 dump messages as MSG_PRIORITY_USER_FACING.
711 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
712 about the interaction with MSG_PRIORITY_*.
714 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
716 * varasm.c (output_constant): Add new parameter merge_strings.
717 Make strings properly zero terminated in merge string sections.
718 (mergeable_string_section): Don't fail if the last char is non-zero.
719 (assemble_variable_contents): Handle merge string sections.
720 (assemble_variable): Likewise.
721 (assemble_constant_contents): Likewise.
722 (output_constant_def_contents): Likewise.
723 (output_constructor_array_range,
724 output_constructor_regular_field): Adjust call to output_constant.
725 (output_object_block): Adjust call to assemble_constant_contents
726 and assemble_variable_contents.
728 2018-10-04 Martin Liska <mliska@suse.cz>
731 * cgraphunit.c (process_function_and_variable_attributes):
732 Warn about a function with alias attribute and a body.
734 2018-10-04 Martin Liska <mliska@suse.cz>
737 * multiple_target.c (redirect_to_specific_clone): New function.
738 (ipa_target_clone): Use it.
739 * tree-inline.c: Fix comment.
741 2018-10-04 David Malcolm <dmalcolm@redhat.com>
743 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
745 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
746 (gcc::dump_manager::register_pass): New member function, adapted
747 from loop body in gcc::pass_manager::register_pass, adding a
748 call to update_dfi_for_opt_info.
749 (gcc::dump_manager::opt_info_enable_passes): Store the
750 -fopt-info options into the new fields. Move the loop
752 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
754 * dumpfile.h (struct opt_pass): New forward decl.
755 (gcc::dump_manager::register_pass): New decl.
756 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
757 (class gcc::dump_manager): Add fields "m_optgroup_flags",
758 "m_optinfo_flags", and "m_optinfo_filename".
759 * passes.c (gcc::pass_manager::register_pass): Move all of the
760 dump-handling code to gcc::dump_manager::register_pass.
762 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
764 PR rtl-optimization/87466
765 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
766 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
767 * doc/tm.texi: Regenerate.
768 * ira-lives.c (process_bb_node_lives): Use the new target hook.
769 * lra-lives.c (process_bb_lives): Likewise.
770 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
773 2018-10-04 Tamar Christina <tamar.christina@arm.com>
775 * params.c (add_params): Fix initialization.
777 2018-10-04 Martin Liska <mliska@suse.cz>
779 PR gcov-profile/84107
780 * tree-profile.c (init_ic_make_global_vars):
781 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
782 Come up with new ic_tuple* variables. Emit
783 __gcov_indirect_call{,_topn} variables.
784 (gimple_gen_ic_profiler): Access the variable
786 (gimple_gen_ic_func_profiler): Access
787 __gcov_indirect_call.callee field.
788 (gimple_init_gcov_profiler): Use ptr_type_node.
789 * value-prof.c (gimple_ic): Use ptr_type_node.
791 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
793 PR tree-optimization/85787
794 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
795 into this function and add support for detecting multiple phis.
796 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
798 2018-10-04 Martin Liska <mliska@suse.cz>
801 * ipa-inline.c (inline_to_all_callers_1):
802 Call ultimate_alias_target for node being inlined.
804 2018-10-03 Jeff Law <law@redhat.com>
806 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
808 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
809 * tree.h (get_typenode_from_name): Prototype.
811 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
813 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
814 Change operand 2 predicate to nonimmediate_operand.
815 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
817 2018-10-03 Martin Sebor <msebor@redhat.com>
818 Jeff Law <law@redhat.com>
820 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
822 (get_string_length): Detect unterminated arrays.
823 (format_string): Same.
824 (format_directive): Warn about unterminated arrays.
825 (handle_gimple_call): Mark statements with no_warning as needed.
827 2018-10-03 Jim Wilson <jimw@sifive.com>
829 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
830 also define __riscv_abi_rve. Delete trailing white space.
832 2018-10-03 Paul Koning <ni1d@arrl.net>
834 Enable LRA register allocator for PDP11.
835 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
838 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
839 * config/pdp11/pdp11.opt (-mlra): New option.
840 * doc/invoke.texi (PDP-11 Options): Document -mlra.
842 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
844 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
845 (*<absneg:code>extend<mode>xf2): Ditto.
847 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
849 PR tree-optimization/87415
850 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
853 2018-10-02 Jeff Law <law@redhat.com>
855 * gimple-fold.c (get_range_strlen): Only set *nonstr when
856 an unterminated string is discovered. Bubble up range
857 even for unterminated strings.
858 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
859 indicates the string was not terminated via NONSTR.
861 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
863 * tree-vrp.c (extract_range_from_unary_expr): Special case all
865 Do not do anything special for anti-ranges.
867 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
869 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
870 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
872 2018-10-03 Martin Liska <mliska@suse.cz>
874 PR gcov-profile/86109
875 * coverage.c (coverage_begin_function): Do not
876 mark lambdas as artificial.
877 * tree-core.h (struct GTY): Remove tm_clone_flag
878 and introduce new lambda_function.
879 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
881 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
884 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
885 P8_VECTOR and VSX are enabled.
887 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
889 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
890 0x3907 as CPU model number.
892 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
894 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
895 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
896 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
897 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
898 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
899 * config/s390/s390.md: Likewise. Rename also the cpu attribute
900 value from arch12 to z14.
902 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
904 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
906 (isinf<mode>2): Ditto.
908 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
910 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
911 before emitting fxam. Perform calculations in XFmode.
913 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
915 * match.pd (((X /[ex] A) +- B) * A): New transformation.
917 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
920 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
921 * tree.c (signed_or_unsigned_type_for): Handle complex.
923 2018-10-02 Jeff Law <law@redhat.com>
925 * gimple-fold.c (get_range_strlen): Remove dead code.
927 2018-10-02 Martin Sebor <msebor@redhat.com>
928 Jeff Law <law@redhat.com>
930 * builtins.c (unterminated_array): Add new arguments.
931 If argument is not terminated, bubble up size and exact
933 (expand_builtin_strnlen): Detect, avoid expanding
934 and diagnose unterminated arrays.
935 (c_strlen): Fill in offset of start of unterminated strings.
936 * builtins.h (unterminated_array): Update prototype.
938 2018-10-02 Richard Biener <rguenther@suse.de>
940 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
941 of haddv4df, first reduce to SSE width and exploit the fact
942 that we only need element zero with the reduction result.
943 (reduc_plus_scal_v2df): Likewise.
945 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
947 * dojump.h (do_jump): Delete.
948 (do_jump_1): Likewise.
949 (split_comparison): Move around.
950 * dojump.c (do_jump): Make static.
951 (do_jump_1): Likewise.
952 (jumpifnot): Move around.
953 (jumpifnot_1): Likewise.
955 (jumpif_1): Likewise.
956 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
958 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
960 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
961 insns in the delay slot and add_insn_after for the jump insn.
963 2018-10-02 Richard Biener <rguenther@suse.de>
965 * tree-inline.c (expand_call_inline): Use the location of
966 the callee declaration for the inline-entry marker.
967 * final.c (notice_source_line): Remove special-casing of
968 NOTE_INSN_INLINE_ENTRY.
970 2018-10-01 Carl Love <cel@us.ibm.com>
973 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
974 (__builtin_mtfsb0): New.
975 (__builtin_mtfsb1): New.
976 ( __builtin_set_fpscr_rn): New.
977 (__builtin_set_fpscr_drn): New.
978 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
979 (rs6000_expand_set_fpscr_rn_builtin): Add.
980 (rs6000_expand_set_fpscr_drn_builtin): Add.
981 (rs6000_expand_builtin): Add case statement entries for
982 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
983 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
984 RS6000_BUILTIN_MFFSL.
985 (rs6000_init_builtins): Add ftype initialization and def_builtin
986 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
987 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
988 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
989 rs6000_mffscdrn): Add define_insn.
990 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
991 * doc/extend.texi: Add documentation for the builtins.
993 2018-10-01 Richard Biener <rguenther@suse.de>
995 PR tree-optimization/87465
996 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
997 causing branch miscounts.
999 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1001 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1002 aarch64_option_default_param): New.
1003 (params.h): Include.
1004 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1005 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1006 stack-clash protection validation code.
1008 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1010 * params.c (validate_param): New.
1011 (add_params): Use it.
1012 (set_param_value): Refactor param validation into validate_param.
1013 (diagnostic.h): Include.
1014 * diagnostic.h (diagnostic_ready_p): New.
1016 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1018 * params.c (set_param_value):
1019 Add index of parameter being validated.
1020 * common/common-target.def (option_validate_param): New.
1021 * common/common-targhooks.h (default_option_validate_param): New.
1022 * common/common-targhooks.c (default_option_validate_param): New.
1023 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1024 * doc/tm.texi: Regenerate.
1026 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1029 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1030 Add validation for stack-clash parameters and set defaults.
1032 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1035 * configure.ac: Add stack-clash-protection-guard-size.
1036 * doc/install.texi: Document it.
1037 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1038 * params.def: Update comment for guard-size.
1039 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1040 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1041 * configure: Regenerate.
1043 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1046 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1047 STACK_DYNAMIC_OFFSET): New.
1048 * config/aarch64/aarch64.c (aarch64_layout_frame):
1049 Update outgoing args size.
1050 (aarch64_stack_clash_protection_alloca_probe_range,
1051 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1053 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1056 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1058 * target.def (stack_clash_protection_alloca_probe_range): New.
1059 (stack_clash_protection_final_dynamic_probe): Remove.
1060 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1061 (default_stack_clash_protection_final_dynamic_probe): Remove.
1062 * targhooks.c: Likewise.
1063 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1064 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1065 * doc/tm.texi: Regenerate.
1067 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1070 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1071 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1072 aarch64_clamp_to_uimm12_shift): New.
1073 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1074 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1076 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1079 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1081 2018-10-01 Jeff Law <law@redhat.com>
1082 Richard Sandiford <richard.sandiford@linaro.org>
1083 Tamar Christina <tamar.christina@arm.com>
1086 * config/aarch64/aarch64.md
1087 (probe_stack_range): Add k (SP) constraint.
1088 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1089 STACK_CLASH_MAX_UNROLL_PAGES): New.
1090 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1091 stack probes for stack clash.
1092 (aarch64_allocate_and_probe_stack_space): New.
1093 (aarch64_expand_prologue): Use it.
1094 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1095 (aarch64_sub_sp): Add emit_move_imm optional param.
1097 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
1099 PR tree-optimization/87261
1100 * match.pd: Remove trailing whitespace.
1101 Add (x & y) | ~(x | y) -> ~(x ^ y),
1102 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1104 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1106 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1108 (ashlsi3_insn): Update instruction constraints.
1109 (ashrsi3_insn): Likewise.
1110 (rotrsi3): Likewise.
1111 (add_shift): Likewise.
1112 * config/arc/constraints.md (Csz): New 32 bit constraint. It
1113 avoids placing in the limm field small constants which, otherwise,
1114 could end into a small instruction.
1116 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1118 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1119 destination register is not odd-even.
1120 (umaddsidi4_split): Likewise.
1122 2018-10-01 Richard Biener <rguenther@suse.de>
1124 * tree-inline.c (expand_call_inline): Store origin of fn
1125 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1126 * tree.c (block_ultimate_origin): Simplify and do some
1129 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1131 * config/i386/mmx.md (EMMS): New int iterator.
1132 (emms): New int attribute.
1133 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1134 EMMS int iterator. Explicitly declare clobbers.
1135 (mmx_emms): Remove expander.
1137 * config/i386/predicates.md (emms_operation): Remove predicate.
1138 (vzeroall_pattern): New predicate.
1139 (vzeroupper_pattern): Rename from vzeroupper_operation.
1140 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1141 vzeroupper_pattern and vzeroall_pattern predicates.
1143 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1145 PR rtl-optimization/86939
1146 * ira-lives.c (make_hard_regno_born): Rename from this...
1147 (make_hard_regno_live): ... to this. Remove update to conflict
1148 information. Update function comment.
1149 (make_hard_regno_dead): Add conflict information update. Update
1151 (make_object_born): Rename from this...
1152 (make_object_live): ... to this. Remove update to conflict information.
1153 Update function comment.
1154 (make_object_dead): Add conflict information update. Update function
1156 (mark_pseudo_regno_live): Call make_object_live.
1157 (mark_pseudo_regno_subword_live): Likewise.
1158 (mark_hard_reg_dead): Update function comment.
1159 (mark_hard_reg_live): Call make_hard_regno_live.
1160 (process_bb_node_lives): Likewise.
1161 * lra-lives.c (make_hard_regno_born): Rename from this...
1162 (make_hard_regno_live): ... to this. Remove update to conflict
1163 information. Remove now uneeded check_pic_pseudo_p argument.
1164 Update function comment.
1165 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1166 to conflict information. Update function comment.
1167 (mark_pseudo_live): Remove update to conflict information. Update
1169 (mark_pseudo_dead): Add conflict information update.
1170 (mark_regno_live): Call make_hard_regno_live.
1171 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1172 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1174 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1177 * config/i386/i386.c (construct_container): Use TImode for
1178 BLKmode values in 2 integer registers.
1180 2018-09-29 Jeff Law <law@redhat.com>
1182 * builtins.c (unterminated_array): Pass in c_strlen_data * to
1183 c_strlen rather than just a tree *.
1184 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1185 Update recursive calls appropriately. If caller did not provide a
1186 suitable data pointer, create a local one. When a non-terminated
1187 string is discovered, bubble up information about the string via the
1188 c_strlen_data object.
1189 * builtins.h (c_strlen): Update prototype.
1190 (c_strlen_data): New structure.
1191 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1192 For a type 2 call, if c_strlen indicates a non-terminated string
1193 use the length of the non-terminated string.
1194 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1196 2018-09-29 Jakub Jelinek <jakub@redhat.com>
1199 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1200 __m512d type for __A argument rather than __m512.
1202 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
1204 * match.pd (simple_comparison): Don't optimize if either operand is
1205 a function pointer when target needs function pointer canonicalization.
1207 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1209 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1210 power5 .. power9 to remove indirection.
1211 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1212 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1213 ASM_CPU_476_SPEC): Delete.
1214 (ASM_CPU_SPEC): Adjust.
1215 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1216 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1218 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1220 * config.in: Delete HAVE_AS_DCI.
1221 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1222 * config/rs6000/rs6000.h: Ditto.
1223 * configure.ac: Delete HAVE_AS_DCI.
1224 * configure: Regenerate.
1226 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1228 * config.in (HAVE_AS_LWSYNC): Delete.
1229 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1230 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1232 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1233 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1235 * configure.ac: Delete HAVE_AS_LWSYNC.
1236 * configure: Regenerate.
1238 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1239 Pierre-Marie de Rodat <derodat@adacore.com>
1241 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1242 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1243 (cgraph_node::create_thunk): Add indirect_offset parameter.
1244 (thunk_adjust): Likewise.
1245 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1246 and initialize the corresponding field with it.
1247 (cgraph_node::dump): Dump indirect_offset field.
1248 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1249 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1250 (thunk_adjust): Add indirect_offset parameter and deal with it.
1251 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1252 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1253 or if the thunk is external or local. Fix formatting. Do not chain
1254 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1255 if any, in the GIMPLE representation.
1256 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1257 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1258 (input_node): Read indirect_offset field.
1259 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1260 call to thunk_adjust.
1261 * tree-nested.c (struct nesting_info): Add thunk_p field.
1262 (create_nesting_tree): Set it.
1263 (convert_all_function_calls): Copy static chain from targets to thunks.
1264 (finalize_nesting_tree_1): Return early for thunks.
1265 (unnest_nesting_tree_1): Do not finalize thunks.
1266 (gimplify_all_functions): Do not gimplify thunks.
1268 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1270 * opt-suggestions.c (option_proposer::build_option_suggestions):
1271 Release "option_values".
1273 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1275 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1276 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1277 * dumpfile.c (kind_as_string): New function.
1278 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1279 kind_as_string to vary the prefix based on dump_kind.
1280 (selftest::test_capture_of_dump_calls): Update for above.
1282 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1284 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1285 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1287 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1289 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1290 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1291 INVALID_REGNUM instead of FPSR_REG.
1292 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1293 * config/i386/i386.md: Update comment of FP compares.
1294 (fldenv): Do not clobber FPSR_REG.
1296 2018-09-28 Richard Biener <rguenther@suse.de>
1298 * tree.h (BLOCK_ORIGIN): New.
1299 * omp-expand.c (grid_expand_target_grid_body): Assign
1300 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1301 * tree-inline.c (remap_block): Likewise.
1302 * auto-profile.c (get_function_decl_from_block): Simplify
1303 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1304 * langhooks.c (lhd_print_error_function): Likewise.
1305 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1307 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1308 * tree.c (block_nonartificial_location): Likewise.
1309 (block_ultimate_origin): Likewise.
1310 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1311 no longer needed LTO case.
1313 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1314 Jan Hubicka <jh@suse.cz>
1315 Martin Jambor <mjambor@suse.cz>
1317 * simplify-rtx.c (simplify_merge_mask): New function.
1318 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1319 same masks are used in op1 or op2.
1320 (test_vec_merge): New function.
1321 (test_vector_ops): Call test_vec_merge.
1323 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1325 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1326 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1327 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1328 (cypress_costs): Set it.
1329 (supersparc_costs): Likewise.
1330 (hypersparc_costs): Likewise.
1331 (leon_cost): Likewise.
1332 (leon3_costs): Likewise.
1333 (sparclet_costs): Likewise.
1334 (ultrasparc_costs): Likewise.
1335 (ultrasparc_costs): Likewise.
1336 (niagara_costs): Likewise.
1337 (niagara2_costs): Likewise.
1338 (niagara3_costs): Likewise.
1339 (niagara4_costs): Likewise.
1340 (niagara7_costs): Likewise.
1341 (m8_costs): Likewise.
1342 (TARGET_CAN_FOLLOW_JUMP): Define.
1343 (pass_work_around_errata::gate): Minor tweak.
1344 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1345 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1346 Automaitcally clear MASK_FSMULD mask for V7 processors.
1347 (sparc_can_follow_jump): New static function.
1348 (output_ubranch): Deal with CROSSING_JUMP_P.
1349 (sparc_use_sched_lookahead): Rewrite using switch statement.
1350 (sparc_issue_rate): Reorder.
1351 (sparc_branch_cost): New function.
1353 2018-09-27 Martin Sebor <msebor@redhat.com>
1355 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1356 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1357 (int_fits_type_p): Same.
1359 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1361 * config/i386/i386.md (FPCR_REG): Remove.
1362 (UNSPEC_FLDCW): Remove.
1363 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1364 (x86_fldcw_1): Remove insn pattern.
1365 (fnstenv): Do not clobber FPCR_REG.
1367 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1368 (CALL_USED_REGISTERS): Ditto.
1369 (REG_ALLOC_ORDER): Ditto.
1370 (REG_CLASS_CONTENTS): Ditto.
1371 (HI_REGISTER_NAMES): Ditto.
1372 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1373 of numerical constants.
1374 * config/i386/i386.c (regclass_map): Remove fpsr register.
1375 (dbx_register_map): Ditto.
1376 (dbx64_register_map): Ditto.
1377 (svr4_dbx_register_map): Ditto.
1378 (print_reg): Do not handle FPCR_REG.
1380 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1383 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1384 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1385 Delete, always treat as true.
1386 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1387 Ditto. Simplify remaining code.
1388 * config/powerpcspe/powerpcspe.h: Ditto.
1389 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1390 Simplify remaining code.
1391 (rs6000_expand_builtin): Ditto.
1392 * config/rs6000/rs6000.h: Ditto.
1393 * configure.ac: Ditto.
1394 * configure: Regenerate.
1396 2018-09-27 Martin Liska <mliska@suse.cz>
1398 * coverage.c (get_coverage_counts): Revert the formatting
1399 of missing profile opt info.
1401 2018-09-27 Richard Biener <rguenther@suse.de>
1405 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1406 block as we do not output that.
1407 (gen_inlined_subroutine_die): Elide the originally outermost
1408 block, matching what we do for concrete instances.
1409 (decls_for_scope): Add parameter specifying whether to recurse
1412 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1413 Tom de Vries <tom@codesourcery.com>
1417 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1418 STORE_FLAG_VALUE == 1.
1420 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1422 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1423 constant definitions.
1424 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1425 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1426 ("speculation_barrier"): New expander definition.
1428 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1430 PR gcov-profile/86957
1431 * common.opt: New warning option -Wmissing-profile.
1432 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1433 * doc/invoke.texi: Document -Wmissing-profile.
1435 2018-09-26 Jim Wilson <jimw@sifive.com>
1437 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1438 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1440 2018-09-26 Martin Sebor <msebor@redhat.com>
1442 * tree.c (zerop): Change return type to bool.
1443 (integer_zerop, integer_onep, integer_each_onep): Same.
1444 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1445 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1446 (real_onep, real_minus_onep, chain_index): Same.
1447 (print_type_hash_statistics, type_list_equal): Same.
1448 * tree.h (zerop): Same.
1449 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1450 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1451 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1452 (real_onep, real_minus_onep, chain_index): Same.
1453 (print_type_hash_statistics, type_list_equal): Same.
1455 2018-09-26 Jim Wilson <jimw@sifive.com>
1457 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1459 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1462 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1463 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1466 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1468 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1470 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1472 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1473 and FP_SECOND_SSE_REGS.
1474 (REG_CLASS_NAMES): Ditto.
1475 (REG_CLASS_CONTENTS): Ditto.
1476 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1477 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1478 (ix86_preferred_output_reload_class): Ditto.
1479 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1480 clobber constraint to "=&f".
1481 (fix_truncdi_i387): Ditto.
1482 (lrintxfdi2): Ditto.
1483 (fistdi2_<rounding>): Ditto.
1484 (fpremxf4_i387): Change "=u" constraint to "=f".
1485 (fprem1xf4_i387): Ditto.
1487 (fptanxf4_i387): Ditto.
1488 (fxtractxf3_i387): Ditto.
1489 (fscalexf4_i387): Ditto.
1490 (atan2xf3): Change "u" constraint to "f".
1491 (fyl2xxf3_i387): Ditto.
1492 (fyl2xp1xf3_i387): Ditto.
1494 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1497 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1498 for removed I387_MASK_PM entity.
1501 2018-09-26 Jeff Law <law@redhat.com>
1503 2018-09-26 Alexey Neyman <stilor@att.net>
1505 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1506 headers are no longer pulled in by <isl/val.h>.
1508 2018-09-26 Richard Biener <rguenther@suse.de>
1511 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1512 or concrete instance DIE to the tree. Create abstract origin
1513 attributes also for concrete instances.
1515 2018-09-26 Alexey Neyman <stilor@att.net>
1517 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1518 headers are no longer pulled in by <isl/val.h>.
1520 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1522 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1523 Use new helper functions.
1524 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1525 Use new helper functions.
1526 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1527 aarch_mm_needs_release): New declarations.
1528 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1529 aarch_mm_needs_release): New.
1531 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1533 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1534 (arm32_output_mi_thunk): Deal with long calls.
1536 2018-09-26 Richard Biener <rguenther@suse.de>
1540 * tree-inline.c (expand_call_inline): When the location
1541 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1542 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1543 the inserted BLOCK to make inlined_function_outer_scope_p
1545 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1546 coords for reserved locations.
1548 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1550 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1551 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1552 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1553 (*sibcall_nonlocal_sysv<mode>): Ditto.
1554 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1555 (<bd>_<mode>): Ditto.
1556 (<bd>tf_<mode>): Ditto.
1558 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1560 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1561 control string as a list of templates instead of as C code.
1562 (*altivec_movti): Ditto.
1563 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1565 2018-09-25 Jim Wilson <jimw@sifive.com>
1567 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1568 when target symbol is weak.
1570 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1573 * builtins.c (unterminated_array): Simplify.
1574 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1575 where pointer arithmetic is safe.
1577 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1580 * config/rs6000/altivec.md (altivec_vspltb): Use
1581 const_0_to_15_operand instead of u5bit_cint_operand.
1582 (*altivec_vspltb_internal): Ditto.
1583 (altivec_vspltb_direct): Ditto.
1584 (altivec_vsplth): Use const_0_to_7_operand instead of
1586 (*altivec_vsplth_internal): Ditto.
1587 (altivec_vsplth_direct): Ditto.
1588 (altivec_vspltw): Use const_0_to_3_operand instead of
1590 (*altivec_vspltw_internal): Ditto.
1591 (altivec_vspltw_direct): Ditto.
1592 (altivec_vspltsf): Ditto.
1593 (*altivec_vspltsf_internal): Ditto.
1594 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1595 various splats with the proper size immediate. Reorder the various
1596 cases by ascending size of immediate, and put all such together.
1598 2018-09-25 Richard Biener <rguenther@suse.de>
1601 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1603 (maybe_create_die_with_external_ref): Do not create
1604 DW_TAG_imported_unit here.
1605 (add_abstract_origin_attribute): Handle external BLOCK refs.
1606 (dwarf2out_abstract_function): Simplify LTO case.
1607 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1608 rather than using maybe_create_die_with_external_ref.
1610 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1613 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1614 (frndintxf2_mask_pm_i387): Ditto.
1615 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1616 Enable for !flag_trapping_math.
1617 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1618 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1619 Change operand 1 predicate to nonimmediate_operand.
1620 (attr "i387_cw"): Remove mask_pm.
1621 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1622 (enum ix86_entity): Remove I387_MASK_PM.
1623 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1624 handle I387_MASK_PM.
1625 (ix86_mode_needed): Ditto.
1626 (ix86_mode_after): Ditto.
1627 (ix86_mode_entry): Ditto.
1628 (ix86_mode_exit): Ditto.
1629 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1631 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1633 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1634 to_update_switch_stmts to vNULL instead of calling create on them
1637 2018-09-25 Richard Biener <rguenther@suse.de>
1639 PR tree-optimization/87402
1640 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1641 (visit_phi): Re-instantiate handling of supposed to be VARYING
1642 but non-VARYING backedge value.
1644 2018-09-25 Richard Biener <rguenther@suse.de>
1647 * dwarf2out.c (struct sym_off_pair): New.
1648 (external_die_map): New global.
1649 (lookup_decl_die): When in LTO create DIEs lazily from the
1651 (lookup_block_die): New function, create DIEs lazily in LTO.
1652 (equate_block_to_die): New function.
1653 (dwarf2out_die_ref_for_decl): During WPA get the association
1654 from the external DIE map.
1655 (dwarf2out_register_external_die): Record mapping into the
1657 (maybe_create_die_with_external_ref): New function split out from
1658 DIE generation part of old dwarf2out_register_external_die.
1659 (add_abstract_origin_attribute): Do not return the DIE. When
1660 in LTO reference externals directly.
1661 (dwarf2out_abstract_function): When in LTO ignore calls for
1662 decls with external DIEs (already present abstract instances).
1663 (gen_call_site_die): Adjust.
1664 (add_high_low_attributes): Likewise.
1665 (gen_lexical_block_die): Likewise.
1666 (gen_inlined_subroutine_die): Likewie.
1667 (gen_block_die): Likewise.
1668 (dwarf2out_inline_entry): Likewise.
1669 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1672 2018-09-25 Martin Liska <mliska@suse.cz>
1674 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1675 integers and not by a float value.
1677 2018-09-25 Martin Liska <mliska@suse.cz>
1680 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1682 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1683 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1684 * godump.c (go_format_type): Remove extra parenthesis.
1686 2018-09-25 Martin Liska <mliska@suse.cz>
1688 * alias.c (set_dest_equal_p): Remove unused function.
1689 * config/i386/i386.c (def_builtin_pure2): Likewise.
1690 * diagnostic-show-locus.c (class layout): Remove
1692 (layout::layout): Likewise here.
1693 * dump-context.h (class temp_dump_context): Likewise.
1694 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1695 (add_AT_loclistsptr): Likewise.
1696 (add_AT_offset): Likewise.
1697 (get_AT_hi_pc): Likewise.
1698 (is_comdat_die): Likewise.
1699 (type_is_enum): Likewise.
1700 (ceiling): Likewise.
1701 (add_AT_vms_delta): Likewise.
1702 (is_class_die): Likewise.
1703 * edit-context.c (class line_event): Remove unused field.
1704 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1706 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1707 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1708 (ok_for_base_p_nonstrict): Likewise.
1709 * tree-chrec.c (is_not_constant_evolution): Likewise.
1710 (chrec_fold_poly_cst): Likewise.
1711 * tree-if-conv.c (has_pred_critical_p): Likewise.
1712 * tree-ssa-coalesce.c (print_exprs): Likewise.
1713 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1714 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1715 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1716 (value_range_nonnegative_p): Likewise.
1718 2018-09-25 Martin Liska <mliska@suse.cz>
1720 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1721 Do not handle "GNU Pascal".
1722 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1724 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1725 from documentation. Likewise.
1726 * dbxout.c (dbxout_range_type): Likewise.
1727 * doc/cpp.texi: Likewise.
1728 * doc/extend.texi: Likewise.
1729 * doc/frontends.texi: Likewise.
1730 * doc/invoke.texi: Remove Pascal entry.
1731 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1732 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1734 2018-09-25 Martin Liska <mliska@suse.cz>
1737 * doc/invoke.texi: Document all parameters and remove default
1740 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1743 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1744 contains HOST_WIDE_INTs when computing its size.
1746 2018-09-24 Jim Wilson <jimw@sifive.com>
1749 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1751 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1753 2018-09-24 Andrew Pinski <apinski@marvell.com>
1755 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1756 access prev before checking it for NULLness in the
1757 AARCH64_FUSE_CMP_BRANCH case.
1759 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1762 * config/i386/i386.c (rest_of_insert_endbranch): Set
1763 endbr_queued_at_entrance to true and don't insert ENDBR if
1764 x86_function_profiler will be called.
1765 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1767 * config/i386/i386.h (machine_function): Add
1768 endbr_queued_at_entrance.
1770 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1772 * genattrtab.c (mk_attr_alt): Use alternative_mask.
1773 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1775 (check_attr_test): Use alternative_mask.
1776 (get_attr_value): Likewise.
1777 (compute_alternative_mask): Use alternative_mask and XWINT.
1778 (make_alternative_compare): Use alternative_mask.
1779 (attr_alt_subset_p): Use XWINT.
1780 (attr_alt_subset_of_compl_p): Likewise.
1781 (attr_alt_intersection): Use alternative_mask and XWINT.
1782 (attr_alt_union): Likewise.
1783 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1784 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1785 (simplify_test_exp): Use alternative_mask and XWINT.
1786 (write_test_expr): Use alternative_mask and XWINT, adjust bit
1787 number calculation to support 64 bits. Generate code that
1788 checks 64-bit masks.
1789 (main): Use alternative_mask.
1790 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1792 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1795 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1796 RETURN+USE when returning via %r14.
1798 2018-09-24 Martin Liska <mliska@suse.cz>
1800 * gcov.c (output_lines): Print colorization legend
1801 for both flag_use_colors and flag_use_hotness_colors.
1804 2018-09-24 Martin Liska <mliska@suse.cz>
1806 * coverage.c (get_coverage_counts): Use warning_at
1807 with current_function_decl location. Use %qD in warning
1810 2018-09-24 Martin Liska <mliska@suse.cz>
1812 * memory-block.h (memory_block_pool::release): Annotate with
1813 valgrind that the memory is not accessible.
1815 2018-09-24 Martin Liska <mliska@suse.cz>
1818 * asan.c: Make asan_handled_variables extern.
1820 * cfgexpand.c (expand_stack_vars): Make sure
1821 a representative is unpoison if another
1822 variable in the partition is handled by
1823 use-after-scope sanitization.
1825 2018-09-24 Richard Biener <rguenther@suse.de>
1827 PR tree-optimization/63155
1828 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1829 the worklist when the edge of the respective argument isn't
1832 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1834 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1835 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1836 (MASK_CLASS_P): Update for rename.
1837 (MAYBE_MASK_CLASS_P): Ditto.
1838 (REG_CLASS_NAMES): Update.
1839 (REG_CLASS_CONTENT): Update.
1840 * config/i386/i386.c (regclass_map): Update for MASK_REG
1841 and ALL_MASK_REGS rename.
1842 * config/i386/constraints.md (Yk): Update for rename.
1845 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1847 * config/i386/i386.h (enum reg_class): Remove
1848 EVEX_SSE_REGS and MOD4_SSE_REGS.
1849 (REG_CLASS_NAMES): Update.
1850 (REG_CLASS_CONTENT): Update.
1851 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1852 registers as ALL_SSE_REGS.
1853 (ix86_additional_allocno_class_p): Remove.
1854 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1855 (ix86_register_priority): Lower priority of EVEX SSE registers.
1856 Use IN_RANGE macro where appropriate.
1857 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1858 AVX-5124VNNIW checks.
1859 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1860 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1861 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1862 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1863 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1864 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1865 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1866 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1867 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1868 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1869 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1870 * config/i386/constraints.md (Yh): Remove.
1872 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1874 * config/i386/i386.c (regclass_map): Declare integer REX registers
1877 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
1879 * doc/service.texi (Service): Switch the fsf.org link to https.
1881 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
1884 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1885 Define to speculation_safe_value_not_needed.
1887 2018-09-21 Florian Weimer <fweimer@redhat.com>
1890 * doc/extend.texi (Common Function Attributes): Mention that
1891 noreturn suppresses tail call optimization.
1893 2018-09-21 Jeff Law <law@redhat.com>
1895 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1896 vr_values::cleanup_edges_and_switches.
1897 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1899 (identify_jump_threads): Remove EDGE_IGNORE handling.
1900 (execute_vrp): Move handling of to_remove_edges and
1901 to_update_switch_stmts into vr_values class member functions.
1902 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1903 (to_update_switch_stmts): Likewise.
1904 * vr-values.c: Include cfghooks.h.
1905 (vr_values::vr_values): Initialize to_remove_edges and
1906 to_update_switch_stmts.
1907 (vr_values::~vr_values): Verify to_remove_edges and
1908 to_update_switch_stmts are empty.
1909 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1910 (vr_values::cleanup_edges_and_switches): New member function.
1911 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1912 function. Add new data members.
1914 2018-09-21 David Malcolm <dmalcolm@redhat.com>
1916 PR tree-optimization/87309
1917 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1918 calls with pflags and alt_flags.
1919 (selftest::test_capture_of_dump_calls): Add test of interaction of
1920 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1922 2018-09-21 Olivier Hainque <hainque@adacore.com>
1924 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1926 2018-09-21 Olivier Hainque <hainque@adacore.com>
1928 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1930 2018-09-21 Olivier Hainque <hainque@adacore.com>
1932 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1933 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1934 (VXWORKS_LIBS_RTP): Minor reordering.
1936 2018-09-21 Olivier Hainque <hainque@adacore.com>
1938 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1939 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1941 2018-09-21 Olivier Hainque <hainque@adacore.com>
1943 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1944 (PTRDIFF_TYPE): Likewise.
1946 2018-09-21 Olivier Hainque <hainque@adacore.com>
1948 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1949 triplet, similar to support for VxWorks7.
1950 * config/vxworks-dummy.h: Provide a default definition
1951 of TARGET_VXWORKS64 to 0.
1953 2018-09-21 Olivier Hainque <hainque@adacore.com>
1955 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1956 * config/vxworks-dummy.h: here.
1958 2018-09-21 Olivier Hainque <hainque@adacore.com>
1960 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1962 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
1963 Bo Zhou <zbo.zhou@hisilicon.com>
1965 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1966 * config/aarch64/aarch64-tune.md: Regenerated.
1967 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1968 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1969 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1971 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
1972 Julian Brown <julian@codesourcery.com>
1974 * builtins.c (get_builtin_sync_mem): Handle address spaces.
1976 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1978 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1979 if the call takes a static chain.
1981 2018-09-21 Martin Liska <mliska@suse.cz>
1983 * auto-profile.c (autofdo_source_profile::read): Do not
1985 (read_profile): Do not add working sets.
1986 (read_autofdo_file): Remove sum_all.
1987 (afdo_callsite_hot_enough_for_early_inline): Remove const
1989 * coverage.c (struct counts_entry): Remove gcov_summary.
1990 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1991 do not support GCOV_TAG_PROGRAM_SUMMARY.
1992 (get_coverage_counts): Remove summary and expected
1994 * coverage.h (get_coverage_counts): Likewise.
1995 * doc/gcov-dump.texi: Remove -w option.
1996 * gcov-dump.c (dump_working_sets): Remove.
1997 (main): Do not support '-w' option.
1998 (print_usage): Likewise.
1999 (tag_summary): Likewise.
2000 * gcov-io.c (gcov_write_summary): Do not dump
2002 (gcov_read_summary): Likewise.
2003 (gcov_histo_index): Remove.
2004 (gcov_histogram_merge): Likewise.
2005 (compute_working_sets): Likewise.
2006 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2008 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2009 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2010 (GCOV_HISTOGRAM_SIZE): Remove.
2011 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2012 (struct gcov_summary): Simplify rapidly just
2013 to runs and sum_max fields.
2014 (gcov_histo_index): Remove.
2015 (NUM_GCOV_WORKING_SETS): Likewise.
2016 (compute_working_sets): Likewise.
2017 * gcov-tool.c (print_overlap_usage_message): Remove
2018 trailing empty line.
2019 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2020 (output_lines): Remove program related line.
2021 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2022 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2024 (input_profile_summary): Do not read it.
2025 (merge_profile_summaries): And do not merge it.
2026 (input_symtab): Do not call removed function.
2027 * modulo-sched.c (sms_schedule): Do not print sum_max.
2028 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2029 removed when histogram method was invented.
2030 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2032 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2034 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2035 and dump selected value.
2036 * profile.c (add_working_set): Remove.
2037 (get_working_sets): Likewise.
2038 (find_working_set): Likewise.
2039 (get_exec_counts): Do not work with working sets.
2040 (read_profile_edge_counts): Do not inform as sum_max is removed.
2041 (compute_branch_probabilities): Likewise.
2042 (compute_value_histograms): Remove argument for call of
2043 get_coverage_counts.
2044 * profile.h: Do not make gcov_summary const.
2046 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
2048 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2050 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2052 PR tree-optimization/86990
2053 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2054 Check that the entire merged store group is made of constants only for
2057 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
2059 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2060 (VTABLE_VERIFICATION_SPEC): Likewise.
2061 (SANITIZER_EARLY_SPEC): Likewise.
2062 (SANITIZER_SPEC): Likewise.
2063 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2064 * doc/invoke.texi (Link Options): Document -r.
2066 2018-09-20 Richard Biener <rguenther@suse.de>
2069 * gimplify.c (gimplify_expr): Retain alignment of
2070 addressable lvalue in dereference.
2072 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
2075 * configure.ac: Check for .loc is_stmt support.
2076 * configure, config.in: Rebuilt.
2077 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2080 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2082 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2083 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2086 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2088 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2090 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2093 2018-09-20 Marek Polacek <polacek@redhat.com>
2095 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2097 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2099 PR tree-optimization/87288
2100 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2101 into account when determining PEELING_FOR_NITERS.
2103 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2105 PR tree-optimization/86877
2106 * tree-vect-loop.c (vect_analyze_loop_2): Call
2107 vect_verify_datarefs_alignment.
2109 2018-09-19 Marek Polacek <polacek@redhat.com>
2111 * doc/invoke.texi: Document -Wclass-conversion.
2113 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2115 * config/pa/pa.c (pa_adjust_priority): Delete.
2116 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2118 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2119 (atomic_storehi): Likewise.
2120 (atomic_storesi): Likewise.
2121 (atomic_loaddi): Restore compare and swap exchange loop code.
2123 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2125 PR rtl-optimization/86902
2126 * combine.c (try_combine): When changing the CC mode used, don't change
2127 an unrelated mode in other_insn to that new CC mode.
2129 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2131 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2132 with %T in place of calls to dump_generic_expr.
2133 (prune_runtime_alias_test_list): Likewise.
2134 (create_runtime_alias_checks): Likewise.
2135 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2136 (vect_analyze_data_ref_dependence): Likewise.
2137 (vect_slp_analyze_data_ref_dependence): Likewise.
2138 (vect_record_base_alignment): Likewise. Use %G in place of call
2139 to dump_gimple_stmt.
2140 (vect_compute_data_ref_alignment): Likewise.
2141 (verify_data_ref_alignment): Likewise.
2142 (vect_find_same_alignment_drs): Likewise.
2143 (vect_analyze_group_access_1): Likewise.
2144 (vect_analyze_data_ref_accesses): Likewise.
2145 (dependence_distance_ge_vf): Likewise.
2146 (dump_lower_bound): Likewise.
2147 (vect_prune_runtime_alias_test_list): Likewise.
2148 (vect_find_stmt_data_reference): Likewise.
2149 (vect_analyze_data_refs): Likewise.
2150 (vect_create_addr_base_for_vector_ref): Likewise.
2151 (vect_create_data_ref_ptr): Likewise.
2152 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2153 (vect_can_advance_ivs_p): Likewise.
2154 (vect_update_ivs_after_vectorizer): Likewise.
2155 (vect_gen_prolog_loop_niters): Likewise.
2156 (vect_prepare_for_masked_peels): Likewise.
2157 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2158 (vect_determine_vectorization_factor): Likewise.
2159 (vect_is_simple_iv_evolution): Likewise.
2160 (vect_analyze_scalar_cycles_1): Likewise.
2161 (vect_analyze_loop_operations): Likewise.
2162 (report_vect_op): Likewise.
2163 (vect_is_slp_reduction): Likewise.
2164 (check_reduction_path): Likewise.
2165 (vect_is_simple_reduction): Likewise.
2166 (vect_create_epilog_for_reduction): Likewise.
2167 (vect_finalize_reduction:): Likewise.
2168 (vectorizable_induction): Likewise.
2169 (vect_transform_loop_stmt): Likewise.
2170 (vect_transform_loop): Likewise.
2171 (optimize_mask_stores): Likewise.
2172 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2173 (vect_split_statement): Likewise.
2174 (vect_recog_over_widening_pattern): Likewise.
2175 (vect_recog_average_pattern): Likewise.
2176 (vect_determine_min_output_precision_1): Likewise.
2177 (vect_determine_precisions_from_range): Likewise.
2178 (vect_determine_precisions_from_users): Likewise.
2179 (vect_mark_pattern_stmts): Likewise.
2180 (vect_pattern_recog_1): Likewise.
2181 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2182 (vect_record_max_nunits): Likewise.
2183 (vect_build_slp_tree_1): Likewise.
2184 (vect_build_slp_tree_2): Likewise.
2185 (vect_print_slp_tree): Likewise.
2186 (vect_analyze_slp_instance): Likewise.
2187 (vect_detect_hybrid_slp_stmts): Likewise.
2188 (vect_detect_hybrid_slp_1): Likewise.
2189 (vect_slp_analyze_operations): Likewise.
2190 (vect_slp_analyze_bb_1): Likewise.
2191 (vect_transform_slp_perm_load): Likewise.
2192 (vect_schedule_slp_instance): Likewise.
2193 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2194 (vect_mark_stmts_to_be_vectorized): Likewise.
2195 (vect_init_vector_1): Likewise.
2196 (vect_get_vec_def_for_operand): Likewise.
2197 (vect_finish_stmt_generation_1): Likewise.
2198 (vect_check_load_store_mask): Likewise.
2199 (vectorizable_call): Likewise.
2200 (vectorizable_conversion): Likewise.
2201 (vectorizable_operation): Likewise.
2202 (vectorizable_load): Likewise.
2203 (vect_analyze_stmt): Likewise.
2204 (vect_is_simple_use): Likewise.
2205 (vect_get_vector_types_for_stmt): Likewise.
2206 (vect_get_mask_type_for_stmt): Likewise.
2207 * tree-vectorizer.c (increase_alignment): Likewise.
2209 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
2211 * doc/rtl.texi: Adjust vec_select description.
2212 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2213 non-constant selectors.
2215 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
2217 * config/aarch64/aarch64-protos.h
2218 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2219 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2220 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2221 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2222 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2223 (AARCH64_FL_PROFILE): Move index so flags are ordered.
2224 (AARCH64_ISA_RCPC8_4): New flag.
2225 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2226 to aarch64_offset_9bit_signed_unscaled_p.
2227 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2229 * config/aarch64/constraints.md (Ust): New constraint.
2230 * config/aarch64/predicates.md.
2231 (aarch64_9bit_offset_memory_operand): New predicate.
2232 (aarch64_rcpc_memory_operand): New predicate.
2234 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
2236 PR rtl-optimization/87361
2237 * rtlanal.c (nonzero_bits1): Revert accidental change.
2239 2018-09-19 Richard Biener <rguenther@suse.de>
2241 PR tree-optimization/87349
2242 PR tree-optimization/87342
2243 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2245 2018-09-18 Marek Polacek <polacek@redhat.com>
2247 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2248 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2250 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2252 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2254 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2256 PR rtl-optimization/86882
2257 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2259 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2261 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2262 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2264 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2267 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2269 2018-09-18 Richard Biener <rguenther@suse.de>
2272 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2273 (compute_samebase_partition_bases): Likewise.
2274 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2275 (gimple_can_coalesce_p): Simplify.
2277 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2279 Handle a library implementation of ffs calling __builtin_ffs.
2280 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2281 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2284 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2286 * diagnostic-show-locus.c (class layout_range): Add field
2288 (layout_range::layout_range): Add "original_idx" param and use it
2289 to initialize new field.
2290 (make_range): Use 0 for original_idx.
2291 (layout::layout): Pass in index to calls to
2292 maybe_add_location_range.
2293 (layout::maybe_add_location_range): Add param "original_idx" and
2294 pass it on to layout_range.
2295 (layout::print_any_labels): Pass on range->m_original_idx to
2297 (gcc_rich_location::add_location_if_nearby): Use 0 for
2299 * gcc-rich-location.h (text_range_label::get_text): Update for new
2301 (range_label_for_type_mismatch::get_text): Likewise.
2303 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2305 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2307 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2309 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2310 format_string_diagnostic_t.
2311 (fmtwarn_n): Likewise.
2312 * substring-locations.c
2313 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2314 (format_warning_n_va): Convert to...
2315 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2316 (format_warning_va): Convert to...
2317 (format_string_diagnostic_t::emit_warning_va): ...this.
2318 (format_warning_at_substring): Convert to...
2319 (format_string_diagnostic_t::emit_warning): ...this.
2320 (format_warning_at_substring_n): Convert to...
2321 (format_string_diagnostic_t::emit_warning_n): ...this.
2322 * substring-locations.h (class format_string_diagnostic_t): New
2324 (format_warning_va): Convert to
2325 format_string_diagnostic_t::emit_warning_va.
2326 (format_warning_n_va): Convert to
2327 format_string_diagnostic_t::emit_warning_n_va.
2328 (format_warning_at_substring): Convert to
2329 format_string_diagnostic_t::emit_warning.
2330 (format_warning_at_substring_n): Convert to
2331 format_string_diagnostic_t::emit_warning_n.
2333 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2334 Bernd Schmidt <bernds_cb1@t-online.de>
2336 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2339 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2341 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2342 operand 0 predicate to nonimmediate operand.
2343 (rint<mode>2_frndint): Remove insn pattern.
2344 (rint<mode>2): Change operand 1 predicate to general_operand.
2345 Extend operand 1 to XFmode and generate rintxf2 insn.
2346 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2347 Do not use X87MODEF mode macro.
2348 (frndintxf2_<rounding>_i387): Rename from
2349 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2350 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2351 to XFmode and generate significandxf3 insn.
2353 2018-09-17 Richard Biener <rguenther@suse.de>
2355 PR tree-optimization/87328
2356 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2357 visiting unexecutable backedges when not iterating.
2358 (do_rpo_vn): Mark all edges not executable even when not
2361 2018-09-17 Martin Jambor <mjambor@suse.cz>
2364 * doc/invoke.texi (Warning Options): Likewise.
2366 2018-09-17 Richard Biener <rguenther@suse.de>
2368 PR tree-optimization/87301
2369 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2370 clean EH info from leftover copy assignments.
2372 2018-09-17 Martin Liska <mliska@suse.cz>
2374 PR gcov-profile/85871
2375 * gcov.c (output_intermediate_file): Fix out of bounds
2378 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2380 * config/arc/arc.c: Object attributes for core4 not reflected
2382 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2385 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2387 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2389 2018-09-17 Martin Liska <mliska@suse.cz>
2391 * doc/gcov.texi: Document new option --use-hotness-colors.
2392 * gcov.c (struct source_info): Declare new field.
2393 (source_info::source_info): Set default for maximum_count.
2394 (print_usage): Add new -q option.
2395 (process_args): Process it.
2396 (accumulate_line_info): Save src->maximum_count.
2397 (output_line_beginning): Make color line number if
2398 flag_use_hotness_colors is set.
2399 (output_line_details): Pass default argument value.
2400 (output_lines): Pass src->maximum_count.
2402 2018-09-17 Martin Liska <mliska@suse.cz>
2404 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2405 Use processor_names table.
2406 * config/i386/i386.c (ix86_default_align): Use
2407 processor_cost_table for alignment values.
2408 (ix86_option_override_internal): Use processor_names.
2409 (ix86_function_specific_print): Likewise.
2410 * config/i386/i386.h (struct processor_costs):
2411 Add alignment values.
2412 (struct ptt): Remove and replace with const char *.
2413 * config/i386/x86-tune-costs.h (struct processor_costs):
2414 Declare default alignments for all costs.
2416 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2418 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2419 symbolics or VR_VARYING ranges for ABS_EXPR.
2420 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2421 when range will wrap.
2423 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2426 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2427 before and after a JUMP_TABLE_DATA.
2429 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2432 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2433 when one operand is a function pointer. Use POINTER_TYPE_P and
2434 FUNC_OR_METHOD_TYPE_P.
2435 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2436 * fold-const.c (build_range_check): Likewise.
2437 * match.pd (simple_comparison): Likewise.
2439 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2442 * spellcheck.c (get_edit_distance_cutoff): New function.
2443 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2444 (selftest::test_get_edit_distance_one_way): ...this.
2445 (selftest::test_get_edit_distance_unit): Rename to...
2446 (selftest::test_get_edit_distance_both_ways): ...this.
2447 (selftest::test_edit_distances): Move tests to this new function,
2448 and test some more pairs of strings. Update for above renaming.
2449 (selftest::get_old_cutoff): New function.
2450 (selftest::test_get_edit_distance_cutoff): New function.
2451 (selftest::assert_suggested_for): New function.
2452 (ASSERT_SUGGESTED_FOR): New macro.
2453 (selftest::assert_not_suggested_for): New function.
2454 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2455 (selftest::test_suggestions): New function.
2456 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2457 tests to selftest::test_edit_distances and call it. Add calls to
2458 selftest::test_get_edit_distance_cutoff and
2459 selftest::test_suggestions.
2460 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2461 (best_match::consider): Replace hard-coded cutoff calculation with
2463 (best_match::get_cutoff): New declaration.
2464 (best_match::get_best_meaningful_candidate): Likewise.
2466 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2468 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2470 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2473 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2475 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2476 terminated string literal.
2478 2018-09-14 Martin Sebor <msebor@redhat.com>
2480 * builtins.c (unterminated_array): Handle ARRAY_REF.
2481 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2482 * builtins.h (unterminated_array): Declare extern.
2483 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2485 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2488 2018-09-14 Martin Sebor <msebor@redhat.com>
2489 Jeff Law <law@redhat.com>
2491 * builtins.c (unterminated_array): New.
2492 (expand_builtin_strcpy): Adjust.
2493 (expand_builtin_strcpy_args): Detect unterminated arrays.
2494 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2495 unterminated arrays.
2496 * gimple-fold.h (get_maxval_strlen): Add argument.
2497 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2499 * gimple-fold.c (get_range_strlen): Add argument.
2500 (get_maxval_strlen): Adjust.
2501 * gimple-fold.h (get_range_strlen): Add argument.
2503 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2505 * config/i386/movdirintrin.h: Fix copyright year.
2507 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2509 * reg-stack.c: Include regs.h.
2510 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2511 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2512 FIRST_STACK_REG, not DFmode.
2513 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2514 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2515 (change stack): Default register mode to the reg_raw_mode of
2516 FIRST_STACK_REG, not DFmode.
2517 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2518 (*swapxf): Rename from swapxf.
2520 2018-09-14 Carl Love <cel@us.ibm.com>
2522 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2523 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2525 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2528 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2531 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2534 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2536 2018-09-14 Jason Merrill <jason@redhat.com>
2538 Fix --enable-gather-detailed-mem-stats.
2539 * hash-table.c (hash_table_usage): Change from variable to function.
2540 * hash-table.h: Adjust.
2541 * Makefile.in: Add missing dependencies on hash-table.h.
2543 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2545 PR tree-optimization/87259
2547 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2548 execute_cse_reciprocals_1 has tried transforming.
2550 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2552 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2553 VR_VARYING for PLUS/MINUS_EXPR.
2555 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2557 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2560 2018-09-14 Richard Biener <rguenther@suse.de>
2563 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2564 bits for the merged partition.
2566 2018-09-13 Martin Sebor <msebor@redhat.com>
2567 Bernd Edlinger <bernd.edlinger@hotmail.de>
2569 * builtins.h (c_srlen): Add argument.
2570 * builtins.c (warn_string_no_nul): New function.
2571 (c_strlen): Add argument and use it. Update recursive calls.
2572 Pass DECL argument to string_constant to get info on non
2573 terminated strings. Update *NONSTR as needed.
2574 (fold_builtin_strlen): Add argument to calls to c_strlen.
2575 Warn for unterminated arrays.
2576 (warn_string_no_null): Add prototype.
2577 * expr.c (string_constant): Update arguments. Update recursive
2578 calls appropriately. Detect missing NUL terminator and outermost
2579 declaration its missing in.
2580 Improve checks for arrays with nonzero lower bound or elements
2581 that are not a single byte. Simplify offset computation.
2582 Simplify checks for non-NUL terminated strings.
2583 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2584 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2586 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2588 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2590 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2591 argument. Fix range checks.
2592 * fold-const.h (c_getstr): Adjust protoype.
2593 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2594 string is constant but contains no NUL byte.
2596 * expr.c (string_constant): Adjust function comment.
2597 Remove bogus check for zero termination.
2599 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2601 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2602 (get_constant_size): Don't make STRING_CSTs larger than they are.
2603 (check_string_literal): New check function for STRING_CSTs.
2604 (output_constant): Use it.
2606 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2609 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2611 2018-09-13 Richard Biener <rguenther@suse.de>
2613 PR tree-optimization/87263
2614 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2615 (struct unwind_state): Add max_rpo field.
2616 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2617 Compute max_rpo, the max RPO number a block can be backwards reached
2618 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2619 separating it from the iterating mode.
2621 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2623 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2624 (rfs_decision): New scheduling decision.
2626 2018-09-13 Richard Biener <rguenther@suse.de>
2629 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2630 (vn_nary_op_insert_pieces_predicated): Do not write useless
2631 valid_dominated_by_p entry outside of the allocated storage.
2633 2018-09-13 Omar Sandoval <osandov@osandov.com>
2634 Tom de Vries <tdevries@suse.de>
2637 * dwarf2out.c (is_c): New function.
2638 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2640 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2643 * config/aarch64/aarch64.md (*aarch64_bfxil):
2645 * config/aarch64/constraints.md (Ulc): Define.
2646 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2648 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2651 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2653 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2654 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2655 aarch64_layout_frame call.
2656 (aarch64_expand_epilogue): Likewise.
2657 (aarch64_initial_elimination_offset): Likewise.
2658 (aarch64_get_separate_components): Likewise.
2659 (aarch64_use_return_insn_p): Likewise.
2660 (aarch64_layout_frame): Remove unneeded check.
2662 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2664 * configure.ac: Only append
2665 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2666 gcc_config_arguments if it was never reconfigured or last reconfigure
2667 was with different arguments.
2668 * configure: Regenerated.
2670 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2671 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2674 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2675 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2677 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2679 PR tree-optimization/87287
2680 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2681 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2682 * match.pd (X % C == 0): ... here. New optimization.
2684 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2687 * expr.h (maybe_optimize_mod_cmp): Declare.
2688 * expr.c (mod_inv): New function.
2689 (maybe_optimize_mod_cmp): New function.
2690 (do_store_flag): Use it.
2691 * cfgexpand.c (expand_gimple_cond): Likewise.
2693 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2694 Julian Brown <julian@codesourcery.com>
2697 * gimplify.c (gimplify_scan_omp_clauses): Set
2698 target_firstprivatize_array_bases in OpenACC parallel and kernels
2699 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2700 OpenACC data regions.
2702 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2704 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2705 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2707 2018-09-12 Richard Biener <rguenther@suse.de>
2709 PR tree-optimization/87280
2710 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2711 edge but unreachable target.
2712 (do_rpo_vn): For conservatively handling a PHI only mark
2713 the backedge executable but not the block reachable.
2715 2018-09-12 Richard Biener <rguenther@suse.de>
2717 PR tree-optimization/87266
2718 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2721 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2723 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2725 ("trunc<BFP:mode><DFP_ALL:mode>2")
2726 ("trunc<DFP_ALL:mode><BFP:mode>2")
2727 ("extend<BFP:mode><DFP_ALL:mode>2")
2728 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2729 according to the target operand type.
2731 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2732 Andreas Krebbel <krebbel@linux.ibm.com>
2734 PR tree-optimization/86844
2735 * gimple-ssa-store-merging.c
2736 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2737 there are any overlapping stores in between them, make sure they are
2738 also coalesced or we give up completely.
2740 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2743 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2744 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2746 2018-09-12 Tom de Vries <tdevries@suse.de>
2748 * common.opt (gdescribe-dies): Add option.
2749 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2750 attribute for artifical and nameless decls.
2751 (dwarf2out_register_external_die): Add description attribute to
2752 external reference die.
2753 (add_desc_attribute): New functions.
2754 (gen_subprogram_die): Add description attribute to
2755 DW_TAG_call_site_parameter.
2756 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2757 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2758 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2760 (@item -gdescribe-dies): Add.
2762 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2764 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2765 (extract_range_from_binary_expr_1: Call
2766 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2767 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2770 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2772 * gimple-ssa-warn-alloca.c
2773 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2774 field for ALLOCA_BOUND_*_LARGE.
2776 2018-09-11 Nathan Sidwell <nathan@acm.org>
2778 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2780 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2782 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2783 for clobbers. Remove obsolete comment.
2785 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2787 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2788 mpxchk, mpxld and mpxst types.
2789 (define_attr length_immediate): Remove all processing of mpx types.
2790 (define_attr prefix_0f): Ditto.
2791 (define_attr memory): Ditto.
2793 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2795 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2796 (log<mode>2): Change operand 1 predicate to general_operand.
2797 Extend operand 1 to XFmode and generate logxf3 insn.
2798 (log10<mode>2): Change operand 1 predicate to general_operand.
2799 Extend operand 1 to XFmode and generate log10xf3 insn.
2800 (log2<mode>2): Change operand 1 predicate to general_operand.
2801 Extend operand 1 to XFmode and generate log2xf3 insn.
2802 (fyl2xp1_extend<mode>xf3_i387): Remove.
2803 (log1p<mode>2): Change operand 1 predicate to general_operand.
2804 Extend operand 1 to XFmode and generate log1pxf3 insn.
2805 (fxtract_extend<mode>xf3_i387): Remove.
2806 (logb<mode>2): Change operand 1 predicate to general_operand.
2807 Extend operand 1 to XFmode and generate logbxf3 insn.
2808 (ilogb<mode>2): Change operand 1 predicate to general_operand.
2809 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2810 (significand<mode>2): Change operand 1 predicate to general_operand.
2811 Extend operand 1 to XFmode and generate significandxf3 insn.
2813 2018-09-11 Nathan Sidwell <nathan@acm.org>
2815 * gcc.c (perror_with_name, pfatal_with_name): Delete.
2816 (load_specs): Use fatal_error.
2817 (DELETE_IF_ORDINARY, process_command): Use error.
2818 (execute, run_attempt): Use fatal_error.
2820 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
2822 * diagnostic-core.h (sorry_at): New prototype.
2823 * diagnostic.c (sorry_at): New function.
2825 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
2827 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2828 by zero as VR_UNDEFINED.
2830 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2832 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2833 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2834 (<sincos>mode2): New expander.
2835 (sincos_extend<mode>xf3_i387): Remove insn pattern.
2836 (sincos -> sin, cos splitters): Remove splitter patterns.
2837 (sincos<mode>3): Change operand 2 predicate to general_operand.
2838 Extend operand 2 to XFmode and generate sincosxf3 insn.
2839 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2840 Change operand 3 predicate to const1_operand.
2841 (fptan_extend<mode>xf4_i387): Remove insn pattern.
2842 (tanxf2): Update operands in the call to fptanxf4_i387.
2843 (tan<mode>2): Change operand 1 predicate to general_operand.
2844 Extend operand 1 to XFmode and generate tanxf3 insn.
2845 (atan2xf3): Rename from *fpatanxf3_i387.
2846 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2847 (atan2xf3): Remove expander.
2848 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
2849 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2850 (atan<mode>2): Change operand 1 predicate to general_operand.
2851 Extend operand 1 to XFmode and generate atanxf3 insn.
2853 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2855 * config/i386/i386.md (x87/SSE constant load splitter): Use
2856 memory_operand instead of nonimmediate_operand for input operand
2859 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
2861 * config/i386/i386.md (float partial SSE register stall splitter): Move
2862 splitter near its instruction pattern.
2863 (float_extend partial SSE register stall splitter): Ditto.
2864 (float_truncate partial SSE register stall splitter): Ditto.
2866 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2869 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2870 to speculation_safe_value_not_needed.
2873 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2874 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2875 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2876 leaf_function_p, instead use has_hard_reg_initial_val.
2878 2018-09-09 Nathan Sidwell <nathan@acm.org>
2880 * gcc.h (pfatal_with_name): Don't declare here.
2881 * gcc.c (pfatal_with_name): Make static.
2883 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
2885 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2888 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
2890 PR rtl-optimization/85458
2891 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2892 priority hook to reduce the priority of EXPR.
2894 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
2896 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2897 DImode for x87 on 32bit targets. Conditionally disable x87 modes
2898 with X87_ENABLE_FLOAT. Remove preparation code.
2899 (*float<SWI48:mode><MODEF:mode>2): Rename from
2900 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
2901 math using "enabled" attribute.
2902 (*floatdi<MODEF:mode>2_i387): Rename from
2903 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
2904 enable for 32bit targets only.
2905 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2907 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2908 as operand 1 predicate. Rewrite as define_insn_and_split.
2909 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2911 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2913 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2914 to fallthru to FLOAT case.
2916 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2919 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2920 around folding of vec_sl to handle out of range shift values.
2922 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2924 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2925 Update callers to gen_fix_trunc<mode>_i387_fisttp
2926 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2927 nonimmediate_operand.
2928 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2929 and corresponding splitters.
2930 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2931 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2932 (fix_truncdi_i387_with_temp): Remove insn pattern
2933 and corresponding splitters.
2934 (fix_trunc<mode>_i387): Change operand 0 predicate to
2935 nonimmediate_operand.
2936 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2937 and corresponding splitters.
2938 (*fistdi2_1): Remove.
2940 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2941 (lrintxfdi2): Remove expander. Reimplement as define_insn.
2942 (*fist<mode>2_1): Remove.
2943 (fist<mode>2): Ditto.
2944 (fist<mode>2_with_temp): Remove insn pattern and corresponding
2946 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
2947 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2948 (fistdi2_<rounding>): Change operand 0 predicate to
2949 nonimmediate_operand.
2950 (fistdi2_<rounding>_with_temp): Remove insn pattern
2951 and corresponding splitters.
2952 (fist<mode>2_<rounding>): Change operand 0 predicate to
2953 nonimmediate_operand.
2954 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2955 and corresponding splitters.
2957 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2959 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2961 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2964 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2966 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2967 early gimple folding of vec_splat().
2968 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2969 * gimple-fold.h: Add an extern define for tree_vec_extract().
2971 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2973 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2974 wrappers around TREE_TYPE comparisons.
2976 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2979 * config/s390/predicates.md: Add nonsym_memory_operand.
2980 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2981 contains a SYMBOL_REF, load it into an intermediate pseudo.
2982 (s390_emit_compare_and_swap): Legitimize operand.
2983 * config/s390/s390.md: Use the new nonsym_memory_operand
2984 with UNSPECV_CAS patterns.
2986 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2989 * config/s390/s390-passes.def: New file.
2990 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2992 (make_pass_s390_early_mach): Add declaration.
2993 * config/s390/s390.c (make_pass_s390_early_mach):
2994 (s390_option_override): Remove dynamic registration.
2995 * config/s390/t-s390: Add s390-passes.def.
2997 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2999 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3000 Remove UNSPEC_LTREL_BASE check.
3001 (annotate_constant_pool_refs): Likewise.
3002 (find_constant_pool_ref): Likewise.
3003 (find_ltrel_base): Removed.
3004 (replace_ltrel_base): Removed.
3005 (s390_mainpool_finish): Remove replace_ltrel_base call.
3006 (s390_chunkify_start): Remove pending LTREL_BASE logic.
3007 (s390_chunkify_finish): Remove replace_ltrel_base call.
3008 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3010 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
3013 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3014 to speculation_safe_value_not_needed.
3016 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
3017 Bernd Schmidt <bernds_cb1@t-online.de>
3019 * config/nvptx/nvptx-opts.h: New file.
3020 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3021 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3023 (TARGET_SM35): New macro.
3024 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3026 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3028 (misa=): New option.
3029 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3031 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
3033 * config/i386/i386.md (truncdfsf2): Remove expander.
3034 (truncdfsf2_with_temp): Ditto.
3035 (truncxf<mode>2): Ditto.
3036 (*truncdfsf_fast_mixed): Remove insn pattern.
3037 (*truncdfsf_fast_i387): Ditto.
3038 (*truncdfsf_mixed): Ditto.
3039 (*truncdfsf_i387): Ditto.
3040 (*truncdfsf2_i387_1): Ditto.
3041 (*truncxfsf2_mixed): Ditto.
3042 (*truncxfdf2_mixed): Ditto.
3043 (*truncxf<mode>2_i387_noop): Ditto. Update callers
3044 to call gen_truncxf<mode>2 instead.
3045 (*truncxf<mode>2_i387): Remove.
3046 (reg->reg splitters): Remove splitter pattern.
3047 (reg->mem splitters): Ditto.
3049 (truncdfsf2): New insn pattern.
3050 (truncxf<mode>2): Ditto.
3052 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3054 * tree-ssa-math-opts.c (is_mult_by): New function.
3055 (is_square_of): Use the above.
3056 (optimize_recip_sqrt): New function.
3057 (pass_cse_reciprocals::execute): Use the above.
3059 2018-09-05 Richard Biener <rguenther@suse.de>
3062 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3063 to zero-init the emplaced vec.
3065 2018-09-05 Martin Liska <mliska@suse.cz>
3067 PR tree-optimization/87205
3068 * tree-switch-conversion.c (pass_lower_switch::execute):
3069 Group cases for switch statements.
3071 2018-09-05 Richard Biener <rguenther@suse.de>
3073 PR tree-optimization/87217
3074 * tree-ssa-sccvn.c (vuse_valueize): New.
3075 (vn_reference_lookup_pieces): Use it.
3076 (vn_reference_lookup): Likewise.
3078 2018-09-05 Nathan Sidwell <nathan@acm.org>
3081 * stor-layout.c (place_field): Scan forwards to check last
3082 bitfield when ms_bitfield_placement is in effect.
3084 2018-09-05 Richard Biener <rguenther@suse.de>
3087 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3090 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
3091 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3093 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3094 * config.gcc (extra_objs): Build it.
3095 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3097 * config/aarch64/aarch64-passes.def
3098 (pass_tag_collision_avoidance): New pass.
3099 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3100 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3101 (aarch64_classify_address): Remove static qualifier.
3102 (aarch64_address_info, aarch64_address_type): Move to...
3103 * config/aarch64/aarch64-protos.h: ... here.
3104 (make_pass_tag_collision_avoidance): New function.
3105 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3108 2018-09-05 Martin Liska <mliska@suse.cz>
3110 * doc/gcov.texi: Update documentation of humar
3112 * gcov.c (format_count): Print one decimal place, it provides
3113 more fine number of situations like '1G' vs. '1.4G'.
3115 2018-09-05 Martin Liska <mliska@suse.cz>
3118 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3119 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3120 to generate a MASK value.
3122 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3125 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3126 if frame pointer isn't used.
3127 (compute_frame_pointer_to_fb_displacement): Likewise.
3129 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3132 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3133 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3134 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3135 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3136 and OPTION_MASK_ISA_XSAVEC_UNSET.
3138 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3140 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3141 XOR operations in NAND case.
3143 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3145 * wide-int-range.cc (wide_int_range_convert): New.
3146 * wide-int-range.h (wide_int_range_convert): New.
3147 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3148 code into wide_int_range_convert.
3149 (extract_range_into_wide_ints): Do not munge anti range constants
3150 into the entire domain. Just return the range back.
3152 2018-09-04 Martin Liska <mliska@suse.cz>
3154 * genmatch.c (output_line_directive): Add new argument
3156 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3158 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3160 * doc/invoke.texi (Option Summary): Add whitespace.
3162 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3164 2018-09-04 Richard Biener <rguenther@suse.de>
3166 PR tree-optimization/87211
3167 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3168 backedge value we're supposed to treat as VARYING also number
3169 the PHI to VARYING in case it got a different value-number already.
3171 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3173 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3174 (extract_range_from_binary_expr_1): Do not call
3175 vrp_can_optimize_bit_op.
3176 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3178 (wide_int_range_get_mask_and_bounds): New.
3179 (wide_int_range_optimize_bit_op): New.
3180 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3181 (wide_int_range_bit_and): Same.
3182 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3183 (wide_int_range_optimize_bit_op): New.
3184 (wide_int_range_get_mask_and_bounds): New.
3186 2018-09-04 Richard Biener <rguenther@suse.de>
3188 PR tree-optimization/87176
3189 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3190 variable. When value-numbering a virtual PHI node make sure
3191 to not value-number to the backedge value.
3193 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3195 * doc/extend.texi (Long Long, Hex Floats): Document support for
3196 long long and hex floats in more recent versions of ISO C++.
3198 2018-09-03 Richard Biener <rguenther@suse.de>
3200 PR tree-optimization/87177
3201 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3204 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3206 * bb-reorder.c (edge_order): Convert to C-qsort-style
3207 tri-state comparator.
3208 (reorder_basic_blocks_simple): Change std::stable_sort to
3211 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3213 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3214 tri-state comparator.
3215 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3217 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3219 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
3220 (mergesort): ... here as maximum count for using netsort.
3221 (gcc_qsort): Set nlim to 3 if stable sort is requested.
3222 (gcc_stablesort): New.
3223 * system.h (gcc_stablesort): Declare.
3225 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3227 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3228 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
3229 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
3231 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
3233 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3234 lxsdx and stxsdx alternatives.
3235 (*mov<mode>_hardfloat64): Ditto.
3236 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3238 2018-09-03 Richard Biener <rguenther@suse.de>
3240 PR tree-optimization/87200
3241 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3244 2018-09-03 Martin Liska <mliska@suse.cz>
3246 PR tree-optimization/87201
3247 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3248 Fix parenthesis in an expression.
3250 2018-09-03 Richard Biener <rguenther@suse.de>
3252 PR tree-optimization/87197
3253 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3254 visited. CSE the VN_INFO hashtable lookup.
3256 PR tree-optimization/87169
3257 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3258 iterating make sure there's no extra backedges from irreducible
3259 regions feeding the header. Mark the destination block
3262 2018-09-03 Martin Liska <mliska@suse.cz>
3265 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3266 * common/common-targhooks.c (default_get_valid_option_values):
3268 * common/common-targhooks.h (default_get_valid_option_values):
3270 * common/config/i386/i386-common.c: Move processor_target_table
3272 (ix86_get_valid_option_values): New function.
3273 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3274 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3275 (PTA_*): Move all defined masks into i386-common.c.
3276 (ix86_function_specific_restore): Use new processor_cost_table.
3277 * config/i386/i386.h (struct ptt): Moved from i386.c.
3278 (struct pta): Likewise.
3279 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3280 * doc/tm.texi.in: Likewise.
3281 * opt-suggestions.c (option_proposer::suggest_option):
3282 Pass prefix to build_option_suggestions.
3283 (option_proposer::get_completions): Likewise.
3284 (option_proposer::build_option_suggestions): Use the new target
3286 * opts.c (struct option_help_tuple): New struct.
3287 (print_filtered_help): Use the new target hook.
3289 2018-09-03 Martin Liska <mliska@suse.cz>
3292 * predict.c (set_even_probabilities): Add likely_edges
3293 argument and handle cases where we have precisely one
3295 (combine_predictions_for_bb): Catch also likely_edges.
3296 (tree_predict_by_opcode): Handle gswitch statements.
3297 * tree-cfg.h (find_case_label_for_value): New declaration.
3298 (find_taken_edge_switch_expr): Likewise.
3299 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3300 Find pivot in decision tree based on probabily, not by number of
3303 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3305 * doc/standards.texi (Standards): Update Objective-C reference.
3307 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3309 * doc/install.texi (Prerequisites): Update link for MPC.
3311 2018-09-01 Michael Matz <matz@suse.de>
3313 PR tree-optimization/87074
3314 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3315 PHIs for outer-loop uses.
3317 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3319 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3320 * doc/invoke.texi (C Dialect Options): Ditto.
3322 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3324 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3326 2018-08-31 Richard Biener <rguenther@suse.de>
3328 PR tree-optimization/87168
3329 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3330 (rpo_elim::eliminate_avail): When OP was not visited it must
3333 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3335 * tree-vrp.c (copy_value_range): Convert param "from" from
3336 "value_range *" to "const value_range *".
3337 (range_is_null): Likewise for param "vr".
3338 (range_int_cst_p): Likewise.
3339 (range_int_cst_singleton_p): Likewise.
3340 (symbolic_range_p): Likewise.
3341 (value_ranges_intersect_p): Likewise for both params.
3342 (value_range_nonnegative_p): Likewise for param "vr".
3343 (value_range_constant_singleton): Likewise.
3344 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3345 (extract_range_into_wide_ints): Likewise for param "vr".
3346 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3348 (vrp_can_optimize_bit_op): Likewise.
3349 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3351 (extract_range_from_unary_expr): Likewise.
3352 (debug_value_range): Likewise for param "vr".
3353 (value_range::dump): Add "const" qualifier.
3354 (vrp_prop::check_array_ref): Convert local "vr" from
3355 "value_range *" to "const value_range *".
3356 (vrp_prop::check_mem_ref): Likewise.
3357 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3358 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3359 (vrp_intersect_ranges): Likewise.
3360 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3361 (vrp_prop::vrp_finalize): Likewise.
3362 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3363 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3364 (extract_range_from_unary_expr): Likewise.
3365 (value_range_constant_singleton): Likewise.
3366 (symbolic_range_p): Likewise.
3367 (copy_value_range): Likewise.
3368 (extract_range_from_binary_expr_1): Likewise.
3369 (range_int_cst_p): Likewise.
3370 (vrp_set_zero_nonzero_bits): Likewise.
3371 (range_int_cst_singleton_p): Likewise.
3373 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3375 * config/aarch64/arm_neon.h (vabsd_s64): New.
3376 (vnegd_s64): Likewise.
3378 2018-08-31 Martin Jambor <mjambor@suse.cz>
3380 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3382 2018-08-31 Martin Liska <mliska@suse.cz>
3384 * ipa-icf.c (sem_item::add_type): Use
3385 sem_item::m_type_hash_cache.
3386 * ipa-icf.h: Move the cache from sem_item_optimizer
3389 2018-08-31 Nathan Sidwell <nathan@acm.org>
3391 * doc/extend.texi (Backwards Compatibility): Remove implicit
3392 extern C leeway of () being (...).
3394 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3396 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3398 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3402 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3404 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3407 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3408 gen_int_mode. Formatting fixes.
3410 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3412 * target.def (custom_function_descriptors): Improve documentation.
3413 * doc/tm.texi.in (Trampolines): Expand discussion of function
3414 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3415 beginning of the section.
3416 * doc/tm.texi: Regenerated.
3418 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3420 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3421 base class in the initializer list. This is a workaround for
3422 building with older GCC.
3423 (class auto_bb_flag): Likewise.
3425 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3427 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3428 (altivec_vcmpequ<VI_char>_p): Remove star.
3429 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3431 (expand_strncmp_vec_sequence): New function.
3432 (emit_final_str_compare_vec): New function.
3433 (expand_strn_compare): Add support for vector strncmp.
3434 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3435 length specification to bytes.
3436 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3437 (vcmpnezb_p): New pattern.
3438 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3439 for option -mstring-compare-inline-limit.
3441 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3443 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3444 (PTA_SKYLAKE): Add PTA_AES.
3445 (PTA_GOLDMONT): Likewise.
3447 2018-08-29 Jan Hubicka <jh@suse.cz>
3450 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3451 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3453 2018-08-29 Jan Hubicka <jh@suse.cz>
3455 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3457 (hash_tree): Do not visit TYPE_STUB_DECL.
3458 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3459 stream TYPE_STUB_DECL.
3460 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3461 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3462 after free_lang_data.
3463 (type_in_anonymous_namespace_p): Likewise.
3465 2018-08-29 Jan Hubicka <jh@suse.cz>
3467 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3468 comment that it has to be even number.
3469 (class sreal): Change m_sig type to int32_t.
3470 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3471 int64_t for temporary calculations.
3472 (sreal_verify_basics): Drop one bit from minimum and maximum.
3474 2018-08-30 Richard Biener <rguenther@suse.de>
3476 PR tree-optimization/87147
3477 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3478 (visit_phi): When the degenerate result is from the backedge and
3479 we didn't visit its definition yet drop to VARYING.
3480 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3482 2018-08-29 Jan Hubicka <jh@suse.cz>
3484 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3486 (hash_tree): Likewise.
3488 2018-08-29 Jan Hubicka <jh@suse.cz>
3490 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3491 and TYPE_NEXT_REF_TO.
3493 2018-08-29 Jan Hubicka <jh@suse.cz>
3495 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3496 comment that it has to be even number.
3497 (class sreal): Change m_sig type to int32_t.
3498 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3499 int64_t for temporary calculations.
3500 (sreal_verify_basics): Drop one bit from minimum and maximum.
3502 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3504 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3506 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3509 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3510 if to_add is negative.
3512 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3515 * builtins.c (c_strlen): Improve range checks.
3517 2018-08-29 Martin Sebor <msebor@redhat.com>
3518 Jeff Law <law@redhat.com>
3520 PR tree-optimization/86714
3521 PR tree-optimization/86711
3522 * builtins.c (c_strlen): Add arguments to call to string_constant.
3523 * expr.c (string_constant): Add argument. Detect missing nul
3524 terminator and outermost declaration it's missing in.
3525 * expr.h (string_constant): Add argument.
3526 * fold-const.c (read_from_constant_string): Add arguments to call to
3528 (c_getstr): Likewise.
3529 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3531 * tree-ssa-strlen.c (get_stridx): Likewise.
3533 2018-08-29 Jan Hubicka <jh@suse.cz>
3535 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3536 Do not stream DECL_VINDEX.
3537 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3538 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3539 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3541 2018-08-29 Richard Biener <rguenther@suse.de>
3543 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3544 virtual operands that are not default defs to honor region
3546 (rpo_vn_valueize): Remove ineffective code here.
3548 2018-08-29 Richard Biener <rguenther@suse.de>
3550 PR tree-optimization/87132
3551 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3552 when skipping defs reachable over backedges.
3554 2018-08-29 Richard Biener <rguenther@suse.de>
3556 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3557 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3558 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3559 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3560 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3561 (vn_reference_lookup_3): Remove use of const_parms.
3562 (free_rpo_vn): Do not free const_parms.
3563 (do_rpo_vn): Do not call init_const_parms.
3564 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3565 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3566 (call_may_clobber_ref_p_1): Likewise.
3568 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3571 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3573 (-ftree-scev-cprop): Document.
3575 2018-08-29 Jan Hubicka <jh@suse.cz>
3577 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3579 (sreal constructor): Update.
3580 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3581 sreal:operator/): Update.
3583 2018-08-29 Martin Liska <mliska@suse.cz>
3585 * tree-switch-conversion.c (switch_conversion::expand):
3586 Strenghten assumption about gswitch statements.
3588 2018-08-29 Richard Biener <rguenther@suse.de>
3590 PR tree-optimization/87117
3591 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3592 re-value-number released SSA VDEFs.
3594 2018-08-29 Richard Biener <rguenther@suse.de>
3596 PR tree-optimization/87126
3597 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3599 2018-08-28 Jim Wilson <jimw@sifive.com>
3601 * config/riscv/pic.md: Rewrite.
3602 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3604 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3605 (SOFTF, default_load, softload, softstore): New.
3607 2018-08-28 Jeff Law <law@redhat.com>
3609 * fold-const.c (fold_binary_loc): Remove recently added assert.
3611 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3613 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3614 to OP parmeter of generated function.
3616 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3618 PR tree-optimization/87009
3619 * match.pd: Add boolean optimizations.
3621 2018-08-28 Martin Sebor <msebor@redhat.com>
3624 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3625 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3626 (pass_walloca::gate): Use it.
3627 (alloca_call_type): Same.
3628 (pass_walloca::execute): Same.
3629 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3631 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3633 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3634 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3637 2018-08-28 Richard Biener <rguenther@suse.de>
3639 PR tree-optimization/87124
3640 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3641 constants before looking up avail.
3643 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3646 * calls.c (maybe_warn_nonstring_arg): Punt early if
3647 warn_stringop_overflow is zero. Don't call get_range_strlen
3648 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3649 Swap comparison operands to have constants on rhs. Only use
3650 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3651 increment lenrng[0].
3653 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3655 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3656 use of tree_to_shwi. Remove duplicated test for the size being
3657 a whole number of bytes.
3659 2018-08-28 Richard Biener <rguenther@suse.de>
3661 PR tree-optimization/87117
3662 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3663 Handle removed stmt without LHS (GIMPLE_NOP).
3665 2018-08-28 Richard Biener <rguenther@suse.de>
3667 PR tree-optimization/87117
3668 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3669 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3671 2018-08-28 Richard Biener <rguenther@suse.de>
3673 PR tree-optimization/87117
3674 * tree-ssa-pre.c (compute_avail): Do not make expressions
3675 with predicated values available.
3676 (get_expr_value_id): Assert we do not run into predicated value
3679 2018-08-28 Richard Biener <rguenther@suse.de>
3681 PR tree-optimization/87117
3682 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3683 get virtual operands.
3684 (get_expr_operands): Handle STRING_CST like other decls.
3686 2018-08-28 Martin Liska <mliska@suse.cz>
3688 * tree.h: Update documentation of fndecl_built_in_p
3692 2018-08-27 Jeff Law <law@redhat.com>
3693 PR tree-optimization/87110
3694 * tree-ssa-dse.c (compute_trims): Handle non-constant
3697 2018-08-27 Martin Sebor <msebor@redhat.com>
3699 PR tree-optimization/86914
3700 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3702 2018-08-27 Martin Sebor <msebor@redhat.com>
3704 PR tree-optimization/87112
3705 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3706 the type of the bound argument.
3708 2018-08-27 Jeff Law <law@redhat.com>
3710 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3711 type does not have a TYPE_SIZE_UNIT.
3713 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3715 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3716 with include of backend.h.
3718 2018-08-27 Richard Biener <rguenther@suse.de>
3720 PR tree-optimization/86927
3721 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3722 use const cond reduction code.
3724 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3726 PR tree-optimization/85758
3727 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3729 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3732 * diagnostic-show-locus.c (class layout_range): Update for
3733 conversion of show_caret_p to a tri-state.
3734 (layout_range::layout_range): Likewise.
3735 (make_range): Likewise.
3736 (layout::maybe_add_location_range): Likewise.
3737 (layout::should_print_annotation_line_p): Don't show annotation
3738 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3739 (layout::get_state_at_point): Update for conversion of
3740 show_caret_p to a tri-state. Bail out early for
3741 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3742 underlining or source colorization.
3743 (gcc_rich_location::add_location_if_nearby): Update for conversion
3744 of show_caret_p to a tri-state.
3745 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3746 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3748 (selftest::test_one_liner_labels): Likewise.
3749 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3750 conversion of show_caret_p to a tri-state.
3751 * pretty-print.c (text_info::set_location): Likewise.
3752 * pretty-print.h (text_info::set_location): Likewise.
3753 * substring-locations.c (format_warning_n_va): Likewise.
3754 * tree-diagnostic.c (default_tree_printer): Likewise.
3755 * tree-pretty-print.c (newline_and_indent): Likewise.
3757 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3760 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3761 line above for line-insertion fix-it hints.
3762 (selftest::test_fixit_insert_containing_newline): Update the
3763 expected results, and add a test with line-numbering enabled.
3765 2018-08-27 Martin Liska <mliska@suse.cz>
3768 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3769 params with DECL_HAS_VALUE_EXPR_P.
3771 2018-08-27 Martin Liska <mliska@suse.cz>
3773 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3774 selected expansion strategy.
3776 2018-08-27 Martin Liska <mliska@suse.cz>
3778 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3779 * builtins.c (is_builtin_fn): Likewise.
3780 * attribs.c (diag_attr_exclusions): Use new function
3781 fndecl_built_in_p and remove check for FUNCTION_DECL if
3783 (builtin_mathfn_code): Likewise.
3784 (fold_builtin_expect): Likewise.
3785 (fold_call_expr): Likewise.
3786 (fold_builtin_call_array): Likewise.
3787 (fold_call_stmt): Likewise.
3788 (set_builtin_user_assembler_name): Likewise.
3789 (is_simple_builtin): Likewise.
3790 * calls.c (gimple_alloca_call_p): Likewise.
3791 (maybe_warn_nonstring_arg): Likewise.
3792 * cfgexpand.c (expand_call_stmt): Likewise.
3793 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3794 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3795 (cgraph_node::verify_node): Likewise.
3796 * cgraphclones.c (build_function_decl_skip_args): Likewise.
3797 (cgraph_node::create_clone): Likewise.
3798 * config/arm/arm.c (arm_insert_attributes): Likewise.
3799 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3800 * dse.c (scan_insn): Likewise.
3801 * expr.c (expand_expr_real_1): Likewise.
3802 * fold-const.c (operand_equal_p): Likewise.
3803 (fold_binary_loc): Likewise.
3804 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3805 * gimple-low.c (lower_stmt): Likewise.
3806 * gimple-pretty-print.c (dump_gimple_call): Likewise.
3807 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3809 * gimple.c (gimple_build_call_from_tree): Likewise.
3810 (gimple_call_builtin_p): Likewise.
3811 (gimple_call_combined_fn): Likewise.
3812 * gimplify.c (gimplify_call_expr): Likewise.
3813 (gimple_boolify): Likewise.
3814 (gimplify_modify_expr): Likewise.
3815 (gimplify_addr_expr): Likewise.
3816 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3817 * ipa-cp.c (determine_versionability): Likewise.
3818 * ipa-fnsummary.c (compute_fn_summary): Likewise.
3819 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3820 * ipa-split.c (visit_bb): Likewise.
3821 (split_function): Likewise.
3822 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3823 * lto-cgraph.c (input_node): Likewise.
3824 * lto-streamer-out.c (write_symbol): Likewise.
3825 * omp-low.c (setjmp_or_longjmp_p): Likewise.
3826 (lower_omp_1): Likewise.
3827 * predict.c (strip_predict_hints): Likewise.
3828 * print-tree.c (print_node): Likewise.
3829 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3830 * trans-mem.c (is_tm_irrevocable): Likewise.
3831 (is_tm_load): Likewise.
3832 (is_tm_simple_load): Likewise.
3833 (is_tm_store): Likewise.
3834 (is_tm_simple_store): Likewise.
3835 (is_tm_abort): Likewise.
3836 (tm_region_init_1): Likewise.
3837 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3838 * tree-cfg.c (verify_gimple_call): Likewise.
3839 (move_stmt_r): Likewise.
3840 (stmt_can_terminate_bb_p): Likewise.
3841 * tree-eh.c (lower_eh_constructs_2): Likewise.
3842 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3843 * tree-inline.c (remap_gimple_stmt): Likewise.
3844 (copy_bb): Likewise.
3845 (estimate_num_insns): Likewise.
3846 (fold_marked_statements): Likewise.
3847 * tree-sra.c (scan_function): Likewise.
3848 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3849 (optimize_stack_restore): Likewise.
3850 (pass_fold_builtins::execute): Likewise.
3851 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3852 (mark_all_reaching_defs_necessary_1): Likewise.
3853 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3854 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3855 (pass_forwprop::execute): Likewise.
3856 * tree-ssa-loop-im.c (stmt_cost): Likewise.
3857 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3858 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3859 * tree-ssa-strlen.c (get_string_length): Likewise.
3860 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3861 (find_func_aliases_for_call): Likewise.
3862 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3863 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3864 * tree-tailcall.c (find_tail_calls): Likewise.
3865 * tree.c (need_assembler_name_p): Likewise.
3866 (free_lang_data_in_decl): Likewise.
3867 (get_call_combined_fn): Likewise.
3868 * ubsan.c (is_ubsan_builtin_p): Likewise.
3869 * varasm.c (incorporeal_function_p): Likewise.
3870 * tree.h (DECL_BUILT_IN): Remove and replace with
3872 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3873 (fndecl_built_in_p): New.
3875 2018-08-27 Martin Liska <mliska@suse.cz>
3877 PR tree-optimization/86847
3878 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3879 Dump also subtree probability.
3880 (switch_decision_tree::do_jump_if_equal): New function.
3881 (switch_decision_tree::emit_case_nodes): Handle special
3882 situations in balanced tree that can be emitted much simpler.
3883 Fix calculation of probabilities that happen in tree expansion.
3884 * tree-switch-conversion.h (struct cluster): Add
3886 (struct simple_cluster): Likewise.
3887 (struct case_tree_node): Add new function has_child.
3888 (do_jump_if_equal): New.
3890 2018-08-27 Martin Liska <mliska@suse.cz>
3892 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3893 Add new argument to bit_test_cluster constructor.
3894 (bit_test_cluster::emit): Set bits really number of values
3896 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3897 probability argument.
3898 * tree-switch-conversion.h (struct bit_test_cluster):
3899 Add m_handles_entire_switch.
3901 2018-08-27 Martin Liska <mliska@suse.cz>
3903 PR tree-optimization/86702
3904 * tree-switch-conversion.c (jump_table_cluster::emit):
3905 Make probabilities even for values in jump table
3906 according to number of cases handled.
3907 (switch_decision_tree::compute_cases_per_edge): Pass
3908 argument to reset_out_edges_aux function.
3909 (switch_decision_tree::analyze_switch_statement): Likewise.
3910 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3913 2018-08-27 Martin Liska <mliska@suse.cz>
3915 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3916 cfun argument explicitly.
3917 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3918 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3919 function gimple_switch_default_bb.
3920 (convert_switch_statements):
3922 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3923 * stmt.c (label_to_block_fn): Use label_to_block and pass
3924 cfun argument explicitly and use gimple_switch_label_bb.
3925 (expand_case): Likewise.
3926 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3927 cfun argument explicitly. Likewise.
3928 (make_edges_bb): Likewise.
3929 (make_cond_expr_edges): Likewise.
3930 (get_cases_for_edge): Likewise.
3931 (make_gimple_switch_edges): Likewise.
3932 (label_to_block_fn): Likewise.
3933 (label_to_block): Likewise.
3934 (make_goto_expr_edges): Likewise.
3935 (make_gimple_asm_edges): Likewise.
3936 (main_block_label): Likewise.
3937 (group_case_labels_stmt): Likewise.
3938 (find_taken_edge_computed_goto): Likewise.
3939 (find_taken_edge_switch_expr): Likewise.
3940 (gimple_verify_flow_info): Likewise.
3941 (gimple_redirect_edge_and_branch): Likewise.
3942 (gimple_switch_label_bb): New function.
3943 (gimple_switch_default_bb): Likewise.
3944 (gimple_switch_edge): Likewise.
3945 (gimple_switch_default_edge): Likewise.
3946 * tree-cfg.h (label_to_block_fn): Remove and replace ...
3947 (label_to_block): ... with this.
3948 (gimple_switch_label_bb): New.
3949 (gimple_switch_default_bb): Likewise.
3950 (gimple_switch_edge): Likewise.
3951 (gimple_switch_default_edge): Likewise.
3952 * tree-cfgcleanup.c (convert_single_case_switch): Use
3953 new gimple functions and pass new argument to label_to_block.
3954 (cleanup_control_flow_bb):
3955 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3956 cfun argument explicitly.
3957 (make_eh_edges): Likewise.
3958 (redirect_eh_dispatch_edge): Likewise.
3959 (lower_resx): Likewise.
3960 (lower_eh_dispatch): Likewise.
3961 (maybe_remove_unreachable_handlers): Likewise.
3962 (unsplit_eh): Likewise.
3963 (cleanup_empty_eh): Likewise.
3964 (verify_eh_edges): Likewise.
3965 (verify_eh_dispatch_edge): Likewise.
3966 * tree-ssa-dom.c (record_edge_info): Likewise.
3967 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3968 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3969 (thread_through_normal_block): Likewise.
3970 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3971 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3972 * tree-switch-conversion.c (switch_conversion::collect): Use new
3974 (switch_conversion::check_final_bb): Likewise.
3975 (switch_conversion::gather_default_values): Pass new argument
3977 (switch_conversion::build_constructors): Likewise.
3978 (switch_decision_tree::compute_cases_per_edge): Use new
3979 gimple_switch_edge function.
3980 (switch_decision_tree::analyze_switch_statement): Pass new argument
3982 (switch_decision_tree::try_switch_expansion): Use
3983 gimple_switch_default_edge.
3984 * tree-vrp.c (find_switch_asserts): Pass new argument
3986 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3987 (vr_values::simplify_switch_using_ranges): Likewise.
3989 2018-08-27 Richard Biener <rguenther@suse.de>
3991 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3992 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3994 * tree-ssa-sccvn.h (struct vn_pval): New structure.
3995 (struct vn_nary_op_s): Add unwind_to member. Add
3996 predicated_values flag and put result into a union together
3997 with a linked list of vn_pval.
3998 (struct vn_ssa_aux): Add name member to make maintaining
3999 a map of SSA name to vn_ssa_aux possible. Remove no longer
4000 needed info, dfsnum, low, visited, on_sccstack, use_processed
4001 and range_info_anti_range_p members.
4002 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4003 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4005 (vn_valueize): New global.
4006 (vn_context_bb): Likewise.
4007 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4008 VN_INFO_PTR_INFO): Remove.
4009 * tree-ssa-sccvn.c: ... (rewrite)
4010 (pass_fre::execute): For -O2+ initialize loops and run
4011 RPO VN in optimistic mode (iterating). For -O1 and -Og
4012 run RPO VN in non-optimistic mode.
4013 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4014 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4015 * doc/invoke.texi (sccvn-max-scc-size): Remove.
4016 (rpo-vn-max-loop-depth): Document.
4017 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4018 when valuezing the VUSE signals we walked out of the region.
4019 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4020 (phi_translate): Set VN context block to use for availability
4022 (compute_avail): Likewise.
4023 (pre_valueize): New function.
4024 (pass_pre::execute): Adjust to the RPO VN API.
4026 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4027 (propagate_constants_for_unrolling): Remove.
4028 (tree_unroll_loops_completely): Perform value-numbering
4029 on the unrolled bodies loop parent.
4031 2018-08-27 Richard Biener <rguenther@suse.de>
4033 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4034 for partial antic compute.
4036 2018-08-27 Jakub Jelinek <jakub@redhat.com>
4038 PR rtl-optimization/87065
4039 * combine.c (simplify_if_then_else): Formatting fix.
4040 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4042 (known_cond): Don't return const_true_rtx for vector modes. Use
4043 CONST0_RTX instead of const0_rtx. Formatting fixes.
4045 2018-08-27 Martin Liska <mliska@suse.cz>
4047 PR gcov-profile/87069
4048 * gcov.c (process_file): Record files already processed
4049 and warn about a file being processed multiple times.
4051 2018-08-27 Martin Liska <mliska@suse.cz>
4054 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4055 Set default values for x_aarch64_*_string strings.
4056 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4057 prefix. For -mabi do not print '=ABI' in help and use
4058 <option_value> format for -msve-vector-bits and -moverride
4061 2018-08-26 Jeff Law <law@redhat.com>
4063 * config/mips/frame-header-opt.c: Include "backend.h" rather than
4066 2018-08-26 Marek Polacek <polacek@redhat.com>
4068 PR c++/87029, Implement -Wredundant-move.
4069 * doc/invoke.texi: Document -Wredundant-move.
4071 2018-08-25 Martin Sebor <msebor@redhat.com>
4073 PR tree-optimization/87059
4074 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4075 to the same type as the other.
4076 * fold-const.c (fold_binary_loc): Assert expectation.
4078 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
4080 * config/darwin.c (machopic_legitimize_pic_address): Clean up
4081 extraneous parentheses, dead code section and formatting.
4083 2018-08-24 David Malcolm <dmalcolm@redhat.com>
4086 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4087 wide enough for jumps in the line-numbering to be visible.
4088 (layout::print_gap_in_line_numbering): New member function.
4089 (layout::calculate_line_spans): When using line numbering, merge
4090 line spans that are only 1 line apart.
4091 (diagnostic_show_locus): When printing line numbers, show gaps in
4092 line numbering directly, rather than printing headers.
4093 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4094 line-numbering with multiple line spans.
4095 (selftest::test_fixit_insert_containing_newline_2): Add test of
4096 line-numbering, in which the spans are close enough to be merged.
4098 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4100 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4101 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
4102 * tree-vrp.c (range_is_nonnull): Remove.
4103 (range_includes_zero_p): Accept value_range instead of min/max.
4104 (extract_range_from_binary_expr_1): Do not early bail on
4106 Use range_includes_zero_p instead of range_is_nonnull.
4107 (extract_range_from_unary_expr): Use range_includes_zero_p instead
4108 of range_is_nonnull.
4109 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
4110 special case VR_ANTI_RANGE.
4111 (vrp_finalize): Same.
4112 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4114 (range_is_nonnull): Remove.
4115 * vr-values.c (vrp_stmt_computes_nonzero): Use
4116 range_includes_zero_p instead of range_is_nonnull.
4117 (extract_range_basic): Pass value_range to range_includes_zero_p
4118 instead of range_is_nonnull.
4120 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4122 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4123 * emit-rtl.h (rtl_data): Remove return_bnd.
4124 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4125 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4126 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4127 (POINTER_BOUNDS_MODE): Remove definition.
4128 (make_pointer_bounds_mode): Remove.
4129 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4130 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4131 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4132 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4133 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4134 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4135 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4137 * config/i386/i386-modes.def (BND32, BND64): Remove.
4138 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4139 (dbx64_register_map): Ditto.
4140 (svr4_dbx_register_map): Ditto.
4141 (indirect_thunk_bnd_needed): Remove.
4142 (indirect_thunks_bnd_used): Ditto.
4143 (indirect_return_bnd_needed): Ditto.
4144 (indirect_return_via_cx_bnd): Ditto.
4145 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4146 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4147 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4148 (output_indirect_thunk_function): Remove handling of
4149 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4150 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4151 (ix86_save_reg): Remove handling of crtl->return_bnd.
4152 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4153 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4154 and UNSPEC_BNDLX_ADDR.
4155 (ix86_output_indirect_branch_via_reg): Remove handling of
4156 indirect_thunk_prefix_bnd.
4157 (ix86_output_indirect_branch_via_push): Ditto.
4158 (ix86_output_function_return): Ditto.
4159 (ix86_output_indirect_function_return): Ditto.
4160 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4161 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4162 (CALL_USED_REGISTERS): Ditto.
4163 (REG_ALLOC_ORDER): Update for removal of bound registers.
4164 (HI_REGISTER_NAMES): Ditto.
4165 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4166 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4167 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4168 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4169 (FIRST_PSEUDO_REG): Update.
4170 (BND): Remove mode iterator.
4171 * config/i386/predicates.md (bnd_mem_operator): Remove.
4173 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4175 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4178 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4180 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4181 the case in which the permute needs only a single element and
4182 repeats for every vector of the result. Extend that case to
4183 handle variable-length vectors.
4184 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4186 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
4189 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4190 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4192 2018-08-24 Richard Biener <rguenther@suse.de>
4194 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4195 bb_flags_allocated members.
4196 (auto_flag): New RAII class for allocating flags.
4197 (auto_edge_flag): New RAII class for allocating edge flags.
4198 (auto_bb_flag): New RAII class for allocating bb flags.
4199 * cfgloop.c (verify_loop_structure): Allocate temporary edge
4201 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4202 in favor of temporarily allocated BB flag.
4203 * hsa-brig.c: Re-order includes.
4204 * hsa-dump.c: Likewise.
4205 * hsa-regalloc.c: Likewise.
4206 * print-rtl.c: Likewise.
4207 * profile-count.c: Likewise.
4209 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
4212 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4215 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4218 * wide-int-range.cc (wide_int_range_div): Do not ignore result
4219 from wide_int_range_multiplicative_op.
4221 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4223 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4226 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
4228 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4231 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
4233 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4234 full GENERIC expression used for replacement.
4236 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
4238 * tree-vrp.c (abs_extent_range): Remove.
4239 (extract_range_into_wide_ints): Pass wide ints by reference.
4240 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4241 Pass wide ints by reference in all calls to
4242 extract_range_into_wide_ints.
4243 * wide-int-range.cc (wide_int_range_div): New.
4244 * wide-int-range.h (wide_int_range_div): New.
4245 (wide_int_range_includes_zero_p): New.
4246 (wide_int_range_zero_p): New.
4248 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4250 * config/aarch64/aarch64.md (arches): New enum.
4251 (arch): New enum attr.
4252 (arch_enabled): New attr.
4253 (enabled): Now uses arch_enabled only.
4254 (simd, sve, fp16): Removed attribute.
4255 (fp): Attr now defined in terms of 'arch'.
4256 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4257 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4258 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4259 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4260 attributes into 'arch'.
4261 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4262 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4263 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4264 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4265 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4266 'simd' attribute into 'arch'.
4267 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4268 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4269 Convert use of 'fp' attribute to 'arch'.
4270 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4271 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4273 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4274 (different modes) Merge 'fp' and 'simd' into 'arch'.
4275 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4278 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4280 PR rtl-optimization/87026
4281 * expmed.c (canonicalize_comparison): If we can no longer create
4282 pseudoregisters, don't.
4284 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4287 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4289 * config/arm/arm.c (speculation_barrier_libfunc): New static
4291 (arm_init_libfuncs): Initialize it.
4292 (arm_emit_speculation_barrier): New function.
4293 * config/arm/arm.md (speculation_barrier): Call
4294 arm_emit_speculation_barrier for architectures that do not have
4296 (speculation_barrier_insn): Only match on Armv7 or later.
4298 2018-08-23 Richard Biener <rguenther@suse.de>
4301 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4304 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4306 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4307 of single-vector TBLs.
4308 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4311 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4314 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4315 aarch64_evpc_tbl guard.
4317 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4319 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4322 2018-08-22 Martin Sebor <msebor@redhat.com>
4325 * tree-pretty-print.c (pretty_print_string): Add argument.
4326 (dump_generic_node): Call to pretty_print_string with string size.
4328 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4330 PR rtl-optimization/86771
4331 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4332 of two SETs into those two SETs, one to be placed at i2, if that SETs
4333 destination is modified between i2 and i3.
4335 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4337 PR tree-optimization/86725
4338 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4340 (vect_analyze_scalar_cycles_1): Check it.
4342 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4344 PR tree-optimization/86725
4345 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4346 an outer loop phi as a double reduction, make sure that the
4347 single user of the phi result is an inner loop phi.
4349 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4351 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4352 grouped stores with gaps to a strided group.
4354 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4356 * tree-vect-stmts.c (get_group_load_store_type)
4357 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4358 first statement in a group.
4360 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4362 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4363 the sequence used in gcc/gcc.c.
4365 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4368 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4371 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4373 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4374 Darwin10-specific unwinder-shim.
4375 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4376 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4377 New to cater for Darwin10 Rosetta.
4379 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4381 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4382 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4384 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4389 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4390 (dwarf2out_switch_text_section): Generate a local label for the
4391 second function sub-section and apply it as the second FDE start
4393 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4394 second sub-section start.
4396 2018-08-22 Richard Biener <rguenther@suse.de>
4398 PR tree-optimization/86988
4399 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4401 2018-08-22 Richard Biener <rguenther@suse.de>
4403 PR tree-optimization/86945
4404 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4406 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4408 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4409 a comment about how uses of r2 for .sdata2 come about.
4411 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4413 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4415 2018-08-21 Marek Polacek <polacek@redhat.com>
4417 PR c++/86981, Implement -Wpessimizing-move.
4418 * doc/invoke.texi: Document -Wpessimizing-move.
4420 2018-08-21 Jan Hubicka <jh@suse.cz>
4422 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4423 * tree.h (is_redundant_typedef): Remove.
4424 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4426 2018-08-21 Jan Hubicka <jh@suse.cz>
4428 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4431 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4433 * expmed.c (extract_low_bits): Reject invalid subregs early.
4435 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4438 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4441 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4443 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4444 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4445 * config/vxworks.c: Likewise.
4447 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4449 * config/vxworks.c: Set targetm.have_ctors_dtors
4450 if HAVE_INITFINI_ARRAY_SUPPORT.
4451 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4452 if HAVE_INITFINI_ARRAY_SUPPORT.
4454 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4456 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4457 default search path for VxWorks < 7.
4459 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4461 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4462 (get_format_string): Refer to c_getstr.
4464 2018-08-21 Tom de Vries <tdevries@suse.de>
4466 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4467 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4468 (debuginfo_early_stop): Declare.
4469 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4470 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4471 (debuginfo_early_stop): New function.
4472 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4473 and debuginfo_early_stop.
4474 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4475 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4476 (general_init): Call debuginfo_early_init.
4477 (finalize): Call debuginfo_fini.
4478 (do_compile): Call debuginfo_init.
4479 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4481 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4483 2018-08-21 Tom de Vries <tdevries@suse.de>
4485 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4486 flag_dump_noaddr and flag_dump_unnumbered.
4488 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4490 * wide-int-range.cc (wide_int_range_abs): New.
4491 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4492 * wide-int-range.h (wide_int_range_abs): New.
4493 (wide_int_range_min_max): New.
4494 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4495 case to call wide_int_range_abs.
4496 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4497 (extract_range_from_abs_expr): Delete.
4499 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4502 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4503 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4506 2018-08-20 Nathan Sidwell <nathan@acm.org>
4507 Jeff Law <law@redhat.com>
4509 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4510 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4512 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4515 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4516 (decl_attributes): Likewise.
4517 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4519 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4520 * diagnostic-core.h (class auto_diagnostic_group): New class.
4521 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4522 (diagnostic_report_diagnostic): Handle the first diagnostics within
4524 (emit_diagnostic): Add auto_diagnostic_group instance.
4526 (inform_n): Likewise.
4527 (warning): Likewise.
4528 (warning_at): Likewise.
4529 (warning_n): Likewise.
4530 (pedwarn): Likewise.
4531 (permerror): Likewise.
4533 (error_n): Likewise.
4534 (error_at): Likewise.
4536 (fatal_error): Likewise.
4537 (internal_error): Likewise.
4538 (internal_error_no_backtrace): Likewise.
4539 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4540 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4541 * diagnostic.h (struct diagnostic_context): Add fields
4542 "diagnostic_group_nesting_depth",
4543 "diagnostic_group_emission_count", "begin_group_cb",
4545 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4546 Add auto_diagnostic_group instance(s).
4547 (find_explicit_erroneous_behavior): Likewise.
4548 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4549 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4550 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4551 (gimplify_va_arg_expr): Likewise.
4552 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4553 (HSA_SORRY_AT): Likewise.
4554 * ipa-devirt.c (compare_virtual_tables): Likewise.
4555 (warn_odr): Likewise.
4556 * multiple_target.c (expand_target_clones): Likewise.
4557 * opts-common.c (cmdline_handle_error): Likewise.
4558 * reginfo.c (globalize_reg): Likewise.
4559 * substring-locations.c (format_warning_n_va): Likewise.
4560 * tree-inline.c (expand_call_inline): Likewise.
4561 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4562 * tree-ssa-loop-niter.c
4563 (do_warn_aggressive_loop_optimizations): Likewise.
4564 * tree-ssa-uninit.c (warn_uninit): Likewise.
4565 * tree.c (warn_deprecated_use): Likewise.
4567 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4570 * config/i386/i386.md (eh_return): Always update EH return
4571 address in word_mode.
4573 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4575 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4576 TARGET_SPLIT_COMPLEX_ARG is defined.
4578 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4580 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4582 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4585 * expr.c (expand_assignment): Assert that bitpos is positive.
4586 (store_field): Likewise
4587 (expand_expr_real_1): Make sure that bitpos is positive.
4588 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4591 2018-08-20 Nathan Sidwell <nathan@acm.org>
4593 * Makefile.in (CPP_ID_DATA_H): Delete.
4594 (CPP_INTERNAL_H): Don't add it.
4595 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4596 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4598 2018-08-20 Richard Biener <rguenther@suse.de>
4600 PR tree-optimization/78655
4601 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4602 pointer + offset nonnull if either operand is nonnull work.
4604 2018-08-20 Tom de Vries <tdevries@suse.de>
4606 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4607 unless the referenced die describes the added property using
4608 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4609 Otherwise, add a DW_AT_location to the referenced die.
4611 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4614 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4615 register_operand when calling ix86_set_reg_reg_cost.
4616 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4617 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4618 predicate and to 1 otherwise.
4620 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4622 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4623 emit a diagnostic that it is not supported and reset the option.
4624 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4625 supported and consume the option. (ASM_FINAL_SPEC): New.
4627 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4629 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4632 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4634 C-SKY port: Documentation
4636 * doc/extend.texi (C-SKY Function Attributes): New section.
4637 * doc/invoke.texi (Option Summary): Add C-SKY options.
4638 (C-SKY Options): New section.
4639 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4641 2018-08-17 Jojo <jijie_rong@c-sky.com>
4642 Huibin Wang <huibin_wang@c-sky.com>
4643 Sandra Loosemore <sandra@codesourcery.com>
4644 Chung-Lin Tang <cltang@codesourcery.com>
4646 C-SKY port: Backend implementation
4648 * config/csky/*: New.
4649 * common/config/csky/*: New.
4651 2018-08-17 Jojo <jijie_rong@c-sky.com>
4652 Huibin Wang <huibin_wang@c-sky.com>
4653 Sandra Loosemore <sandra@codesourcery.com>
4654 Chung-Lin Tang <cltang@codesourcery.com>
4655 Andrew Jenner <andrew@codesourcery.com>
4657 C-SKY port: Configury
4659 * config.gcc (csky-*-*): New.
4660 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4661 * configure: Regenerated.
4663 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4665 * dump-context.h: Include "dumpfile.h".
4666 (dump_context::dump_printf_va): Convert final param from va_list
4667 to va_list *. Convert from ATTRIBUTE_PRINTF to
4668 ATTRIBUTE_GCC_DUMP_PRINTF.
4669 (dump_context::dump_printf_loc_va): Likewise.
4670 * dumpfile.c: Include "stringpool.h".
4671 (make_item_for_dump_printf_va): Delete.
4672 (make_item_for_dump_printf): Delete.
4673 (class dump_pretty_printer): New class.
4674 (dump_pretty_printer::dump_pretty_printer): New ctor.
4675 (dump_pretty_printer::emit_items): New member function.
4676 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4678 (dump_pretty_printer::emit_item): New member function.
4679 (dump_pretty_printer::stash_item): New member function.
4680 (dump_pretty_printer::format_decoder_cb): New member function.
4681 (dump_pretty_printer::decode_format): New member function.
4682 (dump_context::dump_printf_va): Reimplement in terms of
4683 dump_pretty_printer.
4684 (dump_context::dump_printf_loc_va): Convert final param from va_list
4686 (dump_context::begin_scope): Reimplement call to
4687 make_item_for_dump_printf.
4688 (dump_printf): Update for change to dump_printf_va.
4689 (dump_printf_loc): Likewise.
4690 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4691 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4692 with %T, %E, and %G.
4693 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4694 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4695 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4696 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4697 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4698 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4699 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4700 within a dump_printf_loc call to "%wu".
4701 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4702 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4703 missing space after "=".
4704 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4705 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4706 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4707 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4708 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4709 duplicate "vectorized" from message.
4711 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4713 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4714 polyNxK_t element's TYPE_STRING_FLAG.
4716 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4718 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4719 (they were unnamed before). Fix comments.
4721 2018-08-17 Nathan Sidwell <nathan@acm.org>
4723 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4725 2018-08-17 Richard Biener <rguenther@suse.de>
4727 PR tree-optimization/86841
4728 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4730 2018-08-17 Martin Liska <mliska@suse.cz>
4732 * common.opt: Remove Warn, Init and Report for options with
4733 Ignore/Deprecated flag. Warning is done automatically for
4735 * config/i386/i386.opt: Likewise.
4736 * config/ia64/ia64.opt: Likewise.
4737 * config/rs6000/rs6000.opt: Likewise.
4738 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4739 Remove usage of flag_check_pointer_bounds.
4740 * lto-wrapper.c (merge_and_complain): Do not handle
4741 OPT_fcheck_pointer_bounds.
4742 (append_compiler_options): Likewise.
4743 * opt-functions.awk: Do not handle Deprecated.
4744 * optc-gen.awk: Check that Var, Report and Init are not
4745 used for an option with Ignore/Deprecated flag.
4746 * opts-common.c (decode_cmdline_option): Do not report
4748 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4750 * opts.h (struct cl_option): Remove cl_deprecated flag.
4751 (CL_ERR_DEPRECATED): Remove error enum value.
4753 2018-08-17 Richard Biener <rguenther@suse.de>
4756 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4757 across a va-arg-pack using call adjust its return value accordingly.
4759 2018-08-16 Martin Sebor <msebor@redhat.com>
4761 PR tree-optimization/86853
4762 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4763 (struct fmtresult): Add member and initialize it in ctors.
4764 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4765 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4766 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4767 (parse_directive): Handle %C same as %c.
4768 (sprintf_dom_walker::compute_format_length): Adjust.
4769 (is_call_safe): Adjust.
4771 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4773 * builtins.c (c_strlen): Add new parameter eltsize. Use it
4774 for determining how to count the elements.
4775 * builtins.h (c_strlen): Adjust prototype.
4776 * expr.c (string_constant): Add new parameter mem_size.
4777 Set *mem_size appropriately.
4778 * expr.h (string_constant): Adjust protoype.
4779 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4780 * gimple-fold.h (get_range_strlen): Adjust prototype.
4781 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4782 (format_string): Call get_string_length with eltsize.
4784 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4786 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4787 to emit the span, rather than setting it as the prefix.
4789 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4791 * diagnostic-show-locus.c (layout::start_annotation_line): Add
4792 "margin_char" parameter, defaulting to space. Use it in place
4793 of pp_space for the initial part of the margin.
4794 (layout::print_leading_fixits): Use '+' when filling the margin
4795 of line-insertion fix-it hints.
4797 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4799 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4802 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4804 * config/rs6000/altivec.md: Don't set length attribute to the default
4806 * config/rs6000/darwin.md: Ditto.
4807 * config/rs6000/dfp.md: Ditto.
4808 * config/rs6000/htm.md: Ditto.
4809 * config/rs6000/rs6000.md: Ditto.
4810 * config/rs6000/sync.md: Ditto.
4811 * config/rs6000/vsx.md: Ditto.
4813 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4815 * config/rs6000/altivec.md: Don't set length attribute to the default
4816 value, for branch instructions.
4817 * config/rs6000/darwin.md: Ditto.
4818 * config/rs6000/rs6000.md: Ditto.
4820 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4822 * config/rs6000/rs6000.md (length): Always define as const_int 4.
4823 (unnamed conditional branch define_insn): Set length to 4 or 8
4824 depending on offset.
4825 (<bd>_<mode>): Similar, for alternative 0.
4826 (<bd>tf_<mode>): Ditto.
4828 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4830 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4832 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
4834 * doc/rtl.texi: Replace old RTX class names with new names.
4837 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
4839 * expmed.h (canonicalize_comparison): New declaration.
4840 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4841 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4842 * optabs.c (prepare_cmp_insn): Likewise.
4843 * rtl.h (unsigned_condition_p): New function which checks if a
4844 comparison operator is unsigned.
4846 2018-08-16 Nathan Sidwell <nathan@acm.org>
4848 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4849 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4851 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4854 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4855 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4856 (mov<mov>): ..this and enable unconditionally.
4858 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4860 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4862 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
4864 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4865 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4866 "Common" with "Target".
4868 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4870 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4871 * doc/invoke.texi (mmitigate-rop): Remove.
4872 * config/i386/i386.c: Do not include "regrename.h".
4873 (ix86_rop_should_change_byte_p, reg_encoded_number)
4874 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4876 (ix86_reorg): Remove call to ix86_mitigate_rop.
4877 * config/i386/i386.md (attr "modrm_class"): Remove.
4878 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4879 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4880 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4882 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
4884 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4885 allow folding of mergeh() and mergel() for the float and double types.
4886 (fold_mergehl_helper): Rework to handle building a permute tree
4889 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4891 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4894 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4896 * common.opt (fdiagnostics-show-labels): New option.
4897 * diagnostic-show-locus.c (class layout_range): Add field
4899 (class layout): Add field "m_show_labels_p".
4900 (layout_range::layout_range): Add param "label" and use it to
4902 (make_range): Pass in NULL for new "label" param of layout_range's
4904 (layout::layout): Initialize m_show_labels_p.
4905 (layout::maybe_add_location_range): Pass in loc_range->m_label
4906 when constructing layout_range instances.
4907 (struct line_label): New struct.
4908 (layout::print_any_labels): New member function.
4909 (layout::print_line): Call it if label-printing is enabled.
4910 (selftest::test_one_liner_labels): New test.
4911 (selftest::test_diagnostic_show_locus_one_liner): Call it.
4912 * diagnostic.c (diagnostic_initialize): Initialize
4913 context->show_labels_p.
4914 * diagnostic.h (struct diagnostic_context): Add field
4916 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4917 -fno-diagnostics-show-labels.
4918 * dwarf2out.c (gen_producer_string): Add
4919 OPT_fdiagnostics_show_labels to the ignored options.
4920 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4922 (gcc_rich_location::maybe_add_expr): Likewise.
4923 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4924 label" param, defaulting to NULL.
4925 (gcc_rich_location::add_expr): Add "label" param.
4926 (gcc_rich_location::maybe_add_expr): Likewise.
4927 (class text_range_label): New class.
4928 (class range_label_for_type_mismatch): New class.
4929 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4930 of format_warning_va.
4931 (fmtwarn_n): Likewise for new params of format_warning_n_va.
4932 * lto-wrapper.c (merge_and_complain): Add
4933 OPT_fdiagnostics_show_labels to the "pick one setting" options.
4934 (append_compiler_options): Likewise to the dropped options.
4935 (append_diag_options): Likewise to the passed-on options.
4936 * opts.c (common_handle_option): Handle the new option.
4937 * selftest-diagnostic.c
4938 (test_diagnostic_context::test_diagnostic_context): Enable
4940 * substring-locations.c: Include "gcc-rich-location.h".
4941 (format_warning_n_va): Add "fmt_label" and "param_label" params
4942 and use them as appropriate.
4943 (format_warning_va): Add "fmt_label" and "param_label" params,
4944 passing them on to format_warning_n_va.
4945 (format_warning_at_substring): Likewise.
4946 (format_warning_at_substring_n): Likewise.
4947 * substring-locations.h (format_warning_va): Add "fmt_label" and
4948 "param_label" params.
4949 (format_warning_n_va): Likewise.
4950 (format_warning_at_substring): Likewise.
4951 (format_warning_at_substring_n): Likewise.
4952 * toplev.c (general_init): Initialize global_dc->show_labels_p.
4954 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
4957 * builtins.c (expand_builtin_memcmp): Do not expand the call
4958 when overflow is detected.
4960 2018-08-15 Martin Sebor <msebor@redhat.com>
4962 PR tree-optimization/71625
4963 * config/aarch64/aarch64-builtins.c
4964 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4966 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
4968 * config/s390/s390.c (s390_reorg): Remove loop.
4970 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4973 (darwin_function_switched_text_sections): Delete.
4974 * gcc/config/darwin.h
4975 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4977 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4980 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4981 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
4982 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4984 2018-08-15 Martin Liska <mliska@suse.cz>
4986 PR tree-optimization/86925
4987 * predict.c (expr_expected_value_1): When taking
4988 later predictor, assign also probability.
4989 Use fold_build2_initializer_loc in order to fold
4990 the expression in -frounding-math.
4992 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
4994 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4996 (expand_vec_perm_1): Try the new method.
4998 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
5001 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5002 Check whether lra_live_max_point is 0 before dividing.
5004 2018-08-14 Martin Sebor <msebor@redhat.com>
5006 PR tree-optimization/86650
5007 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5008 (vrp_prop::check_mem_ref): Same.
5010 2018-08-13 Liu Hao <lh_mouse@126.com>
5012 * pretty-print.c (eat_esc_sequence): Swap the foreground and
5013 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5014 and clear it thereafter, as it only works for DBCS.
5016 2018-08-13 Liu Hao <lh_mouse@126.com>
5018 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5019 handle returned by _get_osf_handle().
5021 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5023 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5024 for folding vec_perm.
5026 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5028 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5029 Add support for gimple-folding of vec_pack() and vec_unpack()
5032 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5034 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5035 vec_xst variants to the list.
5036 (rs6000_gimple_fold_builtin): Add support for folding unaligned
5037 vector loads and stores.
5039 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
5041 * config.gcc (rs6000-ibm-aix4.x): Delete.
5042 (rs6000-ibm-aix5.1): Delete.
5043 (rs6000-ibm-aix5.2): Delete.
5044 (rs6000-ibm-aix5.3): Delete.
5045 * config/rs6000/aix43.h: Delete.
5046 * config/rs6000/aix51.h: Delete.
5047 * config/rs6000/aix52.h: Delete.
5048 * config/rs6000/t-aix43: Delete.
5050 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
5052 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5054 (s390_decompose_address): Factor out constant pool ref
5057 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5059 * config/nds32/nds32-predicates.c
5060 (nds32_can_use_bclr_p): Change return type as bool.
5061 (nds32_can_use_bset_p): Ditto.
5062 (nds32_can_use_btgl_p): Ditto.
5063 (nds32_can_use_bitci_p): Ditto.
5064 * config/nds32/nds32-protos.h
5065 (nds32_can_use_bclr_p): Change declaration.
5066 (nds32_can_use_bset_p): Ditto.
5067 (nds32_can_use_btgl_p): Ditto.
5068 (nds32_can_use_bitci_p): Ditto.
5070 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5072 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5073 Support -msched-prolog-epilog option.
5074 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5076 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5078 * common/config/nds32/nds32-common.c
5079 (nds32_option_optimization_table): Enalbe -malways-align.
5081 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5083 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5085 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5086 OPT_misr_secure_ case.
5087 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5088 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5089 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5091 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5092 (nds32_isr_info): New field security_level.
5093 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5094 * config/nds32/nds32.md (return_internal): Consider critical attribute.
5095 * config/nds32/nds32.opt (misr-secure): New option.
5096 * config/nds32/nds32_init.inc: New file.
5097 * config/nds32/nds32_isr.h: New file.
5099 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
5101 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5102 Update comment for atomic instructions.
5103 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5104 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5106 (atomic_loaddi): Revise fence expansion to only emit fence prior to
5107 load for __ATOMIC_SEQ_CST model.
5108 (atomic_loaddi_1): Remove float register target.
5109 (atomic_storedi): Handle CONST_INT values.
5110 (atomic_storedi_1): Remove float register source. Add special case
5112 (memory_barrier): New expander and insn.
5114 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5116 PR tree-optimization/86835
5117 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5118 new_stmt after def_gsi, make sure to insert new_square_stmt after
5119 that stmt, not 2 stmts before it.
5121 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5124 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5127 2018-08-10 Martin Liska <mliska@suse.cz>
5130 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5132 * builtins.c (expand_builtin_expect_with_probability):
5134 (expand_builtin_expect_with_probability): New function.
5135 (build_builtin_expect_predicate): Add new argumnet probability
5136 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5137 (fold_builtin_expect):
5140 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5141 * builtins.h (fold_builtin_expect): Set new argument.
5142 * doc/extend.texi: Document __builtin_expect_with_probability.
5143 * doc/invoke.texi: Likewise.
5144 * gimple-fold.c (gimple_fold_call): Pass new argument.
5145 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5146 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5147 * predict.c (get_predictor_value): New function.
5148 (expr_expected_value): Add new argument probability. Assume
5149 that predictor and probability are always non-null.
5150 (expr_expected_value_1): Likewise. For __builtin_expect and
5151 __builtin_expect_with_probability set probability. Handle
5152 combination in binary expressions.
5153 (tree_predict_by_opcode): Simplify code by simply calling
5154 get_predictor_value.
5155 (pass_strip_predict_hints::execute): Add handling of
5156 BUILT_IN_EXPECT_WITH_PROBABILITY.
5157 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5159 * tree.h (DECL_BUILT_IN_P): New function.
5161 2018-08-10 Martin Liska <mliska@suse.cz>
5163 PR tree-optimization/85799
5164 * passes.def: Add argument for pass_strip_predict_hints.
5165 * predict.c (class pass_strip_predict_hints): Add new argument
5167 (strip_predictor_early): New function.
5168 (pass_strip_predict_hints::execute): Call the function to
5170 (strip_predict_hints): New function.
5171 * predict.def: Fix comment.
5173 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5175 * Makefile.in: Clarify which tm.texi to copy over to assert the
5176 right to grant a GFDL license for all.
5178 2018-08-09 Jeff Law <law@redhat.com>
5180 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5183 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
5185 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5188 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5190 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5191 reductions for variable-length vectors.
5193 2018-08-09 David Malcolm <dmalcolm@redhat.com>
5196 * common.opt (fdiagnostics-show-line-numbers): New option.
5197 * diagnostic-show-locus.c (class layout): Add fields
5198 "m_show_line_numbers_p" and "m_linenum_width";
5199 (num_digits): New function.
5200 (test_num_digits): New function.
5201 (layout::layout): Initialize new fields. Update m_x_offset
5202 logic to handle any left margin.
5203 (layout::print_source_line): Print line number when requested.
5204 (layout::start_annotation_line): New member function.
5205 (layout::print_annotation_line): Call it.
5206 (layout::print_leading_fixits): Likewise.
5207 (layout::print_trailing_fixits): Likewise. Update calls to
5208 move_to_column for new parameter.
5209 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5210 it to potentially call start_annotation_line.
5211 (layout::show_ruler): Call start_annotation_line.
5212 (selftest::test_line_numbers_multiline_range): New selftest.
5213 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5214 and selftest::test_line_numbers_multiline_range.
5215 * diagnostic.c (diagnostic_initialize): Initialize
5216 show_line_numbers_p.
5217 * diagnostic.h (struct diagnostic_context): Add field
5218 "show_line_numbers_p".
5219 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5220 -fno-diagnostics-show-line-numbers.
5221 * dwarf2out.c (gen_producer_string): Add
5222 OPT_fdiagnostics_show_line_numbers to the ignored options.
5223 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5224 one setting" options.
5225 (append_compiler_options): Likewise to the dropped options.
5226 (append_diag_options): Likewise to the passed-on options.
5227 * opts.c (common_handle_option): Handle the new option.
5228 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5230 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
5232 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5233 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
5234 third argument of type "const signed char" to descriptions of
5235 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5236 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5237 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5238 __builtin_bcdsub_ov functions.
5240 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5242 PR tree-optimization/86858
5243 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5244 flow_bb_inside_loop_p calls.
5246 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5248 PR tree-optimization/86871
5249 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5250 instead of gimple_assign_lhs.
5252 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5255 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5256 register constraint to operand 0.
5257 (add<mode>3_carryinC): Likewise.
5258 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5260 2018-08-09 Martin Liska <mliska@suse.cz>
5263 * common.opt: Remove extra line.
5265 2018-08-09 Martin Liska <mliska@suse.cz>
5267 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5268 at the end of a line, make first letter capital and end up
5269 a sentence with a dot.
5270 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5271 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5272 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5273 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5274 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5275 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5276 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5277 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5278 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5279 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5280 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5281 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5282 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5283 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5284 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5285 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5286 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5287 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5289 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5292 * config/s390/s390.c (s390_option_override_internal): Reduce the
5293 stack-clash-protection-probe-interval param if it would be too big
5296 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5299 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5300 * config/m68k/m68k.c (handle_move_double): Don't call
5301 m68k_final_prescan_insn.
5302 (m68k_adjust_decorated_operand): Renamed from
5303 m68k_final_prescan_insn, remove first and third operand and
5305 (print_operand): Call it.
5306 (print_operand_address): Call it.
5308 2018-08-08 Nathan Sidwell <nathan@acm.org>
5310 * diagnostic.c (diagnostic_report_current_module): Use
5311 linemap_included_from & linemap_included_from_linemap.
5313 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5315 * config/aarch64/aarch64-cores.def: Add phecda core.
5316 * config/aarch64/aarch64-tune.md: Regenerate.
5317 * doc/invoke.texi: Add phecda core.
5319 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5322 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5324 * config/s390/s390.md ("movti"): Add more alternatives for
5325 constant to GPR copies.
5327 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5329 * config/s390/s390.c: Fix whitespace damage throughout the file.
5330 * config/s390/s390.h: Likewise.
5331 * config/s390/tpf.h: Likewise.
5333 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5335 * config/s390/s390.c (s390_loadrelative_operand_p):
5336 Remove TARGET_CPU_ZARCH usages.
5337 (s390_rtx_costs): Likewise.
5338 (s390_legitimate_constant_p): Likewise.
5339 (s390_cannot_force_const_mem): Likewise.
5340 (legitimate_reload_constant_p): Likewise.
5341 (s390_preferred_reload_class): Likewise.
5342 (legitimize_pic_address): Likewise.
5343 (legitimize_tls_address): Likewise.
5344 (s390_split_branches): Removed.
5345 (s390_add_execute): Removed.
5346 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5347 (s390_mainpool_start): Likewise.
5348 (s390_mainpool_finish): Likewise.
5349 (s390_mainpool_cancel): Removed.
5350 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5351 (s390_chunkify_cancel): Likewise.
5352 (s390_return_addr_rtx): Likewise.
5353 (s390_register_info): Remove split_branches_pending_p uages.
5354 (s390_optimize_register_info): Likewise.
5355 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5356 split_branches_pending_p usages.
5357 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5358 (s390_load_got): Likewise.
5359 (s390_expand_split_stack_prologue): Likewise.
5360 (output_asm_nops): Likewise.
5361 (s390_function_profiler): Likewise.
5362 (s390_emit_call): Likewise.
5363 (s390_conditional_register_usage): Likewise.
5364 (s390_optimize_prologue): Likewise.
5365 (s390_reorg): Remove TARGET_CPU_ZARCH and
5366 split_branches_pending_p usages.
5367 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5369 (s390_output_indirect_thunk_function): Likewise.
5370 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5371 (TARGET_CPU_ZARCH_P): Removed.
5372 (struct machine_function): Remove split_branches_pending_p.
5373 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5375 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5377 * common/config/s390/s390-common.c (processor_flags_table):
5379 * config.gcc: Remove with_arch/with_tune support.
5380 * config/s390/2064.md: Remove cpu attribute comparisons.
5381 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5383 * config/s390/linux.h (ASM_SPEC):
5384 Remove -march support.
5385 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5386 Use a table to get an arch level.
5387 * config/s390/s390-opts.h (enum processor_type):
5389 * config/s390/s390.c
5390 (processor_table): Remove entries, add arch_level values.
5391 (s390_issue_rate): Remove cases.
5392 (s390_option_override): Adjust
5393 s390_option_override_internal() call.
5394 (s390_option_override_internal): Remove deprecation warning.
5395 (s390_valid_target_attribute_tree): Adjust
5396 s390_option_override_internal() call.
5397 * config/s390/s390.h (struct s390_processor):
5398 Share with s390-c.c, add arch_level field.
5399 * config/s390/s390.md:
5400 Remove occurrences in cpu attribute.
5401 * config/s390/s390.opt: Remove -march/-mtune support.
5402 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5403 * doc/invoke.texi: Remove deprecation warning.
5405 2018-08-08 Luis Machado <luis.machado@linaro.org>
5407 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5409 (qdf24xx_tunings): Set vector cost structure to
5410 qdf24xx_vector_cost.
5412 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5413 <register_sextend>: Set to 3.
5415 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5418 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5419 * config/aarch64/aarch64-simd.md
5420 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5421 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5422 (aarch64_frecpx<mode>): ...this new pattern.
5423 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5424 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5426 2018-08-07 Martin Liska <mliska@suse.cz>
5429 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5430 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5431 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5432 * doc/extend.texi: Document that malloc attribute adds
5435 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5438 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5439 Define to speculation_safe_value_not_needed.
5441 2018-08-06 Jeff Law <law@redhat.com>
5443 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5444 the vr_values instance to cprop_into_stmt.
5445 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5446 (cprop_operand): Also query EVRP to determine if OP is a constant.
5448 2018-08-06 Nathan Sidwell <nathan@acm.org>
5450 * diagnostic.c (diagnostic_report_current_module): Reroll
5451 included-at loop. Translate text.
5453 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5455 * function-tests.c (selftest::test_expansion_to_rtl): Call
5456 free_after_compilation.
5458 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5460 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5462 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5464 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5465 loops with memory block operations from getting unrolled.
5467 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5470 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5471 Define to speculation_safe_value_not_needed.
5473 2018-08-06 Jeff Law <law@redhat.com>
5475 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5478 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5481 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5482 with all enabled __intN types.
5484 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5486 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5488 * alias.c (record_set): Check for clobber high.
5489 * cfgexpand.c (expand_gimple_stmt): Likewise.
5490 * combine-stack-adj.c (single_set_for_csa): Likewise.
5491 * combine.c (find_single_use_1): Likewise.
5492 (set_nonzero_bits_and_sign_copies): Likewise.
5493 (get_combine_src_dest): Likewise.
5494 (is_parallel_of_n_reg_sets): Likewise.
5495 (try_combine): Likewise.
5496 (record_dead_and_set_regs_1): Likewise.
5497 (reg_dead_at_p_1): Likewise.
5498 (reg_dead_at_p): Likewise.
5499 * dce.c (deletable_insn_p): Likewise.
5500 (mark_nonreg_stores_1): Likewise.
5501 (mark_nonreg_stores_2): Likewise.
5502 * df-scan.c (df_find_hard_reg_defs): Likewise.
5503 (df_uses_record): Likewise.
5504 (df_get_call_refs): Likewise.
5505 * dwarf2out.c (mem_loc_descriptor): Likewise.
5506 * haifa-sched.c (haifa_classify_rtx): Likewise.
5507 * ira-build.c (create_insn_allocnos): Likewise.
5508 * ira-costs.c (scan_one_insn): Likewise.
5509 * ira.c (equiv_init_movable_p): Likewise.
5510 (rtx_moveable_p): Likewise.
5511 (interesting_dest_for_shprep): Likewise.
5512 * jump.c (mark_jump_label_1): Likewise.
5513 * postreload-gcse.c (record_opr_changes): Likewise.
5514 * postreload.c (reload_cse_simplify): Likewise.
5515 (struct reg_use): Add source expr.
5516 (reload_combine): Check for clobber high.
5517 (reload_combine_note_use): Likewise.
5518 (reload_cse_move2add): Likewise.
5519 (move2add_note_store): Likewise.
5520 * print-rtl.c (print_pattern): Likewise.
5521 * recog.c (decode_asm_operands): Likewise.
5522 (store_data_bypass_p): Likewise.
5523 (if_test_bypass_p): Likewise.
5524 * regcprop.c (kill_clobbered_value): Likewise.
5525 (kill_set_value): Likewise.
5526 * reginfo.c (reg_scan_mark_refs): Likewise.
5527 * reload1.c (maybe_fix_stack_asms): Likewise.
5528 (eliminate_regs_1): Likewise.
5529 (elimination_effects): Likewise.
5530 (mark_not_eliminable): Likewise.
5531 (scan_paradoxical_subregs): Likewise.
5532 (forget_old_reloads_1): Likewise.
5533 * reorg.c (find_end_label): Likewise.
5534 (try_merge_delay_insns): Likewise.
5535 (redundant_insn): Likewise.
5536 (own_thread_p): Likewise.
5537 (fill_simple_delay_slots): Likewise.
5538 (fill_slots_from_thread): Likewise.
5539 (dbr_schedule): Likewise.
5540 * resource.c (update_live_status): Likewise.
5541 (mark_referenced_resources): Likewise.
5542 (mark_set_resources): Likewise.
5543 * rtl.c (copy_rtx): Likewise.
5544 * rtlanal.c (reg_referenced_p): Likewise.
5545 (single_set_2): Likewise.
5546 (noop_move_p): Likewise.
5547 (note_stores): Likewise.
5548 * sched-deps.c (sched_analyze_reg): Likewise.
5549 (sched_analyze_insn): Likewise.
5551 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5553 * cse.c (invalidate_reg): New function extracted from...
5554 (invalidate): ...here.
5555 (canonicalize_insn): Check for clobber high.
5556 (invalidate_from_clobbers): invalidate clobber highs.
5557 (invalidate_from_sets_and_clobbers): Likewise.
5558 (count_reg_usage): Check for clobber high.
5559 (insn_live_p): Likewise.
5560 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5561 (cselib_invalidate_regno): Check for clobber in setter.
5562 (cselib_invalidate_rtx): Pass through setter.
5563 (cselib_invalidate_rtx_note_stores):
5564 (cselib_process_insn): Check for clobber high.
5565 * cselib.h (cselib_invalidate_rtx): Add operand.
5567 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5569 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5570 (mark_not_eliminable): Likewise.
5571 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5572 * lra-lives.c (process_bb_lives): Check for clobber high.
5573 * lra.c (new_insn_reg): Remember clobber highs.
5574 (collect_non_operand_hard_regs): Check for clobber high.
5575 (lra_set_insn_recog_data): Likewise.
5576 (add_regs_to_insn_regno_info): Likewise.
5577 (lra_update_insn_regno_info): Likewise.
5579 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5581 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5582 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5584 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5586 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5587 (copy_insn_1): Likewise.
5588 (gen_hard_reg_clobber_high): New gen function.
5589 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5590 * genemit.c (gen_exp): Likewise.
5591 (gen_emit_seq): Pass through info.
5592 (gen_insn): Check for CLOBBER_HIGH.
5593 (gen_expand): Pass through info.
5594 (gen_split): Likewise.
5595 (output_add_clobbers): Likewise.
5596 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5597 (remove_clobbers): Likewise.
5598 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5600 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5602 * doc/rtl.texi (clobber_high): Add.
5603 (parallel): Add in clobber high
5604 * rtl.c (rtl_check_failed_code3): Add function.
5605 * rtl.def (CLOBBER_HIGH): Add expression.
5606 * rtl.h (RTL_CHECKC3): Add macro.
5607 (rtl_check_failed_code3): Add declaration.
5608 (XC3EXP): Add macro.
5610 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5613 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5614 cfun->machine->max_used_stack_alignment if needed.
5616 2018-08-04 Martin Sebor <msebor@redhat.com>
5618 PR tree-optimization/86571
5619 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5622 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5625 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5628 2018-08-03 Jeff Law <law@redhat.com>
5631 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5632 Define to speculation_safe_value_not_needed.
5634 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5636 * doc/gcov.texi (-x): Remove duplicate "to".
5637 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5638 (-Wif-not-aligned): Remove duplicate "is".
5639 (-flto): Remove duplicate "the".
5640 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5641 duplicate "v5.00.b".
5642 (MSP430 Options): Remove duplicate "and" from the description
5643 of "-mgprel-sec=regexp".
5644 (x86 Options): Remove duplicate copies of "vmldLog102" and
5645 vmlsLog104 from description of "-mveclibabi=type".
5647 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5649 * internal-fn.h (first_commutative_argument): Declare.
5650 * internal-fn.c (first_commutative_argument): New function.
5651 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5652 restrictions for pattern statements. Use first_commutative_argument
5653 to look for commutative operands in calls to internal functions.
5655 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5657 * Makefile.in (wide-int-range.o): New.
5658 * tree-vrp.c: Move all the wide_int_* functions to...
5659 * wide-int-range.cc: ...here.
5660 * tree-vrp.h: Move all the wide_int_* prototypes to...
5661 * wide-int-range.h: ...here.
5663 2018-08-03 Tom de Vries <tdevries@suse.de>
5665 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5667 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5668 * except.c (output_function_exception_table): Do early exit if
5669 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5671 2018-08-03 Martin Liska <mliska@suse.cz>
5673 * predict.c (dump_prediction): Change to 2 digits
5676 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5678 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5680 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5682 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5684 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5685 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5686 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5687 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5688 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5690 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5692 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5693 pp_take_prefix when saving the existing prefix.
5694 * diagnostic.c (diagnostic_append_note): Likewise.
5695 * langhooks.c (lhd_print_error_function): Likewise.
5696 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5697 param's type. Free the existing prefix.
5698 (pp_take_prefix): New function.
5699 (pretty_printer::pretty_printer): Drop the prefix parameter.
5700 Rename the length parameter to match the comment.
5701 (pretty_printer::~pretty_printer): Free the prefix.
5702 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5704 (struct pretty_printer): Drop the "const" from "prefix" field's
5705 type and clarify memory management.
5706 (pp_set_prefix): Drop the "const" from the 2nd param.
5707 (pp_take_prefix): New decl.
5709 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5711 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5712 for word_mode_ok here instead of passing as argument.
5713 (expand_block_compare): Change select_block_compare_mode() call.
5714 (expand_strncmp_gpr_sequence): New function.
5715 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5717 2018-08-02 Jeff Law <law@redhat.com>
5720 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5721 Define to speculation_safe_value_not_needed.
5724 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5725 Define to speculation_safe_value_not_needed.
5727 2018-08-02 Tom de Vries <tdevries@suse.de>
5730 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5731 function. Return UI_TARGET unconditionally.
5732 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5733 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5735 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5737 * genemit.c (print_overload_test): Fix typo.
5739 2018-08-02 Richard Biener <rguenther@suse.de>
5741 PR tree-optimization/86816
5742 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5743 which checks for value availability before querying it.
5744 (gvn_uses_equal): Use it.
5745 (same_succ_hash): Likewise.
5746 (gimple_equal_p): Likewise.
5748 2018-08-02 Nick Clifton <nickc@redhat.com>
5751 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5752 Define to speculation_safe_value_not_needed.
5755 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5756 Define to speculation_safe_value_not_needed.
5759 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5760 Define to speculation_safe_value_not_needed.
5763 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5764 Define to speculation_safe_value_not_needed.
5767 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5768 Define to speculation_safe_value_not_needed.
5771 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5772 Define to speculation_safe_value_not_needed.
5775 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5776 Define to speculation_safe_value_not_needed.
5779 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5780 Define to speculation_safe_value_not_needed.
5783 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5784 speculation_safe_value_not_needed.
5787 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5788 to speculation_safe_value_not_needed.
5790 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5792 * doc/md.texi: Expand the documentation of instruction names
5793 to mention port-local uses. Document '@' in pattern names.
5794 * read-md.h (overloaded_instance, overloaded_name): New structs.
5796 (md_reader::handle_overloaded_name): New member function.
5797 (md_reader::get_overloads): Likewise.
5798 (md_reader::m_first_overload): New member variable.
5799 (md_reader::m_next_overload_ptr): Likewise.
5800 (md_reader::m_overloads_htab): Likewise.
5801 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5802 m_next_overload_ptr and m_overloads_htab.
5803 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5804 (get_mode_token, get_code_token, get_int_token): New functions.
5805 (map_attr_string): Add an optional argument that passes back
5806 the associated iterator.
5807 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5808 (md_reader::handle_overloaded_name, add_overload_instance): New
5810 (apply_iterators): Handle '@' names. Report an error if '@'
5811 is used without iterators.
5812 (initialize_iterators): Initialize the new iterator_group fields.
5813 * genopinit.c (handle_overloaded_code_for)
5814 (handle_overloaded_gen): New functions.
5815 (main): Use them to print declarations of maybe_code_for_* and
5816 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5817 * genemit.c (print_overload_arguments, print_overload_test)
5818 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5819 (main): Use it to print definitions of maybe_code_for_* and
5820 maybe_gen_* functions.
5821 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5822 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5823 instead of explicit mode checks.
5824 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5825 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5826 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5827 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5828 (aarch64_expand_compare_and_swap): Likewise
5829 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5830 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5831 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5832 (aarch64_constant_pool_reload_icode): Delete.
5833 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5834 instead of aarch64_constant_pool_reload_icode. Use
5835 code_for_aarch64_reload_mov instead of explicit mode checks.
5836 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5837 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5838 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5839 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5840 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5841 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5842 (aarch64_atomic_load_op_code): Delete.
5843 (aarch64_emit_atomic_load_op): Likewise.
5844 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5845 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
5846 instead of aarch64_emit_atomic_load_op.
5847 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5848 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5849 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5850 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5851 character before the pattern name.
5852 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5853 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5854 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5855 (aarch64_frecps<mode>): Likewise.
5856 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5857 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5858 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5859 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5860 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5862 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5864 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5865 Allow HFmode constants if TARGET_FP_F16INST.
5867 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
5870 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5871 No longer check last store for clobber of address register.
5873 2018-08-02 Martin Liska <mliska@suse.cz>
5875 PR gcov-profile/86817
5876 * gcov.c (process_all_functions): New function.
5878 (process_file): Move functions processing to
5879 process_all_functions.
5881 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5883 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5884 "const" to the "gimple *" and "rtx_insn *" parameters.
5885 * dumpfile.h (dump_user_location_t::dump_user_location_t):
5887 (dump_location_t::dump_location_t): Likewise.
5889 2018-08-01 Martin Sebor <msebor@redhat.com>
5891 PR tree-optimization/86650
5892 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5893 rather than a "gcall *". Directly pass the data of interest
5894 to percent_K_format, rather than building a temporary CALL_EXPR
5896 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5897 (gimple_fold_builtin_strncat): Adjust.
5898 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5899 gcall* argument with gimple*.
5900 * gimple-ssa-warn-restrict.c (check_call): Same.
5901 (wrestrict_dom_walker::before_dom_children): Same.
5902 (builtin_access::builtin_access): Same.
5903 (check_bounds_or_overlap): Same
5904 (maybe_diag_overlap): Same.
5905 (maybe_diag_offset_bounds): Same.
5906 * tree-diagnostic.c (default_tree_printer): Move usage of
5907 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5909 * tree-pretty-print.c (percent_K_format): Add argument.
5910 * tree-pretty-print.h: Add argument.
5911 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5912 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5913 (maybe_diag_stxncpy_trunc): Same.
5914 (handle_builtin_stxncpy): Same.
5915 (handle_builtin_strcat): Same.
5917 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5919 * match.pd: Optimise pointer range checks.
5921 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5923 PR tree-optimization/86758
5924 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5925 to remove pattern statements.
5927 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5929 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5930 result of dfs_enumerate_from when constructing stmt_vec_infos,
5931 instead of additionally calling get_loop_body.
5933 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5935 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5937 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5938 When creating an iv, assert that the step is not known to be zero.
5939 (vect_setup_realignment): Update call accordingly.
5940 * tree-vect-stmts.c (vectorizable_store): Likewise.
5941 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
5943 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5945 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5946 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5947 (vectorizable_reduction): Likewise.
5948 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5949 (vect_detect_hybrid_slp_stmts): Likewise.
5950 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5952 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
5954 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5955 (wide_int_set_zero_nonzero_bits): ...this.
5956 (zero_nonzero_bits_from_vr): Rename to...
5957 (vrp_set_zero_nonzero_bits): ...this.
5958 (extract_range_from_multiplicative_op_1): Abstract wide int
5960 (wide_int_range_multiplicative_op): ...here.
5961 (extract_range_from_binary_expr_1): Extract wide int binary
5962 operations into their own functions.
5963 (wide_int_range_lshift): New.
5964 (wide_int_range_can_optimize_bit_op): New.
5965 (wide_int_range_shift_undefined_p): New.
5966 (wide_int_range_bit_xor): New.
5967 (wide_int_range_bit_ior): New.
5968 (wide_int_range_bit_and): New.
5969 (wide_int_range_trunc_mod): New.
5970 (extract_range_into_wide_ints): New.
5971 (vrp_shift_undefined_p): New.
5972 (extract_range_from_multiplicative_op): New.
5973 (vrp_can_optimize_bit_op): New.
5974 * tree-vrp.h (value_range::dump): New.
5975 (wide_int_range_multiplicative_op): New.
5976 (wide_int_range_lshift):New.
5977 (wide_int_range_shift_undefined_p): New.
5978 (wide_int_range_bit_xor): New.
5979 (wide_int_range_bit_ior): New.
5980 (wide_int_range_bit_and): New.
5981 (wide_int_range_trunc_mod): New.
5982 (zero_nonzero_bits_from_bounds): Rename to...
5983 (wide_int_set_zero_nonzero_bits): ...this.
5984 (zero_nonzero_bits_from_vr): Rename to...
5985 (vrp_set_zero_nonzero_bits): ...this.
5986 (range_easy_mask_min_max): Rename to...
5987 (wide_int_range_can_optimize_bit_op): this.
5988 * vr-values.c (simplify_bit_ops_using_ranges): Rename
5989 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5991 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5993 * tree-vectorizer.h (vect_orig_stmt): New function.
5994 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5995 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5996 (vect_create_epilog_for_reduction): Likewise.
5997 (vectorizable_live_operation): Likewise.
5998 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5999 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6000 * tree-vect-stmts.c (vectorizable_call): Likewise.
6001 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6003 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6005 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6007 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6008 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6009 (vect_transform_loop): Likewise.
6010 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6012 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6014 * tree-vectorizer.h (vect_schedule_slp): Return void.
6015 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6016 (vect_schedule_slp): Likewise.
6018 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6020 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6022 (vect_transform_loop): Update calls accordingly. Schedule SLP
6023 instances before the main loop, if any exist.
6025 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6027 PR tree-optimization/86749
6028 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6029 If the lhs is used in a COND_EXPR, check that it is being used
6030 as the "then" or "else" value.
6032 2018-08-01 Tom de Vries <tdevries@suse.de>
6035 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6036 speculation_safe_value_not_needed.
6038 2018-08-01 Richard Biener <rguenther@suse.de>
6040 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6043 2018-08-01 Martin Liska <mliska@suse.cz>
6045 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6046 format how successful transformation is dumped.
6047 (gimple_mod_pow2_value_transform): Likewise.
6048 (gimple_mod_subtract_transform): Likewise.
6049 (gimple_stringops_transform): Likewise.
6051 2018-08-01 Martin Liska <mliska@suse.cz>
6054 * value-prof.c (interesting_stringop_to_profile_p):
6055 Simplify the code and add BUILT_IN_MEMMOVE.
6056 (gimple_stringops_transform): Likewise.
6058 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
6060 * config/aarch64/aarch64-simd.md
6061 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6062 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6063 use GPI iterator instead of SI mode.
6065 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6067 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6068 rs6000_speculation_barrier.
6069 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6070 new barrier pattern name.
6072 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6074 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6075 (speculation_barrier): New insn.
6077 2018-08-01 Richard Biener <rguenther@suse.de>
6080 * graphite.h: Include isl/id.h and isl/space.h to allow build
6083 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
6086 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6087 mode for COFF targets.
6088 * defaults.h (TARGET_COFF): Define.
6089 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6090 TARGET_COFF): Define.
6091 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6092 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6093 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6095 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6097 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6098 * gimple-streamer-out.c (output_bb): Save it.
6099 * lto-streamer-in.c (input_struct_function_base): Restore
6100 instance discriminator if available. Create map on demand.
6101 * lto-streamer-out.c (output_struct_function_base): Save it if
6103 * final.c (decl_to_instance_map): Document LTO strategy.
6105 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6106 Olivier Hainque <hainque@adacore.com>
6108 * debug.h (decl_to_instance_map_t): New type.
6109 (decl_to_instance_map): Declare.
6110 (maybe_create_decl_to_instance_map): New inline function.
6111 * final.c (bb_discriminator, last_bb_discriminator): New statics,
6112 to track basic block discriminators.
6113 (final_start_function_1): Initialize them.
6114 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6116 (decl_to_instance_map): New variable.
6117 (map_decl_to_instance, maybe_set_discriminator): New functions.
6118 (notice_source_line): Set discriminator.
6120 2018-07-31 Ian Lance Taylor <iant@golang.org>
6122 * targhooks.c (default_have_speculation_safe_value): Add
6125 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6127 * dump-context.h: Include "pretty-print.h".
6128 (dump_context::refresh_dumps_are_enabled): New decl.
6129 (dump_context::emit_item): New decl.
6130 (class dump_context): Add fields "m_test_pp" and
6132 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6133 (temp_dump_context::get_dumped_text): New decl.
6134 (class temp_dump_context): Add field "m_pp".
6135 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6136 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6138 (set_dump_file): Update for above change.
6139 (set_alt_dump_file): Likewise.
6140 (dump_loc): New overload, taking a pretty_printer *.
6141 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6142 to any test pretty-printer.
6143 (make_item_for_dump_gimple_stmt): New function, adapted from
6144 optinfo::add_gimple_stmt.
6145 (dump_context::dump_gimple_stmt): Call it, and use the result,
6146 eliminating the direct usage of dump_file and alt_dump_file in
6147 favor of indirectly using them via emit_item.
6148 (make_item_for_dump_gimple_expr): New function, adapted from
6149 optinfo::add_gimple_expr.
6150 (dump_context::dump_gimple_expr): Call it, and use the result,
6151 eliminating the direct usage of dump_file and alt_dump_file in
6152 favor of indirectly using them via emit_item.
6153 (make_item_for_dump_generic_expr): New function, adapted from
6155 (dump_context::dump_generic_expr): Call it, and use the result,
6156 eliminating the direct usage of dump_file and alt_dump_file in
6157 favor of indirectly using them via emit_item.
6158 (make_item_for_dump_printf_va): New function, adapted from
6159 optinfo::add_printf_va.
6160 (make_item_for_dump_printf): New function.
6161 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6162 and use the result, eliminating the direct usage of dump_file and
6163 alt_dump_file in favor of indirectly using them via emit_item.
6164 (make_item_for_dump_dec): New function.
6165 (dump_context::dump_dec): Call it, and use the result,
6166 eliminating the direct usage of dump_file and alt_dump_file in
6167 favor of indirectly using them via emit_item.
6168 (make_item_for_dump_symtab_node): New function, adapted from
6169 optinfo::add_symtab_node.
6170 (dump_context::dump_symtab_node): Call it, and use the result,
6171 eliminating the direct usage of dump_file and alt_dump_file in
6172 favor of indirectly using them via emit_item.
6173 (dump_context::begin_scope): Reimplement, avoiding direct usage
6174 of dump_file and alt_dump_file in favor of indirectly using them
6176 (dump_context::emit_item): New member function.
6177 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6178 Set up test pretty-printer on the underlying context. Call
6179 refresh_dumps_are_enabled.
6180 (temp_dump_context::~temp_dump_context): Call
6181 refresh_dumps_are_enabled.
6182 (temp_dump_context::get_dumped_text): New member function.
6183 (selftest::verify_dumped_text): New function.
6184 (ASSERT_DUMPED_TEXT_EQ): New macro.
6185 (selftest::test_capture_of_dump_calls): Run all tests twice, with
6186 and then without optinfo enabled. Add uses of
6187 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
6188 * dumpfile.h: Update comment for the dump_* API.
6189 * optinfo-emit-json.cc
6190 (selftest::test_building_json_from_dump_calls): Update for new
6191 param for temp_dump_context ctor.
6192 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6193 and "m_owned" field.
6194 (optinfo_item::~optinfo_item): Likewise.
6195 (optinfo::add_item): New member function.
6196 (optinfo::emit): Update comment.
6197 (optinfo::add_string): Delete.
6198 (optinfo::add_printf): Delete.
6199 (optinfo::add_printf_va): Delete.
6200 (optinfo::add_gimple_stmt): Delete.
6201 (optinfo::add_gimple_expr): Delete.
6202 (optinfo::add_tree): Delete.
6203 (optinfo::add_symtab_node): Delete.
6204 (optinfo::add_dec): Delete.
6205 * optinfo.h (class dump_context): New forward decl.
6206 (optinfo::add_item): New decl.
6207 (optinfo::add_string): Delete.
6208 (optinfo::add_printf): Delete.
6209 (optinfo::add_printf_va): Delete.
6210 (optinfo::add_gimple_stmt): Delete.
6211 (optinfo::add_gimple_expr): Delete.
6212 (optinfo::add_tree): Delete.
6213 (optinfo::add_symtab_node): Delete.
6214 (optinfo::add_dec): Delete.
6215 (optinfo::add_poly_int): Delete.
6216 (optinfo_item::optinfo_item): Remove "owned" param.
6217 (class optinfo_item): Remove field "m_owned".
6219 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6222 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6223 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6224 requested variable alignment.
6225 (expand_one_ssa_partition): Likewise.
6226 (expand_one_var): Likewise.
6228 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6230 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6231 to speculation_safe_value_not_needed.
6233 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6235 * targhooks.h (speculation_safe_value_not_needed): New prototype.
6236 * targhooks.c (speculation_safe_value_not_needed): New function.
6237 * target.def (have_speculation_safe_value): Update documentation.
6238 * doc/tm.texi: Regenerated.
6240 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6242 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6243 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6245 (despeculate_copy<ALLI:mode>_insn): New insn.
6246 (despeculate_copyti_insn): New insn.
6247 (despeculate_simple<ALLI:mode>): New insn
6248 (despeculate_simpleti): New insn.
6249 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6251 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6252 aarch64_speculation_safe_value.
6253 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6255 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6257 * config/aarch64/aarch64-speculation.cc: New file.
6258 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6259 before pass_reorder_blocks.
6260 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6262 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6263 X14 and X15 when tracking speculation.
6264 * config/aarch64/aarch64.md (register name constants): Add
6265 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6266 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6267 (speculation_barrier): New insn attribute.
6268 (cmp<mode>): Allow SP in comparisons.
6269 (speculation_tracker): New insn.
6270 (speculation_barrier): Add speculation_barrier attribute.
6271 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6272 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6273 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6275 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6277 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6278 aarch64_track_speculation is true.
6279 (tb<optab><mode>1): Likewise.
6280 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6281 generate CB[N]Z when tracking speculation.
6282 (aarch64_split_compare_and_swap): Likewise.
6283 (aarch64_split_atomic_op): Likewise.
6285 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6287 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6289 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6291 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6292 (speculation_barrier): New insn.
6294 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6296 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6297 * config/arm/arm.md (speculation_barrier): New expand.
6298 (speculation_barrier_insn): New pattern.
6300 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6302 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6303 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6304 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6305 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6307 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6308 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6309 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6310 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6311 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6312 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6313 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6314 * builtins.c (expand_speculation_safe_value): New function.
6315 (expand_builtin): Call it.
6316 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6317 * doc/extend.texi: Document __builtin_speculation_safe_value.
6318 * doc/md.texi: Document "speculation_barrier" pattern.
6319 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6320 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6321 * doc/tm.texi: Regenerated.
6322 * target.def (have_speculation_safe_value, speculation_safe_value): New
6324 * targhooks.c (default_have_speculation_safe_value): New function.
6325 (default_speculation_safe_value): New function.
6326 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6327 (default_speculation_safe_value): Add prototype.
6329 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6331 * dump-context.h (dump_context::dump_loc): New decl.
6332 * dumpfile.c (dump_context::dump_loc): New member function.
6333 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6334 and dump_gimple_stmt.
6335 (dump_context::dump_gimple_expr_loc): Likewise, using
6337 (dump_context::dump_generic_expr_loc): Likewise, using
6339 (dump_context::dump_printf_loc_va): Likewise, using
6341 (dump_context::begin_scope): Explicitly using the global function
6342 "dump_loc", rather than the member function.
6344 2018-07-31 Martin Sebor <msebor@redhat.com>
6346 PR tree-optimization/86741
6347 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6349 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6351 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6352 depend on whether prefetch instructions will be emitted or not.
6353 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6354 will be emitted or not.
6355 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6356 (TARGET_SETMEM_PFD): New macros.
6358 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6360 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6361 (NULL_STMT_VEC_INFO): Delete.
6362 (stmt_vec_info::operator*): Likewise.
6363 (stmt_vec_info::operator gimple *): Likewise.
6364 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6365 of NULL_STMT_VEC_INFO.
6366 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6367 (vect_reassociating_reduction_p): Likewise.
6368 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6369 (vectorizable_store): Likewise.
6370 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6371 (vec_info::free_stmt_vec_infos): Likewise.
6373 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6375 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6376 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6378 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6380 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6381 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6382 (vec_info::free_stmt_vec_info): New private member functions.
6383 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6384 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6385 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6386 set_stmt_vec_info_vec and free_stmt_vec_infos.
6387 * tree-vect-loop.c (_loop_vec_info): Remove call to
6388 set_stmt_vec_info_vec.
6389 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6390 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6391 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6392 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6393 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6394 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6395 with the clearing in the xcalloc.
6396 (stmt_vec_info_vec): Delete.
6397 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6398 (vectorize_loops): Likewise.
6399 (vec_info::~vec_info): Remove argument from call to
6400 free_stmt_vec_infos.
6401 (vec_info::add_stmt): Remove vinfo argument from call to
6404 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6406 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6407 rather than a gimple stmt.
6408 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6409 information for pattern statements when passed the original
6410 statement; instead wait to be passed the pattern statement itself.
6411 Don't call set_vinfo_for_stmt here.
6412 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6413 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6414 stmt_vec_infos here.
6415 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6416 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6417 stmt_vec_infos entry.
6419 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6421 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6422 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6423 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6424 * tree-vect-stmts.c (vectorizable_call): Likewise.
6425 (vectorizable_simd_clone_call): Likewise.
6427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6429 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6430 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6431 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6432 * tree-vect-loop.c (vect_transform_loop): Likewise.
6433 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6434 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6436 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6438 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6439 (vect_dr_stmt): Delete.
6440 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6441 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6443 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6444 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6445 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6446 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6447 (vect_analyze_data_refs): Likewise.
6448 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6450 (vect_find_same_alignment_drs): Likewise.
6451 (vect_slp_analyze_node_dependences): Update calls accordingly.
6452 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6453 instead of DR_VECT_AUX.
6454 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6455 of a vector data references. Use vec_info::lookup_dr instead of
6457 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6458 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6459 instead of DR_VECT_AUX.
6461 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6463 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6465 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6467 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6468 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6469 (vect_gen_prolog_loop_niters): Likewise.
6471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6473 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6474 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6475 (vect_known_alignment_in_bytes, vect_dr_behavior)
6476 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6477 instead of data_references. Update calls to other routines for
6478 which the same change has been made.
6479 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6480 dr_vec_infos instead of stmt_vec_infos.
6481 (vect_analyze_data_ref_dependence): Update call accordingly.
6482 (vect_slp_analyze_data_ref_dependence)
6483 (vect_record_base_alignments): Use DR_VECT_AUX.
6484 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6485 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6486 (vector_alignment_reachable_p, vect_get_data_access_cost)
6487 (vect_peeling_supportable, vect_analyze_group_access_1)
6488 (vect_analyze_group_access, vect_analyze_data_ref_access)
6489 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6490 (vect_compile_time_alias, vect_small_gap_p)
6491 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6492 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6493 instead of data_references. Update calls to other routines for
6494 which the same change has been made.
6495 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6496 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6497 (vect_slp_analyze_and_verify_node_alignment)
6498 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6499 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6500 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6502 (_vect_peel_info::dr): Replace with...
6503 (_vect_peel_info::dr_info): ...this new field.
6504 (vect_peeling_hash_get_most_frequent)
6505 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6506 (vect_peeling_hash_get_lowest_cost):
6507 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6508 routines for which the same change has been made.
6509 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6511 * tree-vect-loop-manip.c (get_misalign_in_elems)
6512 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6514 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6515 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6516 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6517 (get_group_load_store_type, get_negative_load_store_type)
6518 (vect_get_data_ptr_increment, vectorizable_store)
6519 (vectorizable_load): Likewise.
6520 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6521 Update calls to other routines for which the same change has been made.
6523 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6525 * tree-vectorizer.h (vec_info::move_dr): New member function.
6526 (dataref_aux): Rename to...
6527 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6528 (_stmt_vec_info::dr_aux): Update accordingly.
6529 (_stmt_vec_info::data_ref_info): Delete.
6530 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6531 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6532 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6533 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6535 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6536 (STMT_VINFO_DR_INFO): New macro.
6537 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6538 (set_dr_misalignment): Update after rename of dataref_aux.
6539 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6540 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6541 initialization of STMT_VINFO_DATA_REF.
6542 * tree-vectorizer.c (vec_info::move_dr): New function.
6543 * tree-vect-patterns.c (vect_recog_bool_pattern)
6544 (vect_recog_mask_conversion_pattern)
6545 (vect_recog_gather_scatter_pattern): Use it.
6546 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6547 the "dr" and "stmt" fields of dr_vec_info instead of
6548 STMT_VINFO_DATA_REF.
6550 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6552 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6553 (is_pattern_stmt_p): Use it.
6554 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6555 on pattern statements.
6557 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6559 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6560 original stmt as a stmt_vec_info rather than a gimple stmt.
6561 (vect_pattern_recog_1): Take the statement directly as a
6562 stmt_vec_info, rather than via a gimple_stmt_iterator.
6563 Update call to vect_mark_pattern_stmts.
6564 (vect_pattern_recog): Update calls accordingly.
6566 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6568 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6569 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6570 a vect_def_type for the first argument.
6571 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6572 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6573 operand if it isn't defined by a vectorized statement.
6574 (vect_build_gather_load_calls): Remove the mask_dt argument and
6575 update calls to vect_get_vec_def_for_stmt_copy.
6576 (vectorizable_bswap): Likewise the dt argument.
6577 (vectorizable_call): Update calls to vectorizable_bswap and
6578 vect_get_vec_def_for_stmt_copy.
6579 (vectorizable_simd_clone_call, vectorizable_assignment)
6580 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6581 (vectorizable_comparison): Update calls to
6582 vect_get_vec_def_for_stmt_copy.
6583 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6585 (vect_get_loop_based_defs): Remove dt argument and update call
6586 to vect_get_vec_def_for_stmt_copy.
6587 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6588 and vect_get_vec_def_for_stmt_copy.
6589 (vectorizable_load): Update calls to vect_build_gather_load_calls
6590 and vect_get_vec_def_for_stmt_copy.
6591 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6592 (vectorizable_reduction, vectorizable_live_operation): Update calls
6593 to vect_get_vec_def_for_stmt_copy.
6595 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6597 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6598 and gimple stmt arguments with a stmt_vec_info.
6599 (vect_record_base_alignments): Update calls accordingly.
6600 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6601 and gimple stmt arguments with a stmt_vec_info.
6602 (vect_build_slp_tree_1): Remove vinfo argument and update call
6603 to vect_record_max_nunits.
6604 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6605 and vect_record_max_nunits.
6607 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6609 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6610 file and take a stmt_vec_info instead of a gimple stmt.
6611 (supportable_widening_operation, vect_finish_replace_stmt)
6612 (vect_finish_stmt_generation, vect_get_store_rhs)
6613 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6614 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6615 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6616 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6617 (vect_create_data_ref_ptr, bump_vector_ptr)
6618 (vect_permute_store_chain, vect_setup_realignment)
6619 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6620 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6621 (vectorizable_reduction, vectorizable_induction)
6622 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6623 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6624 than gimple stmts as arguments.
6625 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6626 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6627 (can_group_stmts_p, vect_check_gather_scatter)
6628 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6629 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6630 (vect_permute_load_chain, vect_shift_permute_load_chain)
6631 (vect_transform_grouped_load)
6632 (vect_record_grouped_load_vectors): Likewise.
6633 * tree-vect-loop.c (vect_fixup_reduc_chain)
6634 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6635 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6636 (vectorizable_reduction, vectorizable_induction)
6637 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6638 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6639 (vect_get_load_store_mask): Likewise.
6640 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6641 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6642 * tree-vect-stmts.c (vect_mark_relevant)
6643 (is_simple_and_all_uses_invariant)
6644 (exist_non_indexing_operands_for_use_p, process_use)
6645 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6646 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6647 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6648 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6649 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6650 (get_negative_load_store_type, get_load_store_type)
6651 (vect_check_load_store_mask, vect_check_store_rhs)
6652 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6653 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6654 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6655 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6656 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6657 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6658 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6659 (supportable_widening_operation): Likewise.
6661 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6663 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6664 a stmt_vec_info instead of a gcall.
6665 (vect_check_gather_scatter): Update call accordingly.
6666 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6668 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6669 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6670 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6671 instead of a gimple stmt.
6672 (vect_transform_loop): Update calls accordingly.
6673 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6674 stmt_vec_infos instead of gimple stmts.
6675 (vect_analyze_slp_instance): Update use accordingly.
6676 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6677 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6678 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6679 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6680 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6681 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6682 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6683 down to subroutines.
6685 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6687 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6688 of the worklist from a vector of gimple stmts to a vector of
6690 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6691 (vect_mark_stmts_to_be_vectorized): Likewise
6693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6695 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6696 statement before passing it to vect_analyze_stmt.
6697 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6698 the chain of phi vector definitions. Track the exit phi via its
6700 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6701 STMT_VINFO_REDUC_DEF.
6702 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6703 stmt_vec_infos to handle the statement chains.
6704 (vect_get_slp_defs): Record the first statement in the node
6705 using a stmt_vec_info.
6706 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6707 statements here and pass their stmt_vec_info down to subroutines.
6708 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6709 down to vect_finish_stmt_generation.
6710 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6711 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6712 stmt_vec_infos to subroutines.
6713 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6718 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6719 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6720 (vect_permute_store_chain, vect_setup_realignment)
6721 (vect_permute_load_chain, vect_shift_permute_load_chain)
6722 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6723 stmts internally, and when passing values to other vectorizer routines.
6724 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6725 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6726 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6727 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6728 (vectorizable_reduction, vectorizable_induction)
6729 (vectorizable_live_operation, vect_transform_loop_stmt)
6730 (vect_transform_loop): Likewise.
6731 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6732 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6733 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6734 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6735 (vect_slp_analyze_node_operations_1): Likewise.
6736 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6737 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6738 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6739 (vect_finish_stmt_generation_1, get_group_load_store_type)
6740 (get_load_store_type, vect_build_gather_load_calls)
6741 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6742 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6743 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6744 (vectorizable_store, vectorizable_load, vectorizable_condition)
6745 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6746 (supportable_widening_operation): Likewise.
6747 (vect_get_vector_types_for_stmt): Likewise.
6748 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6750 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6752 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6753 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6754 (vect_permute_store_chain, vect_permute_load_chain)
6755 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6756 repeated stmt_vec_info lookups.
6757 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6758 (vect_update_ivs_after_vectorizer): Likewise.
6759 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6760 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6761 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6762 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6763 (vect_bb_slp_scalar_cost): Likewise.
6764 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6766 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6768 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6769 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6770 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6771 to get gassigns and gcalls, rather than operating on generc gimple
6773 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6774 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6775 (vectorizable_load, vect_analyze_stmt): Likewise.
6776 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6778 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6780 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6781 return stmt_vec_infos rather than gimple stmts. Do not accept
6783 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6785 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6786 Update use of get_later_stmt.
6787 (vect_get_constant_vectors): Update call accordingly.
6788 (vect_schedule_slp_instance): Likewise
6789 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6790 (vect_slp_analyze_instance_dependence): Likewise.
6791 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6793 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6795 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6796 (stmt_info_for_cost::stmt_info): ...this new field.
6797 (add_stmt_costs): Update accordingly.
6798 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6799 (vect_get_known_peeling_cost): Likewise.
6800 (vect_estimate_min_profitable_iters): Likewise.
6801 * tree-vect-stmts.c (record_stmt_cost): Likewise.
6803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6805 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6806 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6807 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6809 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6813 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6814 a gimple stmt to a stmt_vec_info.
6815 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6817 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6819 * tree-vectorizer.h (vec_info::grouped_stores): Change from
6820 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6821 (_loop_vec_info::reduction_chains): Likewise.
6822 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6824 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6828 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6829 a gimple stmt to a stmt_vec_info.
6830 (_stmt_vec_info::next_element): Likewise.
6831 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6832 (vect_slp_analyze_and_verify_node_alignment)
6833 (vect_analyze_group_access_1, vect_analyze_group_access)
6834 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6835 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6836 (vect_supportable_dr_alignment): Update accordingly.
6837 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6838 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6839 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6840 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6841 * tree-vect-slp.c (vect_build_slp_tree_1)
6842 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6843 (vect_split_slp_store_group, vect_analyze_slp_instance)
6844 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6845 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6846 (get_group_load_store_type, get_load_store_type)
6847 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6848 (vect_transform_stmt, vect_remove_stores): Likewise.
6850 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6852 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6854 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6855 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6856 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6857 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6858 (vector_alignment_reachable_p, vect_get_data_access_cost)
6859 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6860 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6861 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6862 (vect_analyze_group_access_1, vect_analyze_group_access)
6863 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6864 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6865 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6866 result of vect_dr_stmt and use the stmt_vec_info instead of
6867 the associated gimple stmt.
6868 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6869 (vect_gen_prolog_loop_niters): Likewise.
6870 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6874 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6875 to a vec<stmt_vec_info>.
6876 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6877 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6879 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6880 to a vec<stmt_vec_info>.
6881 (bst_traits::value_type, bst_traits::value_type): Likewise.
6882 (bst_traits::hash): Update accordingly.
6883 (vect_get_and_check_slp_defs): Change the stmts parameter from
6884 a vec<gimple *> to a vec<stmt_vec_info>.
6885 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6886 (vect_build_slp_tree): Likewise.
6887 (vect_build_slp_tree_2): Likewise. Update uses of
6888 SLP_TREE_SCALAR_STMTS.
6889 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6890 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6891 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6892 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6893 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6894 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6895 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6896 (vect_get_constant_vectors, vect_get_slp_defs)
6897 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6898 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6899 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6900 instead of gimple stmts.
6901 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6902 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6903 (vect_slp_analyze_instance_dependence): Update uses of
6904 SLP_TREE_SCALAR_STMTS.
6905 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6906 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6907 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6908 (get_initial_defs_for_reduction): Likewise.
6909 (vect_create_epilog_for_reduction): Likewise.
6910 (vectorize_fold_left_reduction): Likewise.
6911 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6912 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6913 (can_vectorize_live_stmts): Likewise.
6915 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6917 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6918 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6919 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6921 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6923 (gather_scalar_reductions): Update after above interface changes.
6924 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6925 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6927 (vect_force_simple_reduction): Likewise.
6928 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6929 LOOP_VINFO_REDUCTIONS.
6930 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6932 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6934 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6935 a gimple stmt to a stmt_vec_info.
6936 * tree-vect-loop.c (vect_active_double_reduction_p)
6937 (vect_force_simple_reduction, vectorizable_reduction): Update
6940 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6942 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6943 vec<gimple *> to a vec<stmt_vec_info>.
6944 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6945 the reduction_phis argument from a vec<gimple *> to a
6947 (vectorizable_reduction): Likewise the phis local variable that
6948 is passed to vect_create_epilog_for_reduction. Update for new type
6949 of SLP_TREE_VEC_STMTS.
6950 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6951 (vectorizable_live_operation): Likewise.
6952 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6953 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6955 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6957 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6958 a gimple stmt to a stmt_vec_info.
6959 (vectorizable_condition, vectorizable_live_operation)
6960 (vectorizable_reduction, vectorizable_induction): Pass back the
6961 vectorized statement as a stmt_vec_info.
6962 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6963 use of STMT_VINFO_VEC_STMT.
6964 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6965 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6966 as stmt_vec_infos rather than gimple stmts.
6967 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6969 (vectorizable_live_operation): Likewise.
6970 (vectorizable_reduction, vectorizable_induction): Likewise,
6971 updating use of STMT_VINFO_VEC_STMT.
6972 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6973 of STMT_VINFO_VEC_STMT.
6974 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6975 (vectorizable_simd_clone_call, vectorizable_conversion)
6976 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6977 (vectorizable_store, vectorizable_load, vectorizable_condition)
6978 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6979 from a gimple stmt to a stmt_vec_info.
6980 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
6981 pointer to a stmt_vec_info to the vectorizable_* routines.
6983 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6985 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6986 a gimple stmt to a stmt_vec_info.
6987 (is_pattern_stmt_p): Update accordingly.
6988 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6989 (vect_record_grouped_load_vectors): Likewise.
6990 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6991 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6992 (vect_model_reduction_cost): Likewise.
6993 (vect_create_epilog_for_reduction): Likewise.
6994 (vectorizable_reduction, vectorizable_induction): Likewise.
6995 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6996 Return the stmt_vec_info for the pattern statement.
6997 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6998 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6999 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7000 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7001 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7002 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7003 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7004 (free_stmt_vec_info, vect_is_simple_use): Likewise.
7006 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7008 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7009 (vect_finish_stmt_generation): Likewise.
7010 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7011 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7012 (vect_build_gather_load_calls): Use the return value of the above
7013 functions instead of a separate call to vinfo_for_stmt. Use narrow
7014 scopes for the input gimple stmt and wider scopes for the associated
7015 stmt_vec_info. Use vec_info::lookup_def when setting these
7016 stmt_vec_infos from an SSA_NAME definition.
7017 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7018 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7019 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7020 (vectorizable_store, vectorizable_load, vectorizable_condition)
7021 (vectorizable_comparison): Likewise.
7022 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7023 (vectorizable_reduction): Likewise.
7025 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7027 * tree-vectorizer.h (vect_is_simple_use): Add an optional
7028 stmt_vec_info * parameter before the optional gimple **.
7029 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7030 (process_use, vect_get_vec_def_for_operand_1): Update callers.
7031 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7032 * tree-vect-loop.c (vectorizable_reduction): Likewise.
7033 (vectorizable_live_operation): Likewise.
7034 * tree-vect-patterns.c (type_conversion_p): Likewise.
7035 (vect_look_through_possible_promotion): Likewise.
7036 (vect_recog_rotate_pattern): Likewise.
7037 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7039 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7041 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7042 a typedef to a wrapper class.
7043 (NULL_STMT_VEC_INFO): New macro.
7044 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7045 (stmt_vec_info::operator*): New function.
7046 (stmt_vec_info::operator gimple *): Likewise.
7047 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7048 (add_stmt_costs): Likewise.
7049 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7050 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7051 (vect_get_known_peeling_cost): Likewise.
7052 (vect_estimate_min_profitable_iters): Likewise.
7053 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7054 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7055 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7056 (vectorizable_store, free_stmt_vec_infos): Likewise.
7057 (new_stmt_vec_info): Change return type of xcalloc to
7060 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7062 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7063 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7064 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7065 a single_imm_use-based sequence.
7066 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7068 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7070 * tree-vectorizer.h (vec_info::lookup_def): Declare.
7071 * tree-vectorizer.c (vec_info::lookup_def): New function.
7072 * tree-vect-patterns.c (vect_get_internal_def): Use it.
7073 (vect_widened_op_tree): Likewise.
7074 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7075 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7076 (vectorizable_reduction): Likewise.
7077 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7079 (vect_is_slp_reduction): Update calls accordingly. Use
7080 vec_info::lookup_def.
7081 (vect_is_simple_reduction): Likewise
7082 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7084 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7086 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7087 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7088 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7090 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7091 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7092 (vect_update_vf_for_slp, vect_analyze_loop_operations)
7093 (vect_is_slp_reduction, vectorizable_induction)
7094 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7095 * tree-vect-patterns.c (vect_init_pattern_stmt):
7096 (vect_determine_min_output_precision_1, vect_determine_precisions)
7097 (vect_pattern_recog): Likewise.
7098 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7099 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7100 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7101 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7102 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7103 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
7104 info field from a loop to a loop_vec_info.
7106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7108 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7109 (vec_info::add_stmt): Declare.
7110 * tree-vectorizer.c (vec_info::add_stmt): New function.
7111 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7112 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7113 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7114 (vectorizable_induction): Likewise.
7115 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7116 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7117 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7118 (vectorizable_load): Likewise.
7119 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7120 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7121 (vect_recog_gather_scatter_pattern): Likewise.
7122 (append_pattern_def_seq): Likewise. Remove a check that is
7123 performed by add_stmt itself.
7125 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7127 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7128 which make_ssa_name was called with new_stmt before new_stmt
7131 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7133 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7135 (vect_is_slp_reduction): ...here...
7136 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7137 that are already known to be false.
7139 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7141 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7142 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7143 STMT_VINFO_NUM_SLP_USES when it's true.
7144 (vect_free_slp_instance): Add a final_p parameter and pass it to
7146 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7147 (vect_analyze_slp_instance): Likewise.
7148 (vect_slp_analyze_operations): Likewise.
7149 (vect_slp_analyze_bb_1): Likewise.
7150 * tree-vectorizer.c (vec_info): Likewise.
7151 * tree-vect-loop.c (vect_transform_loop): Likewise.
7153 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7155 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7156 function is not called for second and subsequent members of
7159 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7161 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7162 cases for nested loops from here to ...
7163 (vect_create_epilog_for_reduction): ...here. Only call
7164 vect_is_simple_use for inner-loop reductions.
7166 2018-07-31 Martin Liska <mliska@suse.cz>
7168 PR gcov-profile/85338
7169 PR gcov-profile/85350
7170 PR gcov-profile/85372
7171 * profile.c (struct location_triplet): New.
7172 (struct location_triplet_hash): Likewise.
7173 (output_location): Do not output a BB that
7174 is already recorded for a line.
7175 (branch_prob): Use streamed_locations.
7177 2018-07-31 Martin Liska <mliska@suse.cz>
7179 PR gcov-profile/85370
7180 * coverage.c (coverage_begin_function): Do not mark target
7181 clones as artificial functions.
7183 2018-07-31 Martin Liska <mliska@suse.cz>
7185 PR gcov-profile/83813
7186 PR gcov-profile/84758
7187 PR gcov-profile/85217
7188 PR gcov-profile/85332
7189 * profile.c (branch_prob): Do not record GOTO expressions
7190 for GIMPLE statements which locations are already streamed.
7192 2018-07-31 Olivier Hainque <hainque@adacore.com>
7194 * gcc.c (handle_spec_function): Accept a soft_matched_part
7195 argument, as do_spec_1. Pass it down to ...
7196 (eval_spec_function): Accept a soft_matched_part argument,
7197 and pass it down to ...
7198 (do_spec_2): Accept a soft_matched_part argument, and pass
7199 it down to do_spec_1.
7200 (do_spec_1): Pass soft_matched_part to handle_spec_function.
7201 (handle_braces): Update call to handle_spec_function.
7202 (driver::set_up_specs): Update calls to do_spec_2.
7203 (compare_debug_dump_opt_spec_function): Likewise.
7204 (compare_debug_self_opt_spec_function): Likewise.
7206 2018-07-31 Olivier Hainque <hainque@adacore.com>
7208 * common.opt (nolibc): New option.
7209 * doc/invoke.texi (Link Options): Document it.
7210 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7211 * config/alpha/linux.h: Likewise.
7212 * config/arc/elf.h: Likewise.
7213 * config/arm/uclinux-elf.h: Likewise.
7214 * config/arm/unknown-elf.h: Likewise.
7215 * config/avr/avrlibc.h: Likewise.
7216 * config/bfin/bfin.h: Likewise.
7217 * config/bfin/linux.h: Likewise.
7218 * config/bfin/uclinux.h: Likewise.
7219 * config/darwin.h: Likewise.
7220 * config/darwin10.h: Likewise.
7221 * config/darwin12.h: Likewise.
7222 * config/gnu-user.h: Likewise.
7223 * config/lm32/uclinux-elf.h: Likewise.
7224 * config/pa/pa-hpux11.h: Likewise.
7225 * config/pa/pa64-hpux.h: Likewise.
7226 * config/sparc/sparc.h: Likewise.
7228 2018-07-31 Olivier Hainque <hainque@adacore.com>
7230 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7231 undefined variables.
7233 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7236 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7239 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7241 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7242 terminated string literal.
7244 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7246 PR rtl-optimization/85160
7247 * combine.c (is_just_move): New function.
7248 (try_combine): Allow combining two instructions into two if neither of
7249 the original instructions was a move.
7251 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7254 * doc/extend.texi (Global Register Variables): Discourage use of type
7256 (Local Register Variables): Likewise.
7258 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7260 PR tree-optimization/86506
7261 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7263 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7266 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7267 hard_regno, make sure no insn between `from` and `to` clobbers it.
7269 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7270 Tom de Vries <tdevries@suse.de>
7272 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7273 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7274 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7275 PTX_DEFAULT_RUNTIME_DIM.
7276 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7278 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7280 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7281 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7282 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7284 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7286 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7288 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7289 predicate to reflect toc fusion has been deleted.
7290 (toc_fusion_mem_raw): Delete, no longer used.
7291 (toc_fusion_mem_wrapped): Likewise.
7292 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7294 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7295 Delete, no longer used.
7296 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7297 meant to be used for toc fusion.
7298 (rs6000_debug_print_mode): Delete toc fusion debugging.
7299 (rs6000_debug_reg_global): Likewise.
7300 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7301 fusion and secondary reload support that were never used.
7302 (rs6000_option_override_internal): Delete TOC fusion, that was only
7303 partially defined, and it did not work unless you also used the
7305 (rs6000_legitimate_address_p): Delete TOC fusion support.
7306 (rs6000_opt_masks): Likewise.
7307 (fusion_wrap_memory_address): Delete function, no longer used.
7308 (fusion_split_address); Delete TOC fusion support.
7309 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7310 longer used with toc fusion being deleted.
7311 (TARGET_TOC_FUSION_FP): Likewise.
7312 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7314 (toc fusion spliter): Delete TOC fusion support.
7315 (toc_fusionload_<mode>): Likewise.
7316 (toc_fusionload_di): Likewise.
7317 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7318 longer needs to be named. Rename predicate to delete TOC fusion.
7319 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7320 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7321 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7322 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7323 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7325 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7327 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7328 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7329 __int128 in built-in function prototypes.
7330 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7331 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7333 2018-07-27 Martin Sebor <msebor@redhat.com>
7335 PR tree-optimization/86696
7336 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7337 types, including enums.
7338 (handle_char_store): Be prepared for the above function to fail.
7340 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7342 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7343 when optimization level is lower than 2 or optimize for size.
7345 2018-07-26 Martin Sebor <msebor@redhat.com>
7347 PR tree-optimization/86043
7348 PR tree-optimization/86042
7349 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7350 (get_string_cst_length): Rename...
7351 (get_min_string_length): ...to this. Add argument.
7352 (handle_char_store): Extend to handle multi-character stores by
7354 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7355 * tree.h (initializer_zerop): Add argument.
7357 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7360 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7361 declare target to variables if they have always,{to,from,tofrom} map
7364 2018-07-26 Martin Liska <mliska@suse.cz>
7367 * lto-wrapper.c: Add linker_output as prefix
7368 for ltrans_output_file.
7370 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7372 PR rtl-optimization/85805
7373 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7374 value for hard registers if that was written in the same mode.
7376 2018-07-26 Martin Liska <mliska@suse.cz>
7378 PR gcov-profile/86536
7379 * gcov.c (format_gcov): Use printf format %.*f directly
7380 and do not handle special values.
7382 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7384 * common/config/arc/arc-common.c (arc_option_optimization_table):
7385 Update default optimizations for size.
7387 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7389 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7390 * config/arc/constraints.md (CfZ): New constraint.
7391 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7392 (subsf3_fpu): Likewise.
7393 (cmpsf_fpu): Likewise.
7394 (cmpsf_fpu_uneq): Likewise.
7396 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7398 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7400 (arc_is_uncached_mem_p): uncached applies to both the variable and
7403 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7405 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7408 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7410 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7411 field "m_scopes" from vec to auto_vec.
7413 2018-07-25 Martin Liska <mliska@suse.cz>
7415 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7418 2018-07-25 Richard Biener <rguenther@suse.de>
7421 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7422 special wrt context_die late.
7423 (gen_subprogram_die): Re-use DIEs in local scope.
7425 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7427 PR tree-optimization/86644
7428 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7430 2018-07-25 Martin Liska <mliska@suse.cz>
7433 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7434 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7436 2018-07-25 Martin Liska <mliska@suse.cz>
7439 * params.def: Explain ASan abbreviation and provide
7440 a documentation link.
7442 2018-07-24 Martin Sebor <msebor@redhat.com>
7444 PR tree-optimization/86622
7445 PR tree-optimization/86532
7446 * builtins.h (string_length): Declare.
7447 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7448 (check_access): Be prepared for non-constant length ranges.
7449 (string_length): Make extern.
7450 * expr.c (string_constant): Only handle the minor non-constant
7451 array index. Use string_constant to compute the length of
7452 a generic string constant.
7454 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7456 PR tree-optimization/86618
7457 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7458 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7460 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7462 PR tree-optimization/86636
7463 * json.cc (json::object::set): Fix comment. Add assertions.
7464 (json::array::append): Move here from json.h. Add comment and an
7466 (json::string::string): Likewise.
7467 * json.h (json::array::append): Move to json.cc.
7468 (json::string::string): Likewise.
7469 * optinfo-emit-json.cc
7470 (optrecord_json_writer::impl_location_to_json): Assert that we
7471 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7472 wrapper around it. Expand the location once, rather than three
7474 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7475 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7477 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7478 places. Fix some overlong lines.
7480 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7482 * config/aarch64/aarch64-simd.md
7483 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7484 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7485 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7486 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7487 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7488 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7489 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7490 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7491 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7493 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7496 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7497 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7498 and abs_d == d, do the power of two handling if profitable.
7500 2018-07-24 Richard Biener <rguenther@suse.de>
7502 * match.pd: Add BIT_FIELD_REF canonicalizations.
7504 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7507 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7509 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7511 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7512 terminated STRING_CST object.
7514 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7516 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7518 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7520 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7521 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7522 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7523 the elements into a register.
7524 (rs6000_split_v4si_init_di_reg): Delete.
7525 (rs6000_split_v4si_init): Delete.
7526 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7527 (vsx_init_v4si): Rewrite as a define_expand.
7529 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7531 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7532 zero_extend argument from memory): New.
7534 2018-07-22 Martin Sebor <msebor@redhat.com>
7537 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7538 diagnosing calls with unknown arguments unless -Walloca-larger-than
7539 is restricted to less than PTRDIFF_MAX bytes.
7541 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7543 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7545 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7547 * pretty-print.c (text_info::set_location): Remove redundant
7548 "line_table" parameter from call to rich_location::set_range.
7550 2018-07-20 Martin Sebor <msebor@redhat.com>
7553 * builtins.c (expand_builtin_alloca): Adjust.
7554 * calls.c (alloc_max_size): Simplify.
7555 * cgraphunit.c (cgraph_node::expand): Adjust.
7556 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7558 (frame_larger_than_size): Same.
7559 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7560 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7562 * doc/invoke.texi (GCC Command Options): Document option arguments.
7563 Explain byte-size arguments and suffixes.
7564 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7565 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7566 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7567 * doc/options.texi (UInteger): Expand.
7568 (Host_Wide_Int, ByteSize): Document new properties.
7569 * final.c (final_start_function_1): Include sizes in an error message.
7570 * function.c (frame_offset_overflow): Same.
7571 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7572 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7573 Diagnose unbounded alloca calls only for limits of less than
7575 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7576 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7578 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7579 only for limits of less than PTRDIFF_MAX.
7580 * langhooks-def.h (lhd_handle_option): Change function argument
7582 * langhooks.c (lhd_handle_option): Same.
7583 * langhooks.h (handle_option): Same.
7584 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7586 (var_type, var_type_struct): Same.
7587 (var_set): Handle ByteSize flag.
7588 * optc-gen.awk: Add comments to output to ease debugging. Make
7589 use of HOST_WIDE_INT where appropriate.
7590 * opts-gen-save.awk: Use %lx to format unsigned long.
7591 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7592 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7593 arguments. Parse bytes-size suffixes.
7594 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7595 (enum_value_to_arg): Same.
7596 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7597 (handle_option): Adjust.
7598 (generate_option): Change function argument to HOST_WIDE_INT.
7599 (cmdline_handle_error): Adjust.
7600 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7601 (set_option): Change function argument to HOST_WIDE_INT.
7602 (option_enabled): Handle cl_host_wide_int.
7603 (get_option_state): Handle CLVC_SIZE.
7604 (control_warning_option): Same.
7605 * opts.c (common_handle_option): Change function argument to
7606 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7607 OPT_Wvla_larger_than_.
7608 * opts.h (enum cl_var_type): Add an enumerator.
7609 * stor-layout.c (layout_decl): Print a more meaningful warning.
7610 * toplev.c (output_stack_usage): Adjust.
7612 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7614 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7615 call to inline_expand_builtin_string_cmp.
7616 (expand_builtin_strcmp): Likewise.
7617 (expand_builtin_strncmp): Likewise.
7618 (inline_string_cmp): Delete the last parameter, change char_type_node
7619 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7621 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7622 the inlining expansion on target where the type of the call has same or
7623 narrower precision than unsigned char.
7625 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7627 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7628 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7629 * common.opt (fsave-optimization-record): New option.
7630 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7631 * doc/invoke.texi (-fsave-optimization-record): New option.
7632 * dumpfile.c: Include "optinfo-emit-json.h".
7633 (struct kv_pair): Move to coretypes.h.
7634 (optgroup_options): Make non-static.
7635 (dump_context::end_scope): Call
7636 optimization_records_maybe_pop_dump_scope.
7637 * dumpfile.h (optgroup_options): New decl.
7638 * json.cc: New file.
7640 * optinfo-emit-json.cc: New file.
7641 * optinfo-emit-json.h: New file.
7642 * optinfo.cc: Include "optinfo-emit-json.h".
7643 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7644 (optinfo_enabled_p): Check optimization_records_enabled_p.
7645 (optinfo_wants_inlining_info_p): Likewise.
7646 * optinfo.h: Update comment.
7647 * profile-count.c (profile_quality_as_string): New function.
7648 * profile-count.h (profile_quality_as_string): New decl.
7649 (profile_count::quality): New accessor.
7650 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7651 and optinfo_emit_json_cc_tests.
7652 * selftest.h (selftest::json_cc_tests): New decl.
7653 (selftest::optinfo_emit_json_cc_tests): New decl.
7654 * toplev.c: Include "optinfo-emit-json.h".
7655 (compile_file): Call optimization_records_finish.
7656 (do_compile): Call optimization_records_start.
7657 * tree-ssa-live.c: Include optinfo.h.
7658 (remove_unused_scope_block_p): Retain inlining information if
7659 optinfo_wants_inlining_info_p returns true.
7661 2018-07-20 Richard Biener <rguenther@suse.de>
7664 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7665 to cover -flto-partition=none.
7667 2018-07-20 Martin Liska <mliska@suse.cz>
7669 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7670 (get_decl_source_range): Remove unused function.
7672 2018-07-20 Richard Biener <rguenther@suse.de>
7674 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7675 (struct vn_phi_s): Likewise.
7676 (struct vn_reference_s): Likewise.
7677 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7678 for searching the slot of an entry known to be in the hash itself.
7679 (vn_phi_hasher::equal): Likewise.
7680 (vn_reference_hasher::equal): Likewise.
7681 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7683 (optimistic_info, current_info): Remove, keeping only valid_info.
7684 (vn_reference_lookup_1): Remove fallback lookup.
7685 (vn_reference_lookup_2): Likewise.
7686 (vn_nary_op_lookup_1): Likewise.
7687 (vn_phi_lookup): Likewise.
7688 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7690 (vn_reference_insert): Adjust, chain the inserted hash element
7691 at last_inserted_ref.
7692 (vn_reference_insert_pieces): Likewise.
7693 (visit_reference_op_call): Likewise.
7694 (vn_nary_op_insert_into): Chain the inserted hash element at
7696 (vn_nary_op_insert_pieces): Adjust.
7697 (vn_nary_op_insert): Likewise.
7698 (vn_nary_op_insert_stmt): Likewise.
7699 (vn_phi_insert): Adjust, chain the inserted hash element at
7701 (process_scc): Remove clearing and copying the optimistic
7702 table. Instead remove elements inserted during an optimistic
7703 iteration from the single table we maintain.
7704 (init_scc_vn): Adjust.
7705 (free_scc_vn): Likewise.
7706 (sccvn_dom_walker::record_cond): Likewise.
7707 (sccvn_dom_walker::after_dom_children): Likewise.
7709 2018-07-19 Martin Sebor <msebor@redhat.com>
7711 PR tree-optimization/84047
7712 PR tree-optimization/83776
7713 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7714 (check_array_bounds): Call it.
7716 2018-07-19 Martin Sebor <msebor@redhat.com>
7718 * align.h (align_flags): Use member initialization.
7720 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7722 * Makefile.in (OBJS): Add optinfo.o.
7723 * coretypes.h (class symtab_node): New forward decl.
7724 (struct cgraph_node): New forward decl.
7725 (class varpool_node): New forward decl.
7726 * dump-context.h: New file.
7727 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7729 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7730 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7731 (set_alt_dump_file): Likewise.
7732 (dump_context::~dump_context): New dtor.
7733 (dump_gimple_stmt): Move implementation to...
7734 (dump_context::dump_gimple_stmt): ...this new member function.
7735 Add the stmt to any pending optinfo, creating one if need be.
7736 (dump_gimple_stmt_loc): Move implementation to...
7737 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7738 Start a new optinfo and add the stmt to it.
7739 (dump_gimple_expr): Move implementation to...
7740 (dump_context::dump_gimple_expr): ...this new member function.
7741 Add the stmt to any pending optinfo, creating one if need be.
7742 (dump_gimple_expr_loc): Move implementation to...
7743 (dump_context::dump_gimple_expr_loc): ...this new member function.
7744 Start a new optinfo and add the stmt to it.
7745 (dump_generic_expr): Move implementation to...
7746 (dump_context::dump_generic_expr): ...this new member function.
7747 Add the tree to any pending optinfo, creating one if need be.
7748 (dump_generic_expr_loc): Move implementation to...
7749 (dump_context::dump_generic_expr_loc): ...this new member
7750 function. Add the tree to any pending optinfo, creating one if
7752 (dump_printf): Move implementation to...
7753 (dump_context::dump_printf_va): ...this new member function. Add
7754 the text to any pending optinfo, creating one if need be.
7755 (dump_printf_loc): Move implementation to...
7756 (dump_context::dump_printf_loc_va): ...this new member function.
7757 Start a new optinfo and add the stmt to it.
7758 (dump_dec): Move implementation to...
7759 (dump_context::dump_dec): ...this new member function. Add the
7760 value to any pending optinfo, creating one if need be.
7761 (dump_context::dump_symtab_node): New member function.
7762 (dump_context::get_scope_depth): New member function.
7763 (dump_context::begin_scope): New member function.
7764 (dump_context::end_scope): New member function.
7765 (dump_context::ensure_pending_optinfo): New member function.
7766 (dump_context::begin_next_optinfo): New member function.
7767 (dump_context::end_any_optinfo): New member function.
7768 (dump_context::s_current): New global.
7769 (dump_context::s_default): New global.
7770 (dump_scope_depth): Delete global.
7771 (dumpfile_ensure_any_optinfo_are_flushed): New function.
7772 (dump_symtab_node): New function.
7773 (get_dump_scope_depth): Reimplement in terms of dump_context.
7774 (dump_begin_scope): Likewise.
7775 (dump_end_scope): Likewise.
7776 (selftest::temp_dump_context::temp_dump_context): New ctor.
7777 (selftest::temp_dump_context::~temp_dump_context): New dtor.
7778 (selftest::verify_item): New function.
7779 (ASSERT_IS_TEXT): New macro.
7780 (ASSERT_IS_TREE): New macro.
7781 (ASSERT_IS_GIMPLE): New macro.
7782 (selftest::test_capture_of_dump_calls): New test.
7783 (selftest::dumpfile_c_tests): Call it.
7784 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7785 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7786 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7787 descriptive comment.
7788 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7789 (dump_node, dump_bb): Move these unrelated decls.
7790 (class dump_manager): Add leading comment.
7791 * optinfo.cc: New file.
7792 * optinfo.h: New file.
7794 2018-07-19 Michael Collison <michael.collison@arm.com>
7795 Richard Henderson <rth@redhat.com>
7797 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7798 (subti): Handle op1 zero.
7799 (subvti4, usub4ti4): New.
7800 (*sub<GPI>3_compare1_imm): New.
7801 (sub<GPI>3_carryinCV): New.
7802 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7803 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7805 2018-07-19 Michael Collison <michael.collison@arm.com>
7806 Richard Henderson <rth@redhat.com>
7808 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7809 (addti3): Create simpler code if low part is already known to be 0.
7810 (addvti4, uaddvti4): New.
7811 (*add<GPI>3_compareC_cconly_imm): New.
7812 (*add<GPI>3_compareC_cconly): New.
7813 (*add<GPI>3_compareC_imm): New.
7814 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7815 handle constants within this pattern..
7816 (*add<GPI>3_compareV_cconly_imm): New.
7817 (*add<GPI>3_compareV_cconly): New.
7818 (*add<GPI>3_compareV_imm): New.
7819 (add<GPI>3_compareV): New.
7820 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7821 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7822 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7823 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7824 with 'comparison' operator.
7825 (*add<GPI>3_compareV_cconly_imm): Ditto.
7826 (*add<GPI>3_compareV_cconly): Ditto.
7827 (*add<GPI>3_compareV_imm): Ditto.
7828 (add<GPI>3_compareV): Ditto.
7829 (add<mode>3_carryinC): Ditto.
7830 (*add<mode>3_carryinC_zero): Ditto.
7831 (*add<mode>3_carryinC): Ditto.
7832 (add<mode>3_carryinV): Ditto.
7833 (*add<mode>3_carryinV_zero): Ditto.
7834 (*add<mode>3_carryinV): Ditto.
7836 2018-07-19 Michael Collison <michael.collison@arm.com>
7837 Richard Henderson <rth@redhat.com>
7839 * config/aarch64/aarch64-modes.def (CC_V): New.
7840 * config/aarch64/aarch64-protos.h
7841 (aarch64_addti_scratch_regs): Declare
7842 (aarch64_subvti_scratch_regs): Declare.
7843 (aarch64_expand_subvti): Declare.
7844 (aarch64_gen_unlikely_cbranch): Declare
7845 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7846 for signed overflow using CC_Vmode.
7847 (aarch64_get_condition_code_1): Handle CC_Vmode.
7848 (aarch64_gen_unlikely_cbranch): New function.
7849 (aarch64_addti_scratch_regs): New function.
7850 (aarch64_subvti_scratch_regs): New function.
7851 (aarch64_expand_subvti): New function.
7853 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7855 * config/aarch64/aarch64-option-extensions.def: New entry for profile
7857 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7858 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7861 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7864 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7865 address check not strict.
7867 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7869 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7871 (store_pair_lanes<mode>): Likewise.
7872 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7873 enum value 'ADDR_QUERY_LDP_STP_N'.
7874 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7875 (aarch64_print_address_internal): Add declaration.
7876 (aarch64_print_ldpstp_address): Remove.
7877 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7878 (aarch64_print_operand): Change printing of 'y'.
7879 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7880 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7881 'true' rather than '1'.
7882 * config/aarch64/constraints.md (Uml): Likewise.
7883 (Uml): Rename to Umn.
7886 2018-07-19 Richard Biener <rguenther@suse.de>
7888 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7890 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7891 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7892 (vn_reference_hasher): Likewise.
7893 (struct vn_tables_s): Remove obstack and alloc-pool members.
7894 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7895 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7896 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7897 (vn_reference_insert_pieces): Likewise.
7898 (alloc_vn_nary_op_noinit): Adjust.
7899 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7900 (vn_phi_eq): Adjust.
7901 (shared_lookup_phiargs): Remove.
7902 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7903 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7904 (visit_reference_op_call): Likewise.
7905 (copy_nary, copy_phi, copy_reference): Remove.
7906 (process_scc): Rewind the obstack when iterating. Do not
7907 copy the elements to valid_info but just move them from one
7908 hashtable to the other.
7909 (allocate_vn_table): Adjust.
7910 (free_vn_table): Likewise.
7911 (init_scc_vn): Likewise.
7912 (free_scc_vn): Likewise.
7914 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
7917 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7918 indirect_return as function type attribute.
7919 (ix86_attribute_table): Change indirect_return to function
7921 * doc/extend.texi: Update indirect_return attribute.
7923 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
7925 * wide-int.h (widest2_int): New.
7926 * gimple-fold.c (arith_overflowed_p): Use it.
7927 * tree.h (widest2_int_cst): New.
7928 * tree-vrp.c (wide_int_binop_overflow): Rename from
7929 vrp_int_const_binop.
7930 Rewrite to work on trees.
7931 (extract_range_from_multiplicative_op_1): Abstract code to...
7932 (wide_int_range_min_max): ...here.
7933 (wide_int_range_cross_product): ...and here.
7934 (extract_range_from_binary_expr_1): Abstract overflow code to...
7935 (wide_int_range_mult_wrapping): ...here.
7936 * tree-vrp.h (wide_int_range_cross_product): New.
7937 (wide_int_range_mult_wrapping): New.
7939 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
7940 Julia Koval <julia.koval@intel.com>
7942 * config/i386/x86-tune-costs.h (skylake_memcpy,
7943 skylake_memset): Replace rep_prefix with unrolling for size 512.
7945 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
7948 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7949 comparision with EQ_EXPR in last stmt.
7951 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
7953 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7954 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7955 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7956 previously known as "PowerPC AltiVec Built-in Functions". Move
7957 some material to new subsubsections "PowerPC AltiVec Built-in
7958 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7960 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7961 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7962 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7963 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7965 2018-07-18 Richard Biener <rguenther@suse.de>
7967 PR tree-optimization/86557
7968 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7971 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
7973 * config/s390/s390.c (s390_function_profiler): Generate CFI.
7975 2018-07-17 Jeff Law <law@redhat.com>
7977 * config/arm/arm.c (get_label_padding): Update for recent
7978 changes to label_to_alignment.
7980 PR tree-optimization/86010
7981 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7983 * config/mips/mips.c (vr4130_align_insns): Update for recent
7984 changes to label_to_alignment.
7986 * config/frv/frv.c (frv_label_align): Update for recent changes
7987 to label_to_alignment.
7989 * config/nios2/nios2.c (nios2_label_align): Update for recent
7990 changes which dropped ALIGN_LABELS_LOG.
7992 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
7994 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7995 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7997 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
7999 * config/arc/arc.c (arc_label_align): Use align_labels instead of
8000 deprecated align_labels_log.
8002 2018-07-17 Richard Biener <rguenther@suse.de>
8005 * dwarf2out.c (init_sections_and_labels): Always generate
8006 a debug_line_str_section for early LTO debug.
8007 (dwarf2out_finish): Reset debug_line_str_hash output early.
8008 Bump counter for extra dwarf5 .debug_loc labels to not conflict
8010 (dwarf2out_early_finish): Output debug_line_str.
8012 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8014 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8015 index register on z196 or later.
8017 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8019 * config/s390/s390.c (s390_default_align): Set default function
8021 (s390_override_options_after_change): Call s390_default align.
8022 (s390_option_override_internal): Call s390_default_align.
8023 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8025 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8028 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8029 to _looptemp_ clauses, other than the first two.
8031 2018-07-17 Martin Liska <mliska@suse.cz>
8033 * opts.c: Do not enable OPT_falign_* for -Os.
8035 2018-07-17 Martin Liska <mliska@suse.cz>
8037 * align.h (MAX_CODE_ALIGN): New.
8038 (MAX_CODE_ALIGN_VALUE): New.
8039 * common/config/i386/i386-common.c (ix86_handle_option):
8040 (MAX_CODE_ALIGN): Moved to align.h.
8041 * final.c (MAX_CODE_ALIGN): Likewise.
8042 * opts.c (parse_and_check_align_values):
8043 (MAX_CODE_ALIGN): Likewise.
8044 (MAX_CODE_ALIGN_VALUE): Likewise.
8046 2018-07-17 Martin Liska <mliska@suse.cz>
8048 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8049 in order to fulfil coding style.
8050 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8051 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8052 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8053 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8054 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8055 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8056 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8057 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8058 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8060 2018-07-17 Martin Liska <mliska@suse.cz>
8062 * align.h: New file.
8063 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8065 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8066 align_flags of label_to_alignment.
8067 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8069 * config/m68k/m68k.c: Do not use removed align_labels_value and
8071 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8072 (LOOP_ALIGN): Likewise.
8073 (LABEL_ALIGN): Likewise.
8074 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8075 Remove not used macro.
8076 (rs6000_loop_align): Change return type to align_flags.
8077 (rs6000_loop_align_max_skip): Remove.
8078 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8079 Change return type to align_flags.
8080 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8081 Remove not used macro.
8082 (rs6000_loop_align): Change return type to align_flags.
8083 (rs6000_loop_align_max_skip): Remove.
8084 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8085 * config/rx/rx-protos.h (rx_align_for_label): Make it
8087 * config/rx/rx.c (rx_align_for_label): Change return type
8089 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8091 into align_flags class.
8092 (LABEL_ALIGN): Likewise.
8093 (LOOP_ALIGN): Likewise.
8094 * config/s390/s390.c (s390_label_align): Use align_flags
8096 (s390_asm_output_function_label): Likewise.
8097 * config/sh/sh.c (sh_override_options_after_change):
8098 Use align_flags class directly without macros.
8099 (find_barrier): Likewise.
8100 (barrier_align): Likewise.
8101 (sh_loop_align): Likewise.
8102 * config/spu/spu.c (spu_option_override):
8103 Use align_flags_tuple::get_value instead of removed macros.
8104 (spu_sched_init): Likewise.
8105 * config/spu/spu.h (GTY): Likewise.
8106 * config/visium/visium.c (visium_option_override):
8107 Set "8" as default secondary alignment.
8108 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8109 in order to guarantee secondary alignment of 8.
8110 * coretypes.h: Include align.h header file.
8111 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8112 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8113 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8114 * doc/tm.texi.in: Likewise.
8115 * final.c (struct label_alignment): Remove not used structure.
8116 (LABEL_ALIGN): Change type to align_flags.
8117 (LOOP_ALIGN): Likewise.
8118 (JUMP_ALIGN): Likewise.
8119 (default_loop_align_max_skip): Remove.
8120 (default_label_align_max_skip): Likewise.
8121 (default_jump_align_max_skip): Likewise.
8122 (default_label_align_after_barrier_max_skip):
8123 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8124 (LABEL_TO_MAX_SKIP): Remove.
8125 (label_to_alignment): Return align_flags type instead of integer.
8126 (label_to_max_skip): Remove.
8127 (align_fuzz): Use align_flags type.
8128 (compute_alignments): Use align_flags type and use align_flags::max
8129 to combine multiple alignments.
8130 (grow_label_align): Grow vec instead of C array.
8131 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8132 (shorten_branches): Use align_flags type and use align_flags::max
8133 to combine multiple alignments.
8134 (final_scan_insn_1): Remove usage of secondary alignment that comes
8135 from label alignment, but instead use proper secondary alignment
8136 which is computed in grow_label_align.
8137 * flags.h (struct align_flags_tuple): Move to align.h.
8138 (struct align_flags): Likewise.
8139 (state_align_loops): Rename to align_loops.
8140 (state_align_jumps): Rename to align_jumps.
8141 (state_align_labels): Rename to align_labels.
8142 (state_align_functions): Rename to align_functions.
8143 (align_loops_log): Remove.
8144 (align_jumps_log): Remove.
8145 (align_labels_log): Remove.
8146 (align_functions_log): Remove.
8147 (align_loops_max_skip): Remove.
8148 (align_jumps_max_skip): Remove.
8149 (align_labels_max_skip): Remove.
8150 (align_functions_max_skip): Remove.
8151 (align_loops_value): Remove.
8152 (align_jumps_value): Remove.
8153 (align_labels_value): Remove.
8154 (align_functions_value): Remove.
8155 * output.h (label_to_alignment): Change return type to align_flags.
8156 (label_to_max_skip): Remove.
8157 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8158 jump_align_max_skip macros.
8159 * targhooks.h (default_loop_align_max_skip): Remove.
8160 (default_label_align_max_skip): Likewise.
8161 (default_jump_align_max_skip): Likewise.
8162 (default_label_align_after_barrier_max_skip): Remove.
8163 * toplev.c (read_log_maxskip): Use ::normalize function.
8164 (parse_N_M): Remove not used argument and also call ::normalize.
8165 (parse_alignment_opts): Do not pass unused arguments.
8166 * varasm.c (assemble_start_function): Use directly align_functions
8167 instead of removed macros.
8168 * system.h: Do not poison removed macros.
8170 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8173 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8174 and cond temporaries don't have reference type if iterator has
8175 pointer type. For init use &for_pre_body instead of pre_p if
8176 for_pre_body is non-empty.
8178 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8180 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8181 double-double modes to SFmode directly directly.
8182 (trunc<mode>sf2_fprs): Delete.
8184 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8186 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8187 for conversions between IFmode and the decimal floating point modes.
8188 (init_float128_ieee): Use the correct names for conversions between
8189 KFmode and the decimal floating point modes.
8191 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8193 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8194 for the conversions between TDmode and IFmode.
8195 (init_float128_ieee): Use more correct names for the conversions
8196 between TDmode and KFmode.
8198 2018-07-16 Jakub Jelinek <jakub@redhat.com>
8200 PR tree-optimization/86526
8201 * builtins.c (expand_builtin_memcmp): Formatting fixes.
8202 (inline_expand_builtin_string_cmp): Likewise.
8203 (inline_string_cmp): Likewise. Use c_readstr instead of
8204 builtin_memcpy_read_str. Add unit_mode temporary.
8206 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8209 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8210 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8212 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8214 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8215 Alphabetize prototypes of built-in functions, separating out
8216 built-in functions that are listed in this section but should be
8217 described elsewhere.
8219 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
8222 * expmed.c (emit_store_flag): Do not emit setcc followed by a
8223 conditional move when trapping comparison was split to a
8224 non-trapping one (and vice versa).
8226 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8228 * config/s390/s390.c (s390_function_profiler): Generate nops
8229 instead of profiler call sequences.
8230 * config/s390/s390.opt: Add the new option.
8232 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8234 * config/s390/s390.c (s390_function_profiler): Generate
8235 __mcount_loc section.
8236 * config/s390/s390.opt: Add the new option.
8238 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8240 * common.opt: Add the new warning.
8241 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8242 %r0,__fentry__" when -mfentry is specified.
8243 (s390_option_override_internal): Disallow -mfentry for 31-bit
8245 * config/s390/s390.opt: Add the new option.
8247 2018-07-16 Richard Biener <rguenther@suse.de>
8250 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8251 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8253 2018-07-16 Martin Liska <mliska@suse.cz>
8256 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8259 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8261 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8263 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8265 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8267 * config/arc/arc-cpus.def (hs4x): New cpu.
8269 * config/arc/arc-tables.opt: Regenerate.
8270 * config/arc/arc.c (arc_sched_issue_rate): New function.
8271 (TARGET_SCHED_ISSUE_RATE): Define.
8272 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8273 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8275 (attr tune): Add ARCHS4x tune values.
8276 (attr tune_dspmpy): Define.
8277 (*tst): Correct instruction type.
8278 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8279 * config/arc/arcHS4x.md: New file.
8280 * config/arc/fpu.md: Update instruction type attributes.
8281 * config/arc/t-multilib: Regenerate.
8283 2018-07-16 Tom de Vries <tdevries@suse.de>
8286 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8288 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8290 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8293 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8295 PR tree-optimization/86514
8296 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8297 conversion to a boolean type from a type with greater precision.
8299 2018-07-16 Tom de Vries <tdevries@suse.de>
8301 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8302 dump_flags request TDF_SLIM.
8304 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8306 * fold-const.c (int_const_binop_1): Abstract...
8307 (wide_int_binop): ...wide int code here.
8308 (poly_int_binop): ...poly int code here.
8309 Abstract the rest of int_const_binop_1 into int_const_binop.
8310 * fold-const.h (wide_int_binop): New.
8311 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8312 Remove useless PLUS/MINUS_EXPR case.
8313 (zero_nonzero_bits_from_vr): Move wide int code...
8314 (zero_nonzero_bits_from_bounds): ...here.
8315 (extract_range_from_binary_expr_1): Move mask optimization code...
8316 (range_easy_mask_min_max): ...here.
8317 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8318 (range_easy_mask_min_max): New.
8320 2018-07-15 Jeff Law <law@redhat.com>
8323 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8326 2018-07-14 Jim Wilson <jimw@sifive.com>
8328 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8330 2018-07-14 Paul Koning <ni1d@arrl.net>
8332 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8334 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8336 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8339 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8340 Steve Munroe <munroesj52@gmail.com>
8342 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8343 (_mm_andnot_si128): Likewise.
8344 (_mm_or_si128): Likewise.
8345 (_mm_xor_si128): Likewise.
8347 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8350 * builtins.c (expand_builtin_memcmp): Inline the calls first
8351 when result_eq is false.
8352 (expand_builtin_strcmp): Inline the calls first.
8353 (expand_builtin_strncmp): Likewise.
8354 (inline_string_cmp): New routine. Expand a string compare
8355 call by using a sequence of char comparison.
8356 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8357 a call to str(n)cmp/memcmp.
8358 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8360 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8362 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8364 * config/arm/driver-arm.c: Include arm-native.h.
8365 (host_detect_local_cpu): Use auto-generated data tables.
8366 (vendors, arm_cpu_table): Delete. Move part information to ...
8367 * config/arm/arm-cpus.in: ... here.
8368 * config/arm/parsecpu.awk (gen_native): New function.
8369 (vendor, part): New CPU fields.
8370 (END): Add support for building the native CPU detection tables.
8371 * config/arm/t-arm (arm-native.h): Add build rule.
8372 (driver-arm.o): Add dependency on arm-native.h.
8374 2018-07-13 Richard Biener <rguenther@suse.de>
8377 * match.pd (addr1 - addr2): Allow either of the operand to
8380 2018-07-13 Tom de Vries <tdevries@suse.de>
8382 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8385 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8387 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8388 arrays instead of numbered variables.
8390 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8392 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8393 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8395 2018-07-13 Richard Biener <rguenther@suse.de>
8398 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8399 instead of get_context_die.
8401 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8402 Richard Biener <rguenther@suse.de>
8405 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8406 that the loop latch destination where phi is defined.
8408 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8410 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8411 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8412 (riscv_set_current_function): Extract getting interrupt type to new
8414 (riscv_get_interrupt_type): New function.
8415 (riscv_merge_decl_attributes): New function, checking interrupt type is
8417 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8419 2018-07-12 Paul Koning <ni1d@arrl.net>
8421 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8424 2018-07-12 Paul Koning <ni1d@arrl.net>
8426 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8427 zero reference, add doloop_end instead.
8428 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8429 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8430 detail for doloop_end.
8432 2018-07-12 Martin Sebor <msebor@redhat.com>
8435 * attribs.c (decl_attributes): Reject conflicting attributes before
8436 calling attribute handlers.
8438 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8440 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8442 (gcc::dump_manager::get_dump_file_name): likewise.
8443 (dump_begin): Likewise.
8444 * dumpfile.h (dump_begin): Update prototype.
8445 (gcc::dump_manager::get_dump_file_name,
8446 gcc::dump_manager::get_dump_file_name): Update prototype.
8448 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8450 * internal-fn.h (vectorizable_internal_fn_p): New function.
8451 * tree-vect-slp.c (compatible_calls_p): Likewise.
8452 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8453 to internal functions.
8454 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8456 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8458 * fold-const.h (inverse_conditions_p): Declare.
8459 * fold-const.c (inverse_conditions_p): New function.
8460 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8461 that test the inverse condition of a conditional internal function.
8462 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8463 * internal-fn.c (internal_fn_mask_index): Handle conditional
8465 (vectorized_internal_fn_supported_p): New function.
8466 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8467 (any_pred_load_store): Replace with...
8468 (need_to_predicate): ...this new variable.
8469 (redundant_ssa_names): New variable.
8470 (ifcvt_can_use_mask_load_store): Move initial checks to...
8471 (ifcvt_can_predicate): ...this new function. Handle tree codes
8472 for which a conditional internal function exists.
8473 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8474 instead of ifcvt_can_use_mask_load_store. Update after variable
8476 (predicate_load_or_store): New function, split out from
8477 predicate_mem_writes.
8478 (check_redundant_cond_expr): New function.
8479 (value_available_p): Likewise.
8480 (predicate_rhs_code): Likewise.
8481 (predicate_mem_writes): Rename to...
8482 (predicate_statements): ...this. Use predicate_load_or_store
8483 and predicate_rhs_code.
8484 (combine_blocks, tree_if_conversion): Update after above name changes.
8485 (ifcvt_local_dce): Handle redundant_ssa_names.
8486 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8487 general conditional functions.
8488 * tree-vect-stmts.c (vectorizable_call): Likewise.
8490 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8491 Alan Hayward <alan.hayward@arm.com>
8492 David Sherwood <david.sherwood@arm.com>
8494 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8495 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8496 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8497 plus and minus and convert them into IFN_COND_FMA-based sequences.
8498 (convert_mult_to_fma): Handle conditional plus and minus.
8500 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8502 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8503 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8504 (cond_fnms_optab): New optabs.
8505 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8507 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8508 * internal-fn.h (get_conditional_internal_fn): Declare.
8509 (get_unconditional_internal_fn): Likewise.
8510 * internal-fn.c (cond_ternary_direct): New macro.
8511 (expand_cond_ternary_optab_fn): Likewise.
8512 (direct_cond_ternary_optab_supported_p): Likewise.
8513 (FOR_EACH_COND_FN_PAIR): Likewise.
8514 (get_conditional_internal_fn): New function.
8515 (get_unconditional_internal_fn): Likewise.
8516 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8517 (gimple_match_op::gimple_match_op): Add a new overload for 5
8519 (gimple_match_op::set_op): Likewise.
8520 (gimple_resimplify5): Declare.
8521 * genmatch.c (decision_tree::gen): Generate simplifications for
8523 * gimple-match-head.c (gimple_simplify): Define an overload for
8524 5 operands. Handle calls with 5 arguments in the top-level overload.
8525 (convert_conditional_op): Handle conversions from unconditional
8526 internal functions to conditional ones.
8527 (gimple_resimplify5): New function.
8528 (build_call_internal): Pass a fifth operand.
8529 (maybe_push_res_to_seq): Likewise.
8530 (try_conditional_simplification): Try converting conditional
8531 internal functions to unconditional internal functions.
8532 Handle 3-operand unconditional forms.
8533 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8534 Define ternary equivalents of the current rules for binary conditional
8536 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8538 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8539 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8540 (optab): Handle them.
8541 (SVE_COND_FP_TERNARY): New int iterator.
8542 (sve_fmla_op, sve_fmad_op): New int attributes.
8543 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8544 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8545 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8547 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8549 * target.def (preferred_else_value): New target hook.
8550 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8551 * doc/tm.texi: Regenerate.
8552 * targhooks.h (default_preferred_else_value): Declare.
8553 * targhooks.c (default_preferred_else_value): New function.
8554 * internal-fn.h (conditional_internal_fn_code): Declare.
8555 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8556 (get_conditional_internal_fn): Use it.
8557 (conditional_internal_fn_code): New function.
8558 * gimple-match.h (gimple_match_cond): New struct.
8559 (gimple_match_op): Add a cond member function.
8560 (gimple_match_op::gimple_match_op): Update all forms to take a
8562 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8563 for the suboperation, but don't specify a particular else_value.
8564 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8565 (visit_nary_op, visit_reference_op_load): Pass
8566 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8567 * gimple-match-head.c: Include tree-eh.h
8568 (convert_conditional_op): New function.
8569 (maybe_resimplify_conditional_op): Likewise.
8570 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8571 (gimple_resimplify2): Likewise.
8572 (gimple_resimplify3): Likewise.
8573 (gimple_resimplify4): Likewise.
8574 (maybe_push_res_to_seq): Return null for conditional operations.
8575 (try_conditional_simplification): New function.
8576 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8578 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8580 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8582 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8584 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8586 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8588 (hash_tree): Do not hash DECL_FCONTEXT
8589 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8590 Do not stream DECL_FCONTEXT.
8591 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8592 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8594 2018-07-12 Richard Biener <rguenther@suse.de>
8597 * dwarf2out.c (gen_block_die): Only output blocks when they have
8598 at least one !DECL_IGNORED_P variable.
8600 2018-07-12 Richard Biener <rguenther@suse.de>
8603 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8604 Remove -mieee-fp handling.
8606 2018-07-12 Richard Biener <rguenther@suse.de>
8608 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8609 left-over from last patch.
8611 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8613 PR tree-optimization/86492
8614 * gimple-ssa-store-merging.c
8615 (imm_store_chain_info::coalesce_immediate_stores): Call
8616 check_no_overlap even for the merge_overlapping case. Formatting fix.
8618 2018-07-12 Richard Biener <rguenther@suse.de>
8621 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8622 move possibly trapping operations into the conditional.
8624 2018-07-12 Richard Biener <rguenther@suse.de>
8626 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8627 (vn_lookup_simplify_result): Remove recursion limit applied
8629 (vn_nary_build_or_lookup_1): Adjust.
8630 (try_to_simplify): Likewise.
8631 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8633 (gimple_resimplify2): Likewise.
8634 (gimple_resimplify3): Likewise.
8635 (gimple_resimplify4): Likewise.
8637 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8639 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8640 Use __mmask64 type instead of __mmask8 for __M argument.
8641 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8642 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8644 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8645 __mmask16 for __M argument.
8646 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8647 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8648 to __mmask16 instead of __mmask8.
8649 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8650 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8651 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8652 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8653 instead of __mmask16 for __U argument.
8654 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8655 __mmask16 instead of __mmask8 for __U argument.
8656 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8658 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8660 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8662 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8664 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8666 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8668 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8670 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8672 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8674 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8676 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8677 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8678 return type as well as __M argument type and all casts from __mmask8
8680 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8681 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8682 return type as well as __M argument type and all casts from __mmask8
8684 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8685 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8686 return type as well as __M argument type and all casts from __mmask8
8688 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8689 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8690 return type as well as __M argument type and all casts from __mmask8
8692 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8693 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8696 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8698 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8699 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8702 2018-07-11 Paul Koning <ni1d@arrl.net>
8704 * doc/md.texi (define_subst): Document how multiple occurrences of
8705 the same argument in the replacement pattern are handled.
8707 2018-07-11 Paul Koning <ni1d@arrl.net>
8709 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8711 (Common Type Attributes): Add "mode" attribute.
8713 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8715 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8716 stream DECL_ORIGINAL_TYPE.
8717 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8718 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8719 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8720 Do not walk original type.
8721 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8723 (write_ts_decl_non_common_tree_pointers): Do not stream
8725 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8726 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8728 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8730 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8731 thread twice from the same starting edge.
8733 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8735 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8736 * gimple.c (gimple_call_nonnull_result_p): ...here...
8737 (gimple_call_nonnull_arg): ...and here.
8738 * gimple.h (gimple_call_nonnull_result_p): New.
8739 (gimple_call_nonnull_arg): New.
8741 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8743 * config/arm/arm-cpus.in: Move information from fpu field of each
8744 cpu definition to the isa field.
8745 * config/arm/parsecpu.awk (fpu): Delete match rule.
8746 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8748 2018-07-11 Richard Biener <rguenther@suse.de>
8751 * dwarf2out.c (init_sections_and_labels): Use
8752 output_asm_line_debug_info consistently.
8753 (dwarf2out_early_finish): Likewise.
8754 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8757 2018-07-11 Richard Biener <rguenther@suse.de>
8759 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8760 Rework father_bb setting in a way to avoid propagating constants
8761 multiple times on a loop body.
8763 2018-07-10 Mark Wielaard <mark@klomp.org>
8766 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8768 2018-07-10 Richard Biener <rguenther@suse.de>
8770 * hash-map.h (hash_map::iterator::operator*): Return
8771 references to key and value.
8773 2018-07-10 Jakub Jelinek <jakub@redhat.com>
8776 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8777 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8778 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8779 (gimplify_omp_for): For composite loops, move outer
8780 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8781 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
8782 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
8783 TREE_LIST for both the original class iterator and the "last" helper
8784 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
8785 loop, remember has_decl_expr from outer composite loops for the
8786 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8788 2018-07-09 Martin Sebor <msebor@redhat.com>
8792 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8793 accessing implicitly initialized array elements.
8794 * expr.c (string_constant): Handle string initializers of
8795 character arrays within aggregates.
8796 * gimple-fold.c (fold_array_ctor_reference): Add argument.
8797 Store element offset. As a special case, handle zero size.
8798 (fold_nonarray_ctor_reference): Same.
8799 (fold_ctor_reference): Add argument. Store subobject offset.
8800 * gimple-fold.h (fold_ctor_reference): Add argument.
8802 2018-07-09 Paul Koning <ni1d@arrl.net>
8804 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8805 (pdp11_insn_cost): New function.
8806 (pdp11_md_asm_adjust): New function.
8807 (TARGET_INVALID_WITHIN_DOLOOP): Define.
8808 (pdp11_rtx_costs): Update to match machine better.
8809 (output_addr_const_pdp11): Correct format mismatch warnings.
8810 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8811 * config/pdp11/pdp11.md: General change to add base_cost and/or
8812 length attributes for use by new pdp11_insn_cost function.
8813 (MIN_BRANCH): Correct definition.
8815 (doloop_end): Use standard pattern name for looping pattern.
8816 (doloop_end_nocc): New.
8817 (movsf): Add another constraint alternative.
8818 (zero_extendqihi2): Add constraint alternatives for not in place
8820 (zero_extendhisi2): Remove.
8821 (shift patterns): Add CC handling variants.
8825 (define_peephole2): New peephole to recognize mov that sets CC for
8828 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8830 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8831 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8834 2018-07-09 Jakub Jelinek <jakub@redhat.com>
8837 * real.c (real_nextafter): Return true if result is denormal.
8839 2018-07-09 Martin Liska <mliska@suse.cz>
8841 * common.opt: Add back wrongly removed attribute.
8843 2018-07-09 Richard Biener <rguenther@suse.de>
8846 * dwarf2out.c (gen_block_die): For an early generated DIE
8847 always output high/low PC attributes.
8849 2018-07-09 Tom de Vries <tdevries@suse.de>
8851 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8852 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8853 onto VAR_DECL with abstract origin.
8855 2018-07-07 Jim Wilson <jimw@sifive.com>
8857 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8859 2018-07-07 Tom de Vries <tdevries@suse.de>
8861 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8863 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
8865 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8867 (combine_bound): Use wide-int overflow calculation instead of
8869 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8871 * fold-const.c (int_const_binop_2): Same.
8872 (extract_muldiv_1): Same.
8873 (fold_div_compare): Same.
8874 (fold_abs_const): Same.
8876 * poly-int.h (add): Same.
8880 * predict.c (predict_iv_comparison): Same.
8881 * profile-count.c (slow_safe_scale_64bit): Same.
8882 * simplify-rtx.c (simplify_const_binary_operation): Same.
8883 * tree-chrec.c (tree_fold_binomial): Same.
8884 * tree-data-ref.c (split_constant_offset_1): Same.
8885 * tree-if-conv.c (idx_within_array_bound): Same.
8886 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8887 * tree-ssa-phiopt.c (minmax_replacement): Same.
8888 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8889 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8890 * vr-values.c (vr_values::adjust_range_with_scev): Same.
8891 * wide-int.cc (wi::add_large): Same.
8892 (wi::mul_internal): Same.
8893 (wi::sub_large): Same.
8894 (wi::divmod_internal): Same.
8895 * wide-int.h: Change overflow type to overflow_type for neg, add,
8896 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8897 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8898 mul_internal, divmod_internal.
8899 (overflow_type): New enum.
8900 (accumulate_overflow): New.
8902 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8904 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8905 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8907 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8909 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8910 argument is checked for zero before entering loop, avoid checking again.
8912 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8914 * gimplify.h (generic_expr_could_trap_p): Set as global function.
8915 * gimplify.h (generic_expr_could_trap_p): Likwise.
8916 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8918 2018-07-06 Jakub Jelinek <jakub@redhat.com>
8920 PR tree-optimization/86401
8921 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8922 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8923 (fold_bit_and_mask): ... here. New helper function for match.pd.
8924 * fold-const.h (fold_bit_and_mask): Declare.
8925 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8927 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
8930 * target.def (translate_mode_attribute): New hook.
8931 * targhooks.h (default_translate_mode_attribute): Declare.
8932 * targhooks.c (default_translate_mode_attribute): New function.
8933 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8934 * doc/tm.texi: Regenerate.
8935 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8936 (rs6000_translate_mode_attribute): New function.
8938 2018-07-06 Paul Koning <ni1d@arrl.net>
8940 * doc/md.texi (define_split): Document DONE and FAIL.
8941 (define_peephole2): Ditto.
8943 2018-07-05 Jeff Law <law@redhat.com>
8945 PR tree-optimization/86010
8946 * tree-ssa-dse.c (compute_trims): More aggressively trim at
8947 both the head and tail of mem* and str* calls.
8949 2018-07-05 Jim Wilson <jimw@sifive.com>
8951 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8953 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
8955 * config/aarch64/aarch64-simd.md: correct flags text for
8956 MIN_EXPR replacement.
8958 2018-07-05 James Clarke <jrtc27@jrtc27.com>
8960 * configure: Regenerated.
8962 2018-07-05 Carl Love <cel@us.ibm.com>
8964 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8965 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8966 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8967 VSX_BUILTIN_DOUBLEL_V4SF.
8969 2018-07-05 Martin Sebor <msebor@redhat.com>
8972 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8973 than its domain to compute its the upper bound of a char array.
8975 2018-07-05 Nathan Sidwell <nathan@acm.org>
8977 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8978 * doc/cpp.texi: Update comment.
8979 * doc/tm.texi: Rebuilt.
8980 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8981 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8982 * doc/extend.texi (Backwards Compatibility): Clarify it is system
8983 headers affected by extern "C".
8984 * system.h: Poison NO_IMPLICIT_EXTERN_C.
8985 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8986 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8987 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8988 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8989 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8990 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8991 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8992 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8993 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8994 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8995 config/sparc/sp64-elf.h, config/spu/spu.h,
8996 config/stormy16/stormy16.h, config/v850/v850.h,
8997 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8998 define NO_IMPLICIT_EXTERN_C.
8999 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9001 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9004 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9005 instead of GET_MODE_SIZE when comparing Units.
9007 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9010 * rtlanal.c (set_noop_p): Constrain on mode change,
9011 include hard-reg-set.h
9013 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9015 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9017 2018-07-05 Jakub Jelinek <jakub@redhat.com>
9020 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9023 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9025 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9027 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9030 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9032 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9034 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
9037 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9039 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
9041 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9042 neg_*_op* variables.
9044 2018-07-04 Martin Liska <mliska@suse.cz>
9046 * tree-switch-conversion.c: Define
9047 max_ratio_for_speed and max_ratio_for_size constants.
9049 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9050 Martin Liska <mliska@suse.cz>
9055 * common.opt: Rename align options with 'str_' prefix.
9056 * common/config/i386/i386-common.c (set_malign_value): New
9058 (ix86_handle_option): Use it to set -falign-* options/
9059 * config/aarch64/aarch64-protos.h (struct tune_params): Change
9060 type from int to string.
9061 * config/aarch64/aarch64.c: Update default values from int
9063 * config/alpha/alpha.c (alpha_override_options_after_change):
9065 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9066 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9067 max skip conditionally.
9068 * config/i386/freebsd.h (SUBALIGN_LOG): New.
9069 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9070 max skip conditionally.
9071 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9072 max skip conditionally.
9073 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9074 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9075 max skip conditionally.
9076 * config/i386/i386.c (struct ptt): Change type from int to
9078 (ix86_default_align): Set default values.
9079 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9080 max skip conditionally.
9081 * config/i386/iamcu.h (SUBALIGN_LOG): New.
9082 (ASM_OUTPUT_MAX_SKIP_ALIGN):
9083 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9084 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9085 max skip conditionally.
9086 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9087 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9088 * config/i386/x86-64.h (SUBALIGN_LOG): New.
9089 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9090 max skip conditionally.
9091 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9092 * config/ia64/ia64.c (ia64_option_override): Set default values
9093 for alignment options.
9094 * config/m68k/m68k.c: Handle new str_align_* options.
9095 * config/mips/mips.c (mips_set_compression_mode): Change
9097 (mips_option_override): Set default values for options.
9098 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9100 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9102 * config/rx/rx.c (rx_option_override): Likewise.
9103 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9104 (LABEL_ALIGN): Use align_labels_log.
9105 (LOOP_ALIGN): Use align_loops_align.
9106 * config/s390/s390.c (s390_asm_output_function_label): Use new
9108 * config/sh/sh.c (sh_override_options_after_change):
9109 Change type of constants.
9110 * config/spu/spu.c (spu_sched_init): Likewise.
9111 * config/sparc/sparc.c (sparc_option_override): Set default
9113 * config/visium/visium.c (visium_option_override): Likewise.
9114 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9115 emit p2align format with last argument if it's not needed.
9116 * doc/invoke.texi: Document extended format of -falign-*.
9117 * final.c: Use align_labels alignment.
9118 * flags.h (struct target_flag_state): Change type to use
9120 (struct align_flags_tuple): New.
9121 (struct align_flags): Likewise.
9122 (align_loops_log): Redefine macro to use new types.
9123 (align_loops_max_skip): Redefine macro to use new types.
9124 (align_jumps_log): Redefine macro to use new types.
9125 (align_jumps_max_skip): Redefine macro to use new types.
9126 (align_labels_log): Redefine macro to use new types.
9127 (align_labels_max_skip): Redefine macro to use new types.
9128 (align_functions_log): Redefine macro to use new types.
9129 (align_loops): Redefine macro to use new types.
9130 (align_jumps): Redefine macro to use new types.
9131 (align_labels): Redefine macro to use new types.
9132 (align_functions): Redefine macro to use new types.
9133 (align_functions_max_skip): Redefine macro to use new types.
9134 (align_loops_value): New macro.
9135 (align_jumps_value): New macro.
9136 (align_labels_value): New macro.
9137 (align_functions_value): New macro.
9138 * function.c (invoke_set_current_function_hook): Propagate
9139 alignment values from flags to global variables default in
9141 * ipa-icf.c (sem_function::equals_wpa): Use
9142 cl_optimization_option_eq instead of memcmp.
9143 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9145 (cl_optimization_stream_in): Likewise.
9146 * optc-save-gen.awk: Support strings in cl_optimization.
9147 * opth-gen.awk: Likewise.
9148 * opts.c (finish_options): Remove error checking of invalid
9150 (MAX_CODE_ALIGN): Remove.
9151 (MAX_CODE_ALIGN_VALUE): Likewise.
9152 (parse_and_check_align_values): New function.
9153 (check_alignment_argument): Likewise.
9154 (common_handle_option): Use check_alignment_argument.
9155 * opts.h (parse_and_check_align_values): Declare.
9156 * toplev.c (init_alignments): Remove.
9157 (read_log_maxskip): New.
9158 (parse_N_M): Likewise.
9159 (parse_alignment_opts): Likewise.
9160 (backend_init_target): Remove usage of init_alignments.
9161 * toplev.h (parse_alignment_opts): Declare.
9162 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9164 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9165 * tree.c (cl_option_hasher::equal): New.
9166 * varasm.c: Use new global macros.
9168 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9170 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9171 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9172 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9173 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9174 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9175 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9176 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9177 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9178 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9179 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9180 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9181 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9182 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9184 2018-07-04 Martin Liska <mliska@suse.cz>
9185 Jonathan Wakely <jwakely@redhat.com>
9187 * coverage.c: Use correct type.
9188 * doc/invoke.texi: Language correction.
9190 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
9193 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9194 ENDBRANCH for non-tail call which may return via indirect branch.
9195 * doc/extend.texi: Document indirect_return attribute.
9197 2018-07-03 Martin Sebor <msebor@redhat.com>
9199 PR tree-optimization/86274
9200 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9202 (format_floating): Correct handling of infinities and NaNs.
9204 2018-07-03 Martin Sebor <msebor@redhat.com>
9206 * print-tree.c (print_real_cst): New function.
9207 (print_node_brief): Call it.
9208 (print_node): Ditto.
9210 2018-07-03 Jeff Law <law@redhat.com>
9212 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9213 into a single pattern.
9215 * config/h8300/h8300.md (ors code_iterator): New.
9216 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9217 a single pattern and single splitter.
9218 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9219 (iorqi3_1, xorqi3_1): Likewise.
9220 (iorqi3, xorqi3 expanders): Similarly.
9222 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9223 (movmd_internal) into a single pattern using the P mode iterator.
9224 (movmd splitters): Similarly.
9225 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9226 (movsd splitters): Similarly.
9228 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9229 ADDB, ADDW and ADDL into a single ADD attribute which selects the
9230 right table based on the size of the operand.
9231 * config/h8300/h8300.md (length_table): Corresponding changes. All
9232 references to "addb", "addw" and "addl" changed to "add".
9233 (btst patterns): Merge two variants into a single pattern.
9234 (tstqi, tsthi): Likewise.
9235 (addhi3_incdec, addsi3_incdec): Likewise.
9236 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9237 (mulhi3, mulsi3): Likewise.
9238 (udivhi3, udivsi3): Likewise.
9239 (divhi3, divsi3): Likewise.
9240 (andorqi3, andorhi3, andorsi3): Likewise.
9242 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9245 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9246 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9248 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9250 PR tree-optimization/85694
9251 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9252 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9254 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9255 (<u>avg<mode>3_ceil): New patterns.
9257 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9259 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9260 scan-tree-dump directive.
9261 * gcc.dg/vect/slp-perm-2.c: Likewise.
9262 * gcc.dg/vect/slp-perm-3.c: Likewise.
9263 * gcc.dg/vect/slp-perm-5.c: Likewise.
9264 * gcc.dg/vect/slp-perm-6.c: Likewise.
9265 * gcc.dg/vect/slp-perm-7.c: Likewise.
9266 * gcc.dg/vect/slp-perm-8.c: Likewise.
9268 2018-07-03 Marek Polacek <polacek@redhat.com>
9271 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9273 2018-07-03 Richard Biener <rguenther@suse.de>
9276 * tree-ssa-structalias.c (find_func_clobbers): Properly
9277 handle indirect calls.
9279 2018-07-03 Jeff Law <law@redhat.com>
9281 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9282 (shifts): New code iterator.
9283 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9284 expander. Fix HImode handling on H8/SX.
9285 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9286 (subqi3, subhi3, subsi3 expanders): Likewise.
9287 (andqi3, andhi3, andsi3 expanders): Likewise.
9288 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9289 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9290 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9291 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9292 (zero_extendqihi2, zero_extendqisi2): Likewise.
9293 (extendqihi2, extendqisi2): Likewise.
9294 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9295 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9296 (rotlqi3_1, rotlhi3_1): Likewise.
9297 (logicalhi3_sn, logicalsi3_sn): Likewise.
9298 (logicalhi3, logicalsi3): Likewise.
9300 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9302 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9303 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9304 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9305 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9306 type to append_pattern_def_seq instead of creating a stmt_vec_info
9308 (build_mask_conversion): Likewise. Remove vinfo argument.
9309 (vect_add_conversion_to_patterm): Likewise, renaming to...
9310 (vect_add_conversion_to_pattern): ...this.
9311 (vect_recog_mask_conversion_pattern): Update call to
9312 build_mask_conversion. Pass the vector type to
9313 append_pattern_def_seq here too.
9314 (vect_recog_gather_scatter_pattern): Update call to
9315 vect_add_conversion_to_pattern.
9317 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9319 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9320 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9321 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9322 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9323 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9324 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9325 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9326 append_pattern_def_seq instead of new_pattern_def_seq.
9327 (vect_recog_divmod_pattern): Do both of the above.
9328 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9331 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9333 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9334 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9335 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9336 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9337 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9338 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9339 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9340 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9341 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9342 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9343 parameter with a single stmt_vec_info.
9344 (vect_recog_func_ptr): Likewise.
9345 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9346 (vect_try_gather_scatter_pattern): ...this.
9347 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9348 the stmt_vec_info of the statement to be matched. Don't clear
9349 STMT_VINFO_RELATED_STMT.
9350 (vect_pattern_recog): Update call accordingly.
9352 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9354 PR tree-optimization/85694
9355 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9356 (uavgM3_ceil): Document new optabs.
9357 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9358 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9360 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9361 (savg_ceil_optab): New optabs.
9362 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9363 (vect_vect_recog_func_ptrs): Add it.
9364 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9365 constant directly from the associated lhs.
9367 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9369 * tree-vect-patterns.c (vect_split_statement): New function.
9370 (vect_convert_input): Use it to try to split an existing cast.
9372 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9374 * poly-int.h (print_hex): New function.
9375 * dumpfile.h (dump_dec, dump_hex): Declare.
9376 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9377 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9378 min_input_precision, operation_precision and operation_sign.
9379 * tree-vect-patterns.c (vect_get_range_info): New function.
9380 (vect_same_loop_or_bb_p, vect_single_imm_use)
9381 (vect_operation_fits_smaller_type): Delete.
9382 (vect_look_through_possible_promotion): Add an optional
9383 single_use_p parameter.
9384 (vect_recog_over_widening_pattern): Rewrite to use new
9385 stmt_vec_info infomration. Handle one operation at a time.
9386 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9387 (vect_truncatable_operation_p, vect_set_operation_type)
9388 (vect_set_min_input_precision): New functions.
9389 (vect_determine_min_output_precision_1): Likewise.
9390 (vect_determine_min_output_precision): Likewise.
9391 (vect_determine_precisions_from_range): Likewise.
9392 (vect_determine_precisions_from_users): Likewise.
9393 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9394 (vect_vect_recog_func_ptrs): Put over_widening first.
9396 (vect_pattern_recog): Call vect_determine_precisions.
9398 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9400 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9401 statements that have been replaced by further pattern statements.
9402 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9404 2018-07-03 Richard Biener <rguenther@suse.de>
9406 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9407 always set *dt. Dump vectype in vectype overload.
9408 * dumpfile.h (dump_gimple_expr): New function.
9409 (dump_gimple_expr_loc): Likewise.
9410 * dumpfile.c (dump_gimple_expr): New function.
9411 (dump_gimple_expr_loc): Likewise.
9413 2018-07-02 Jeff Law <law@redhat.com>
9415 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9416 the H8/300, H8/300H and H8/S variants into a single pattern.
9417 (movhi_h8300, movqi_h8300hs): Similarly.
9418 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9419 (QHI mode iterator): New.
9421 * config/h8300/h8300.md: Remove trailing whitespace.
9423 2018-07-02 Jim Wilson <jimw@sifive.com>
9425 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9426 instead of emit_insn for interrupt returns.
9427 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9428 (riscv_sret, riscv_uret): Likewise.
9430 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9432 * pretty-print.c (selftest::test_pp_format): Move save and restore
9433 of quotes to class auto_fix_quotes, and add an instance.
9434 * selftest.c: Include "intl.h".
9435 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9436 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9437 * selftest.h (selftest::auto_fix_quotes): New class.
9439 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9441 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9442 (aarch64_sve_prepare_conditional_op): Remove.
9443 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9444 Allow aarch64_simd_reg_or_zero as select operand; remove
9445 the aarch64_sve_prepare_conditional_op call.
9446 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9447 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9448 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9449 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9450 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9451 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9452 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9453 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9454 and a splitters to match all of the *_any patterns.
9455 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9457 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9458 (SVE_COND_FP_BINARY_REV): Remove.
9459 (sve_int_op_rev, sve_fp_op_rev): New.
9460 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9461 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9462 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9463 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9464 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9465 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9466 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9467 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9468 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9470 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9471 Remove match_dup 1 from the inner unspec.
9472 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9474 * config/aarch64/aarch64.md (movprfx): New attr.
9475 (length): Default movprfx to 8.
9476 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9477 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9478 (*<su>mul<SVE_I>3_highpart): Likewise.
9479 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9480 (*v<ASHIFT><SVE_I>3): Likewise.
9481 (*<su><MAXMIN><SVE_I>3): Likewise.
9482 (*<su><MAXMIN><SVE_F>3): Likewise.
9483 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9484 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9485 (*div<SVE_F>4): Likewise.
9487 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9489 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9492 2018-07-02 Richard Biener <rguenther@suse.de>
9494 PR tree-optimization/86363
9495 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9496 memset argument refers to a non-variable address.
9498 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9500 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9501 {PLUS,MINUS}_EXPR code to...
9502 (adjust_symbolic_bound): ...here,
9503 (combine_bound): ...here,
9504 (set_value_range_with_overflow): ...and here.
9506 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9508 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9510 (extract_range_from_abs_expr): ...here.
9512 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9514 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9515 -fno-omit-frame-pointer when not optimizing.
9517 2018-07-02 Martin Liska <mliska@suse.cz>
9520 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9521 (propagate_nothrow): Likewise.
9523 2018-07-02 Martin Liska <mliska@suse.cz>
9526 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9528 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9530 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9531 function in r262149, changing "loc" param from source_location to
9532 const dump_location_t &.
9533 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9534 declaration, as above.
9536 2018-07-01 Paul Koning <ni1d@arrl.net>
9538 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9539 -munit-asm, -mgnu-asm, -mdec-asm.
9540 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9541 (pdp11_output_labelref): New.
9542 (pdp11_output_def): New.
9543 (pdp11_output_addr_vec_elt): New.
9544 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9545 %# and %@ format codes.
9546 (pdp11_option_override): New.
9547 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9548 (pdp11_output_ident): New.
9549 (pdp11_asm_named_section): New.
9550 (pdp11_asm_init_sections): New.
9551 (pdp11_file_start): New.
9552 (pdp11_file_end): New.
9553 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9554 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9555 %o, like %c but octal.
9556 (pdp11_option_override): New.
9557 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9559 (DATA_SECTION_ASM_OP): Ditto.
9560 (READONLY_DATA_SECTION_ASM_OP): New.
9561 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9562 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9563 (ASM_OUTPUT_LABELREF): Ditto.
9564 (ASM_OUTPUT_DEF): Ditto.
9565 (ASM_OUTPUT_EXTERNAL): New.
9566 (ASM_OUTPUT_SOURCE_FILENAME): New.
9567 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9568 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9569 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9570 %# and %@ format codes.
9571 * config/pdp11/pdp11.opt (mgnu-asm): New.
9572 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9573 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9574 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9576 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9578 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9579 dereferencing path[] beyond its length.
9581 (debug_all_paths): New.
9582 (rewire_first_differing_edge): New.
9583 (adjust_paths_after_duplication): New.
9584 (duplicate_thread_path): Call adjust_paths_after_duplication.
9586 (thread_through_all_blocks): Add new argument to
9587 duplicate_thread_path.
9589 2018-06-30 Jim Wilson <jimw@sifive.com>
9591 * config/riscv/predicates.md (p2m1_shift_operand): New.
9592 (high_mask_shift_operand): New.
9593 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9594 pattern using p2m1_shift_operand.
9595 (lshsi3_zero_extend_3+2): New combiner pattern using
9596 high_mask_shift_operand.
9598 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9600 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9602 (vect_recog_rotate_pattern): ...here.
9603 (vect_convert_input): Try to insert casts of invariants in the
9605 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9606 preheader to be empty.
9608 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9610 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9611 vector type. If given, install it in the new statement's
9613 (vect_element_precision): New function.
9614 (vect_unpromoted_value): New struct.
9615 (vect_unpromoted_value::vect_unpromoted_value): New function.
9616 (vect_unpromoted_value::set_op): Likewise.
9617 (vect_look_through_possible_promotion): Likewise.
9618 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9619 (vect_widened_op_tree, vect_convert_input): Likewise.
9620 (vect_convert_inputs, vect_convert_output): Likewise.
9621 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9622 to handle the optional cast of the multiplication result and
9623 vect_widened_op_tree to detect the widened multiplication itself.
9624 Do not require the input and output of promotion casts to have
9625 the same sign, but base the signedness of the operation on the
9626 input rather than the result. If the pattern includes two
9627 promotions, check that those promotions have the same sign.
9628 Do not restrict the MULT_EXPR handling to a double-width result;
9629 handle quadruple-width results and wider. Use vect_convert_inputs
9630 to convert the inputs to the common type.
9631 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9632 to handle the optional cast of the ABS result. Also allow a sign
9633 change or a sign extension between the ABS and MINUS.
9634 Use vect_widened_op_tree to detect the widened subtraction and use
9635 vect_convert_inputs to convert the inputs to the common type.
9636 (vect_handle_widen_op_by_const): Delete.
9637 (vect_recog_widen_op_pattern): New function.
9638 (vect_recog_widen_mult_pattern): Use it.
9639 (vect_recog_widen_shift_pattern): Likewise.
9640 (vect_recog_widen_sum_pattern): Use
9641 vect_look_through_possible_promotion to handle the promoted
9644 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9646 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9647 the containing gimple_seq *.
9648 * gimple-iterator.h (gsi_for_stmt): Declare it.
9649 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9650 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9651 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9652 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9653 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9655 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9657 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9658 statement being replaced is part of an existing pattern
9659 definition sequence, inserting the new pattern statements before
9661 (vect_pattern_recog_1): Don't return a bool. If the statement
9662 is already part of a pattern, instead apply pattern matching
9663 to the pattern definition statements. Don't clear the
9664 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9665 (vect_pattern_recog): Don't break after the first match;
9666 continue processing the pattern definition statements instead.
9667 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9669 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9671 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9672 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9673 (vect_recog_widen_sum_pattern): Use it.
9675 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9677 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9678 phi is not a pattern statement and has not been replaced by
9679 a pattern statement.
9680 * tree-vect-patterns.c (type_conversion_p): Don't check
9681 STMT_VINFO_IN_PATTERN_P.
9682 (vect_recog_vector_vector_shift_pattern): Likewise.
9683 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9684 the pattern statement rather than the original statement; check
9685 directly for a WIDEN_MULT_EXPR here.
9686 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9687 vect_is_simple_use to return the pattern statement rather
9688 than the original statement; use is_pattern_stmt_p to check
9689 for such a pattern statement.
9690 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9691 to return the pattern statement rather than the original statement;
9692 don't do the same transformation here.
9693 (vect_is_simple_use): If the defining statement has been replaced
9694 by a pattern statement, return the pattern statement instead.
9695 Remove the corresponding (local) transformation from the vectype
9698 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9700 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9701 end and default to null.
9702 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9703 (vectorizable_reduction): Update calls accordingly, dropping the
9704 gimple ** argument if the passed-back statement isn't needed.
9705 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9706 (vect_recog_rotate_pattern): Likewise.
9707 (vect_recog_mask_conversion_pattern): Likewise.
9708 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9709 (vect_mask_constant_operand_p): Likewise.
9710 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9711 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9712 (get_group_load_store_type, get_load_store_type): Likewise.
9713 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9714 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9715 (vectorizable_conversion, vectorizable_assignment): Likewise.
9716 (vectorizable_shift, vectorizable_operation): Likewise.
9717 (vectorizable_store, vect_is_simple_cond): Likewise.
9718 (vectorizable_condition, vectorizable_comparison): Likewise.
9719 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9720 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9721 and move it to the end. Cope with null def_stmt_outs.
9723 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9725 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9727 2018-06-29 Jeff Law <law@redhat.com>
9729 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9730 displacements for TARGET_V850E2V3 and newer.
9731 (TARGET_LRA_P): Remove. Defaults to LRA now.
9732 * config/v850/v850.md (sign23byte_load): Remove.
9733 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9734 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9736 2018-06-29 Martin Liska <mliska@suse.cz>
9739 * coverage.c (coverage_init): Mangle full path name.
9740 * doc/invoke.texi: Document the change.
9741 * gcov-io.c (mangle_path): New.
9742 * gcov-io.h (mangle_path): Likewise.
9743 * gcov.c (mangle_name): Use mangle_path for path mangling.
9745 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9747 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9748 if starting source register is not even.
9750 2018-06-29 Martin Liska <mliska@suse.cz>
9752 PR tree-optimization/86263
9753 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9754 Make edge redirection.
9756 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9758 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9759 (dump_scope_depth): New variable.
9760 (get_dump_scope_depth): New function.
9761 (dump_begin_scope): New function.
9762 (dump_end_scope): New function.
9763 * dumpfile.h (get_dump_scope_depth): New declaration.
9764 (dump_begin_scope): New declaration.
9765 (dump_end_scope): New declaration.
9766 (class auto_dump_scope): New class.
9767 (AUTO_DUMP_SCOPE): New macro.
9768 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9771 2018-06-29 Richard Biener <rguenther@suse.de>
9773 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9774 compute_all_dependences succeeds.
9775 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9776 exceed --param loop-max-datarefs-for-datadeps.
9778 2018-06-29 Jakub Jelinek <jakub@redhat.com>
9780 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9782 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
9785 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9786 alternative 0 in preferred_for_speed attribute.
9788 2018-06-28 Paul Koning <ni1d@arrl.net>
9790 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9791 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9792 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9793 * config/pdp11/pdp11.md: Correct "length" attribute calculation
9794 for shift insn patterns.
9796 2018-06-28 David Malcolm <dmalcolm@redhat.com>
9798 * cgraph.c (cgraph_node::get_body): Replace assignments to
9799 "dump_file" with calls to set_dump_file.
9800 * dumpfile.c (alt_dump_file): Make static, and group with...
9801 (alt_flags): ...this definition.
9802 (dumps_are_enabled): New variable.
9803 (refresh_dumps_are_enabled): New function.
9804 (set_dump_file): New function.
9805 (set_alt_dump_file): New function.
9806 (gcc::dump_manager::dump_start): Replace assignments to
9807 "dump_file" and "alt_dump_file" with calls to set_dump_file and
9809 (gcc::dump_manager::dump_finish): Likewise.
9810 * dumpfile.h (alt_dump_file): Delete decl.
9811 (dumps_are_enabled): New variable decl.
9812 (set_dump_file): New function decl.
9813 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9815 * tree-nested.c (lower_nested_functions): Replace assignments to
9816 "dump_file" with calls to set_dump_file.
9818 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9820 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9821 goto_locus of each outgoing edge of each basic block.
9823 2018-06-28 Richard Biener <rguenther@suse.de>
9825 * dwarf2out.c (decl_scope_table): Remove.
9826 (push_decl_scope): Likewise.
9827 (pop_decl_scope): Likewise.
9828 (gen_type_die_for_member): Do not call push/pop_decl_scope.
9829 (gen_struct_or_union_type_die): Likewise.
9830 (gen_tagged_type_die): Likewise.
9831 (dwarf2out_init): Do not initialize decl_scope_table.
9832 (dwarf2out_c_finalize): Do not free it.
9834 2018-06-28 Richard Biener <rguenther@suse.de>
9836 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9837 deciding whether to not re-use a DIE.
9839 2018-06-28 Richard Biener <rguenther@suse.de>
9841 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9842 DW_AT_abstract_origin attribute.
9844 2018-06-28 Martin Liska <mliska@suse.cz>
9846 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9847 Use newly introduced constants.
9848 * tree-switch-conversion.h (struct jump_table_cluster):
9849 Define max_ratio_for_size and max_ratio_for_speed.
9851 2018-06-28 Martin Liska <mliska@suse.cz>
9853 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9854 Add new checking assert to catch invalid state.
9855 (jump_table_cluster::can_be_handled): Handle single case
9857 (jump_table_cluster::is_beneficial): Bail out for such case.
9858 (bit_test_cluster::find_bit_tests):
9859 Add new checking assert to catch invalid state.
9860 (bit_test_cluster::can_be_handled): Handle single case
9862 (bit_test_cluster::is_beneficial): Bail out for such case.
9863 (switch_decision_tree::analyze_switch_statement):
9866 2018-06-28 Martin Liska <mliska@suse.cz>
9868 * common.opt: Introduce -completion option.
9869 * gcc.c (driver_handle_option): Handle it.
9870 (driver::main): Print completions if completion
9872 * opt-suggestions.c (option_proposer::get_completions):
9874 (option_proposer::suggest_completion): Likewise.
9875 (option_proposer::find_param_completions): Likewise.
9876 (verify_autocompletions): Likewise.
9877 (test_completion_valid_options): Likewise.
9878 (test_completion_valid_params): Likewise.
9879 (in_completion_p): Likewise.
9880 (empty_completion_p): Likewise.
9881 (test_completion_partial_match): Likewise.
9882 (test_completion_garbage): Likewise.
9883 (opt_proposer_c_tests): Likewise.
9884 * opt-suggestions.h: Declare new functions.
9885 * opts.c (common_handle_option): Handle OPT__completion_.
9886 * selftest-run-tests.c (selftest::run_tests): Add
9887 opt_proposer_c_tests.
9888 * selftest.c (assert_str_startswith): New.
9889 * selftest.h (assert_str_startswith): Likewise.
9890 (opt_proposer_c_tests): New.
9891 (ASSERT_STR_STARTSWITH): Likewise.
9893 2018-06-28 Martin Liska <mliska@suse.cz>
9895 * Makefile.in: Add opt-suggestions.o.
9896 * gcc-main.c: Include opt-suggestions.h.
9897 * gcc.c (driver::driver): Likewise.
9898 (driver::~driver): Remove m_option_suggestions.
9899 (driver::build_option_suggestions): Moved to option_proposer.
9900 (driver::suggest_option): Likewise.
9901 (driver::handle_unrecognized_options): Use option_proposer.
9902 * gcc.h (class driver): Add new memver m_option_proposer.
9903 * opt-suggestions.c: New file.
9904 * opt-suggestions.h: New file.
9906 2018-06-28 Martin Liska <mliska@suse.cz>
9908 * vec.h (class auto_string_vec): New (moved from auto_argvec).
9909 (auto_string_vec::~auto_string_vec): Likewise.
9911 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9913 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9914 prevent_decl_creation_for_types fields up and add reset_location field.
9915 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9916 statement if id->reset_location is true.
9917 (copy_edges_for_bb): Do not set goto_locus on the new edges if
9918 id->reset_location is true.
9919 (copy_phis_for_bb): Force input_location on the arguments if
9920 id->reset_location is true.
9921 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9922 is set on the function to be inlined.
9924 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
9926 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9928 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
9930 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9931 registers for Pmode.
9932 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9933 hard registers for the clobbered pseudo.
9935 2018-06-27 Paul Koning <ni1d@arrl.net>
9937 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9938 mutually exclusive options.
9939 * config/pdp11/constraints.md (h): New constraint.
9940 (O): Update definition to match shift code generation.
9941 (D): New constraint.
9942 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9944 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9946 (output_jump): Change arguments.
9947 (pdp11_fixed_cc_regs): New function.
9948 (pdp11_cc_mode): Ditto.
9949 (pdp11_expand_shift): Ditto.
9950 (pdp11_assemble_shift): Ditto.
9951 (pdp11_small_shift): Ditto.
9952 (pdp11_branch_cost): Remove.
9953 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9955 (pdp11_register_move_cost): Update for CC registers.
9956 (pdp11_rtx_costs): Add case for LSHIFTRT.
9957 (pdp11_output_jump): Add CCNZ mode conditional branches.
9958 (notice_update_cc_on_set): Remove.
9959 (pdp11_cc_mode): New function.
9960 (simple_memory_operand): Correct pre/post decrement case.
9961 (no_side_effect_operand): New function.
9962 (pdp11_regno_reg_class): Add CC_REGS class.
9963 (pdp11_fixed_cc_regs): New function.
9964 (pdp11_small_shift): New function.
9965 (pdp11_expand_shift): New function to expand shift insns.
9966 (pdp11_assemble_shift): New function to output shifts.
9967 (pdp11_branch_cost): Remove.
9968 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9969 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9970 (WCHAR_TYPE): Ditto.
9971 (PTRDIFF_TYPE): Ditto.
9972 (ADJUST_INSN_LENGTH): New macro.
9973 (FIXED_REGISTERS): Add CC registers.
9974 (CALL_USED_REGISTERS): Ditto.
9976 (REG_CLASS_NAMES): Ditto.
9977 (REG_CLASS_CONTENTS): Ditto.
9978 (SELECT_CC_MODE): Use new function.
9979 (TARGET_FLAGS_REGNUM): New macro.
9980 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9981 (cc0_reg_rtx): Remove.
9982 (CC_STATUS_MDEP): Remove.
9983 (CC_STATUS_MDEFP_INIT): Remove.
9984 (CC_IN_FPU): Remove.
9985 (NOTICE_UPDATE_CC): Remove.
9986 (REGISTER_NAMES): Add CC registers.
9987 (BRANCH_COST): Change to constant 1.
9988 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9990 * config/pdp11/pdp11.opt (mbcopy): Remove.
9991 (mbcopy-builtin): Remove.
9992 (mbranch-cheap): Remove.
9993 (mbranch-expensive): Remove.
9994 * config/pdp11/predicates.md (expand_shift_operand): Update to
9995 match shift code generation.
9996 (ccnz_operator): New predicate.
9997 * doc/invoke.texi (PDP-11 Options): Remove deleted options
9998 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9999 Remove non-existent option -mabshi, -mno-abshi. Document mutually
10001 * doc/md.texi (PDP-11): Document new D and h constraints. Update
10002 description of O constraint.
10004 2018-06-27 Jeff Law <law@redhat.com>
10005 Austin Law <austinklaw@gmail.com>
10007 * config/v850/v850.md (addsi3_set_flags): New pattern.
10008 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10009 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10010 (zero_extendhisi2_v850_set_flags): Likewise.
10011 (zero_extendqisi2_v850_set_flags): Likewise.
10012 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10013 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10014 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10016 * config/v850/v850-protos.h (notice_update_cc): Remove.
10017 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10018 (v850_print_operand): Handle 'D' and "d".
10019 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10020 Add handling of arithmetic/logical operations compared against zero.
10021 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10022 Do not look at v850_compare_op, instead get mode from last argument.
10023 (v850_gen_compare): Remove
10024 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10025 after reload for prologue insns.
10026 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10028 (construct_save_jarl): Likewise.
10029 (TARGET_FLAGS_REGNUM): Define.
10030 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10031 (NOTICE_UPDATE_CC): Remove.
10032 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10033 than cc0. Conditionalize on reload_completed.
10034 (cmpsi_insn, setfcc_insn): Likewise.
10035 (tst1 splitter): Turn into define_and_split which sets the flags
10037 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10038 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10039 (cstoresf4, cstoredf4): Clobber the flags.
10040 (cmpsi, cmpsf, cmpdf): Remove expanders.
10041 (setf_insn): Remove pattern.
10042 (addsi3): Turn into define_and_split which clobbers the flags after
10043 reload and a suitable pattern (addsi3_clobber_flags) for use after
10045 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10046 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10047 (ashrsi3, ashrsi3_v850e2): Likewise.
10048 (bins): Clobber the flags.
10049 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10050 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10051 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10052 (call_value_internal_short, call_value_internal_long): Likewise.
10053 (callt_save_interrupt, callt_return_interrupt): Likewise.
10054 (save_interrupt, return_interrupt): Likewise.
10055 (callt_save_all_interrupt, save_all_interrupt): Likewise.
10056 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10057 (restore_all_interrupt, _restore_all_interrupt): Likewise.
10058 (All FP comparisons): Only allow after reload has completed.
10060 (divh, divhu): Tweak output template.
10061 (branch_z_normal, branch_z_invert): Remove
10062 (branch_nz_normal, branch_nz_invert): Likewise.
10063 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10065 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10066 * config/v850/v850.c (notice_update_cc): Remove.
10067 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
10068 (CC_NO_CARRY): Likewise.
10069 (NOTICE_UPDATE_CC): Define to nothing.
10070 * config/v850/v850.md: Remove block comment on cc0 handling
10071 Remove "cc" attribute from all patterns. Remove cc_status handling
10072 from all patterns. Minor formatting fixes.
10074 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10076 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10077 (cortex-a76.cortex-a55): Likewise.
10078 * config/aarch64/aarch64-tune.md: Regenerate.
10079 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10080 cortex-a76.cortex-a55.
10082 2018-06-27 Jeff Law <law@redhat.com>
10084 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10085 (MULTILIB_DIRNAMES): Similarly.
10087 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
10089 * gimple.h (gimple_return_retbnd): Delete.
10090 (gimple_return_set_retbnd): Likewise.
10091 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10092 gimple_return_set_retbnd.
10093 * gimple-pretty-print.c (dump_gimple_return): Remove call to
10094 gimple_return_retbnd and adjust.
10095 * tree-inline.h (struct copy_body_data): Remove retbnd field.
10096 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10097 Explicitly return NULL in a couple more cases. Move assertion
10098 on debug statements and remove unreachable code.
10099 (reset_debug_binding): Do not test id->retbnd.
10100 (expand_call_inline): Do not set it.
10102 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10104 * configure.ac: Add --disable-gcov option.
10105 * configure: Regenerate.
10106 * Makefile.in: Honour @enable_gcov@.
10107 * doc/install.texi: Document --disable-gcov.
10109 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10111 * config/arm/arm-cpus.in (cortex-a76): New entry.
10112 (cortex-a76.cortex-a55): Likewise.
10113 * config/arm/arm-tables.opt: Regenerate.
10114 * config/arm/arm-tune.md: Likewise.
10115 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10116 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10117 cortex-a76.cortex-a55.
10119 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10122 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10124 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10126 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10128 (EPILOGUE_USES): Likewise.
10130 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10132 * tree-inline.c (remap_location): New function extracted from...
10133 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10134 (copy_phis_for_bb): ...here. Call remap_location.
10135 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10137 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10139 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10140 unaligned vsx for 16B memset.
10142 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10145 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10146 ieee128_float_type_node to long_double_type_node unless
10147 TARGET_LONG_DOUBLE_128 is set.
10149 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10151 * cfgloop.c (get_loop_location): Convert return type from
10152 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10153 by implicit construction from rtx_insn *, and using
10154 dump_user_location_t::from_function_decl for the fallback case.
10155 * cfgloop.h (get_loop_location): Convert return type from
10156 location_t to dump_user_location_t.
10157 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10158 dump_printf_loc to pass in a dump_location_t rather than a
10159 location_t, via the gimple stmt.
10160 * coverage.c (get_coverage_counts): Update calls to
10161 dump_printf_loc to pass in dump_location_t rather than a
10163 * doc/optinfo.texi (Dump types): Convert example of
10164 dump_printf_loc from taking "locus" to taking "insn". Update
10165 description of the "_loc" calls to cover dump_location_t.
10166 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10168 (dump_user_location_t::dump_user_location_t): New constructors,
10169 from gimple *stmt and rtx_insn *.
10170 (dump_user_location_t::from_function_decl): New function.
10171 (dump_loc): Make static.
10172 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10173 const dump_location_t &.
10174 (dump_generic_expr_loc): Delete.
10175 (dump_printf_loc): Convert param "loc" from location_t to
10176 const dump_location_t &.
10177 (selftest::test_impl_location): New function.
10178 (selftest::dumpfile_c_tests): New function.
10179 * dumpfile.h: Include "profile-count.h".
10180 (class dump_user_location_t): New class.
10181 (struct dump_impl_location_t): New struct.
10182 (class dump_location_t): New class.
10183 (dump_printf_loc): Convert 2nd param from source_location to
10184 const dump_location_t &.
10185 (dump_generic_expr_loc): Delete.
10186 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10187 const dump_location_t &.
10188 * gimple-fold.c (fold_gimple_assign): Update call to
10189 dump_printf_loc to pass in a dump_location_t rather than a
10190 location_t, via the gimple stmt.
10191 (gimple_fold_call): Likewise.
10192 * gimple-loop-interchange.cc
10193 (loop_cand::analyze_iloop_reduction_var): Update for change to
10194 check_reduction_path.
10195 (tree_loop_interchange::interchange): Update for change to
10196 find_loop_location.
10197 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10198 change in return-type of find_loop_location.
10199 (graphite_regenerate_ast_isl): Likewise.
10200 * graphite-optimize-isl.c (optimize_isl): Likewise.
10201 * graphite.c (graphite_transform_loops): Likewise.
10202 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10203 pass in a dump_location_t rather than a location_t, via the
10205 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10206 * ipa.c (walk_polymorphic_call_targets): Likewise.
10207 * loop-unroll.c (report_unroll): Convert "locus" param from
10208 location_t to dump_location_t.
10209 (decide_unrolling): Update for change to get_loop_location's
10211 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10212 location_t to dump_user_location_t.
10213 (grid_find_single_omp_among_assignments_1): Updates calls to
10214 dump_printf_loc to pass in a dump_location_t rather than a
10215 location_t, via the gimple stmt.
10216 (grid_parallel_clauses_gridifiable): Convert "tloc" from
10217 location_t to dump_location_t. Updates calls to dump_printf_loc
10218 to pass in a dump_location_t rather than a location_t, via the
10220 (grid_inner_loop_gridifiable_p): Likewise.
10221 (grid_dist_follows_simple_pattern): Likewise.
10222 (grid_gfor_follows_tiling_pattern): Likewise.
10223 (grid_target_follows_gridifiable_pattern): Likewise.
10224 (grid_attempt_target_gridification): Convert initialization
10225 of local "grid" from memset to zero-initialization; FIXME: does
10226 this require C++11? Update call to dump_printf_loc to pass in a
10227 optinfo_location rather than a location_t, via the gimple stmt.
10228 * profile.c (read_profile_edge_counts): Updates call to
10229 dump_printf_loc to pass in a dump_location_t rather than a
10231 (compute_branch_probabilities): Likewise.
10232 * selftest-run-tests.c (selftest::run_tests): Call
10234 * selftest.h (dumpfile_c_tests): New decl.
10235 * tree-loop-distribution.c (pass_loop_distribution::execute):
10236 Update for change in return type of find_loop_location.
10237 * tree-parloops.c (parallelize_loops): Likewise.
10238 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10239 "locus" from location_t to dump_user_location_t.
10240 (canonicalize_loop_induction_variables): Likewise.
10241 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10242 for change in return type of find_loop_location.
10243 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10244 to dump_printf_loc to pass in a dump_location_t rather than a
10245 location_t, via the stmt.
10246 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10248 * tree-vect-loop-manip.c (find_loop_location): Convert return
10249 type from source_location to dump_user_location_t.
10250 (vect_do_peeling): Update for above change.
10251 (vect_loop_versioning): Update for change in type of
10253 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10254 from location_t to dump_user_location_t.
10255 (vect_estimate_min_profitable_iters): Update for change in type
10257 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10258 location_t to dump_location_t.
10259 (vect_slp_bb): Update for change in type of vect_location.
10260 * tree-vectorizer.c (vect_location): Convert from source_location
10261 to dump_user_location_t.
10262 (try_vectorize_loop_1): Update for change in vect_location's type.
10263 (vectorize_loops): Likewise.
10264 (increase_alignment): Likewise.
10265 * tree-vectorizer.h (vect_location): Convert from source_location
10266 to dump_user_location_t.
10267 (find_loop_location): Convert return type from source_location to
10268 dump_user_location_t.
10269 (check_reduction_path): Convert 1st param from location_t to
10270 dump_user_location_t.
10271 * value-prof.c (check_counter): Update call to dump_printf_loc to
10272 pass in a dump_user_location_t rather than a location_t; update
10273 call to error_at for change in type of "locus".
10274 (check_ic_target): Update call to dump_printf_loc to
10275 pass in a dump_user_location_t rather than a location_t, via the
10278 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10280 * config/s390/s390.h (enum processor_flags): Do not use
10281 default tune parameter when -march was specified.
10283 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10286 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10287 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10290 2018-06-26 Richard Biener <rguenther@suse.de>
10292 PR tree-optimization/86287
10294 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10295 (vect_analyze_loop): Initialize n_stmts.
10297 2018-06-26 Richard Biener <rguenther@suse.de>
10299 PR middle-end/86271
10300 * fold-const.c (fold_convertible_p): Pointer extension
10303 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10306 * dwarf2out.c (loc_list_has_views): Adjust comments.
10307 (dw_loc_list): Split single cross-partition range with
10310 2018-06-25 Jeff Law <law@redhat.com>
10312 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10313 on -mbig-switch by default.
10315 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10317 (const_float_0_operand): Remove unused predicate.
10318 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10319 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10320 (recipsf2): New expander. Original pattern now called
10322 (recipdf2, recipdf2_insn): Similarly.
10323 (rsqrtsf2, rsqrtsf2_insn): Similarly
10324 (rsqrtdf2, rsqrtdf2_insn): Similarly
10326 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10328 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10329 Simplify logic for FreeBSD (twice).
10331 2018-06-25 Martin Sebor <msebor@redhat.com>
10333 PR tree-optimization/86204
10334 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10335 a strnlen result if it's less than the length of the string.
10337 2018-06-25 Martin Sebor <msebor@redhat.com>
10339 PR tree-optimization/85700
10340 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10341 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10342 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10344 2018-06-25 Martin Sebor <msebor@redhat.com>
10346 * doc/extend.texi (Zero-length arrays): Update and clarify.
10348 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10350 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10351 added IEEE/IBM long double multilib support on PowerPC little
10352 endian Linux systems.
10353 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10354 (MULTILIB_DEFAULTS): Likewise.
10355 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10357 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10358 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10359 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10361 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10363 PR middle-end/86311
10364 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10365 (REORDER_45): Likewise.
10367 2018-06-25 Jeff Law <law@redhat.com>
10369 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10370 dividend to 32 bits. Adjust length.
10371 (udivmodhi4): Cleanup output template. Fix length.
10373 2018-06-25 Carl Love <cel@us.ibm.com>
10375 * config/rs6000/vsx.md: Change word selector to prefered location.
10377 2018-06-25 Richard Biener <rguenther@suse.de>
10379 PR tree-optimization/86304
10380 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10381 epilogue-if-converted loops as well.
10383 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10385 * lto-section-out.c (lto_begin_section): Do not print section
10386 name for noaddr and unnumbered dumps.
10388 2018-06-25 Richard Biener <rguenther@suse.de>
10390 * tree-vectorizer.h (struct vec_info_shared): New structure
10391 with parts split out from struct vec_info and loop_nest from
10392 struct _loop_vec_info.
10393 (struct vec_info): Adjust accordingly.
10394 (struct _loop_vec_info): Likewise.
10395 (LOOP_VINFO_LOOP_NEST): Adjust.
10396 (LOOP_VINFO_DATAREFS): Likewise.
10397 (LOOP_VINFO_DDRS): Likewise.
10398 (struct _bb_vec_info): Likewise.
10399 (BB_VINFO_DATAREFS): Likewise.
10400 (BB_VINFO_DDRS): Likewise.
10401 (struct _stmt_vec_info): Add dr_aux member.
10402 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10403 (DR_MISALIGNMENT_UNINITIALIZED): New.
10404 (set_dr_misalignment): Adjust.
10405 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10406 (vect_analyze_loop): Adjust prototype.
10407 (vect_analyze_loop_form): Likewise.
10408 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10409 Compute dependences lazily.
10410 (vect_record_base_alignments): Use shared datarefs/ddrs.
10411 (vect_verify_datarefs_alignment): Likewise.
10412 (vect_analyze_data_refs_alignment): Likewise.
10413 (vect_analyze_data_ref_accesses): Likewise.
10414 (vect_analyze_data_refs): Likewise.
10415 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10416 constructor parameter for shared part.
10417 (vect_analyze_loop_form): Pass in shared part and adjust.
10418 (vect_analyze_loop_2): Pass in storage for the number of
10419 stmts. Move loop nest finding to the caller. Compute
10421 (vect_analyze_loop): Pass in shared part.
10422 (vect_transform_loop): Verify shared datarefs are unchanged.
10423 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10424 constructor parameter for shared part.
10425 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10426 (vect_slp_bb): Verify shared datarefs are unchanged before
10428 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10430 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10431 DR_MISALIGNMENT_UNINITIALIZED.
10432 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10433 parameter for shared part.
10434 (vec_info::~vec_info): Adjust.
10435 (vec_info_shared::vec_info_shared): New.
10436 (vec_info_shared::~vec_info_shared): Likewise.
10437 (vec_info_shared::save_datarefs): Likewise.
10438 (vec_info_shared::check_datarefs): Likewise.
10439 (try_vectorize_loop_1): Construct shared part live for analyses
10440 of a single loop for multiple vector sizes.
10441 * tree-parloops.c (gather_scalar_reductions): Adjust.
10443 2018-06-25 Richard Biener <rguenther@suse.de>
10445 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10446 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10447 (vect_analyze_data_refs): Remove similar code from here and
10448 simplify accordingly.
10450 2018-06-25 Richard Biener <rguenther@suse.de>
10452 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10453 for reverse storage order accesses rather than asserting
10454 they cannot happen here.
10456 2018-06-25 Tom de Vries <tdevries@suse.de>
10459 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10460 Use data16 instead of .byte for insn prefix.
10462 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10465 * parser.c (make_char_string_pack): Pass this literal chars
10466 through cpp_interpret_string.
10467 (cp_parser_userdef_numeric_literal): Check the result of
10468 make_char_string_pack.
10470 2018-06-24 Maya Rashish <coypu@sdf.org>
10472 * ginclude/stddef.h: Simplify conditions around avoiding
10473 re-definition of __size_t.
10475 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10477 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10478 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10480 2018-06-22 Maya Rashish <coypu@sdf.org>
10482 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10483 made to OpenBSD and NetBSD through the years.
10485 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10487 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10488 behavior of vec_pack (vector double, vector double) to match
10489 behavior of vec_float2 (vector double, vector double).
10491 2018-06-22 Olivier Hainque <hainque@adacore.com>
10493 * gimplify.c (gimplify_function_tree): Prevent creation
10494 of a trampoline for the address of the current function
10495 passed to entry/exit instrumentation hooks.
10497 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10500 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10503 2018-06-22 Martin Liska <mliska@suse.cz>
10505 PR tree-optimization/86263
10506 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10507 Bail out if is_enabled is false.
10508 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10510 (jump_table_cluster::is_enabled): New function.
10512 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10514 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10515 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10516 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10517 (lto_input_ts_binfo_tree_pointers): Likewise.
10518 * tree-streamer-out.c (streamer_write_tree_bitfields,
10519 write_ts_binfo_tree_pointers): Likewise.
10520 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10522 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10524 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10526 2018-06-22 Martin Liska <mliska@suse.cz>
10528 * symbol-summary.h (get): Make it pure and inline move
10529 functionality from ::get function.
10530 (get): Remove and inline into ::get and ::get_create.
10531 (get_create): Move code from ::get function.
10533 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10536 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10537 -x assembler-with-cpp.
10539 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10541 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10542 _FILE_OFFSET_BITS=64 for C++.
10544 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10546 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10547 conversion insn that shows up when pr85657-3.c is compiled using
10548 IEEE 128-bit long double.
10549 (neg<mode>2_internal): Use the correct mode to check whether the
10550 mode is IBM extended.
10551 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10552 multiply and divide external functions from being created more
10555 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10557 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10559 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10560 the edge can be forwarded.
10561 (cfg_layout_merge_blocks): Likewise.
10563 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10565 * except.c (finish_eh_generation): Commit edge insertions only after
10566 the EH edges have been redirected from post-landing to landing pads.
10568 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10570 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10571 create_tmp_var_for to create the FRAME decl.
10572 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10574 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10576 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10577 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10578 debug statement when resetting its value.
10579 (expand_call_inline): Copy the locus of the call onto the assignment
10580 of the return value, if any. Use local variable in more cases.
10582 2018-06-21 Martin Liska <mliska@suse.cz>
10584 * ipa-pure-const.c (propagate_nothrow): Use
10585 funct_state_summaries->get.
10586 (dump_malloc_lattice): Likewise.
10587 (propagate_malloc): Likewise.
10589 2018-06-21 Richard Biener <rguenther@suse.de>
10591 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10592 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10593 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10595 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10596 BLOCK_ABSTRACT_ORIGIN unconditionally.
10598 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10600 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10602 * ipa-reference.c (ipa_reference_c_finalize): Delete
10603 ipa_ref_opt_sum_summaries and set it to NULL.
10605 2018-06-21 Tom de Vries <tdevries@suse.de>
10607 PR tree-optimization/85859
10608 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10609 test with comment from bb_no_side_effects_p.
10611 2018-06-21 Richard Biener <rguenther@suse.de>
10613 PR tree-optimization/86232
10614 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10615 max for constant niter.
10617 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10619 * config/aarch64/aarch64-simd.md
10620 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10622 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10624 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10625 Make opernads of the unspec commutative.
10627 2018-06-21 Richard Biener <rguenther@suse.de>
10629 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10630 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10631 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10632 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10634 (vect_record_base_alignments): Do not record base alignment
10635 for gathers or scatters.
10636 (vect_compute_data_ref_alignment): Drop return value that is always
10637 true. Bail out early for gathers or scatters.
10638 (vect_enhance_data_refs_alignment): Bail out early for gathers
10640 (vect_find_same_alignment_drs): Likewise.
10641 (vect_analyze_data_refs_alignment): Remove dead code.
10642 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10643 (vect_analyze_data_refs): For possible gathers or scatters do
10644 not create an alternate DR, just check their possible validity
10645 and mark them. Adjust DECL_NONALIASED handling to not rely
10646 on DR_BASE_ADDRESS.
10647 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10648 update inits of gathers or scatters.
10649 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10650 Also copy gather/scatter flag to pattern vinfo.
10652 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10654 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10655 behavior of vec_packsu (vector unsigned long long, vector unsigned
10656 long long) to match behavior of vec_packs with same signature.
10658 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10659 Thomas Schwinge <thomas@codesourcery.com>
10660 Cesar Philippidis <cesar@codesourcery.com>
10662 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10663 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10664 (gimplify_adjust_omp_clauses): Likewise.
10665 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10666 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10667 (gimplify_omp_target_update): Update handling of acc update and
10669 * omp-low.c (install_var_field): Remove unused parameter
10670 base_pointers_restrict.
10671 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10672 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10674 (omp_target_base_pointers_restrict_p): Delete.
10675 (scan_omp_target): Update call to scan_sharing_clauses.
10676 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10678 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10679 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10680 (convert_local_omp_clauses): Likewise.
10681 * tree-pretty-print.c (dump_omp_clause): Likewise.
10682 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10684 (omp_clause_code_name): Likewise.
10686 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10689 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10692 PR tree-optimization/86231
10693 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10694 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10696 2018-06-20 Tom de Vries <tdevries@suse.de>
10698 PR tree-optimization/86097
10699 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10700 iv type if signedness of iv type is not the same as that of *nit.
10702 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10704 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10705 EDGE_EH edges, verify they are all EDGE_EH.
10707 2018-06-20 Maya Rashish <coypu@sdf.org>
10709 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10711 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10713 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10714 * config/aarch64/aarch64.c (xgene1_tunings): Add
10715 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10716 (aarch64_mode_valid_for_sched_fusion_p):
10717 Allow 16-byte modes.
10718 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10719 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10721 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10723 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10724 * config/aarch64/iterators.md (VQ2): New mode iterator.
10726 2018-06-20 Martin Liska <mliska@suse.cz>
10728 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10729 Change default ratio from 10 to 8.
10731 2018-06-20 Martin Liska <mliska@suse.cz>
10733 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10735 (bit_test_cluster::find_bit_tests): Likewise.
10736 (switch_decision_tree::analyze_switch_statement): Find clusters.
10737 * tree-switch-conversion.h (struct jump_table_cluster): Document
10740 2018-06-20 Martin Liska <mliska@suse.cz>
10742 * tree-switch-conversion.c (switch_conversion::collect):
10743 Record m_uniq property.
10744 (switch_conversion::expand): Bail out for special conditions.
10745 (group_cluster::~group_cluster): New.
10746 (group_cluster::group_cluster): Likewise.
10747 (group_cluster::dump): Likewise.
10748 (jump_table_cluster::emit): New.
10749 (switch_decision_tree::fix_phi_operands_for_edges): New.
10750 (struct case_node): Remove struct.
10751 (jump_table_cluster::can_be_handled): New.
10752 (case_values_threshold): Moved to header.
10753 (reset_out_edges_aux): Likewise.
10754 (jump_table_cluster::is_beneficial): New.
10755 (bit_test_cluster::can_be_handled): Likewise.
10756 (add_case_node): Remove.
10757 (bit_test_cluster::is_beneficial): New.
10758 (case_bit_test::cmp): New.
10759 (bit_test_cluster::emit): New.
10760 (expand_switch_as_decision_tree_p): Remove.
10761 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10762 (fix_phi_operands_for_edge): Likewise.
10763 (switch_decision_tree::analyze_switch_statement): New.
10764 (compute_cases_per_edge): Move ...
10765 (switch_decision_tree::compute_cases_per_edge): ... here.
10766 (try_switch_expansion): Likewise.
10767 (switch_decision_tree::try_switch_expansion): Likewise.
10768 (record_phi_operand_mapping): Likewise.
10769 (switch_decision_tree::record_phi_operand_mapping): Likewise.
10770 (emit_case_decision_tree): Likewise.
10771 (switch_decision_tree::emit): Likewise.
10772 (balance_case_nodes): Likewise.
10773 (switch_decision_tree::balance_case_nodes): Likewise.
10774 (dump_case_nodes): Likewise.
10775 (switch_decision_tree::dump_case_nodes): Likewise.
10776 (emit_jump): Likewise.
10777 (switch_decision_tree::emit_jump): Likewise.
10778 (emit_cmp_and_jump_insns): Likewise.
10779 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10780 (emit_case_nodes): Likewise.
10781 (switch_decision_tree::emit_case_nodes): Likewise.
10782 (conditional_probability): Remove.
10783 * tree-switch-conversion.h (enum cluster_type): New.
10785 (struct cluster): Likewise.
10786 (cluster::cluster): Likewise.
10787 (struct simple_cluster): Likewise.
10788 (simple_cluster::simple_cluster): Likewise.
10789 (struct group_cluster): Likewise.
10790 (struct jump_table_cluster): Likewise.
10791 (struct bit_test_cluster): Likewise.
10792 (struct min_cluster_item): Likewise.
10793 (struct case_tree_node): Likewise.
10794 (case_tree_node::case_tree_node): Likewise.
10795 (jump_table_cluster::case_values_threshold): Likewise.
10796 (struct case_bit_test): Likewise.
10797 (struct switch_decision_tree): Likewise.
10798 (struct switch_conversion): Likewise.
10799 (switch_decision_tree::reset_out_edges_aux): Likewise.
10801 2018-06-20 Martin Liska <mliska@suse.cz>
10803 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10804 (hoist_edge_and_branch_if_true): Likewise.
10805 (expand_switch_using_bit_tests_p): Likewise.
10806 (struct case_bit_test): Likewise.
10807 (case_bit_test_cmp): Likewise.
10808 (emit_case_bit_tests): Likewise.
10809 (switch_conversion::switch_conversion): New class.
10810 (struct switch_conv_info): Remove old struct.
10811 (collect_switch_conv_info): More to ...
10812 (switch_conversion::collect): ... this.
10813 (check_range): Likewise.
10814 (switch_conversion::check_range): Likewise.
10815 (check_all_empty_except_final): Likewise.
10816 (switch_conversion::check_all_empty_except_final): Likewise.
10817 (check_final_bb): Likewise.
10818 (switch_conversion::check_final_bb): Likewise.
10819 (create_temp_arrays): Likewise.
10820 (switch_conversion::create_temp_arrays): Likewise.
10821 (free_temp_arrays): Likewise.
10822 (gather_default_values): Likewise.
10823 (switch_conversion::gather_default_values): Likewise.
10824 (build_constructors): Likewise.
10825 (switch_conversion::build_constructors): Likewise.
10826 (constructor_contains_same_values_p): Likewise.
10827 (switch_conversion::contains_same_values_p): Likewise.
10828 (array_value_type): Likewise.
10829 (switch_conversion::array_value_type): Likewise.
10830 (build_one_array): Likewise.
10831 (switch_conversion::build_one_array): Likewise.
10832 (build_arrays): Likewise.
10833 (switch_conversion::build_arrays): Likewise.
10834 (gen_def_assigns): Likewise.
10835 (switch_conversion::gen_def_assigns): Likewise.
10836 (prune_bbs): Likewise.
10837 (switch_conversion::prune_bbs): Likewise.
10838 (fix_phi_nodes): Likewise.
10839 (switch_conversion::fix_phi_nodes): Likewise.
10840 (gen_inbound_check): Likewise.
10841 (switch_conversion::gen_inbound_check): Likewise.
10842 (process_switch): Use the newly created class.
10843 (switch_conversion::expand): New.
10844 (switch_conversion::~switch_conversion): New.
10845 * tree-switch-conversion.h: New file.
10847 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10849 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10850 tree-vect-patterns.c.
10851 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10852 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
10853 (vect_recog_sad_pattern): Likewise.
10854 (vect_recog_widen_sum_pattern): Likewise.
10855 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
10856 (vect_recog_widen_shift_pattern): Remove the type_in argument.
10857 (vect_recog_rotate_pattern): Likewise.
10858 (vect_recog_mult_pattern): Likewise.
10859 (vect_recog_vector_vector_shift_pattern): Likewise.
10860 (vect_recog_divmod_pattern): Likewise.
10861 (vect_recog_mixed_size_cond_pattern): Likewise.
10862 (vect_recog_bool_pattern): Likewise.
10863 (vect_recog_mask_conversion_pattern): Likewise.
10864 (vect_try_gather_scatter_pattern): Likewise.
10865 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
10866 (vect_recog_over_widening_pattern): Likewise.
10867 (vect_recog_gather_scatter_pattern): Likewise.
10868 (vect_recog_func_ptr): Move from tree-vectorizer.h
10869 (vect_vect_recog_func_ptrs): Move further down the file.
10870 (vect_recog_func): Likewise. Remove the third argument.
10871 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10872 (vect_pattern_recog_1): Expect the pattern function to do any
10873 necessary target tests. Also expect it to provide a vector type.
10874 Remove the type_in handling.
10876 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10878 * tree-vect-patterns.c (vect_pattern_detected): New function.
10879 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10880 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10881 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10882 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10883 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10884 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10885 (vect_recog_mask_conversion_pattern)
10886 (vect_try_gather_scatter_pattern): Likewise.
10888 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10890 * tree-vect-patterns.c (vect_get_internal_def): New function.
10891 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10892 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10893 (search_type_for_mask_1): Use it.
10895 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10897 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10898 redundant WIDEN_SUM_EXPR handling.
10899 (vect_recog_sad_pattern): Likewise.
10901 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10903 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10904 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10905 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10906 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10907 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10909 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10911 * tree-vect-stmts.c (vectorizable_call): Make sure that we
10912 use the stmt_vec_info of the original bb statement for the
10913 new zero assignment, even if the call is part of a pattern.
10915 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10917 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10918 that the sequence is attached to the original statement rather
10919 than the pattern statement.
10920 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10921 PATTERN_DEF_SEQ from the original statement rather than
10922 the main pattern statement.
10923 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10924 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10925 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10927 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10929 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10930 definition statements before the early exit for statements that aren't
10932 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10934 (vect_transform_loop): ...here. Process pattern definition
10935 statements without first checking whether the main pattern
10936 statement is live or relevant.
10938 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10940 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10941 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10943 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
10945 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10946 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10947 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10948 (expand_block_compare): Change select_block_compare_mode call.
10949 (expand_strncmp_align_check): Use new functions, fix comment.
10950 (emit_final_str_compare_gpr): New function.
10951 (expand_strn_compare): Refactor and clean up code.
10952 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10954 2018-06-19 Tony Reix <tony.reix@atos.com>
10955 Damien Bergamini <damien.bergamini@atos.com>
10956 David Edelsohn <dje.gcc@gmail.com>
10958 * collect2.c (static_obj): New variable.
10959 (static_libs): New variable.
10960 (is_in_list): Uncomment declaration.
10961 (main): Track AIX libraries linked statically.
10962 (is_in_list): Uncomment definition.
10963 (scan_prog_file): Don't add AIX shared libraries initializer
10964 to constructor list if linking statically.
10966 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
10968 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10970 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10972 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
10974 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10977 2018-06-19 Martin Liska <mliska@suse.cz>
10979 * config/i386/i386.c (ix86_can_inline_p): Do not use
10980 ipa_fn_summaries::get_create.
10981 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10983 (devirtualization_time_bonus): Likewise.
10984 (ipcp_propagate_stage): Likewise.
10985 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10986 (edge_set_predicate): Likewise.
10987 (evaluate_conditions_for_known_args): Likewise.
10988 (evaluate_properties_for_edge): Likewise.
10989 (ipa_call_summary::reset): Tranform to ...
10990 (ipa_call_summary::~ipa_call_summary): ... this.
10991 (ipa_fn_summary::reset): Transform to ...
10992 (ipa_fn_summary::~ipa_fn_summary): ... this.
10993 (ipa_fn_summary_t::remove): Rename to ...
10994 (ipa_fn_summary_t::remove_callees): ... this.
10995 (ipa_fn_summary_t::duplicate): Use placement new
10996 instead of memory copy.
10997 (ipa_call_summary_t::duplicate): Likewise.
10998 (ipa_call_summary_t::remove): Remove.
10999 (dump_ipa_call_summary): Change get_create to get.
11000 (ipa_dump_fn_summary): Dump only when summary exists.
11001 (analyze_function_body): Use symbol_summary::get instead
11003 (compute_fn_summary): Likewise.
11004 (estimate_edge_devirt_benefit): Likewise.
11005 (estimate_edge_size_and_time): Likewise.
11006 (inline_update_callee_summaries): Likewise.
11007 (remap_edge_change_prob): Likewise.
11008 (remap_edge_summaries): Likewise.
11009 (ipa_merge_fn_summary_after_inlining): Likewise.
11010 (write_ipa_call_summary): Likewise.
11011 (ipa_fn_summary_write): Likewise.
11012 (ipa_free_fn_summary): Likewise.
11013 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11014 (struct ipa_call_summary): Likewise.
11015 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11017 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11018 (estimate_size_after_inlining): Likewise.
11019 (estimate_growth): Likewise.
11020 (growth_likely_positive): Likewise.
11021 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11022 (inline_call): Likewise.
11023 * ipa-inline.c (caller_growth_limits): Likewise.
11024 (can_inline_edge_p): Likewise.
11025 (can_inline_edge_by_limits_p): Likewise.
11026 (compute_uninlined_call_time): Likewise.
11027 (compute_inlined_call_time): Likewise.
11028 (want_inline_small_function_p): Likewise.
11029 (edge_badness): Likewise.
11030 (update_caller_keys): Likewise.
11031 (update_callee_keys): Likewise.
11032 (inline_small_functions): Likewise.
11033 (inline_to_all_callers_1): Likewise.
11034 (dump_overall_stats): Likewise.
11035 (early_inline_small_functions): Likewise.
11036 (early_inliner): Likewise.
11037 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11038 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11039 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11040 * ipa-split.c (execute_split_functions): Likewise.
11041 * symbol-summary.h: Likewise.
11042 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11044 2018-06-19 Richard Biener <rguenther@suse.de>
11046 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11047 (vectorize_loops): ... here. Fix dbgcnt handling.
11048 (try_vectorize_loop): Wrap try_vectorize_loop_1.
11050 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
11053 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11054 ieee128 argument takes up only one (vector) register, not two (floating
11057 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11059 * gimplify.c (gimplify_init_constructor): Really never clear for an
11060 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11062 2018-06-19 Richard Biener <rguenther@suse.de>
11064 PR tree-optimization/86179
11065 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11066 after failed recognition.
11068 2018-06-18 Martin Sebor <msebor@redhat.com>
11070 PR middle-end/85602
11071 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11072 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11073 Handle integer subtraction.
11074 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11075 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11077 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11079 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11080 param from rtx to rtx_insn *.
11081 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11083 (frv_ifcvt_modify_insn): Likwise.
11084 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11085 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
11086 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11087 as_a <rtx_insn *> cast to local "unprotected_region" once
11088 it's been established that it's not NULL or pc_rtx.
11089 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11090 param "sethi" from rtx to rtx_insn *.
11091 (nds32_group_float_insns): Likewise for param "insn".
11092 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11094 (vax_output_int_subtract): Likewise.
11095 * config/vax/vax.c (vax_output_int_add): Likewise for param
11097 (vax_output_int_subtract): Likewise.
11098 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11099 (emit_pattern_after): Likewise for param "after".
11100 (emit_insn_after): Likewise.
11101 (emit_jump_insn_after): Likewise.
11102 (emit_call_insn_after): Likewise.
11103 (emit_debug_insn_after): Likewise.
11104 (emit_pattern_before): Likewise for param "before".
11105 (emit_insn_before): Likewise.
11106 (emit_jump_insn_before): Likewise.
11107 * final.c (get_insn_template): Likewise for param "insn", removing
11109 * output.h (get_insn_template): Likewise for 2nd param.
11110 * rtl.h (emit_insn_before): Likewise.
11111 (emit_jump_insn_before): Likewise.
11112 (emit_debug_insn_before_noloc): Likewise.
11113 (emit_insn_after): Likewise.
11114 (emit_jump_insn_after): Likewise.
11115 (emit_call_insn_after): Likewise.
11116 (emit_debug_insn_after): Likewise.
11117 (set_insn_deleted): Likewise for param.
11119 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11122 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11123 floating point modes, so that IFmode is numerically greater than
11124 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11125 to declare the ordering. This prevents IFmode from being
11126 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11127 machine. Include rs6000-modes.h to share the fractional values
11128 between genmodes* and the rest of the compiler.
11129 (IFmode): Likewise.
11130 (KFmode): Likewise.
11131 (TFmode): Likewise.
11132 * config/rs6000/rs6000-modes.h: New file.
11133 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11134 meaning of rs6000_long_double_size so that 126..128 selects an
11135 appropriate 128-bit floating point type.
11136 (rs6000_option_override_internal): Likewise.
11137 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11138 (TARGET_LONG_DOUBLE_128): Change the meaning of
11139 rs6000_long_double_size so that 126..128 selects an appropriate
11140 128-bit floating point type.
11141 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11142 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11143 source and destination to match the standard usage.
11144 (truncifkf2): Likewise.
11145 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11146 ISA 2.07 to use an explicit clobber, instead of passing in a
11148 (copysign<mode>3_soft): Likewise.
11150 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11152 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11153 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11154 (vect_slp_analyze_instance_dependence): Likewise.
11155 (vect_enhance_data_refs_alignment): Likewise.
11156 (vect_analyze_data_refs_alignment): Likewise.
11157 (vect_slp_analyze_and_verify_instance_alignment
11158 (vect_analyze_data_ref_accesses): Likewise.
11159 (vect_prune_runtime_alias_test_list): Likewise.
11160 (vect_analyze_data_refs): Likewise.
11161 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11162 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11163 (vect_analyze_scalar_cycles_1): Likewise.
11164 (vect_get_loop_niters): Likewise.
11165 (vect_analyze_loop_form_1): Likewise.
11166 (vect_update_vf_for_slp): Likewise.
11167 (vect_analyze_loop_operations): Likewise.
11168 (vect_analyze_loop): Likewise.
11169 (vectorizable_induction): Likewise.
11170 (vect_transform_loop): Likewise.
11171 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11172 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11173 (vect_make_slp_decision): Likewise.
11174 (vect_detect_hybrid_slp): Likewise.
11175 (vect_slp_analyze_operations): Likewise.
11176 (vect_slp_bb): Likewise.
11177 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11178 (vectorizable_bswap): Likewise.
11179 (vectorizable_call): Likewise.
11180 (vectorizable_simd_clone_call): Likewise.
11181 (vectorizable_conversion): Likewise.
11182 (vectorizable_assignment): Likewise.
11183 (vectorizable_shift): Likewise.
11184 (vectorizable_operation): Likewise.
11185 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11187 2018-06-18 Martin Sebor <msebor@redhat.com>
11189 PR tree-optimization/81384
11190 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11191 * builtins.c (expand_builtin_strnlen): New function.
11192 (expand_builtin): Call it.
11193 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11194 * builtins.def (BUILT_IN_STRNLEN): New.
11195 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11196 Warn for bounds in excess of maximum object size.
11197 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11198 single-value ranges. Handle strnlen.
11199 (handle_builtin_strlen): Handle strnlen.
11200 (strlen_check_and_optimize_stmt): Same.
11201 * doc/extend.texi (Other Builtins): Document strnlen.
11203 2018-06-18 Maya Rashish <coypu@sdf.org>
11205 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11206 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11207 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11209 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11211 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11213 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11215 * tree.c (escaped_string::escape): Replace cast to char * by
11216 const_cast<char *> (unescaped).
11218 2018-06-18 Nick Clifton <nickc@redhat.com>
11221 * tree.c (escaped_string): New class. Converts an unescaped
11222 string into its escaped equivalent.
11223 (warn_deprecated_use): Use the new class to convert the
11224 deprecation message, if present.
11225 (test_escaped_strings): New self test.
11226 (test_c_tests): Add test_escaped_strings.
11227 * doc/extend.texi (deprecated): Add a note that the
11228 deprecation message is affected by the -fmessage-length
11229 option, and that control characters will be escaped.
11230 (#pragma GCC error): Document this pragma.
11231 (#pragma GCC warning): Likewise.
11232 * doc/invoke.texi (-fmessage-length): Document this option's
11233 effect on the #warning and #error preprocessor directives and
11234 the deprecated attribute.
11236 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
11238 * tree.c (decl_value_expr_lookup): Revert latest change.
11239 (decl_value_expr_insert): Likewise.
11241 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11243 * gimplify.c (nonlocal_vlas): Delete.
11244 (nonlocal_vla_vars): Likewise.
11245 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11247 (gimplify_body): Do not create and destroy nonlocal_vlas.
11248 * tree-nested.c: Include diagnostic.h.
11249 (use_pointer_in_frame): Tweak.
11250 (lookup_field_for_decl): Add assertion and declare the transformation.
11251 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11252 internal error when the reference is in a wrong context. Do not
11253 create a debug decl by default.
11254 (note_nonlocal_block_vlas): Delete.
11255 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11256 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11257 create a debug decl by default.
11258 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11259 call is in a wrong context.
11260 (fixup_vla_decls): New function.
11261 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11262 debug variables were created.
11263 * tree.c (decl_value_expr_lookup): Add checking assertion.
11264 (decl_value_expr_insert): Likewise.
11266 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11268 PR middle-end/82479
11269 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11270 * tree-scalar-evolution.c (interpret_expr): Likewise.
11271 (expression_expensive_p): Likewise.
11272 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11273 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11274 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11275 (ssa_defined_by_minus_one_stmt_p): New.
11277 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11279 PR middle-end/64946
11280 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11281 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11282 * dojump.c (do_jump): Likewise.
11283 * expr.c (expand_expr_real_2): Check operand type's sign.
11284 * fold-const.c (const_unop): Handle ABSU_EXPR.
11285 (fold_abs_const): Likewise.
11286 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11287 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11288 (strip_sign_op_1): Likesise.
11289 * match.pd: Add new pattern to generate ABSU_EXPR.
11290 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11291 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11292 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11293 * tree-inline.c (estimate_operator_cost): Likewise.
11294 * tree-pretty-print.c (dump_generic_node): Likewise.
11295 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11296 * tree.def (ABSU_EXPR): New.
11298 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11300 PR middle-end/86095
11301 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11302 documented as preserved for backward compatibility only.
11303 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11305 PR rtl-optimization/86108
11306 * bb-reorder.c (create_forwarder_block): Renamed to ...
11307 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11308 jump from new landing pad to the second part.
11309 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11312 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11314 PR middle-end/85878
11315 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11316 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11317 Only call store_expr for halves if the mode is the same.
11319 PR middle-end/86123
11320 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11321 Fix up comment formatting.
11323 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11325 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11326 (typed_splay_tree::closure,
11327 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11328 (typed_splay_tree::typed_splay_tree,
11329 typed_splay_tree::operator =): Declared private.
11330 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11331 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11332 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11333 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11334 typed_splay_tree::splay_tree_splay,
11335 typed_splay_tree::splay_tree_foreach_helper,
11336 typed_splay_tree::splay_tree_insert,
11337 typed_splay_tree::splay_tree_remove,
11338 typed_splay_tree::splay_tree_lookup,
11339 typed_splay_tree::splay_tree_predecessor,
11340 typed_splay_tree::splay_tree_successor,
11341 typed_splay_tree::splay_tree_min,
11342 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11343 (typed_splay_tree::root, typed_splay_tree::comp,
11344 typed_splay_tree::delete_key,
11345 typed_splay_tree::delete_value): New data members.
11346 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11347 typed_splay_tree::remove.
11349 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11351 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11352 -mginv and -mno-ginv to the assembler.
11353 * config/mips/mips.opt (-mcrc): New option.
11354 (-mginv): Likewise.
11355 * doc/invoke.text (-mcrc): Document.
11356 (-mginv): Likewise.
11358 2018-06-15 Nick Clifton <nickc@redhat.com>
11361 * tree.c (escaped_string): New class. Converts an unescaped
11362 string into its escaped equivalent.
11363 (warn_deprecated_use): Use the new class to convert the
11364 deprecation message, if present.
11365 (test_escaped_strings): New self test.
11366 (test_c_tests): Add test_escaped_strings.
11367 * doc/extend.texi (deprecated): Add a note that the
11368 deprecation message is affected by the -fmessage-length
11369 option, and that control characters will be escaped.
11370 (#pragma GCC error): Document this pragma.
11371 (#pragma GCC warning): Likewise.
11372 * doc/invoke.texi (-fmessage-length): Document this option's
11373 effect on the #warning and #error preprocessor directives and
11374 the deprecated attribute.
11376 2018-06-15 Richard Biener <rguenther@suse.de>
11378 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11379 here, also noting vector size used.
11380 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11381 size used in MSG_OPTIMIZED_LOCATIONS dump.
11382 (pass_slp_vectorize::execute): Adjust.
11384 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11387 * config/arc/arc.c (arc_return_address_register): Fix
11390 2018-06-15 Richard Biener <rguenther@suse.de>
11392 PR middle-end/86159
11393 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11394 leave useless conversion stripping to force_gimple_operand_gsi.
11395 (gimplify_build2): Likewise.
11396 (gimplify_build1): Likewise.
11398 2018-06-15 Richard Biener <rguenther@suse.de>
11400 PR middle-end/86076
11401 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11402 before adjusting their block.
11404 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11406 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11407 multilibs for *-*-rtems*.
11408 * config/riscv/t-rtems: New file.
11410 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11412 PR middle-end/86122
11413 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11414 unsigned_type_for returns NULL.
11417 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11418 subregs of multi-word pseudos unless the float mode has word size.
11420 2018-06-14 Richard Biener <rguenther@suse.de>
11422 PR middle-end/86139
11423 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11424 duplicate and harmful type_hash_canon.
11425 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11427 2018-06-14 Richard Biener <rguenther@suse.de>
11430 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11433 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11435 * config/rtems.h (STDINT_LONG32): Define.
11437 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11438 Prachi Godbole <prachi.godbole@imgtec.com>
11440 * config/mips/mips-cpus.def: Define P6600.
11441 * config/mips/mips-tables.opt: Regenerate.
11442 * config/mips/mips.c (mips_ucbranch_type): New enum.
11443 (mips_rtx_cost_data): Add support for P6600.
11444 (mips_issue_rate): Likewise.
11445 (mips_multipass_dfa_lookahead): Likewise.
11446 (mips_avoid_hazard): Likewise.
11447 (mips_reorg_process_insns): Likewise.
11448 (mips_classify_branch_p6600): New function.
11449 * config/mips/mips.h (TUNE_P6600): New define.
11450 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11451 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11452 * config/mips/mips.md: Include p6600.md.
11453 (processor): Add p6600.
11454 * config/mips/p6600.md: New file.
11455 * doc/invoke.texi: Add p6600 to supported architectures.
11457 2018-06-13 Martin Sebor <msebor@redhat.com>
11459 PR tree-optimization/86114
11460 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11462 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11464 2018-06-13 Richard Biener <rguenther@suse.de>
11466 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11467 Properly set vector type of the intermediate stmt.
11468 * tree-vect-stmts.c (vectorizable_operation): The destination
11469 var always has vectype_out type.
11471 2018-06-13 Jeff Law <law@redhat.com>
11473 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11474 integer 0 for argument to print_rtl_with_bb.
11475 (rl78_reorg): Likewise.
11477 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11479 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11480 from rtx to rtx_insn *.
11481 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11483 (add_sched_insns_for_speculation): Likewise for local "target",
11484 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11485 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11486 from rtx_insn ** to rtx_code_label **.
11487 (reorg_emit_nops): Likewise.
11488 (c6x_reorg): Likewise for local "call_labels".
11489 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11491 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11492 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11493 the loops over LABEL_REFS.
11494 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11496 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11497 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11498 (split_branches): Strengthen local "olabel" from rtx to
11499 rtx_insn *, adding a safe_as_a cast.
11500 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11502 (add_insn_after): Likewise for first two params.
11503 (add_insn_before): Likewise.
11504 (remove_insn): Likewise for param.
11505 (emit_pattern_before_noloc): Likewise for second and third params.
11506 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11507 (emit_call_insn_before_noloc): Likewise.
11508 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11510 (emit_barrier_before): Likewise.
11511 (emit_label_before): Strengthen "label" param from "rtx" to
11512 "rtx_code_label *". Strengthen "before" param from "rtx" to
11514 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11516 (emit_pattern_after_noloc): Likewise.
11517 (emit_insn_after_noloc): Likewise.
11518 (emit_jump_insn_after_noloc): Likewise.
11519 (emit_call_insn_after_noloc): Likewise.
11520 (emit_debug_insn_after_noloc): Likewise.
11521 (emit_barrier_after): Likewise.
11522 (emit_label_after): Likewise for both params.
11523 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11524 "loc" param from "int" to "location_t".
11525 (emit_insn_after_setloc): Likewise.
11526 (emit_jump_insn_after_setloc): Likewise.
11527 (emit_call_insn_after_setloc): Likewise.
11528 (emit_debug_insn_after_setloc): Likewise.
11529 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11530 "loc" param from "int" to "location_t".
11531 (emit_pattern_before): Convert NULL_RTX to NULL.
11532 (emit_insn_before_setloc): Convert "loc" param from "int" to
11534 (emit_jump_insn_before_setloc): Likewise.
11535 (emit_call_insn_before_setloc): Likewise.
11536 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11537 rtx_insn *. Convert "loc" param from "int" to "location_t".
11538 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11539 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11540 Convert 3rd param from "int" to "location_t".
11541 (emit_barrier_before, emit_barrier_after, next_real_insn):
11542 Strengthen param from rtx to rtx_insn *.
11543 (emit_label_before): Strengthen 1st param from "rtx" to
11544 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11546 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11547 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11548 Strengthen 2nd param from "rtx" to "rtx_insn *".
11549 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11550 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11551 Likewise. Convert 3rd param from "int" to "location_t".
11552 (emit_label_after): Strengthen 1st param from "rtx" to
11553 "rtx_code_label *".
11554 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11556 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11557 from "rtx" to "rtx_insn *".
11559 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11561 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11562 bodies streamed in with -Q.
11563 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11564 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11565 * gimple-streamer-out.c: Include gimple-pretty-print.h
11566 (output_bb): Dump stmts streamed.
11567 * lto-section-out.c: Include print-tree.h
11568 (lto_begin_section): Dump sections created.
11569 (lto_output_decl_index): Dump decl encoded.
11570 * lto-streamer-out.c: Include print-tree.h
11571 (create_output_block): Dump output block created.
11572 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11573 (output_function): Dump function output.
11574 (output_constructor): Dump constructor streamed.
11575 (write_global_stream): Output indexes encoded.
11576 (produce_asm_for_decls): Dump streams encoded.
11577 * lto-streamer.c (streamer_dump_file): New global var.
11578 * lto-streamer.h (streamer_dump_file): Declare.
11579 * passes.c (ipa_write_summaries): Initialize streamer dump.
11580 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11583 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11586 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11587 offsets for register save directives. Emit a second batch of save
11588 directives, if need be, when the function accesses prior frames.
11590 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11592 * config/arc/fpu.md (fmasf4): Force operand to register.
11593 (fnmasf4): Likewise.
11595 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11597 * config/arc/arc-protos.h (arc_pad_return): Remove.
11598 * config/arc/arc.c (machine_function): Remove force_short_suffix
11600 (arc_print_operand): Adjust printing of '&'.
11601 (arc_verify_short): Remove conditional printing of short suffix.
11602 (arc_final_prescan_insn): Remove reference to size_reason.
11603 (pad_return): New function.
11604 (arc_reorg): Call pad_return.
11605 (arc_pad_return): Remove.
11606 (arc_init_machine_status): Remove reference to force_short_suffix.
11607 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11608 (attr length): When attribute iscompact is true force to 2
11609 regardless; in the case of maybe check if we want to force the
11610 instruction to have 4 bytes length.
11611 (nopv): Change it to generate 4 byte long nop as well.
11612 (blockage): New pattern.
11613 (simple_return): Remove call to arc_pad_return.
11614 (p_return_i): Likewise.
11616 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11618 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11620 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11622 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11625 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11627 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11628 for ARC700 and ARCv2.
11630 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11633 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11634 operands[2] instead of operands[1].
11637 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11639 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11640 case, check whether the outer register overlaps an unallocatable
11641 register, not just whether it fits the required class.
11643 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11645 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11647 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11648 (memrefs_conflict_p): Likewise.
11649 (init_alias_analysis): Likewise.
11650 * cfgexpand.c (expand_debug_expr): Likewise.
11651 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11652 * cse.c (fold_rtx): Likewise.
11653 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11654 * expr.c (emit_block_move_hints): Likewise.
11655 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11656 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11657 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11658 (emit_group_store): Likewise.
11659 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11660 to read the PRE/POST_MODIFY increment.
11661 * calls.c (store_one_arg): Use strip_offset.
11662 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11664 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11666 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11667 (simplify_binary_operation_1): Extend CONST_INT handling to
11669 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11670 than a HOST_WIDE_INT.
11671 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11673 (adjust_mems, add_stores): Update accodingly.
11674 (vt_canonicalize_addr): Track polynomial offsets.
11675 (emit_note_insn_var_location): Likewise.
11676 (vt_add_function_parameter): Likewise.
11677 (vt_initialize): Likewise.
11679 2018-06-12 Jeff Law <law@redhat.com>
11681 * config.gcc (alpha*-*-freebsd*): Remove.
11682 * config/alpha/freebsd.h: Remove.
11684 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11687 * spellcheck-tree.c (levenshtein_distance): Rename to...
11688 (get_edit_distance): ...this, and update for underlying renaming.
11689 * spellcheck-tree.h (levenshtein_distance): Rename to...
11690 (get_edit_distance): ...this.
11691 * spellcheck.c (levenshtein_distance): Rename to...
11692 (get_edit_distance): ...this. Convert from Levenshtein distance
11693 to Damerau-Levenshtein distance by supporting transpositions of
11694 adjacent characters. Rename "v1" to "v_next" and "v0" to
11696 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11697 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11698 update for underlying renaming.
11699 (selftest::levenshtein_distance_unit_test): Rename to...
11700 (selftest::test_get_edit_distance_unit): ...this, and update for
11701 underlying renaming.
11702 (selftest::test_find_closest_string): Add example from PR 69968
11703 where transposition helps
11704 (selftest::test_metric_conditions): Update for renaming.
11705 (selftest::test_metric_conditions): Likewise.
11706 (selftest::spellcheck_c_tests): Likewise.
11707 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11708 (get_edit_distance): ...this.
11709 (best_match::consider): Update for renaming.
11711 2018-06-12 Martin Sebor <msebor@redhat.com>
11713 PR tree-optimization/85259
11714 * builtins.c (compute_objsize): Handle constant offsets.
11715 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11716 true iff a warning has been issued.
11717 * gimple.h (gimple_nonartificial_location): New function.
11718 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11719 gimple_nonartificial_location and handle -Wno-system-headers.
11720 (handle_builtin_stxncpy): Same.
11722 2018-06-12 Martin Sebor <msebor@redhat.com>
11725 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11727 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11729 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11730 BUILTIN_VEC_XST entries for pointer to double and long long.
11732 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11735 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11737 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11740 2018-06-12 Martin Liska <mliska@suse.cz>
11742 * doc/options.texi: Document IntegerRange.
11744 2018-06-12 Martin Liska <mliska@suse.cz>
11746 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11747 * opt-functions.awk: Handle Deprecated flag.
11748 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11750 (read_cmdline_option): Report warning for a deprecated option.
11751 * opts.h (struct cl_option): Add new field cl_deprecated.
11752 (CL_ERR_DEPRECATED): New.
11754 2018-06-12 Martin Liska <mliska@suse.cz>
11756 * doc/options.texi: Document Deprecated option flag.
11758 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11760 * config/arc/arc-arch.h (arc_extras): New enum.
11761 (arc_cpu_t):Add field extra.
11762 (arc_cpu_types): Consider the extras.
11763 * config/arc/arc-cpus.def: Add extras info.
11764 * config/arc/arc-opts.h (processor_type): Consider extra field.
11765 * config/arc/arc.c (arc_override_options): Handle extra field.
11767 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11769 * config/arc/arc-arch.h: Update ARC_OPTX macro.
11770 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11772 * config/arc/arc.c (arc_init): Update pic warning.
11773 (irq_range): Update irq range parsing warnings.
11774 (arc_override_options): Update various warning messages.
11775 (arc_handle_aux_attribute): Likewise.
11777 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
11779 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11781 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11783 * doc/sourcebuild.texi: Document usage of line number 0 in verify
11784 compiler messages directives.
11786 2018-06-12 Matthew Fortune <mfortune@gmail.com>
11788 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11789 * config/mips/mips-tables.opt: Regenerate.
11790 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11792 * doc/invoke.texi: Document -march=i6500.
11794 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
11796 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11797 (i6400_gpmul): Add cpu_unit.
11798 (i6400_gpdiv): Likewise.
11799 (i6400_msa_add_d): Update reservations.
11800 (i6400_msa_int_add) Likewise.
11801 (i6400_msa_short_logic3) Likewise.
11802 (i6400_msa_short_logic2) Likewise.
11803 (i6400_msa_short_logic) Likewise.
11804 (i6400_msa_move) Likewise.
11805 (i6400_msa_cmp) Likewise.
11806 (i6400_msa_short_float2) Likewise.
11807 (i6400_msa_div_d) Likewise.
11808 (i6400_msa_long_logic1) Likewise.
11809 (i6400_msa_long_logic2) Likewise.
11810 (i6400_msa_mult) Likewise.
11811 (i6400_msa_long_float2) Likewise.
11812 (i6400_msa_long_float4) Likewise.
11813 (i6400_msa_long_float5) Likewise.
11814 (i6400_msa_long_float8) Likewise.
11815 (i6400_fpu_fadd): Include frint type.
11816 (i6400_fpu_store): New define_insn_reservation.
11817 (i6400_fpu_load): Likewise.
11818 (i6400_fpu_move): Likewise.
11819 (i6400_fpu_fcmp): Likewise.
11820 (i6400_fpu_fmadd): Likewise.
11821 (i6400_int_mult): Include imul3nc type and update reservation.
11822 (i6400_int_div): Include idiv3 type and update reservation.
11823 (i6400_int_load): Update to check type not move_type.
11824 (i6400_int_store): Likewise.
11825 (i6400_int_prefetch): Set zero latency.
11827 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
11829 * gcc.c: Document new %@{...} sequence.
11830 (LINK_COMMAND_SPEC): Use it for the -L switches.
11831 (cpp_unique_options): Use it for the -I switches.
11832 (at_file_argbuf): New global variable.
11833 (in_at_file): Likewise.
11834 (alloc_args): Create at_file_argbuf.
11835 (clear_args): Truncate at_file_argbuf.
11836 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11837 (open_at_file): New function.
11838 (close_at_file): Likewise.
11839 (create_at_file): Delete.
11840 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11843 (validate_switches_from_spec): Deal with %@{...} sequence.
11844 (validate_switches): Likewise.
11845 (driver::finalize): Call clear_args.
11847 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11849 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11851 2018-06-11 Martin Sebor <msebor@redhat.com>
11853 * doc/invoke.texi (-Wall): List -Wc++17-compat.
11854 (Wno-class-memaccess): Add @opindex.
11855 (Wno-templates, Wno-multiple-inheritance): Same.
11856 (Wno-virtual-inheritance, Wno-namespaces): Same.
11857 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11858 (Wno-format-overflow, Wno-format-truncation): Same.
11859 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11860 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11861 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11862 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11863 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11864 (Wno-misspelled-isr): Same.
11866 2018-06-11 Martin Sebor <msebor@redhat.com>
11868 * PR tree-optimization/86083
11869 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11871 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
11873 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11875 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
11878 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11879 on the correct operand.
11880 (*movdi_internal64): Ditto.
11882 2018-06-11 Martin Liska <mliska@suse.cz>
11884 PR tree-optimization/86089
11885 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11887 2018-06-11 Julia Koval <julia.koval@intel.com>
11889 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11890 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11891 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11893 2018-06-11 Olivier Hainque <hainque@adacore.com>
11895 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11896 for Ada with strict dwarf2.
11898 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
11901 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11904 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
11906 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11908 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
11910 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11913 2018-06-08 Martin Liska <mliska@suse.cz>
11915 * tree-cfg.h (debug_function): Fix argument type to match
11918 2018-06-08 Martin Liska <mliska@suse.cz>
11920 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11921 Remove usage of MPX-related (and removed) fields.
11922 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11924 2018-06-08 David Malcolm <dmalcolm@redhat.com>
11926 * cfg.c (debug): Use TDF_NONE rather than 0.
11927 * cfghooks.c (debug): Likewise.
11928 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11929 (struct dump_option_value_info): Convert to...
11930 (struct kv_pair): ...this template type.
11931 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11933 (optinfo_verbosity_options): Likewise.
11934 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11936 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11937 than int for "optgroup_flags" param.
11938 (dump_generic_expr_loc): Use dump_flags_t rather than int for
11940 (dump_dec): Likewise.
11941 (dump_finish): Use TDF_NONE rather than 0.
11942 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11943 rather than int for "optgroup_flags" param. Use TDF_NONE rather
11944 than 0. Update for change to option_ptr.
11945 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11946 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
11947 0. Update for changes to optinfo_verbosity_options and
11949 (opt_info_switch_p): Convert optgroup_flags from int to
11951 (dump_basic_block): Use dump_flags_t rather than int
11952 for "dump_kind" param.
11953 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11954 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11955 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11956 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11957 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11958 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11959 TDF_NONE): Convert from macros to...
11960 (enum dump_flag): ...this new enum.
11961 (dump_flags_t): Update to use enum.
11962 (operator|, operator&, operator~, operator|=, operator&=):
11963 Implement for dump_flags_t.
11964 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11965 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11966 Convert from macros to...
11967 (enum optgroup_flag): ...this new enum.
11968 (optgroup_flags_t): New typedef.
11969 (operator|, operator|=): Implement for optgroup_flags_t.
11970 (struct dump_file_info): Convert field "alt_flags" to
11971 dump_flags_t. Convert field "optgroup_flags" to
11973 (dump_basic_block): Use dump_flags_t rather than int for param.
11974 (dump_generic_expr_loc): Likewise.
11975 (dump_dec): Likewise.
11976 (dump_register): Convert param "optgroup_flags" to
11978 (opt_info_enable_passes): Likewise.
11979 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11981 * gimple-pretty-print.c (debug): Likewise.
11982 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11983 (merged_store_group::apply_stores): Likewise.
11984 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11985 * gimple.c (verify_gimple_pp): Likewise.
11986 * graphite-poly.c (print_pbb_body): Likewise.
11987 * passes.c (pass_manager::register_one_dump_file): Convert
11988 local "optgroup_flags" to optgroup_flags_t.
11989 * print-tree.c (print_node): Use TDF_NONE rather than 0.
11991 (debug_body): Likewise.
11992 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11993 to optgroup_flags_t.
11994 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11996 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11997 (convert_mult_to_fma): Likewise.
11998 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11999 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12000 * tree-vect-data-refs.c (dump_lower_bound): Convert param
12001 "dump_kind" to dump_flags_t.
12003 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12005 * config/rs6000/rs6000.c (min, max): Delete.
12007 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12009 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12010 -mabi=spe and -mabi=no-spe.
12012 2018-06-08 Martin Liska <mliska@suse.cz>
12014 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12015 where we expect an existing summary.
12017 2018-06-08 Martin Liska <mliska@suse.cz>
12019 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12020 * ipa-inline.h (estimate_edge_growth): Likewise.
12022 2018-06-08 Martin Liska <mliska@suse.cz>
12024 * cgraph.c (function_version_hasher::hash): Use
12025 cgraph_node::get_uid ().
12026 (function_version_hasher::equal):
12027 * cgraph.h (cgraph_node::get_uid): New method.
12028 * ipa-inline.c (update_caller_keys): Use
12029 cgraph_node::get_uid ().
12030 (update_callee_keys): Likewise.
12031 * ipa-utils.c (searchc): Likewise.
12032 (ipa_reduced_postorder): Likewise.
12033 * lto-cgraph.c (input_node): Likewise.
12034 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12035 * symbol-summary.h (symtab_insertion): Likewise.
12036 (symtab_removal): Likewise.
12037 (symtab_duplication): Likewise.
12038 * tree-pretty-print.c (dump_function_header): Likewise.
12039 * tree-sra.c (convert_callers_for_node): Likewise.
12041 2018-06-08 Martin Liska <mliska@suse.cz>
12043 * cgraph.c (symbol_table::create_edge): Always assign a new
12045 (symbol_table::free_edge): Do not recycle numbers.
12046 * cgraph.h (cgraph_edge::get): New method.
12047 * symbol-summary.h (symtab_removal): Use it.
12048 (symtab_duplication): Likewise.
12049 (call_summary::hashable_uid): Remove.
12051 2018-06-08 Martin Liska <mliska@suse.cz>
12053 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12054 (initialize_growth_caches): Remove.
12055 (free_growth_caches): Likewise.
12056 (do_estimate_edge_time): Use edge_growth_cache.
12057 (do_estimate_edge_size): Likewise.
12058 (do_estimate_edge_hints): Likewise.
12059 * ipa-inline.c (reset_edge_caches): Likewise.
12060 (recursive_inlining): Likewise.
12061 (inline_small_functions): Likewise.
12062 * ipa-inline.h (initialize_growth_caches): Remove.
12063 (estimate_edge_size): Likewise.
12064 (estimate_edge_time): Likewise.
12065 (estimate_edge_hints): Likewise.
12066 (reset_edge_growth_cache): Likewise.
12067 * symbol-summary.h (call_summary::remove): New method.
12069 2018-06-08 Martin Liska <mliska@suse.cz>
12071 * ipa-cp.c (class edge_clone_summary): New summary.
12072 (grow_edge_clone_vectors): Remove.
12073 (ipcp_edge_duplication_hook): Remove.
12074 (class edge_clone_summary_t): New call_summary class.
12075 (ipcp_edge_removal_hook): Remove.
12076 (edge_clone_summary_t::duplicate): New function.
12077 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12078 (create_specialized_node): Likewise.
12079 (ipcp_driver): Initialize edge_clone_summaries and do not
12082 2018-06-08 Martin Liska <mliska@suse.cz>
12084 * symbol-summary.h (get): New function.
12085 (call_summary::m_initialize_when_cloning): New class member.
12087 2018-06-08 Martin Liska <mliska@suse.cz>
12089 * cgraph.c (cgraph_node::remove): Do not recycle uid.
12090 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12091 (symbol_table::allocate_cgraph_symbol): Do not set uid.
12092 * passes.c (uid_hash_t): Record removed_nodes by their uids.
12093 (remove_cgraph_node_from_order): Use the removed_nodes set.
12094 (do_per_function_toporder): Likwise.
12095 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12096 instead of summary_uid.
12097 (symtab_removal): Likewise.
12098 (symtab_duplication): Likewise.
12100 2018-06-08 Martin Liska <mliska@suse.cz>
12102 * ipa-cp.c (ipcp_store_bits_results): Use
12103 ipcp_transformation_sum.
12104 (ipcp_store_vr_results): Likewise.
12105 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12107 (ipcp_transformation_initialize): ... this.
12108 (ipa_set_node_agg_value_chain):
12109 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12110 (write_ipcp_transformation_info): Likewise.
12111 (read_ipcp_transformation_info): Likewise.
12112 (ipcp_update_bits): Likewise.
12113 (ipcp_update_vr): Likewise.
12114 (ipcp_transform_function): Likewise.
12115 * ipa-prop.h: Rename ipcp_transformation_summary to
12116 ipcp_transformation.
12117 (class ipcp_transformation_t): New function summary.
12118 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12119 (ipa_get_agg_replacements_for_node): Likewise.
12121 2018-06-08 Martin Liska <mliska@suse.cz>
12123 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12125 (class funct_state_summary_t): New function_summary class.
12126 (has_function_state): Remove.
12127 (get_function_state): Likewise.
12128 (set_function_state): Likewise.
12129 (add_new_function): Likewise.
12130 (funct_state_summary_t::insert): New function.
12131 (duplicate_node_data): Remove.
12132 (remove_node_data): Remove.
12133 (funct_state_summary_t::duplicate): New function.
12134 (register_hooks): Create new funct_state_summaries.
12135 (pure_const_generate_summary): Use it.
12136 (pure_const_write_summary): Likewise.
12137 (pure_const_read_summary): Likewise.
12138 (propagate_pure_const): Likewise.
12139 (propagate_nothrow): Likewise.
12140 (dump_malloc_lattice): Likewise.
12141 (propagate_malloc): Likewise.
12142 (execute): Do not register hooks, just remove summary
12144 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12147 2018-06-08 Martin Liska <mliska@suse.cz>
12149 * ipa-reference.c (remove_node_data): Remove.
12150 (duplicate_node_data): Likewise.
12151 (class ipa_ref_var_info_summary_t): New class.
12152 (class ipa_ref_opt_summary_t): Likewise.
12153 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12154 (get_reference_optimization_summary): Use
12155 ipa_ref_opt_sum_summaries.
12156 (set_reference_vars_info): Remove.
12157 (set_reference_optimization_summary): Likewise.
12158 (ipa_init): Create summaries.
12159 (init_function_info): Use function summary.
12160 (ipa_ref_opt_summary_t::duplicate): New function.
12161 (ipa_ref_opt_summary_t::remove): New function.
12162 (get_read_write_all_from_node): Fix GNU coding style.
12163 (propagate): Use function summary.
12164 (write_node_summary_p): Fix GNU coding style.
12165 (stream_out_bitmap): Likewise.
12166 (ipa_reference_read_optimization_summary): Use function summary.
12167 (ipa_reference_c_finalize): Do not release hooks.
12169 2018-06-08 Martin Liska <mliska@suse.cz>
12171 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12172 (analyze_function_body): Extract multiple calls of get_create.
12173 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12174 * ipa-inline.c (recursive_inlining): Use ::get method.
12175 * ipa-inline.h (estimate_edge_growth): Likewise.
12177 2018-06-08 Martin Liska <mliska@suse.cz>
12179 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12181 (hsa_function_summary::hsa_function_summary): Use the new enum
12183 (hsa_gpu_implementation_p): Use hsa_summaries::get.
12184 * hsa-gen.c (hsa_get_host_function): Likewise.
12185 (get_brig_function_name): Likewise.
12186 * ipa-hsa.c (process_hsa_functions): Likewise.
12187 (ipa_hsa_write_summary): Likewise.
12188 * symbol-summary.h (symtab_duplication): Use ::get function/
12189 (get): New function.
12191 2018-06-08 Martin Liska <mliska@suse.cz>
12193 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12195 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12196 (hsa_register_kernel): Likewise.
12197 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12198 * hsa-gen.c (hsa_get_host_function): Likewise.
12199 (get_brig_function_name): Likewise.
12200 (generate_hsa): Likewise.
12201 (pass_gen_hsail::execute): Likewise.
12202 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12203 (devirtualization_time_bonus): Likewise.
12204 (ipcp_propagate_stage): Likewise.
12205 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12206 (edge_set_predicate): Likewise.
12207 (evaluate_conditions_for_known_args): Likewise.
12208 (evaluate_properties_for_edge): Likewise.
12209 (ipa_fn_summary::reset): Likewise.
12210 (ipa_fn_summary_t::duplicate): Likewise.
12211 (dump_ipa_call_summary): Likewise.
12212 (ipa_dump_fn_summary): Likewise.
12213 (analyze_function_body): Likewise.
12214 (compute_fn_summary): Likewise.
12215 (estimate_edge_devirt_benefit): Likewise.
12216 (estimate_edge_size_and_time): Likewise.
12217 (estimate_calls_size_and_time): Likewise.
12218 (estimate_node_size_and_time): Likewise.
12219 (inline_update_callee_summaries): Likewise.
12220 (remap_edge_change_prob): Likewise.
12221 (remap_edge_summaries): Likewise.
12222 (ipa_merge_fn_summary_after_inlining): Likewise.
12223 (ipa_update_overall_fn_summary): Likewise.
12224 (read_ipa_call_summary): Likewise.
12225 (inline_read_section): Likewise.
12226 (write_ipa_call_summary): Likewise.
12227 (ipa_fn_summary_write): Likewise.
12228 (ipa_free_fn_summary): Likewise.
12229 * ipa-hsa.c (process_hsa_functions): Likewise.
12230 (ipa_hsa_write_summary): Likewise.
12231 (ipa_hsa_read_section): Likewise.
12232 * ipa-icf.c (sem_function::merge): Likewise.
12233 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12234 (do_estimate_edge_time): Likewise.
12235 (estimate_size_after_inlining): Likewise.
12236 (estimate_growth): Likewise.
12237 (growth_likely_positive): Likewise.
12238 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12239 (inline_call): Likewise.
12240 * ipa-inline.c (caller_growth_limits): Likewise.
12241 (can_inline_edge_p): Likewise.
12242 (can_inline_edge_by_limits_p): Likewise.
12243 (compute_uninlined_call_time): Likewise.
12244 (compute_inlined_call_time): Likewise.
12245 (want_inline_small_function_p): Likewise.
12246 (edge_badness): Likewise.
12247 (update_caller_keys): Likewise.
12248 (update_callee_keys): Likewise.
12249 (recursive_inlining): Likewise.
12250 (inline_small_functions): Likewise.
12251 (inline_to_all_callers_1): Likewise.
12252 (dump_overall_stats): Likewise.
12253 (early_inline_small_functions): Likewise.
12254 (early_inliner): Likewise.
12255 * ipa-inline.h (estimate_edge_growth): Likewise.
12256 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12257 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12258 * ipa-prop.h (IPA_NODE_REF): Likewise.
12259 (IPA_EDGE_REF): Likewise.
12260 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12261 (propagate_malloc): Likewise.
12262 * ipa-split.c (execute_split_functions): Likewise.
12263 * symbol-summary.h: Rename get to get_create.
12265 (get_create): Likewise.
12266 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12268 2018-06-08 Martin Liska <mliska@suse.cz>
12270 * symbol-summary.h (release): Move definition out of class
12272 (symtab_removal): Likewise.
12273 (symtab_duplication): Likewise.
12275 2018-06-08 Martin Liska <mliska@suse.cz>
12277 * symbol-summary.h (function_summary): Move constructor
12278 implementation out of class declaration.
12279 (release): Likewise.
12280 (symtab_insertion): Likewise.
12281 (symtab_removal): Likewise.
12282 (symtab_duplication): Likewise.
12285 2018-06-08 Martin Liska <mliska@suse.cz>
12287 * Makefile.in: Remove support for MPX (macros, related functions,
12288 fields in cgraph_node, ...).
12289 * builtin-types.def (BT_BND): Likewise.
12290 (BT_FN_BND_CONST_PTR): Likewise.
12291 (BT_FN_CONST_PTR_BND): Likewise.
12292 (BT_FN_VOID_PTR_BND): Likewise.
12293 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12294 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12295 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12296 (expand_builtin_mempcpy_with_bounds): Likewise.
12297 (expand_builtin_memset_with_bounds): Likewise.
12298 (expand_builtin_memset_args): Likewise.
12299 (std_expand_builtin_va_start): Likewise.
12300 (expand_builtin): Likewise.
12301 (expand_builtin_with_bounds): Likewise.
12302 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12303 (DEF_LIB_BUILTIN_CHKP): Likewise.
12304 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12305 (DEF_CHKP_BUILTIN): Likewise.
12306 (BUILT_IN_MEMCPY): Likewise.
12307 (BUILT_IN_MEMMOVE): Likewise.
12308 (BUILT_IN_MEMPCPY): Likewise.
12309 (BUILT_IN_MEMSET): Likewise.
12310 (BUILT_IN_STPCPY): Likewise.
12311 (BUILT_IN_STRCAT): Likewise.
12312 (BUILT_IN_STRCHR): Likewise.
12313 (BUILT_IN_STRCPY): Likewise.
12314 (BUILT_IN_STRLEN): Likewise.
12315 (BUILT_IN_MEMCPY_CHK): Likewise.
12316 (BUILT_IN_MEMMOVE_CHK): Likewise.
12317 (BUILT_IN_MEMPCPY_CHK): Likewise.
12318 (BUILT_IN_MEMSET_CHK): Likewise.
12319 (BUILT_IN_STPCPY_CHK): Likewise.
12320 (BUILT_IN_STRCAT_CHK): Likewise.
12321 (BUILT_IN_STRCPY_CHK): Likewise.
12322 * calls.c (store_bounds): Likewise.
12323 (emit_call_1): Likewise.
12324 (special_function_p): Likewise.
12325 (maybe_warn_nonstring_arg): Likewise.
12326 (initialize_argument_information): Likewise.
12327 (finalize_must_preallocate): Likewise.
12328 (compute_argument_addresses): Likewise.
12329 (expand_call): Likewise.
12330 * cfgexpand.c (expand_call_stmt): Likewise.
12331 (expand_return): Likewise.
12332 (expand_gimple_stmt_1): Likewise.
12333 (pass_expand::execute): Likewise.
12334 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12335 (cgraph_node::remove): Likewise.
12336 (cgraph_node::dump): Likewise.
12337 (cgraph_node::verify_node): Likewise.
12338 * cgraph.h (chkp_function_instrumented_p): Likewise.
12339 (symtab_node::get_alias_target): Likewise.
12340 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12341 (cgraph_local_p): Likewise.
12342 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12343 (cgraph_edge::rebuild_references): Likewise.
12344 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12345 (walk_polymorphic_call_targets): Likewise.
12346 (cgraph_node::expand_thunk): Likewise.
12347 (symbol_table::output_weakrefs): Likewise.
12348 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12349 (ix86_handle_option): Likewise.
12350 * config/i386/constraints.md: Likewise.
12351 * config/i386/i386-builtin-types.def (BND): Likewise.
12355 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12356 (BDESC_FIRST): Likewise.
12358 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12359 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12360 * config/i386/i386.c (enum reg_class): Likewise.
12361 (ix86_target_string): Likewise.
12362 (ix86_option_override_internal): Likewise.
12363 (ix86_conditional_register_usage): Likewise.
12364 (ix86_valid_target_attribute_inner_p): Likewise.
12365 (ix86_set_indirect_branch_type): Likewise.
12366 (ix86_set_current_function): Likewise.
12367 (ix86_function_arg_regno_p): Likewise.
12368 (init_cumulative_args): Likewise.
12369 (ix86_function_arg_advance): Likewise.
12370 (ix86_function_arg): Likewise.
12371 (ix86_pass_by_reference): Likewise.
12372 (ix86_function_value_regno_p): Likewise.
12373 (ix86_function_value_1): Likewise.
12374 (ix86_function_value_bounds): Likewise.
12375 (ix86_return_in_memory): Likewise.
12376 (ix86_setup_incoming_vararg_bounds): Likewise.
12377 (ix86_va_start): Likewise.
12378 (indirect_thunk_need_prefix): Likewise.
12379 (print_reg): Likewise.
12380 (ix86_print_operand): Likewise.
12381 (ix86_expand_call): Likewise.
12382 (ix86_output_function_return): Likewise.
12383 (reg_encoded_number): Likewise.
12384 (BDESC_VERIFYS): Likewise.
12385 (ix86_init_mpx_builtins): Likewise.
12386 (ix86_init_builtins): Likewise.
12387 (ix86_emit_cmove): Likewise.
12388 (ix86_emit_move_max): Likewise.
12389 (ix86_expand_builtin): Likewise.
12390 (ix86_builtin_mpx_function): Likewise.
12391 (ix86_get_arg_address_for_bt): Likewise.
12392 (ix86_load_bounds): Likewise.
12393 (ix86_store_bounds): Likewise.
12394 (ix86_load_returned_bounds): Likewise.
12395 (ix86_store_returned_bounds): Likewise.
12396 (ix86_class_likely_spilled_p): Likewise.
12397 (ix86_hard_regno_mode_ok): Likewise.
12398 (x86_order_regs_for_local_alloc): Likewise.
12399 (ix86_mitigate_rop): Likewise.
12400 (ix86_bnd_prefixed_insn_p): Likewise.
12401 (ix86_mpx_bound_mode): Likewise.
12402 (ix86_make_bounds_constant): Likewise.
12403 (ix86_initialize_bounds): Likewise.
12404 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12405 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12406 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12407 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12408 (TARGET_CHKP_BOUND_MODE): Likewise.
12409 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12410 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12411 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12412 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12413 * config/i386/i386.h (TARGET_MPX): Likewise.
12414 (TARGET_MPX_P): Likewise.
12415 (VALID_BND_REG_MODE): Likewise.
12416 (FIRST_BND_REG): Likewise.
12417 (LAST_BND_REG): Likewise.
12418 (enum reg_class): Likewise.
12419 (BND_REG_P): Likewise.
12420 (BND_REGNO_P): Likewise.
12421 (BNDmode): Likewise.
12422 (ADJUST_INSN_LENGTH): Likewise.
12423 * config/i386/i386.md: Likewise.
12424 * config/i386/i386.opt: Likewise.
12425 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12426 (defined): Likewise.
12427 (LINK_MPX): Likewise.
12428 (MPX_SPEC): Likewise.
12429 (LIBMPX_SPEC): Likewise.
12430 (LIBMPXWRAPPERS_SPEC): Likewise.
12431 (CHKP_SPEC): Likewise.
12432 * config/i386/predicates.md: Likewise.
12433 * dbxout.c (dbxout_type): Likewise.
12434 * doc/extend.texi: Likewise.
12435 * doc/invoke.texi: Likewise.
12436 * doc/md.texi: Likewise.
12437 * doc/tm.texi: Likewise.
12438 * doc/tm.texi.in: Likewise.
12439 * dwarf2out.c (is_base_type): Likewise.
12440 (gen_formal_types_die): Likewise.
12441 (gen_subprogram_die): Likewise.
12442 (gen_type_die_with_usage): Likewise.
12443 (gen_decl_die): Likewise.
12444 (dwarf2out_late_global_decl): Likewise.
12445 * expr.c (expand_assignment): Likewise.
12446 (emit_storent_insn): Likewise.
12447 (store_expr_with_bounds): Likewise.
12448 (store_expr): Likewise.
12449 (expand_expr_real_1): Likewise.
12450 * expr.h (store_expr_with_bounds): Likewise.
12451 * function.c (use_register_for_decl): Likewise.
12452 (struct bounds_parm_data): Likewise.
12453 (assign_parms_augmented_arg_list): Likewise.
12454 (assign_parm_find_entry_rtl): Likewise.
12455 (assign_parm_is_stack_parm): Likewise.
12456 (assign_parm_load_bounds): Likewise.
12457 (assign_bounds): Likewise.
12458 (assign_parms): Likewise.
12459 (expand_function_start): Likewise.
12460 * gcc.c (CHKP_SPEC): Likewise.
12461 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12462 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12463 (wrestrict_dom_walker::check_call): Likewise.
12464 * gimple.c (gimple_build_call_from_tree): Likewise.
12465 * gimple.h (enum gf_mask): Likewise.
12466 (gimple_call_with_bounds_p): Likewise.
12467 (gimple_call_set_with_bounds): Likewise.
12468 * gimplify.c (gimplify_init_constructor): Likewise.
12469 * ipa-cp.c (initialize_node_lattices): Likewise.
12470 (propagate_constants_across_call): Likewise.
12471 (find_more_scalar_values_for_callers_subset): Likewise.
12472 * ipa-hsa.c (process_hsa_functions): Likewise.
12473 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12474 * ipa-icf.c (sem_function::merge): Likewise.
12475 * ipa-inline.c (early_inliner): Likewise.
12476 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12477 (warn_function_cold): Likewise.
12478 (propagate_pure_const): Likewise.
12479 * ipa-ref.h (enum GTY): Likewise.
12480 * ipa-split.c (find_retbnd): Likewise.
12481 (consider_split): Likewise.
12482 (split_function): Likewise.
12483 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12484 * ipa.c (walk_polymorphic_call_targets): Likewise.
12485 (symbol_table::remove_unreachable_nodes): Likewise.
12486 (process_references): Likewise.
12487 (cgraph_build_static_cdtor_1): Likewise.
12488 * lto-cgraph.c (lto_output_node): Likewise.
12489 (output_refs): Likewise.
12490 (compute_ltrans_boundary): Likewise.
12491 (input_overwrite_node): Likewise.
12492 (input_node): Likewise.
12493 (input_cgraph_1): Likewise.
12494 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12495 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12496 (class pass_chkp_instrumentation_passes): Likewise.
12497 (make_pass_chkp_instrumentation_passes): Likewise.
12498 * passes.def: Likewise.
12499 * rtl.h (struct GTY): Likewise.
12500 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12501 * stor-layout.c (layout_type): Likewise.
12502 * symtab.c: Likewise.
12503 * target.def: Likewise.
12504 * targhooks.c (default_chkp_bound_type): Likewise.
12505 (default_chkp_bound_mode): Likewise.
12506 (default_builtin_chkp_function): Likewise.
12507 (default_chkp_function_value_bounds): Likewise.
12508 (default_chkp_make_bounds_constant): Likewise.
12509 (default_chkp_initialize_bounds): Likewise.
12510 * targhooks.h (default_chkp_bound_type): Likewise.
12511 (default_chkp_bound_mode): Likewise.
12512 (default_builtin_chkp_function): Likewise.
12513 (default_chkp_function_value_bounds): Likewise.
12514 (default_chkp_make_bounds_constant): Likewise.
12515 (default_chkp_initialize_bounds): Likewise.
12516 * toplev.c (compile_file): Likewise.
12517 (process_options): Likewise.
12518 * tree-core.h (DEF_BUILTIN): Likewise.
12519 (DEF_BUILTIN_CHKP): Likewise.
12520 * tree-inline.c (declare_return_variable): Likewise.
12521 (remap_gimple_stmt): Likewise.
12522 (copy_bb): Likewise.
12523 (initialize_inlined_parameters): Likewise.
12524 (expand_call_inline): Likewise.
12525 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12526 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12527 (make_pass_ipa_chkp_produce_thunks): Likewise.
12528 (make_pass_chkp): Likewise.
12529 (make_pass_chkp_opt): Likewise.
12530 (make_pass_chkp_instrumentation_passes): Likewise.
12531 * tree-pretty-print.c (dump_generic_node): Likewise.
12532 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12533 * tree-ssa-dce.c (propagate_necessity): Likewise.
12534 (eliminate_unnecessary_stmts): Likewise.
12535 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12536 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12537 * tree-ssa-sccvn.h: Likewise.
12538 * tree-ssa-strlen.c (get_string_length): Likewise.
12539 (valid_builtin_call): Likewise.
12540 (adjust_last_stmt): Likewise.
12541 (handle_builtin_strchr): Likewise.
12542 (handle_builtin_strcpy): Likewise.
12543 (handle_builtin_stxncpy): Likewise.
12544 (handle_builtin_memcpy): Likewise.
12545 (handle_builtin_strcat): Likewise.
12546 (strlen_check_and_optimize_stmt): Likewise.
12547 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12548 * tree-streamer-in.c: Likewise.
12549 * tree-streamer.c (record_common_node): Likewise.
12550 * tree.c (tree_code_size): Likewise.
12551 (wide_int_to_tree_1): Likewise.
12552 (type_contains_placeholder_1): Likewise.
12553 (build_common_tree_nodes): Likewise.
12554 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12555 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12556 (POINTER_BOUNDS_P): Likewise.
12557 (BOUNDED_TYPE_P): Likewise.
12558 (BOUNDED_P): Likewise.
12559 (CALL_WITH_BOUNDS_P): Likewise.
12560 (pointer_bounds_type_node): Likewise.
12561 * value-prof.c (gimple_ic): Likewise.
12562 * var-tracking.c (vt_add_function_parameters): Likewise.
12563 * varasm.c (make_decl_rtl): Likewise.
12564 (assemble_start_function): Likewise.
12565 (output_constant): Likewise.
12566 (maybe_assemble_visibility): Likewise.
12567 * varpool.c (ctor_for_folding): Likewise.
12568 * chkp-builtins.def: Remove.
12569 * ipa-chkp.c: Remove.
12570 * ipa-chkp.h: Remove.
12571 * rtl-chkp.c: Remove.
12572 * rtl-chkp.h: Remove.
12573 * tree-chkp-opt.c: Remove.
12574 * tree-chkp.c: Remove.
12575 * tree-chkp.h: Remove.
12577 2018-06-07 Carl Love <cel@us.ibm.com>
12579 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12580 vextract_fp_from_shortl): Add BE support.
12582 2018-06-07 Paul Koning <ni1d@arrl.net>
12584 * compare-elim.c (try_merge_compare): Don't merge compare if
12585 address contains a side effect.
12586 (try_eliminate_compare): Likewise.
12588 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12590 * config.gcc: Support "tremont".
12591 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12592 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12594 * config/i386/i386.c (m_TREMONT): Define.
12595 (processor_target_table): Add "tremont".
12596 (PTA_TREMONT): Define.
12597 (ix86_lea_outperforms): Add TARGET_TREMONT.
12598 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12599 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12600 and M_INTEL_GOLDMONT_PLUS.
12601 (fold_builtin_cpu): Add "tremont".
12602 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12603 (ix86_option_override_internal): Add "tremont".
12604 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12605 (processor_type): Add PROCESSOR_TREMONT.
12606 * config/i386/x86-tune.def: Add m_TREMONT.
12607 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12609 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12611 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12612 symbol defined for msp430i* devices to be lower case.
12614 2018-06-07 Richard Biener <rguenther@suse.de>
12616 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12617 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12618 Properly wrap signed arithmetic if overflow wraps.
12620 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12622 PR tree-optimization/69615
12623 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12624 of a cast from a same precision integral SSA_NAME in a bb dominated
12625 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12626 cast to utype if rhs2 has already a compatible type.
12628 2018-06-07 Richard Biener <rguenther@suse.de>
12630 PR tree-optimization/85935
12631 * graphite-scop-detection.c (find_params_in_bb): Analyze
12632 condition operands with respect to the correct loop. Assert
12633 the analysis doesn't fail.
12635 2018-06-04 Carl Love <cel@us.ibm.com>
12637 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12638 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12639 as it is slightly cheaper.
12640 (first_match_or_eos_index_<mode>):
12641 Calculate index using natural element order.
12642 (first_match_index_<mode>):
12643 Calculate index using natural element order.
12644 (first_match_or_eos_index_<mode>):
12645 Calculate index using natural order.
12646 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12647 for BE and LE modes.
12648 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12649 P9V_BUILTIN_VCLZLSBB_V16QI.
12650 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12653 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12655 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12656 indentation and line wrap for many prototypes. Add missing
12657 @smallexample directives around block of prototypes for vec_xl and
12660 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12662 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12663 track if we pass or return IEEE 128-bit floating point.
12664 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12665 C++ mangling that is compatible with GCC 8.1.
12666 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12667 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12668 floating point types.
12669 (rs6000_function_arg_advance_1): Likewise.
12670 (rs6000_mangle_type): Optionally generate mangled names that match
12671 what GCC 8.1 generated for IEEE 128-bit floating point types.
12672 (rs6000_globalize_decl_name): If we have an external function that
12673 passes or returns IEEE 128-bit types, generate a weak reference
12674 from the mangled name used in GCC 8.1 to the current mangled
12676 (rs6000_init_builtins): Make __ibm128 use the long double type if
12677 long double is IBM extended double. Make __float128 use the long
12678 double type if long double is IEEE 128-bit.
12681 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12682 macro for __ibm128 built-in functions.
12683 (PACK_IF): Add __ibm128 pack/unpack functions.
12684 (UNPACK_IF): Likewise.
12685 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12686 enable long double built-in functions if long double is IEEE
12687 128-bit floating point.
12688 (rs6000_invalid_builtin): Update long double built-in function
12690 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12691 functions, adjust the built-in function to use the long double
12692 built-in function if __ibm128 and long double are the same type.
12693 * doc/extend.texi (PowerPC builtins): Update documention for
12694 __builtin_{,un}pack_longdouble. Add documentation for
12695 __builtin_{,un}pack_ibm128.
12697 2018-06-06 Jim Wilson <jimw@sifive.com>
12699 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12700 (struct machine_function): New field interrupt_mode.
12701 (riscv_handle_type_attribute): New function. Add forward declaration.
12702 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12703 (riscv_expand_epilogue): Check interrupt_mode field.
12704 (riscv_set_current_function): Check interrupt attribute args and
12705 set interrupt_mode field.
12706 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12707 (riscv_sret, riscv_uret): New.
12708 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12709 new arguments to interrupt attribute.
12711 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12714 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12715 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12717 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12719 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12720 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12721 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12722 several redundant entries.
12724 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12726 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12727 type from "rtx" to "rtx_insn *".
12728 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12729 for local "call_insn", removing cast.
12730 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12732 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12734 PR tree-optimization/86066
12735 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12736 for BIT_INSERT_EXPR stores.
12738 2018-06-06 Richard Biener <rguenther@suse.de>
12740 PR tree-optimization/86062
12741 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12742 component refs ontop
12743 of to be offsetted base.
12745 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12747 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12748 to be static and remove check on interrupt attribute name.
12750 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12752 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12753 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12755 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12758 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12760 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12761 Remove second argument, change how error is called.
12762 (aarch64_layout_arg): Remove second argument from
12763 aarch64_err_no_fpadvsimd call.
12764 (aarch64_init_cumulative_args): Ditto.
12765 (aarch64_gimplify_va_arg_expr): Ditto.
12766 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12768 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
12770 * config/i386/i386.md (simple_return_indirect_internal): New expander.
12771 (*simple_return_indirect_internal<mode>): Rename from
12772 simple_return_indirect_internal. Use W mode iterator.
12773 (rstorssp): New expander.
12774 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
12775 (clrssbsy): New expander.
12776 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
12778 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
12780 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12782 (cmse_check_pointed_object): Likewise.
12784 2018-06-05 Martin Liska <mliska@suse.cz>
12786 PR gcov-profile/47618
12787 * doc/invoke.texi: Document how -fprofile-dir format
12790 2018-06-05 Richard Biener <rguenther@suse.de>
12792 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12793 removal pretend DOM info isn't available so we do not update
12794 it and only remove edges, not dominated blocks. Actually free
12795 DOM info in case we removed something. Remove unreachable blocks.
12796 (mfb_keep_latches): Work with either DOM info or marked backedges.
12797 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12798 first. Mark backedges if DOM info isn't available.
12799 (Re-)compute DOM info after cleanup_control_flow_pre.
12801 2018-06-05 Richard Biener <rguenther@suse.de>
12803 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12804 (locus_discrim_hasher::hash): Adjust.
12805 (locus_discrim_hasher::equal): Likewise.
12806 (next_discriminator_for_locus): Work on line directly.
12807 (same_line_p): Pass in expanded locus1 as well.
12808 (assign_discriminators): Avoid redundant location expansions.
12810 2018-06-05 Richard Biener <rguenther@suse.de>
12812 PR tree-optimization/86046
12813 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12814 if required after clearing TREE_ADDRESSABLE.
12816 2018-06-05 Richard Biener <rguenther@suse.de>
12818 PR tree-optimization/86047
12819 * tree-ssa-loop.c (for_each_index): Glob handling of all
12820 decls and constants and really handle all of them.
12822 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12825 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12826 qualifier_void_pointer and qualifier_const_void_pointer.
12827 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12828 (arm_init_builtins): Handle the above.
12829 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12830 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12831 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12834 2018-06-05 Martin Liska <mliska@suse.cz>
12836 * auto-profile.c (read_autofdo_file): Do not use
12837 gcov_ctr_summary struct.
12838 (afdo_callsite_hot_enough_for_early_inline): Likewise.
12839 * coverage.c (struct counts_entry): Likewise.
12840 (read_counts_file): Read just single summary entry.
12841 (get_coverage_counts): Use gcov_summary struct.
12842 * coverage.h (get_coverage_counts): Likewise.
12843 * gcov-dump.c (dump_working_sets): Likewise.
12844 (tag_summary): Dump just single summary.
12845 * gcov-io.c (gcov_write_summary): Write just histogram
12847 (gcov_read_summary): Read just single summary.
12848 (compute_working_sets): Use gcov_summary struct.
12849 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12850 of GCOV_COUNTERS_SUMMABLE.
12851 (GCOV_COUNTERS_SUMMABLE): Remove.
12852 (GCOV_FIRST_VALUE_COUNTER): Replace with
12853 GCOV_COUNTER_V_INTERVAL.
12854 (struct gcov_ctr_summary): Remove.
12855 (struct gcov_summary): Directly use fields of former
12857 (compute_working_sets): Use gcov_summary struct.
12858 * gcov.c (read_count_file): Do not use ctrs fields.
12859 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12861 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12863 * profile.c: Likewise.
12864 * profile.h: Likewise.
12866 2018-06-05 Martin Liska <mliska@suse.cz>
12868 PR gcov-profile/84846
12869 * gcov.c (output_lines): Print working directory only
12870 in intermediate format.
12872 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
12874 * config/s390/s390-builtin-types.def: Add void function type.
12875 * config/s390/s390-builtins.def: Use the function type for the
12878 2018-06-04 Jim Wilson <jimw@sifive.com>
12880 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12882 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12883 and maybe_eh_return. Change regno to unsigned int. Use new args to
12884 handle EH_RETURN_DATA_REGNO registers properly.
12885 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12886 (riscv_expand_epilogue): Update comment. Change argument name and
12887 type. Update code to use new name and type. Pass new args to
12888 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
12890 * config/riscv/riscv.md (NORMAL_RETURN): New.
12891 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12892 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12893 (eh_return): Call gen_eh_return_internal and emit barrier.
12894 (eh_return_internal): Call riscv_expand_epilogue.
12896 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
12898 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12899 bit_insertion field and declare can_be_merged_into method.
12900 (merged_store_group::can_be_merged_into): New method.
12901 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12902 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
12903 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12905 2018-06-04 Richard Biener <rguenther@suse.de>
12907 PR tree-optimization/85955
12908 * builtins.c (fold_builtin_sincos): Convert pointers to
12909 destination to appropriate type before dereferencing.
12911 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
12913 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12915 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
12917 * expr.c (expand_expr_real_1): Force the operand into memory if
12918 its TYPE_MODE is BLKmode and if there is no integer mode for
12919 the number of bits being extracted.
12921 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12925 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12926 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12928 2018-06-04 Richard Biener <rguenther@suse.de>
12930 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12931 (cleanup_tree_cfg_noloop): ... single caller. Do
12932 start_recording_case_labels later.
12934 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
12936 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12937 to _IMMINTRIN_H_INCLUDED.
12938 * config/i386/pconfigintrin.h: Ditto.
12939 * config/i386/waitpkgintrin.h: Ditto.
12940 * config/i386/immintrin.h: Add includes for sgxintrin.h,
12941 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12942 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12943 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12944 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12945 waitpkgintrin.h and cldemoteintrin.h.
12947 2018-06-04 Richard Biener <rguenther@suse.de>
12949 PR tree-optimization/86038
12950 * tracer.c (find_best_successor): Check probability for
12951 being initialized, bail out if not.
12953 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
12956 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12957 of bits to ignore when comparing architectures.
12959 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12961 PR tree-optimization/69615
12962 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12963 maximum or minimum of the type, try to merge it also as if
12964 range1 is + [-, x - 1] or + [x + 1, -].
12967 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12969 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
12971 PR tree-optimization/86034
12972 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12973 the unsigned bitfield type in a bit insertion sequence if it does not
12974 have a larger precision than the bitfield size.
12975 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12977 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
12979 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12981 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12983 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12984 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12985 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12986 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12988 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12990 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12991 Disable -fdelete-null-pointer-checks for ELF toolchain.
12993 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12994 Kito Cheng <kito.cheng@gmail.com>
12996 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12997 (nds32le-*-*, nds32be-*-*): Integrate checking process.
12998 (nds32*-*-*): Add glibc and uclibc conditions.
12999 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13000 (TARGET_EXCEPT_UNWIND_INFO): Define.
13001 * config/nds32/elf.h: New file.
13002 * config/nds32/linux.h: New file.
13003 * config/nds32/nds32-elf.opt: New file.
13004 * config/nds32/nds32-linux.opt: New file.
13005 * config/nds32/nds32-fp-as-gp.c
13006 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13007 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13009 (nds32_asm_file_end): Ditto.
13010 (nds32_print_operand): Ditto.
13011 (nds32_insert_attributes): Ditto.
13012 (nds32_init_libfuncs): New function.
13013 (TARGET_HAVE_TLS): Define.
13014 (TARGET_INIT_LIBFUNCS): Define.
13015 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13017 (TARGET_ELF): Apply different mcmodel setting.
13018 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13019 been migrated into elf.h and linux.h files.
13020 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13021 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13022 (mcmodel): The content has been migrated into nds32-elf.opt and
13023 nds32-linux.opt files.
13024 * config/nds32/t-elf: New file.
13025 * config/nds32/t-linux: New file.
13027 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13028 Shiva Chen <shiva0217@gmail.com>
13030 * config/nds32/constants.md (unspec_volatile_element): Add
13031 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13032 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13034 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13035 (make_pass_nds32_fp_as_gp): Declare.
13036 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13038 (nds32_asm_function_end_prologue): Remove unused asm output.
13039 (nds32_asm_function_begin_epilogue): Remove unused asm output.
13040 (nds32_asm_file_start): Output necessary fp_as_gp information.
13041 (nds32_option_override): Adjust register usage.
13042 (nds32_expand_prologue): Consider fp_as_gp situation.
13043 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13044 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13047 (simple_return): Ditto.
13048 (omit_fp_begin): Output special directive for fp_as_gp.
13049 (omit_fp_end): Output special directive for fp_as_gp.
13050 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13051 mforbid-fp-as-gp): New options.
13053 2018-06-01 Mark Wielaard <mark@klomp.org>
13055 * dwarf2out.c (dwarf2out_finish): Remove generation of
13056 DW_AT_loclists_base.
13058 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
13060 * gimple-ssa-store-merging.c: Include gimple-fold.h.
13061 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13062 (struct merged_store_group): Add bit_insertion field.
13063 (dump_char_array): Use standard hexadecimal format.
13064 (merged_store_group::merged_store_group): Set bit_insertion to false.
13065 (merged_store_group::apply_stores): Use optimal buffer size. Deal
13066 with BIT_INSERT_EXPR stores. Move up code updating the mask and
13067 also print the mask in the dump file.
13068 (pass_store_merging::gate): Minor tweak.
13069 (imm_store_chain_info::coalesce_immediate): Fix wrong association
13070 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
13071 stores with INTEGER_CST stores.
13072 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13073 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13074 and use it throughout. Generate bit insertion sequences if need be.
13075 (pass_store_merging::process_store): Remove redundant condition.
13076 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13078 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
13080 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13081 the 128-bit floating point types. Fix function comment.
13083 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13085 * config/aarch64/aarch64-simd.md
13086 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13088 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13091 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13093 PR tree-optimization/85989
13094 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13096 (backprop::intersect_uses): Check it when deciding whether this
13097 is a backedge reference.
13098 (backprop::process_block): Add each phi to m_visited_phis
13099 after visiting it, then clear it at the end.
13101 2018-06-01 Richard Biener <rguenther@suse.de>
13103 * tree-vectorizer.h (vect_dr_stmt): New function.
13104 (vect_get_load_cost): Adjust.
13105 (vect_get_store_cost): Likewise.
13106 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13107 Use vect_dr_stmt instead of DR_SMTT.
13108 (vect_record_base_alignments): Likewise.
13109 (vect_calculate_target_alignment): Likewise.
13110 (vect_compute_data_ref_alignment): Likewise and make static.
13111 (vect_update_misalignment_for_peel): Likewise.
13112 (vect_verify_datarefs_alignment): Likewise.
13113 (vector_alignment_reachable_p): Likewise.
13114 (vect_get_data_access_cost): Likewise. Pass down
13115 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13116 (vect_get_peeling_costs_all_drs): Likewise.
13117 (vect_peeling_hash_get_lowest_cost): Likewise.
13118 (vect_enhance_data_refs_alignment): Likewise.
13119 (vect_find_same_alignment_drs): Likewise.
13120 (vect_analyze_data_refs_alignment): Likewise.
13121 (vect_analyze_group_access_1): Likewise.
13122 (vect_analyze_group_access): Likewise.
13123 (vect_analyze_data_ref_access): Likewise.
13124 (vect_analyze_data_ref_accesses): Likewise.
13125 (vect_vfa_segment_size): Likewise.
13126 (vect_small_gap_p): Likewise.
13127 (vectorizable_with_step_bound_p): Likewise.
13128 (vect_prune_runtime_alias_test_list): Likewise.
13129 (vect_analyze_data_refs): Likewise.
13130 (vect_supportable_dr_alignment): Likewise.
13131 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13132 (vect_gen_prolog_loop_niters): Likewise.
13133 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13134 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13136 (vect_recog_mask_conversion_pattern): Likewise.
13137 (vect_try_gather_scatter_pattern): Likewise.
13138 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13139 to vect_get_store_cost.
13140 (vect_get_store_cost): Get stmt_info instead of DR.
13141 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13142 (vect_get_load_cost): Get stmt_info instead of DR.
13144 2018-06-01 Richard Biener <rguenther@suse.de>
13146 PR middle-end/86017
13147 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13148 vars wrapped in MEM_REFs.
13150 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13152 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13153 Fix subreg tests so that we only return a choice between
13154 GENERAL_REGS and FP_REGS if the original classes included both.
13156 2018-06-01 Richard Biener <rguenther@suse.de>
13159 * tree-ssa-structalias.c (get_function_part_constraint):
13160 Handle NULL fi->decl.
13161 (find_func_aliases_for_call): Properly handle indirect
13162 fi from direct call.
13163 (find_func_clobbers): Likewise.
13164 (ipa_pta_execute): Likewise.
13165 (create_variable_info_for): For functions that are ifunc_resolver
13166 resolve to a varinfo that contains the result of the resolver call.
13167 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13170 2018-05-31 Michael Collison <michael.collison@arm.com>
13172 * config/aarch64/aarch64.md:
13173 (*fix_to_zero_extenddfdi2): New pattern.
13174 * gcc.target/aarch64/fix_extend1.c: New testcase.
13176 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13178 PR middle-end/78809
13179 PR middle-end/83026
13180 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13181 and BUILT_IN_STRNCMP_EQ.
13182 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13183 BUILT_IN_STRNCMP_EQ.
13184 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13185 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13186 (gimple_fold_builtin): Likewise.
13187 * tree-ssa-strlen.c (compute_string_length): New function.
13188 (determine_min_obsize): New function.
13189 (handle_builtin_string_cmp): New function to handle calls to
13190 string compare functions.
13191 (strlen_optimize_stmt): Add handling to builtin string compare
13193 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13194 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13195 * tree.c (build_common_builtin_nodes): Add new defines of
13196 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13198 2018-05-31 Jakub Jelinek <jakub@redhat.com>
13201 * bb-reorder.c (pass_partition_blocks::gate): Return false for
13202 functions with naked attribute.
13204 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
13206 * config/i386/sse.md (avx_vec_concat<mode>):
13207 Substitute concat_tg_mode mode attribute with xtg_mode.
13208 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13209 (concat_tg_mode): Remove mode attribute.
13211 2018-05-31 Martin Sebor <msebor@redhat.com>
13214 * calls.c (alloc_max_size): Correct a logic error/typo.
13215 Treat excessive arguments as infinite. Warn for invalid arguments.
13216 * doc/invoke.texi (-Walloc-size-larger-than): Update.
13218 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
13221 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13222 and movx for Haswell.
13224 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
13225 Cesar Philippidis <cesar@codesourcery.com>
13227 PR middle-end/85879
13228 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13229 when emitting error on private/firstprivate reductions.
13230 * omp-low.c (lower_omp_target): Avoid reference-type processing
13231 on pointers for firstprivate clause.
13233 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13235 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13238 * config/aarch64/aarch64-simd.md
13239 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13240 (aarch64_ld1_x3_<mode>): Likewise
13241 (aarch64_st1x2<VALLDIF:mode>): Likewise
13242 (aarch64_st1_x2_<mode>): Likewise
13243 (aarch64_st1x3<VALLDIF:mode>): Likewise
13244 (aarch64_st1_x3_<mode>): Likewise
13245 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13246 (vld1_s8_x3): Likewise.
13247 (vld1_u16_x3): Likewise.
13248 (vld1_s16_x3): Likewise.
13249 (vld1_u32_x3): Likewise.
13250 (vld1_s32_x3): Likewise.
13251 (vld1_u64_x3): Likewise.
13252 (vld1_s64_x3): Likewise.
13253 (vld1_f16_x3): Likewise.
13254 (vld1_f32_x3): Likewise.
13255 (vld1_f64_x3): Likewise.
13256 (vld1_p8_x3): Likewise.
13257 (vld1_p16_x3): Likewise.
13258 (vld1_p64_x3): Likewise.
13259 (vld1q_u8_x3): Likewise.
13260 (vld1q_s8_x3): Likewise.
13261 (vld1q_u16_x3): Likewise.
13262 (vld1q_s16_x3): Likewise.
13263 (vld1q_u32_x3): Likewise.
13264 (vld1q_s32_x3): Likewise.
13265 (vld1q_u64_x3): Likewise.
13266 (vld1q_s64_x3): Likewise.
13267 (vld1q_f16_x3): Likewise.
13268 (vld1q_f32_x3): Likewise.
13269 (vld1q_f64_x3): Likewise.
13270 (vld1q_p8_x3): Likewise.
13271 (vld1q_p16_x3): Likewise.
13272 (vld1q_p64_x3): Likewise.
13273 (vst1_s64_x2): Likewise.
13274 (vst1_u64_x2): Likewise.
13275 (vst1_f64_x2): Likewise.
13276 (vst1_s8_x2): Likewise.
13277 (vst1_p8_x2): Likewise.
13278 (vst1_s16_x2): Likewise.
13279 (vst1_p16_x2): Likewise.
13280 (vst1_s32_x2): Likewise.
13281 (vst1_u8_x2): Likewise.
13282 (vst1_u16_x2): Likewise.
13283 (vst1_u32_x2): Likewise.
13284 (vst1_f16_x2): Likewise.
13285 (vst1_f32_x2): Likewise.
13286 (vst1_p64_x2): Likewise.
13287 (vst1q_s8_x2): Likewise.
13288 (vst1q_p8_x2): Likewise.
13289 (vst1q_s16_x2): Likewise.
13290 (vst1q_p16_x2): Likewise.
13291 (vst1q_s32_x2): Likewise.
13292 (vst1q_s64_x2): Likewise.
13293 (vst1q_u8_x2): Likewise.
13294 (vst1q_u16_x2): Likewise.
13295 (vst1q_u32_x2): Likewise.
13296 (vst1q_u64_x2): Likewise.
13297 (vst1q_f16_x2): Likewise.
13298 (vst1q_f32_x2): Likewise.
13299 (vst1q_f64_x2): Likewise.
13300 (vst1q_p64_x2): Likewise.
13301 (vst1_s64_x3): Likewise.
13302 (vst1_u64_x3): Likewise.
13303 (vst1_f64_x3): Likewise.
13304 (vst1_s8_x3): Likewise.
13305 (vst1_p8_x3): Likewise.
13306 (vst1_s16_x3): Likewise.
13307 (vst1_p16_x3): Likewise.
13308 (vst1_s32_x3): Likewise.
13309 (vst1_u8_x3): Likewise.
13310 (vst1_u16_x3): Likewise.
13311 (vst1_u32_x3): Likewise.
13312 (vst1_f16_x3): Likewise.
13313 (vst1_f32_x3): Likewise.
13314 (vst1_p64_x3): Likewise.
13315 (vst1q_s8_x3): Likewise.
13316 (vst1q_p8_x3): Likewise.
13317 (vst1q_s16_x3): Likewise.
13318 (vst1q_p16_x3): Likewise.
13319 (vst1q_s32_x3): Likewise.
13320 (vst1q_s64_x3): Likewise.
13321 (vst1q_u8_x3): Likewise.
13322 (vst1q_u16_x3): Likewise.
13323 (vst1q_u32_x3): Likewise.
13324 (vst1q_u64_x3): Likewise.
13325 (vst1q_f16_x3): Likewise.
13326 (vst1q_f32_x3): Likewise.
13327 (vst1q_f64_x3): Likewise.
13328 (vst1q_p64_x3): Likewise.
13330 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13332 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13333 user_label_prefix to name.
13335 * tree-core.h: Update comment about the format of NAME string
13336 passed to handler in attribute_spec.
13338 * config/msp430/msp430.md: Remove erroneous subreg expression from
13339 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13340 zero_extend{q,h}isi2.
13342 2018-05-30 Borislav Petkov <bp@suse.de>
13344 * doc/extend.texi: Document some architecture specific
13345 constraints and sort entries.
13347 2018-05-30 Martin Sebor <msebor@redhat.com>
13349 PR middle-end/85369
13350 * builtins.c (expand_builtin_stpcpy_1): New function.
13351 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13352 only if the former succeeds.
13354 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13356 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13359 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13361 * doc/invoke.texi (-flinker-output): Document
13363 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13365 * passes.c (ipa_write_summaries): Only modify statements if body
13367 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13368 incrementally linking.
13369 (ipa_passes): Likewise.
13370 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13371 pass down resolution info.
13372 * common.opt (flag_incremental_link): Update info.
13373 * gcc.c (plugin specs): Turn flinker-output=* to
13374 -plugin-opt=-linker-output-known
13375 * toplev.c (compile_file): Also cut compilation when doing incremental
13377 * flag-types. (enum lto_partition_model): Add
13378 LTO_LINKER_OUTPUT_NOLTOREL.
13379 (invoke.texi): Add -flinker-output docs.
13380 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13381 link same way as WPA; do not stream in dead initializers.
13383 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13384 darf2out_register_external_decl): Support incremental link.
13386 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13388 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13390 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13392 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13393 it down to simple_object_copy_lto_debug_sections.
13394 (run_gcc): Determine incremental LTO link time and configure
13395 lto1 into non-wpa mode, disable renaming of debug sections.
13397 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13399 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13400 descriptions of various incorrectly documented functions.
13402 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13405 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13406 address check not strict.
13408 2018-05-30 Richard Biener <rguenther@suse.de>
13410 PR tree-optimization/85964
13411 * tracer.c (better_p): Drop initialized count check, we only
13412 call the function with initialized counts now.
13413 (find_best_successor): Do find a best edge if one
13414 has uninitialized count.
13415 (find_best_predecessor): Likewise. Do BB frequency check only
13416 if count is initialized.
13418 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13420 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13421 (aarch64_ldrstr_offset_compare): New.
13422 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13423 load/store orderings.
13424 (aarch64_gen_adjusted_ldpstp): Likewise.
13426 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13428 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13429 Check for subset of GENERAL_REGS and FP_REGS.
13430 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13433 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13435 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13436 and wi::to_poly_offset. Add the current offset and then check
13437 whether the sum fits, rather than using an unchecked addition of
13438 a checked term. Check for a shwi rather than a uhwi.
13439 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13440 (store_constructor): Use poly_int_tree_p.
13441 (expand_expr_real_1): Likewise.
13442 * function.c (assign_temp): Likewise.
13443 * fold-const.c (const_binop): Use poly_int_tree_p and
13444 wi::to_poly_offset.
13445 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13447 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13448 to_poly_offset for MEM offsets.
13449 * ipa-icf.c (sem_variable::equals): Likewise.
13450 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13451 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13452 wi::to_poly_offset for BIT_FIELD_REF offsets.
13453 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13454 wi::to_poly_offset.
13455 * var-tracking.c (emit_note_insn_var_location): Use
13456 tree_to_poly_uint64.
13458 2018-05-29 Jim Wilson <jimw@sifive.com>
13460 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13462 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13465 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13466 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13468 (sse4_1_round<mode>2): Use nonimmediate_operand
13469 for operand 1 predicate.
13471 2018-05-29 Martin Sebor <msebor@redhat.com>
13472 Richard Biener <rguenther@suse.de>
13475 * calls.c (get_size_range): Call determine_value_range instead
13476 of get_value_range..
13477 * tree-vrp.h (determine_value_range): Declared new function.
13478 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13480 2018-05-29 Richard Biener <rguenther@suse.de>
13482 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13483 sure to use non-pattern stmts for get_earlier_stmt arguments.
13484 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13485 called on pattern stmts.
13486 (get_later_stmt): Likewise.
13488 2018-05-29 Martin Liska <mliska@suse.cz>
13490 PR gcov-profile/85759
13491 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13494 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13496 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13498 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13502 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13503 VEC_PACK_FLOAT_EXPR): New tree codes.
13504 * tree-pretty-print.c (op_code_prio): Handle
13505 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13506 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13507 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13508 * tree-inline.c (estimate_operator_cost): Likewise.
13509 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13510 * fold-const.c (const_binop): Likewise.
13511 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13512 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13513 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13514 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13515 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13516 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13517 * expr.c (expand_expr_real_2): Likewise.
13518 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13519 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13520 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13522 * optabs.c (expand_widen_pattern_expr): For
13523 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13524 sign from result type rather than operand's type.
13525 (expand_binop_directly): For vec_packu_float_optab and
13526 vec_packs_float_optab allow result type to be different from operand's
13528 * optabs-tree.c (optab_for_tree_code): Handle
13529 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13530 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13531 * tree-vect-generic.c (expand_vector_operations_1): Handle
13532 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13533 VEC_PACK_FLOAT_EXPR.
13534 * tree-vect-stmts.c (supportable_widening_operation): Handle
13536 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13537 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13538 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13539 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13540 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13542 (vec_pack<floatprefix>_float_<mode>): New expander.
13543 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13545 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13546 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13547 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13548 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13549 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13551 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13552 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13553 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13554 VEC_PACK_FLOAT_EXPR): Document.
13556 2018-05-29 Richard Biener <rguenther@suse.de>
13558 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13560 (stmt_vec_info_vec): Make pointer.
13561 (init_stmt_vec_info_vec): Remove.
13562 (free_stmt_vec_info_vec): Likewise.
13563 (set_stmt_vec_info_vec): New function.
13564 (free_stmt_vec_infos): Likewise.
13565 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13566 (set_vinfo_for_stmt): Likewise.
13567 (get_earlier_stmt): Likewise.
13568 (get_later_stmt): Likewise.
13569 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13570 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13571 (vec_info::~vec_info): Free stmt_vec_infos.
13572 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13573 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13574 (pass_slp_vectorize::execute): Likewise.
13575 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13576 (free_stmt_vec_info_vec): Likewise.
13577 (set_stmt_vec_info_vec): New function.
13578 (free_stmt_vec_infos): Likewise.
13579 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13580 the global stmt_vec_info_vec.
13581 * tree-parloops.c (gather_scalar_reductions): Use
13582 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13585 2018-05-29 Richard Biener <rguenther@suse.de>
13587 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13589 2018-05-29 Martin Liska <mliska@suse.cz>
13590 David Malcolm <dmalcolm@redhat.com>
13592 * vec.c (test_reverse): New.
13593 (vec_c_tests): Add new test.
13594 * vec.h (vl_ptr>::reverse): New function.
13596 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13598 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13600 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13603 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13605 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13607 2018-05-28 Richard Biener <rguenther@suse.de>
13609 PR tree-optimization/85933
13610 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13611 look at stmts marked as vectorizable.
13613 2018-05-28 Richard Biener <rguenther@suse.de>
13615 PR tree-optimization/85934
13616 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13617 vector boolean check before scalar optimization.
13619 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13621 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13624 2018-05-28 Mark Wielaard <mark@klomp.org>
13626 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13627 if it is an expression containing a minus sign.
13629 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13631 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13633 2018-05-27 Paul Koning <ni1d@arrl.net>
13635 * config/pdp11/pdp11.md (truncsihi2): Remove.
13637 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13638 Chung-Ju Wu <jasonwucj@gmail.com>
13640 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13642 (unaligned_store_dw): Ditto.
13643 * config/nds32/nds32-memory-manipulation.c
13644 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13645 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13646 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13647 (emit_setmem_word_loop): Rename to ...
13648 (emit_setmem_doubleword_loop): ... this.
13649 (nds32_gen_dup_4_byte_to_word_value): New function.
13650 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13651 (nds32_expand_setmem_loop): Refine implementation.
13652 (nds32_expand_setmem_loop_v3m): Ditto.
13653 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13656 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13658 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13660 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13662 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13663 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13664 machine->attr_no_prologue_p.
13665 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13666 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13667 (nds32_expand_epilogue): Consider attr_naked_p.
13668 (nds32_expand_epilogue_v3pop): Likewise.
13669 (nds32_can_use_return_insn): Likewise.
13670 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13671 attr_no_prologue_p fields.
13672 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13674 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13677 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13679 * config/i386/sse.md
13680 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13682 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13684 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13686 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13688 (*<floatsuffix>floatv2div2sf2): Rename to ...
13689 (*float<floatunssuffix>v2div2sf2): ... this.
13690 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13691 (float<floatunssuffix>v2div2sf2_mask): ... this.
13692 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13693 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13694 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13696 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13698 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13700 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13702 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13704 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13706 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13707 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13708 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13709 gen_ufix_truncv8dfv8si2.
13710 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13711 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13712 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13713 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13714 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13715 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13716 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13717 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13719 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13723 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13725 2018-05-25 Jim Wilson <jimw@sifive.com>
13727 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13728 * config/riscv/riscv.c (struct machine_function): Add
13729 interrupt_handler_p and attribute_checked_p fields.
13730 (riscv_attribute_table): Add interrupt.
13731 (riscv_interrupt_type_p): New.
13732 (riscv_save_reg_p): Save extra regs for interrupt handler.
13733 (riscv_use_save_libcall): Return false for interrupt handler.
13734 (riscv_first_stack_step): Add forward declaration.
13735 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13736 for interrupt handler with large frame. Use it for saved reg list.
13737 (riscv_expand_prologue): Move flag_stack_usage_info support to
13738 eliminate duplication.
13739 (riscv_expand_epilogue): Generate mret for interrupt handler.
13740 (riscv_epilogue_uses): New.
13741 (riscv_can_use_return_insn): Return false for interrupt handler.
13742 (riscv_function_ok_for_sibcall): Likewise.
13743 (riscv_set_current_function): Add interrupt handler support.
13744 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13745 * config/riscv/riscv.md (UNSPECV_MRET): New.
13747 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13749 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13751 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13753 PR tree-optimization/85712
13754 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13755 this candidate has already been replaced in-situ by a copy.
13757 2018-05-25 Jason Merrill <jason@redhat.com>
13759 PR c++/80485 - inline function non-zero address.
13760 * symtab.c (nonzero_address): Check DECL_COMDAT.
13762 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13765 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13766 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13767 extension of SImode operation. Use const123_operand predicate.
13768 (*saddsi_1): Remove.
13769 (*saddl_se_1): Ditto.
13770 (*ssubsi_1): Ditto.
13771 (*ssubl_se_1): Ditto.
13772 * config/alpha/predicates.md (const123_operand): New predicate.
13773 * config/alpha/constraints.md (P): Use IN_RANGE.
13775 2018-05-25 Richard Biener <rguenther@suse.de>
13777 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13779 (ref_maybe_used_by_stmt_p): Likewise.
13780 (stmt_may_clobber_ref_p): Likewise.
13781 (stmt_may_clobber_ref_p_1): Likewise.
13782 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13784 (ref_maybe_used_by_stmt_p): Likewise.
13785 (stmt_may_clobber_ref_p): Likewise.
13786 (stmt_may_clobber_ref_p_1): Likewise.
13787 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13788 the alias oracle to disambiguate DRs with stmts DR analysis
13790 (vect_analyze_data_refs): Do not give up on not analyzable
13791 DRs for BB vectorization. Remove code truncating the dataref
13794 2018-05-25 Jakub Jelinek <jakub@redhat.com>
13797 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13798 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
13799 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13801 2018-05-25 Richard Biener <rguenther@suse.de>
13803 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13804 function, combining stmt data ref gathering and fatal analysis
13806 (vect_analyze_data_refs): Remove now redudnant code and simplify.
13807 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13808 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13809 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13810 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13812 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13814 PR tree-optimization/85720
13815 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13816 SCC if all partitions are builtins.
13817 (version_loop_by_alias_check): New parameter. Generate cancelable
13818 runtime alias check if all partitions are builtins.
13819 (distribute_loop): Update call to above function.
13821 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13823 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13824 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13825 (parm_default_def_partition_arg): Ditto.
13826 (set_parm_default_def_partition): Ditto.
13827 (get_parm_default_def_partitions): Ditto and make it static.
13828 (get_undefined_value_partitions): Ditto and make it static.
13829 (remove_ssa_form): Refactor call to init_var_map here.
13830 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13831 computation for loop region.
13832 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13833 (register_default_def): Delete.
13834 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13835 (parm_default_def_partition_arg): Ditto.
13836 (set_parm_default_def_partition): Ditto.
13837 (get_parm_default_def_partitions): Ditto and make it static.
13838 (get_undefined_value_partitions): Ditto and make it static.
13839 (coalesce_with_default, coalesce_with_default): Update comment.
13840 (create_coalesce_list_for_region): New func factored out from
13841 create_outofssa_var_map.
13842 (populate_coalesce_list_for_outofssa): New func factored out from
13843 create_outofssa_var_map and coalesce_ssa_name.
13844 (create_outofssa_var_map): Delete.
13845 (coalesce_ssa_name): Refactor to support live range computation.
13846 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13847 (get_parm_default_def_partitions): Delete.
13848 (get_undefined_value_partitions): Ditto.
13849 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13850 computation for loop region.
13851 (new_tree_live_info, loe_visit_block): Ditto.
13852 (live_worklist, set_var_live_on_entry): Ditto.
13853 (calculate_live_on_exit, verify_live_on_entry): Ditto.
13854 * tree-ssa-live.h (struct _var_map): New fields.
13855 (init_var_map): Change decl.
13856 (region_contains_p): New.
13858 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13860 * tree-ssa-live.h (live_merge_and_clear): Delete.
13862 2018-05-25 Richard Biener <rguenther@suse.de>
13865 * tree-dump.c (dequeue_and_dump): Remove access to removed
13866 operand 2 of a SWITCH_EXPR.
13868 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13870 * doc/sourcebuild.texi (vect_double_cond_arith): Include
13871 multiplication and division.
13872 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13873 (cond_udiv@var{m}, cond_umod@var{m}): Document.
13874 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13875 (cond_udiv_optab, cond_umod_optab): New optabs.
13876 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13877 (IFN_COND_RDIV): New internal functions.
13878 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13879 TRUNC_MOD_EXPR and RDIV_EXPR.
13880 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13881 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13883 (SVE_INT_BINARY): Include mult.
13884 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13885 (optab, sve_int_op): Handle mult.
13886 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13888 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13889 for SVE_INT_BINARY_SD.
13891 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13893 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13894 (optab, sve_int_op): Handle div and udiv.
13895 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13896 for SVE_INT_BINARY_SD.
13897 (*<optab><mode>3): New insn for the same.
13899 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13901 * tree-vect-patterns.c: Include predict.h.
13902 (vect_recog_divmod_pattern): Restrict check for division support
13903 to when optimizing for size.
13905 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13907 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13908 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13909 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13910 (gimple_match_op::set_op): Likewise.
13911 (gimple_resimplify4): Declare.
13912 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13913 (expr::gen_transform): Likewise.
13914 (decision_tree::gen): Generate a simplification routine for 4 operands.
13915 * gimple-match-head.c (gimple_simplify): Add an overload for
13916 4 operands. In the top-level function, handle up to 4 call
13917 arguments and call gimple_resimplify4.
13918 (gimple_resimplify4): New function.
13919 (build_call_internal): Pass a fourth operand.
13920 (maybe_push_to_seq): Likewise.
13921 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13922 Fold VEC_COND_EXPRs of an operation and a default value into
13923 an IFN_COND_* function if possible.
13924 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13926 (SVE_COND_FP_BINARY): Include them.
13927 (optab, sve_fp_op): Handle them.
13928 (SVE_INT_BINARY_REV): New code iterator.
13929 (SVE_COND_FP_BINARY_REV): New int iterator.
13930 (commutative): New int attribute.
13931 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13933 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13935 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13936 (*cond_<optab><mode>): New patterns for reversed operands.
13938 2018-05-25 Richard Biener <rguenther@suse.de>
13940 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13941 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13942 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13943 (STMT_VINFO_GROUPED_ACCESS): Adjust.
13944 * tree-vect-data-refs.c (everywhere): Adjust users.
13945 * tree-vect-loop.c (everywhere): Likewise.
13946 * tree-vect-slp.c (everywhere): Likewise.
13947 * tree-vect-stmts.c (everywhere): Likewise.
13948 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13950 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13952 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13954 (gcc_cv_as_section_exclude): ... this.
13955 Try Solaris as #exclude syntax.
13956 * configure: Regenerate.
13957 * config.in: Regenerate.
13958 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13960 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13961 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13963 * varasm.c (default_elf_asm_named_section): Don't check if
13964 HAVE_GAS_SECTION_EXCLUDE is defined.
13966 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13968 * doc/md.texi: Update the documentation of the cond_* optabs
13969 to mention the new final operand. Fix GET_MODE_NUNITS call.
13970 Describe the scalar case too.
13971 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13972 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13974 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13975 (get_conditional_internal_fn): Update comment.
13976 * tree-vect-loop.c (vectorizable_reduction): Pass the original
13977 accumulator value as a final argument to conditional functions.
13978 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13979 a define_expand and add an "else" operand. Assert for now that
13980 the else operand is equal to operand 2. Use SVE_INT_BINARY and
13981 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13982 (*cond_<optab><mode>): New patterns.
13983 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13984 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13985 (UNSPEC_COND_EOR): Delete.
13986 (optab): Remove associated mappings.
13987 (SVE_INT_BINARY): New code iterator.
13988 (sve_int_op): Remove int attribute and add "minus" to the code
13990 (SVE_COND_INT_OP): Delete.
13991 (SVE_COND_FP_OP): Rename to...
13992 (SVE_COND_FP_BINARY): ...this.
13994 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13996 * optabs.c (can_reuse_operands_p): New function.
13997 (maybe_legitimize_operands): Try to reuse the results for
14000 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14002 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14003 Add {q} suffix to insn mnemonic.
14005 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14007 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14008 (msp430_warn_func_return): New.
14010 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
14012 * fold-const.c (tree_nonzero_bits): New function.
14013 * fold-const.h (tree_nonzero_bits): Likewise.
14014 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14015 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14017 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14021 * varasm.c (assemble_alias): Check ifunc_resolver only on
14024 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14027 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14028 when memory input operand is handled.
14030 2018-05-24 Luis Machado <luis.machado@linaro.org>
14032 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14034 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14036 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14038 * match.pd: Delay FMA folds until after vectorization.
14040 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
14043 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14044 address check not strict.
14046 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14048 * gimple-match.h (gimple_match_op): New class.
14049 (mprts_hook): Replace parameters with a gimple_match_op *.
14050 (maybe_build_generic_op): Likewise.
14051 (gimple_simplified_result_is_gimple_val): Replace parameters with
14052 a const gimple_match_op *.
14053 (gimple_simplify): Replace code_helper * and tree * parameters with
14054 a gimple_match_op * parameter.
14055 (gimple_resimplify1): Replace code_helper *, tree and tree *
14056 parameters with a gimple_match_op * parameter.
14057 (gimple_resimplify2): Likewise.
14058 (gimple_resimplify3): Likewise.
14059 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14060 parameters with a gimple_match_op * parameter.
14061 * gimple-match-head.c (gimple_simplify): Change prototypes of
14062 auto-generated functions to take a gimple_match_op * instead of
14063 separate code_helper * and tree * parameters. Make the same
14064 change in the top-level overload and update calls to the
14065 gimple_resimplify routines. Update calls to the auto-generated
14066 functions and to maybe_push_res_to_seq in the publicly-facing
14067 operation-specific gimple_simplify overloads.
14068 (gimple_match_op::MAX_NUM_OPS): Define.
14069 (gimple_resimplify1): Replace rcode and ops with a single res_op
14070 parameter. Update call to gimple_simplify.
14071 (gimple_resimplify2): Likewise.
14072 (gimple_resimplify3): Likewise.
14073 (mprts_hook): Replace parameters with a gimple_match_op *.
14074 (maybe_build_generic_op): Likewise.
14075 (build_call_internal): Replace type, nargs and ops with
14076 a gimple_match_op *.
14077 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14078 with a single gimple_match_op *. Update calls to mprts_hook,
14079 build_call_internal and gimple_simplified_result_is_gimple_val.
14080 Factor out code that is common to the tree_code and combined_fn cases.
14081 * genmatch.c (expr::gen_transform): Replace tem_code and
14082 tem_ops with a gimple_match_op called tem_op. Update calls
14083 to the gimple_resimplify functions and maybe_push_res_to_seq.
14084 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14085 res_ops. Update call to the gimple_resimplify functions.
14086 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14087 (decision_tree::gen): Make the functions take a gimple_match_op *
14088 called res_op instead of separate res_code and res_ops parameters.
14089 Update call accordingly.
14090 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14091 and ops with a single res_op parameter. Update calls to
14092 maybe_build_generic_op and maybe_push_res_to_seq.
14093 (fold_stmt_1): Update calls to gimple_simplify and
14094 replace_stmt_with_simplification.
14095 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14096 and gimple_simplified_result_is_gimple_val.
14097 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14099 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14100 with a gimple_match_op *.
14101 (vn_nary_build_or_lookup): Likewise. Update call to
14102 vn_nary_build_or_lookup_1.
14103 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14104 gimple_match_op *. Update calls to the gimple_resimplify routines
14105 and to gimple_simplified_result_is_gimple_val.
14106 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14107 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14108 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14109 (visit_nary_op): Likewise.
14110 (visit_reference_op_load): Likewise.
14112 2018-05-23 Luis Machado <luis.machado@linaro.org>
14114 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14115 modifier for printing the step amount.
14117 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14120 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14123 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14125 * doc/sourcebuild.texi (Endianness): New subsubsection.
14127 2018-05-23 Luis Machado <luis.machado@linaro.org>
14129 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14130 <prefetch_dynamic_strides>: New const bool field.
14131 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14132 prefetch_dynamic_strides.
14133 (exynosm1_prefetch_tune): Likewise.
14134 (thunderxt88_prefetch_tune): Likewise.
14135 (thunderx_prefetch_tune): Likewise.
14136 (thunderx2t99_prefetch_tune): Likewise.
14137 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14139 (aarch64_override_options_internal): Update to set
14140 PARAM_PREFETCH_DYNAMIC_STRIDES.
14141 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14142 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14143 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14144 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14145 prefetch-dynamic-strides setting.
14147 2018-05-23 Luis Machado <luis.machado@linaro.org>
14149 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14150 <minimum_stride>: New const int field.
14151 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14152 minimum_stride field defaulting to -1.
14153 (exynosm1_prefetch_tune): Likewise.
14154 (thunderxt88_prefetch_tune): Likewise.
14155 (thunderx_prefetch_tune): Likewise.
14156 (thunderx2t99_prefetch_tune): Likewise.
14157 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14158 <default_opt_level>: Set to 3.
14159 (aarch64_override_options_internal): Update to set
14160 PARAM_PREFETCH_MINIMUM_STRIDE.
14161 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14162 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14163 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14164 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14165 stride is constant and is below the minimum stride threshold.
14167 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14169 * config/arm/arm-cpus.in (mode26): Delete.
14170 (armv4): Delete mode26 reference.
14171 * config/arm/arm.c (arm_configure_build_target): Delete use of
14174 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14176 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14178 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14179 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
14181 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
14182 (floatunsdidf2): Ditto.
14184 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14186 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14187 (fixuns_trunc<mode>si2_avx512f): Ditto.
14188 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14189 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14190 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14192 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14194 PR rtl-optimization/79985
14195 * df-scan.c (df_insn_refs_collect): Remove special case for
14196 global registers and asm statements.
14198 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14200 * extend.texi (Global Register Variables): Rewrite the bullet list.
14201 Note that the register is available for allocation. Note that access
14202 via inline asm must use constraints. Add note about async-signal
14203 handlers. Remove paragraph about automagic register selection.
14205 2018-05-23 Richard Biener <rguenther@suse.de>
14207 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14208 of fixed offset from memset VN.
14210 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
14212 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14213 first_interp field.
14214 (alloc_cand_and_find_basis): Initialize first_interp field.
14215 (slsr_process_mul): Modify first_interp field.
14216 (slsr_process_add): Likewise.
14217 (slsr_process_cast): Modify first_interp field for each new
14219 (slsr_process_copy): Likewise.
14220 (dump_candidate): Dump first_interp field.
14221 (replace_mult_candidate): Process all interpretations, not just
14223 (replace_rhs_if_not_dup): Likewise.
14224 (replace_one_candidate): Likewise.
14226 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
14228 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14230 (aarch64_needs_frame_chain): New function.
14231 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14233 2018-05-23 Sudakshina Das <sudi.das@arm.com>
14236 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14237 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14238 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14239 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14240 as true for strict-align.
14241 (aarch64_can_inline_p): Perform checks even when callee has no
14242 attributes to check for strict alignment.
14243 * doc/extend.texi (AArch64 Function Attributes): Document
14245 * doc/invoke.texi: (AArch64 Options): Likewise.
14247 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14249 PR tree-optimization/85853
14250 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14251 the handling of the root of the node to...
14252 (vect_slp_analyze_node_operations_1): ...this new function,
14253 and run the whole thing with the child nodes' def types
14254 set according to their SLP node's def type.
14256 2018-05-23 Richard Biener <rguenther@suse.de>
14258 PR middle-end/85874
14259 * tree-data-ref.c (create_runtime_alias_checks): Defer
14260 and ignore overflow warnings.
14262 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14264 PR tree-optimization/85822
14265 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14268 2018-05-23 Richard Biener <rguenther@suse.de>
14270 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14271 memset constants via native_interpret_expr.
14273 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14276 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14278 (cgraph_node::create_alias): Likewise.
14279 (cgraph_node::get_availability): Check ifunc_resolver instead
14280 of looking up ifunc attribute.
14281 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14282 * varasm.c (do_assemble_alias): Likewise.
14283 (assemble_alias): Likewise.
14284 (default_binds_local_p_3): Likewise.
14285 * cgraph.h (cgraph_node): Add ifunc_resolver.
14286 (cgraph_node::only_called_directly_or_aliased_p): Return false
14287 for IFUNC resolver.
14288 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14290 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14291 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14292 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14293 instead of looking up ifunc attribute.
14295 2018-05-22 Luis Machado <luis.machado@linaro.org>
14297 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14299 2018-05-22 Martin Sebor <msebor@redhat.com>
14301 PR middle-end/85359
14302 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14303 only when expasion succeeds.
14304 (expand_builtin_strcmp): Same.
14305 (expand_builtin_strncmp): Same.
14307 2018-05-22 Martin Sebor <msebor@redhat.com>
14309 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14311 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14312 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14314 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14315 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14317 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14318 Add check for legitimate_address.
14319 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14320 (aarch64_swap_ldrstr_operands): New.
14321 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14324 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14325 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14327 * config/aarch64/aarch64.md: New patterns to generate stp
14329 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14330 single words and double words.
14331 (load_pair_sw, load_pair_dw): Likewise.
14332 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14334 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14336 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14337 for different mode ldpstp and add peephole for merged zero stores.
14338 Likewise for loads.
14339 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14341 (aarch64_gen_store_pair): Rename calls to match new patterns.
14342 (aarch64_gen_load_pair): Rename calls to match new patterns.
14343 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14344 (load_pair<DREG:mode><DREG2:mode>): ... This.
14345 (store_pair<mode>): Rename to...
14346 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14347 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14348 New mode iterators.
14349 (V_INT_EQUIV): Handle SImode.
14350 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14353 2018-05-22 Martin Sebor <msebor@redhat.com>
14356 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14357 or ajust the presumed bound on an operation to avoid unnecessary
14360 2018-05-22 Martin Sebor <msebor@redhat.com>
14362 PR tree-optimization/85826
14363 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14364 assuming that a DECL necesarily has a constant size.
14366 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14368 PR middle-end/85862
14369 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14371 2018-05-22 Richard Biener <rguenther@suse.de>
14373 PR tree-optimization/85834
14374 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14375 non-constant and non-zero memset arguments.
14377 2018-05-22 Martin Liska <mliska@suse.cz>
14380 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14382 2018-05-22 Richard Biener <rguenther@suse.de>
14384 PR tree-optimization/85863
14385 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14386 comparisons when vectype is specified.
14387 (vectorizable_condition): Do not specify vectype for
14388 vect_is_simple_cond when SLP vectorizing.
14390 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14393 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14394 define __ibm128 as long double.
14395 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14396 as a distinct type when IEEE 128-bit support is enabled.
14397 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14398 128-bit types to use the correct functions.
14399 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14400 convert between 128-bit floating point types that have different
14401 modes but the same representation, instead of using gen_lowpart to
14403 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14405 (IFKF_reg): New attributes to give the register constraints for
14407 (extend<mode>tf2_internal): New insns to mark an explicit
14408 conversion between 128-bit floating point types that have a
14409 different mode but share the same representation.
14411 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14413 PR tree-optimization/85814
14414 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14415 a null return from get_strinfo when unsharing the next
14416 strinfo in the chain.
14418 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14421 * varasm.c (weak_finish): Clean up weak_decls.
14423 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14425 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14426 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14427 UNSPEC_UADALP values.
14428 * config/aarch64/iterators.md (ABAL): New int iterator.
14431 (sur): Add mappings for the above.
14432 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14434 (aarch64_<sur>abal<mode>_4): Likewise.
14435 (aarch64_<sur>adalp<mode>_3): Likewise.
14436 (<sur>sadv16qi): New define_expand.
14438 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14440 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14441 (*movdf_internal): Ditto.
14442 (*rcpsf2_sse): Ditto.
14443 (*rsqrtsf2_sse): Ditto.
14444 (*sqrt<mode>2_sse): Ditto.
14446 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14448 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14450 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14451 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14452 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14453 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14455 * config/aarch64/arm_neon.h: Likewise.
14456 * config/aarch64/iterators.md (VQ_I): New.
14458 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14460 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14462 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14465 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14467 * config/nds32/constraints.md (S): New constraint.
14468 * config/nds32/nds32.md (call_internal): Use constraint S.
14469 (call_value_internal): Likewise.
14470 (sibcall_internal): Likewise.
14471 (sibcall_value_internal): Likewise.
14473 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14474 Chung-Ju Wu <jasonwucj@gmail.com>
14476 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14477 into consideration.
14479 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14480 Chung-Ju Wu <jasonwucj@gmail.com>
14482 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14483 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14484 (nds32_rtx_costs_impl): Simplify.
14485 (nds32_address_cost_impl): Simplify.
14486 (nds32_init_rtx_costs): New function.
14487 (nds32_rtx_costs_speed_prefer): Likewise.
14488 (nds32_rtx_costs_size_prefer): Likewise.
14489 (nds32_address_cost_speed_prefer): Likewise.
14490 (nds32_address_cost_speed_fwprop): Likewise.
14491 (nds32_address_cost_size_prefer): Likewise.
14492 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14493 * config/nds32/nds32.c (nds32_option_override): Use
14494 nds32_init_rtx_costs function.
14496 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14498 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14499 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14500 (TARGET_PIPELINE_N8): Likewise.
14501 (TARGET_PIPELINE_N10): Likewise.
14502 (TARGET_PIPELINE_N13): Likewise.
14503 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14505 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14507 * config/nds32/nds32-fpu.md: Update copyright year.
14509 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14511 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14513 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14515 * config/nds32/nds32.c
14516 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14517 * config/nds32/nds32.opt (minline-asm-r15): New option.
14519 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14521 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14523 * config/nds32/nds32.md (abssi2): New pattern.
14525 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14527 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14528 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14529 Merge insn pattern from sse_cvtsi2ss<round_name> and
14530 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14531 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14532 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14533 using SWI48 mode iterator.
14534 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14535 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14536 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14537 pattern from sse_cvttss2si<round_saeonly_name>
14538 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14539 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14540 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14541 using SWI48 mode iterator.
14542 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14543 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14544 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14545 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14546 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14547 using SWI48 mode iterator.
14548 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14549 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14550 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14551 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14552 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14553 SWI48 mode iterator.
14554 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14555 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14556 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14557 pattern from sse_cvttsd2si<round_saeonly_name>
14558 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14560 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14562 * config/nds32/nds32-md-auxiliary.c
14563 (nds32_valid_smw_lwm_base_p): Refine.
14564 (nds32_output_smw_single_word): Refine.
14565 (nds32_output_smw_double_word): New.
14566 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14568 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14570 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14571 (nds32_output_stack_pop): Refine.
14572 (nds32_expand_unaligned_load): Refine.
14573 (nds32_expand_unaligned_store): Refine.
14575 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14576 Chung-Ju Wu <jasonwucj@gmail.com>
14578 * config/nds32/constants.md: Add TP_REGNUM constant.
14579 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14580 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14582 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14583 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14584 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14585 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14586 and PIC code generation.
14587 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14589 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14591 * config/nds32/nds32.md: Support TLS and PIC.
14592 * config/nds32/nds32.c: Support TLS and PIC.
14593 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14594 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14597 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14599 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14600 mode with E_ prefix.
14602 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14603 Chung-Ju Wu <jasonwucj@gmail.com>
14605 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14606 * config/nds32/nds32-md-auxiliary.c
14607 (symbolic_reference_mentioned_p): New.
14608 (nds32_legitimize_ict_address): New.
14609 (nds32_expand_ict_move): New.
14610 (nds32_indirect_call_referenced_p): New.
14611 (nds32_symbol_binds_local_p): Delete.
14612 (nds32_long_call_p): Modify.
14613 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14614 * config/nds32/nds32-protos.h
14615 (symbolic_reference_mentioned_p): Declare.
14616 (nds32_legitimize_ict_address): Declare.
14617 (nds32_expand_ict_move): Declare.
14618 (nds32_indirect_call_referenced_p): Declare.
14619 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14620 (nds32_relax_group): Use nds32_ict_const_p as condition.
14621 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14622 (nds32_asm_file_start): Output ict_model directive in asm code.
14623 (nds32_legitimate_address_p): Consider indirect call.
14624 (nds32_print_operand): Consider indirect call.
14625 (nds32_print_operand_address): Consider indirect call.
14626 (nds32_insert_attributes): Handle "indirect_call" attribute.
14627 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14628 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14629 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14630 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14631 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14632 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14633 (TARGET_ICT_MODEL_SMALL): Define.
14634 (TARGET_ICT_MODEL_LARGE): Define.
14635 * config/nds32/nds32.md (movsi): Consider ict model.
14636 (call, call_value): Consider ict model.
14637 (sibcall, sibcall_value): Consider ict model.
14638 * config/nds32/nds32.opt (mict-model): New option.
14639 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14642 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14643 Monk Chiang <sh.chiang04@gmail.com>
14644 Jim Wilson <jimw@sifive.com>
14646 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14647 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14648 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14649 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14650 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14651 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14652 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14653 compute save_libcall_adjustment properly.
14654 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14655 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14656 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14657 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14658 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14659 (ABI_SPEC): Handle mabi=ilp32e.
14660 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14661 (RVE): Add RVE mask.
14662 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14663 <-march>: Add rv32e as an example.
14665 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14668 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14669 (intra_create_variable_infos): Handle C++ constructors.
14671 2018-05-18 Martin Liska <mliska@suse.cz>
14673 * passes.def: Remove a redundant pass.
14675 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14678 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14680 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14682 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14684 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14686 (armv2, armv2a, armv3, armv3m): Delete architectures.
14687 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14688 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14689 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14691 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14692 (*mulsidi3adddi): Likewise.
14693 (mulsidi3): Likewise.
14694 (*mulsidi3_nov6): Likewise.
14695 (umulsidi3): Likewise.
14696 (umulsidi3_nov6): Likewise.
14697 (umaddsidi4): Likewise.
14698 (*umulsidi3adddi): Likewise.
14699 (smulsi3_highpart): Likewise.
14700 (*smulsi3_highpart_nov6): Likewise.
14701 (umulsi3_highpart): Likewise.
14702 (*umulsi3_highpart_nov6): Likewise.
14703 * config/arm/arm.h (arm_arch3m): Delete.
14704 * config/arm/arm.c (arm_arch3m): Delete.
14705 (arm_option_override_internal): Update armv3-related comment.
14706 (arm_configure_build_target): Delete use of isa_bit_mode32.
14707 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14708 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14709 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14710 (mulsa3): Likewise.
14711 (mulusa3): Likewise.
14712 * config/arm/arm-protos.h (arm_arch3m): Delete.
14713 * config/arm/arm-tables.opt: Regenerate.
14714 * config/arm/arm-tune.md: Likewise.
14715 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14716 deleted architectures.
14718 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14720 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14721 (armv5t, armv5te): New features.
14722 (ARMv5, ARMv5e): Delete fgroups.
14723 (ARMv5t, ARMv5te): Adjust for above changes.
14724 (ARMv6m): Likewise.
14725 (armv5, armv5e): Delete arches.
14726 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14728 (*call_reg_arm): Likewise.
14729 (*call_value_reg_armv5): Likewise.
14730 (*call_value_reg_arm): Likewise.
14731 (*call_symbol): Likewise.
14732 (*call_value_symbol): Likewise.
14733 (*sibcall_insn): Likewise.
14734 (*sibcall_value_insn): Likewise.
14735 (clzsi2): Likewise.
14736 (prefetch): Likewise.
14737 (define_split and define_peephole2 dependent on arm_arch5):
14739 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14741 (TARGET_ARM_QBIT): Likewise.
14742 (TARGET_DSP_MULTIPLY): Likewise.
14743 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14744 (arm_arch5, arm_arch5e): Delete.
14745 (arm_arch5t, arm_arch5te): Declare.
14746 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14747 (arm_arch5t): Declare.
14748 (arm_option_reconfigure_globals): Update for the above.
14749 (arm_options_perform_arch_sanity_checks): Update comment, replace
14750 use of arm_arch5 with arm_arch5t.
14751 (use_return_insn): Likewise.
14752 (arm_emit_call_insn): Likewise.
14753 (output_return_instruction): Likewise.
14754 (arm_final_prescan_insn): Likewise.
14755 (arm_coproc_builtin_available): Likewise.
14756 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14757 arm_arch5e with arm_arch5t and arm_arch5te.
14758 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14759 (arm_arch5t, arm_arch5te): Declare.
14760 * config/arm/arm-tables.opt: Regenerate.
14761 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14762 * config/arm/t-multilib: Likewise.
14763 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14764 instead of arm_arch5.
14765 (*call_reg_thumb1): Likewise.
14766 (*call_value_reg_thumb1_v5): Likewise.
14767 (*call_value_reg_thumb1): Likewise.
14768 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14770 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14772 2018-05-18 Martin Liska <mliska@suse.cz>
14774 PR gcov-profile/84846
14775 * doc/gcov.texi: Document -t option of gcov tool.
14777 2018-05-18 Martin Liska <mliska@suse.cz>
14779 PR gcov-profile/84846
14780 * gcov.c (print_usage): Add new -t option.
14781 (process_args): Handle the option.
14782 (generate_results): Use stdout as output when requested by
14785 2018-05-18 Martin Liska <mliska@suse.cz>
14787 PR gcov-profile/84846
14788 * coverage.c (coverage_init): Write PWD to .gcno file.
14789 * doc/gcov.texi: Document how working directory is printed.
14790 * gcov-dump.c (dump_gcov_file): Print PWD.
14791 * gcov.c (output_intermediate_file): Likewise.
14792 (read_graph_file): Read PWD string.
14793 (output_lines): Print PWD.
14795 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14797 PR middle-end/85817
14798 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14799 for retval and return false if all args to phi are zero.
14801 2018-05-18 Richard Biener <rguenther@suse.de>
14803 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14805 (evrp_dom_walker::before_dom_children): Call it.
14807 2018-05-18 Richard Biener <rguenther@suse.de>
14809 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14810 results when processing array refs with variable index.
14812 2018-05-18 Toon Moene <toon@moene.org>
14814 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14815 directly after that of -floop-interchange. Indicate that both
14816 options are enabled by default when specifying -O3.
14818 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14820 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14821 iterator. Delete separate integer-mode vec_set<mode> expander.
14822 (aarch64_simd_vec_setv2di): Delete.
14823 (vec_setv2di): Delete.
14824 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14825 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
14826 the "w, r" alternative.
14828 2018-05-18 Martin Liska <mliska@suse.cz>
14830 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14831 * tree-pass.h (make_pass_lower_switch_O0): New function.
14832 * tree-switch-conversion.c (node_has_low_bound): Remove.
14833 (node_has_high_bound): Likewise.
14834 (node_is_bounded): Likewise.
14835 (class pass_lower_switch): Make it a template type and create
14837 (pass_lower_switch::execute): Add template argument.
14838 (make_pass_lower_switch): New function.
14839 (make_pass_lower_switch_O0): New function.
14840 (do_jump_if_equal): Remove.
14841 (emit_case_nodes): Simplify to just handle all 3 cases and leave
14842 all the hard work to tree optimization passes.
14844 2018-05-18 Martin Liska <mliska@suse.cz>
14846 * dbgcnt.c (limit_low): Renamed from limit.
14847 (limit_high): New variable.
14848 (dbg_cnt_is_enabled): Check for upper limit.
14849 (dbg_cnt): Adjust dumping.
14850 (dbg_cnt_set_limit_by_index): Add new argument for high
14852 (dbg_cnt_set_limit_by_name): Likewise.
14853 (dbg_cnt_process_single_pair): Parse new format.
14854 (dbg_cnt_process_opt): Use strtok.
14855 (dbg_cnt_list_all_counters): Remove 'value' and add
14857 * doc/invoke.texi: Document changes.
14859 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
14861 * doc/sourcebuild.texi (scalar_all_fma): Document.
14862 * tree.def (FMA_EXPR): Delete.
14863 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14864 * internal-fn.c (ternary_direct): New macro.
14865 (expand_ternary_optab_fn): Likewise.
14866 (direct_ternary_optab_supported_p): Likewise.
14867 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14868 * builtins.c (fold_builtin_fma): Delete.
14869 (fold_builtin_3): Don't call it.
14870 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14871 * expr.c (expand_expr_real_2): Likewise.
14872 * fold-const.c (operand_equal_p): Likewise.
14873 (fold_ternary_loc): Likewise.
14874 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14875 * gimple.c (DEFTREECODE): Likewise.
14876 * gimplify.c (gimplify_expr): Likewise.
14877 * optabs-tree.c (optab_for_tree_code): Likewise.
14878 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14879 * tree-eh.c (operation_could_trap_p): Likewise.
14880 (stmt_could_throw_1_p): Likewise.
14881 * tree-inline.c (estimate_operator_cost): Likewise.
14882 * tree-pretty-print.c (dump_generic_node): Likewise.
14883 (op_code_prio): Likewise.
14884 * tree-ssa-loop-im.c (stmt_cost): Likewise.
14885 * tree-ssa-operands.c (get_expr_operands): Likewise.
14886 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14887 * fold-const-call.h (fold_fma): Delete.
14888 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14889 CFN_FNMA and CFN_FNMS.
14890 (fold_fma): Delete.
14891 * genmatch.c (combined_fn): New enum.
14892 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14893 (commutative_op): New function.
14894 (commutate): Use it. Handle more than 2 operands.
14895 (dt_operand::gen_gimple_expr): Use commutative_op.
14896 (parser::parse_expr): Allow :c to be used with non-binary
14897 operators if the commutative operand is known.
14898 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14899 CFN_FMS, CFN_FNMA and CFN_FNMS.
14900 (backprop::process_assign_use): Remove FMA_EXPR handling.
14901 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14902 (gen_hsa_fma): New function.
14903 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14904 IFN_FNMA and IFN_FNMS.
14905 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14906 * gimple-fold.h (follow_all_ssa_edges): Declare.
14907 * gimple-fold.c (follow_all_ssa_edges): New function.
14908 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14909 gimple_build interface and use follow_all_ssa_edges to fold the result.
14910 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14911 instead of checking for optabs directly.
14912 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14913 rather than FMA_EXPRs.
14914 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14915 call to IFN_FMA instead of an FMA_EXPR.
14917 2018-05-17 Jim Wilson <jimw@sifive.com>
14919 * expr.c (do_tablejump): When converting index to Pmode, if we have a
14920 sign extended promoted subreg, and the range does not have the sign bit
14921 set, then do a sign extend.
14923 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14924 test, check for sign extended subreg and/or constant operands, and
14925 do a sign extend in that case.
14927 2018-05-17 Steve Ellcey <sellcey@cavium.com>
14929 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14930 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14932 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14933 Change logics_shift_reg to logics_shift_imm.
14934 (thunderx2t99_fp_loadpair_basic): Delete.
14935 (thunderx2t99_fp_storepair_basic): Delete.
14936 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14937 (thunderx2t99_asimd_polynomial): Delete.
14938 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14939 and neon_fp_mul_d_scalar_q.
14940 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14941 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14942 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14943 (thunderx2t99_asimd_lut): Add missing tbl types.
14944 (thunderx2t99_asimd_ext): Delete.
14945 (thunderx2t99_asimd_load1_1_mult): Delete.
14946 (thunderx2t99_asimd_load1_2_mult): Delete.
14947 (thunderx2t99_asimd_load1_ldp): New.
14948 (thunderx2t99_asimd_load1): New.
14949 (thunderx2t99_asimd_load2): Add missing *load2* types.
14950 (thunderx2t99_asimd_load3): New.
14951 (thunderx2t99_asimd_load4): New.
14952 (thunderx2t99_asimd_store1_1_mult): Delete.
14953 (thunderx2t99_asimd_store1_2_mult): Delete.
14954 (thunderx2t99_asimd_store2_mult): Delete.
14955 (thunderx2t99_asimd_store2_onelane): Delete.
14956 (thunderx2t99_asimd_store_stp): New.
14957 (thunderx2t99_asimd_store1): New.
14958 (thunderx2t99_asimd_store2): New.
14959 (thunderx2t99_asimd_store3): New.
14960 (thunderx2t99_asimd_store4): New.
14962 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
14964 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14965 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
14967 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
14968 Segher Boessenkool <segher@kernel.crashing.org>
14971 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14974 2018-05-17 Richard Biener <rguenther@suse.de>
14976 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14977 for pruning loop and prune defs feeding only already visited PHIs.
14979 2018-05-17 Richard Biener <rguenther@suse.de>
14981 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14983 2018-05-17 Bin Cheng <bin.cheng@arm.com>
14984 Richard Biener <rguenther@suse.de>
14986 PR tree-optimization/85793
14987 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14988 for VMAT_ELEMENTWISE.
14990 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14992 * internal-fn.h (lookup_internal_fn): Declare
14993 * internal-fn.c (lookup_internal_fn): New function.
14994 * gimple.c (gimple_build_call_from_tree): Handle calls to
14995 internal functions.
14996 * gimple-pretty-print.c (dump_gimple_call): Print "." before
14997 internal function names.
14998 * tree-pretty-print.c (dump_generic_node): Likewise.
14999 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15001 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15003 * gimple-fold.h (gimple_build): Make the function forms take
15004 combined_fn rather than built_in_function.
15005 (gimple_simplify): Likewise.
15006 * gimple-match-head.c (gimple_simplify): Likewise.
15007 * gimple-fold.c (gimple_build): Likewise.
15008 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15009 rather than gimple_build_call_internal.
15010 (get_initial_defs_for_reduction): Likewise.
15011 (vect_create_epilog_for_reduction): Likewise.
15012 (vectorizable_live_operation): Likewise.
15014 2018-05-17 Martin Liska <mliska@suse.cz>
15016 * gimple-ssa-sprintf.c (format_directive): Do not use
15017 space in between 'G_' and '('.
15019 2018-05-17 Jakub Jelinek <jakub@redhat.com>
15022 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15023 even if the mask is not all ones.
15026 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15028 (ix86_gimple_fold_builtin): Likewise.
15031 * config/i386/i386.c: Include tree-vector-builder.h.
15032 (ix86_vector_shift_count): New function.
15033 (ix86_fold_builtin): Fold shift builtins by scalar count.
15034 (ix86_gimple_fold_builtin): Likewise.
15036 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15037 _mm512_setzero): New intrinsics.
15039 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
15040 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15042 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15043 code generation for cases where splatting a value is not useful.
15044 * simplify-rtx.c (simplify_ternary_operation): Simplify
15045 vec_merge across a vec_duplicate and a paradoxical subreg forming
15046 a vector mode to a vec_concat.
15048 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
15050 * config.gcc: Support "goldmont-plus".
15051 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15053 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15054 PROCESSOR_GOLDMONT_PLUS.
15055 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15056 (processor_target_table): Add "goldmont-plus".
15057 (PTA_GOLDMONT_PLUS): Define.
15058 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15059 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15060 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15061 (fold_builtin_cpu): Add "goldmont-plus".
15062 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15063 (ix86_option_override_internal): Add "goldmont-plus".
15064 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15065 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15066 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15067 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15069 2018-05-17 Richard Biener <rguenther@suse.de>
15071 PR tree-optimization/85757
15072 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15073 remove defs that only feed that PHI from further processing.
15075 2018-05-16 Jim Wilson <jimw@sifive.com>
15077 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15079 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15081 2018-05-16 Mark Wielaard <mark@klomp.org>
15083 * dwarf2out.c (count_index_strings): New function.
15084 (output_indirect_strings): Call count_index_strings and generate
15085 header for dwarf_version >= 5.
15087 2018-05-16 Mark Wielaard <mark@klomp.org>
15089 * dwarf2out.c (dwarf_FORM): New function.
15090 (set_indirect_string): Use dwarf_FORM.
15091 (reset_indirect_string): Likewise.
15092 (size_of_die): Likewise.
15093 (value_format): Likewise.
15094 (output_die): Likewise.
15095 (add_skeleton_AT_string): Likewise.
15096 (output_macinfo_op): Likewise.
15097 (index_string): Likewise.
15098 (output_index_string_offset): Likewise.
15099 (output_index_string): Likewise.
15100 (count_index_strings): Likewise.
15102 2018-05-16 Carl Love <cel@us.ibm.com>
15104 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15105 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15107 2018-05-16 Martin Jambor <mjambor@suse.cz>
15109 * ipa-prop.c (ipa_free_all_edge_args): Remove.
15110 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15112 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15114 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15115 (fnma<mode>4): Likewise.
15116 (fms<mode>4): Likewise.
15117 (fnms<mode>4): Likewise.
15118 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15119 (aarch64_fnma<mode>4): Likewise.
15120 (aarch64_fms<mode>4): Likewise.
15121 (aarch64_fnms<mode>4): Likewise.
15122 (aarch64_fnmadd<mode>4): Likewise.
15124 2018-05-16 Jason Merrill <jason@redhat.com>
15126 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15128 2018-05-16 Richard Biener <rguenther@suse.de>
15130 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15131 (dump_stmt_cost): Declare.
15132 (add_stmt_cost): Dump cost we add.
15133 (add_stmt_costs): New function.
15134 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15135 No longer exported.
15136 (vect_analyze_stmt): Adjust prototype.
15137 (vectorizable_condition): Likewise.
15138 (vectorizable_live_operation): Likewise.
15139 (vectorizable_reduction): Likewise.
15140 (vectorizable_induction): Likewise.
15141 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15142 cost vector to pass to vectorizable_ and record afterwards.
15143 (vect_model_reduction_cost): Take cost vector argument and adjust.
15144 (vect_model_induction_cost): Likewise.
15145 (vectorizable_reduction): Likewise.
15146 (vectorizable_induction): Likewise.
15147 (vectorizable_live_operation): Likewise.
15148 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15149 SLP_TREE_NUMBER_OF_VEC_STMTS.
15150 (vect_analyze_slp_cost_1): Remove.
15151 (vect_analyze_slp_cost): Likewise.
15152 (vect_slp_analyze_node_operations): Take visited args and
15153 a target cost vector. Avoid processing already visited stmt sets.
15154 (vect_slp_analyze_operations): Use a local cost vector to gather
15155 costs and register those of non-discarded instances.
15156 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15157 (vect_schedule_slp_instance): Remove copying of
15158 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15160 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15161 adding cost. Record cost entry location.
15162 (vect_prologue_cost_for_slp_op): Function to compute cost of
15163 a constant or invariant generated for SLP vect in the prologue,
15164 split out from vect_analyze_slp_cost_1.
15165 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15166 (vect_model_promotion_demotion_cost): Likewise.
15167 (vect_model_store_cost): Likewise, make static.
15168 (vect_model_load_cost): Likewise.
15169 (vectorizable_bswap): Add cost vector arg and adjust.
15170 (vectorizable_call): Likewise.
15171 (vectorizable_simd_clone_call): Likewise.
15172 (vectorizable_conversion): Likewise.
15173 (vectorizable_assignment): Likewise.
15174 (vectorizable_shift): Likewise.
15175 (vectorizable_operation): Likewise.
15176 (vectorizable_store): Likewise.
15177 (vectorizable_load): Likewise.
15178 (vectorizable_condition): Likewise.
15179 (vectorizable_comparison): Likewise.
15180 (can_vectorize_live_stmts): Likewise.
15181 (vect_analyze_stmt): Likewise.
15182 (vect_transform_stmt): Adjust calls to vectorizable_*.
15183 * tree-vectorizer.c: Include gimple-pretty-print.h.
15184 (dump_stmt_cost): New function.
15186 2018-05-16 Richard Biener <rguenther@suse.de>
15188 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15189 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15190 * tree-ssa-dse.c: Include tree-ssa-loop.h.
15191 (check_name): New callback.
15192 (dse_classify_store): Track cycles via a visited bitmap of PHI
15193 defs and simplify handling of in-loop and across loop dead stores
15194 and properly fail for loop-variant refs. Handle byte-tracking with
15195 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15198 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
15200 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15201 (vect_get_mask_type_for_stmt): Likewise.
15202 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15204 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
15205 to determine the statement's vector type and the vector type that
15206 should be used for calculating nunits. Deal with cases in which
15207 the type has to be deferred.
15208 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15209 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15210 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15211 (vect_determine_vf_for_stmt): New functions, split out from...
15212 (vect_determine_vectorization_factor): ...here.
15213 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15214 (vect_get_mask_type_for_stmt): New functions, split out from
15215 vect_determine_vectorization_factor.
15217 2018-05-16 Richard Biener <rguenther@suse.de>
15219 * tree-cfg.c (verify_gimple_assign_ternary): Properly
15220 verify the [VEC_]COND_EXPR embedded comparison.
15222 2018-05-15 Martin Sebor <msebor@redhat.com>
15224 PR tree-optimization/85753
15225 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15226 RECORD_TYPE in addition to ARRAY_TYPE.
15228 2018-05-15 Martin Sebor <msebor@redhat.com>
15230 PR middle-end/85643
15231 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15233 2018-05-15 Richard Biener <rguenther@suse.de>
15235 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15236 add by_clobber_p one. Change algorithm to collect all defs
15237 representing uses we need to walk and try reducing them to
15238 a single one before failing.
15239 (dse_dom_walker::dse_optimize_stmt): Adjust.
15241 2018-05-13 Mark Wielaard <mark@klomp.org>
15243 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15244 (size_of_loc_descr): Likewise.
15245 (output_loc_operands): Likewise.
15246 (output_loc_operands_raw): Likewise.
15247 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15248 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15249 (hash_loc_operands): Likewise.
15250 (compare_loc_operands): Likewise.
15252 2018-05-14 Mark Wielaard <mark@klomp.org>
15254 * dwarf2out.c (count_index_addrs): New function.
15255 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15257 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15259 PR tree-optimization/83648
15260 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15261 return value as malloc candidate.
15263 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15266 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15267 param as true in call to suggest_attribute.
15269 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15271 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15272 -mreadonly-in-sdata.
15274 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15276 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15278 (aarch64_crypto_aesd_fused): Likewise.
15280 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15282 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15283 (movsi_aarch64): Likewise.
15284 (load_pairsi): Likewise.
15285 (load_pairdi): Likewise.
15286 (store_pairsi): Likewise.
15287 (store_pairdi): Likewise.
15288 (load_pairsf): Likewise.
15289 (load_pairdf): Likewise.
15290 (store_pairsf): Likewise.
15291 (store_pairdf): Likewise.
15292 (zero_extend): Likewise.
15293 (trunc): Swap alternatives.
15294 (fcvt_target): Add '?' to prefer w over r.
15296 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15299 * config/i386/i386.md: Disallow non-commutative arithmetics in
15300 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15301 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15302 in the peephole2 before it.
15304 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15306 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15307 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15308 (ix86_handle_option): Handle -mcldemote.
15309 * config.gcc: New header.
15310 * config/i386/cldemoteintrin.h: New file.
15311 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15312 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15314 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15315 OPTION_MASK_ISA_CLDEMOTE.
15316 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15317 (ix86_valid_target_attribute_inner_p): Ditto.
15318 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15319 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15320 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15321 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15322 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15324 * config/i386/i386.opt: Add -mcldemote.
15325 * config/i386/x86intrin.h: New header.
15326 * doc/invoke.texi: Add -mcldemote.
15328 2018-05-14 Richard Biener <rguenther@suse.de>
15330 * doc/match-and-simplify.texi: Adjust :s documentation.
15332 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15334 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15335 intended memcpy size.
15336 (REORDER_45): Likewise.
15338 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15340 * sort.cc: New file.
15341 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15342 * vec.c (qsort_chk): Use gcc_qsort.
15343 * Makefile.in (OBJS-libcommon): Add sort.o.
15344 (build/sort.o): New target. Use it...
15345 (BUILD_RTL): ... here, and...
15346 (build/gencfn-macros): ... here, and...
15347 (build/genmatch): ... here.
15349 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15350 Chung-Ju Wu <jasonwucj@gmail.com>
15352 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15353 * config/nds32/nds32-graywolf.md: New file.
15354 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15355 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15357 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15358 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15359 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15360 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15361 * config/nds32/pipelines.md: Include n15 settings.
15363 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15364 Chung-Ju Wu <jasonwucj@gmail.com>
15366 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15367 * config/nds32/nds32-n13.md: New file.
15368 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15369 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15371 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15372 * config/nds32/nds32.md (pipeline_model): Add n13.
15373 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15374 * config/nds32/pipelines.md: Include n13 settings.
15376 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15377 Chung-Ju Wu <jasonwucj@gmail.com>
15379 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15380 * config/nds32/nds32-n10.md: New file.
15381 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15382 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15384 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15385 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15386 * config/nds32/nds32.md (pipeline_model): Add n10.
15387 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15388 * config/nds32/pipelines.md: Include n10 settings.
15390 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15391 Kito Cheng <kito.cheng@gmail.com>
15392 Chung-Ju Wu <jasonwucj@gmail.com>
15394 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15395 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15396 Add enum values for DSP extension instructions.
15397 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15399 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15400 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15401 New code iterators.
15402 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15403 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15404 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15405 * config/nds32/nds32-intrinsic.md: Likewise.
15406 * config/nds32/nds32_intrinsic.h: Likewise.
15407 * config/nds32/nds32-md-auxiliary.c: Likewise.
15408 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15409 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15410 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15411 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15412 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15413 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15414 TYPE_DMAC in switch statement.
15415 * config/nds32/nds32.c: New checking and implementation for DSP
15416 extension instructions.
15417 * config/nds32/nds32.h: Likewise.
15418 * config/nds32/nds32.md: Likewise.
15419 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15420 * config/nds32/predicates.md: Implement new predicates for DSP
15423 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15425 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15426 Reformat alternatives and attributes so it is easier to identify
15427 which constraints/attributes go with which instruction.
15428 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15429 (mov<mode>_softfloat32, FMOVE64): Likewise.
15430 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15431 (mov<mode>_softfloat64, FMOVE64): Likewise.
15433 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15435 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15437 (Basic PowerPC Built-in Functions): The new name of the
15438 subsection previously known as "PowerPC Built-in Functions".
15439 (Basic PowerPC Built-in Functions Available on all Configurations):
15441 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15442 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15443 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15444 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15446 2018-05-11 Martin Jambor <mjambor@suse.cz>
15449 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15452 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15455 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15457 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15459 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15460 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15461 (ix86_handle_option): Handle -mwaitpkg.
15462 * config.gcc: New header.
15463 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15464 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15465 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15467 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15468 OPTION_MASK_ISA_WAITPKG.
15469 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15470 (ix86_option_override_internal): Add PTA_WAITPKG.
15471 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15472 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15473 IX86_BUILTIN_TPAUSE.
15474 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15475 __builtin_ia32_umwait and __builtin_ia32_tpause.
15476 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15477 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15478 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15479 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15480 UNSPECV_TPAUSE): New.
15481 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15482 * config/i386/i386.opt: Add -mwaitpkg.
15483 * config/i386/waitpkgintrin.h: New file.
15484 * config/i386/x86intrin.h: New header.
15485 * doc/invoke.texi: Add -mwaitpkg.
15487 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15490 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15492 (cortex-m0): Use armv6s-m isa.
15493 (cortex-m0plus): Likewise.
15494 (cortex-m1): Likewise.
15495 (cortex-m0.small-multiply): Likewise.
15496 (cortex-m0plus.small-multiply): Likewise.
15497 (cortex-m1.small-multiply): Likewise.
15499 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15500 Jakub Jelinek <jakub@redhat.com>
15502 PR tree-optimization/85692
15503 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15504 source permute as well.
15506 2018-05-11 Martin Liska <mliska@suse.cz>
15509 * doc/extend.texi: Document LLVM style format for no_sanitize
15512 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15514 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15515 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15516 (mode_supports_vsx_dform_quad): Likewise.
15517 (mode_supports_vmx_dform): Move these functions to be next to the
15518 other mode_supports functions.
15519 (mode_supports_dq_form): Likewise.
15520 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15521 mode_supports_dq_form.
15522 (reg_offset_addressing_ok_p): Likewise.
15523 (offsettable_ok_by_alignment): Likewise.
15524 (rs6000_legitimate_offset_address_p): Likewise.
15525 (legitimate_lo_sum_address_p): Likewise.
15526 (rs6000_legitimize_address): Likewise.
15527 (rs6000_legitimize_reload_address): Likewise.
15528 (rs6000_secondary_reload_inner): Likewise.
15529 (rs6000_preferred_reload_class): Likewise.
15530 (rs6000_output_move_128bit): Likewise.
15532 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15534 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15535 Generate SImode target register for null target.
15536 <case IX86_BUILTIN_XGETBV>: Ditto.
15537 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15538 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15540 2018-05-10 Carl Love <cel@us.ibm.com>
15542 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15543 dcbtt and dcbtstt if operands[2] is 0.
15545 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15548 * config/i386/sse.md (usadv64qi): New expander.
15550 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15552 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15553 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15554 -maltivec=be support.
15555 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15556 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15557 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15558 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15559 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15560 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15561 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15562 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15563 altivec_vsumsws): Adjust.
15564 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15565 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15566 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15568 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15569 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15570 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15571 (altivec_lve<VI_char>x): Delete expand.
15572 (*altivec_lve<VI_char>x_internal): Rename to...
15573 (altivec_lve<VI_char>x): ... this.
15574 (altivec_lvxl_<mode>): Delete expand.
15575 (*altivec_lvxl_<mode>_internal): Rename to ...
15576 (altivec_lvxl_<mode>): ... this.
15577 (altivec_stvxl_<mode>): Delete expand.
15578 (*altivec_stvxl_<mode>_internal): Rename to ...
15579 (altivec_stvxl_<mode>): ... this.
15580 (altivec_stve<VI_char>x): Delete expand.
15581 (*altivec_stve<VI_char>x_internal): Rename to ...
15582 (altivec_stve<VI_char>x): ... this.
15583 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15584 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15585 reduc_plus_scal_<mode>): Adjust.
15586 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15588 (rs6000_cpu_cpp_builtins): Adjust.
15589 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15590 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15591 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15592 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15593 -maltivec=be support.
15594 (rs6000_split_vec_extract_var): Adjust.
15595 (rs6000_split_v4si_init): Adjust.
15596 (swap_selector_for_mode): Delete.
15597 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15598 altivec_expand_stvex_be): Delete.
15599 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15600 -maltivec=be support.
15601 (rs6000_gimple_fold_builtin): Ditto.
15602 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15604 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15605 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15606 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15607 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15608 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15609 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15610 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15611 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15612 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15613 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15614 anonymous split): Adjust.
15615 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15616 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15618 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15620 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15621 when --with-gxx-include-dir is also specified.
15622 * configure: Regenerate.
15624 2018-05-09 Jim Wilson <jimw@sifive.com>
15627 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15628 * config/riscv/t-withmultilib: New.
15629 * config/riscv/withmultilib.h: New.
15630 * doc/install.texi: Document RISC-V --with-multilib-list support.
15632 2018-05-09 Richard Biener <rguenther@suse.de>
15634 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15636 (vect_bb_vectorization_profitable_p): Adjust. Compute
15637 actual scalar cost using the cost vector and the add_stmt_cost
15640 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15642 PR rtl-optimization/85645
15643 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15644 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15646 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15648 PR rtl-optimization/85645
15649 * shrink-wrap.c (spread_components): Return a boolean saying if
15650 anything was changed.
15651 (try_shrink_wrapping_separate): Iterate spread_components until
15652 nothing changes anymore.
15654 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15656 PR rtl-optimization/85645
15657 * regrename.c (build_def_use): Also kill the chains that include the
15658 destination of a REG_CFA_REGISTER note.
15660 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15662 PR rtl-optimization/85645
15663 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15664 insn that has a REG_CFA_REGISTER note.
15666 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15668 * cfgexpand.c (expand_clobber): New function.
15669 (expand_gimple_stmt_1): Use it.
15670 * tree-vect-stmts.c (vect_clobber_variable): New function,
15672 (vectorizable_simd_clone_call): ...here.
15673 (vectorizable_store): Emit a clobber either side of an
15674 IFN_STORE_LANES sequence.
15675 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15677 2018-05-09 Tom de Vries <tom@codesourcery.com>
15680 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15681 (define_insn "trap_if_false"): Add exit after trap.
15683 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15685 PR rtl-optimization/85638
15686 * bb-reorder.c: Include common/common-target.h.
15687 (create_forwarder_block): New function extracted from...
15688 (fix_up_crossing_landing_pad): ...here. Rename into...
15689 (dw2_fix_up_crossing_landing_pad): ...this.
15690 (sjlj_fix_up_crossing_landing_pad): New function.
15691 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15692 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15693 from both partitions and exit the loop after one iteration.
15695 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 Jim Wilson <jimw@sifive.com>
15715 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15716 (LD_EMUL_SUFFIX): New.
15717 (LINK_SPEC): Use it.
15719 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15721 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15723 (Basic PowerPC Built-in Functions): The new name of the
15724 subsection previously known as "PowerPC Built-in Functions".
15725 (Basic PowerPC Built-in Functions Available on all Configurations):
15727 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15729 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15731 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15733 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15736 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15739 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15740 after cmpelim optimization.
15742 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15744 * config.gcc: Support "goldmont".
15745 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15746 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15747 PROCESSOR_GOLDMONT.
15748 * config/i386/i386.c (m_GOLDMONT): Define.
15749 (processor_target_table): Add "goldmont".
15750 (PTA_GOLDMONT): Define.
15751 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15752 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15753 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15754 (fold_builtin_cpu): Add "goldmont".
15755 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15756 (ix86_option_override_internal): Add "goldmont".
15757 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15758 (processor_type): Add PROCESSOR_GOLDMONT.
15759 * config/i386/i386.md: Add CPU "glm".
15760 * config/i386/glm.md: New file.
15761 * config/i386/x86-tune.def: Add m_GOLDMONT.
15762 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15764 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15767 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15769 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15770 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
15771 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
15774 * config/i386/i386.c (ix86_fold_builtin): Handle
15775 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15778 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15779 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15781 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
15784 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15785 (check_arch): Likewise.
15786 (check_fpu): Return the result rather than printing it.
15787 (end arch): Fix operator precedence.
15788 (end cpu): Likewise.
15789 (END): Print the result from check_fpu.
15791 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15792 Alan Hayward <alan.hayward@arm.com>
15793 David Sherwood <david.sherwood@arm.com>
15795 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15796 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15797 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15798 (*fcmuo<mode>_and): New patterns.
15800 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15802 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15803 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15804 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15805 (cmp_op, sve_imm_con): New code attributes.
15806 (SVE_COND_INT_CMP, imm_con): Delete.
15807 (cmp_op): Remove above unspecs from int attribute.
15808 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15810 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
15811 comparison-specific unspecs.
15812 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15813 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15814 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15815 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15816 (*vec_fcm<cmp_op><mode>): Rename to...
15817 (*fcm<cmp_op><mode>): ...this and adjust likewise.
15818 (*vec_fcmuo<mode>): Rename to...
15819 (*fcmuo<mode>): ...this and adjust likewise.
15820 (*pred_fcm<cmp_op><mode>): New pattern.
15821 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15822 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15824 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15826 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15827 (aarch64_emit_sve_predicated_cond): New function.
15828 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15829 (aarch64_emit_unspec_cond_or): Replace with...
15830 (aarch64_emit_sve_or_conds): ...this new function. Use
15831 aarch64_emit_sve_ptrue_op for the individual comparisons and
15832 aarch64_emit_binop to OR them together.
15833 (aarch64_emit_inverted_unspec_cond): Replace with...
15834 (aarch64_emit_sve_inverted_cond): ...this new function. Use
15835 aarch64_emit_sve_ptrue_op for the comparison and
15836 aarch64_emit_unop to invert the result.
15837 (aarch64_expand_sve_vec_cmp_float): Update after the above
15838 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
15840 2018-05-07 Nathan Sidwell <nathan@acm.org>
15842 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15843 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15844 (Backwards Compatibility): Likewise.
15846 2018-05-07 Luis Machado <luis.machado@linaro.org>
15850 2018-05-07 Luis Machado <luis.machado@linaro.org>
15852 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15853 <prefetch_dynamic_strides>: New const bool field.
15854 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15855 prefetch_dynamic_strides.
15856 (exynosm1_prefetch_tune): Likewise.
15857 (thunderxt88_prefetch_tune): Likewise.
15858 (thunderx_prefetch_tune): Likewise.
15859 (thunderx2t99_prefetch_tune): Likewise.
15860 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15862 (aarch64_override_options_internal): Update to set
15863 PARAM_PREFETCH_DYNAMIC_STRIDES.
15864 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15865 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15866 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15867 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15868 prefetch-dynamic-strides setting.
15870 2018-05-07 Luis Machado <luis.machado@linaro.org>
15872 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15873 <minimum_stride>: New const int field.
15874 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15875 minimum_stride field.
15876 (exynosm1_prefetch_tune): Likewise.
15877 (thunderxt88_prefetch_tune): Likewise.
15878 (thunderx_prefetch_tune): Likewise.
15879 (thunderx2t99_prefetch_tune): Likewise.
15880 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15881 (aarch64_override_options_internal): Update to set
15882 PARAM_PREFETCH_MINIMUM_STRIDE.
15883 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15884 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15885 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15886 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15887 stride is constant and is below the minimum stride threshold.
15889 2018-05-07 Luis Machado <luis.machado@linaro.org>
15891 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15894 2018-05-07 Luis Machado <luis.machado@linaro.org>
15896 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15897 <prefetch_dynamic_strides>: New const bool field.
15898 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15899 prefetch_dynamic_strides.
15900 (exynosm1_prefetch_tune): Likewise.
15901 (thunderxt88_prefetch_tune): Likewise.
15902 (thunderx_prefetch_tune): Likewise.
15903 (thunderx2t99_prefetch_tune): Likewise.
15904 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15906 (aarch64_override_options_internal): Update to set
15907 PARAM_PREFETCH_DYNAMIC_STRIDES.
15908 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15909 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15910 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15911 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15912 prefetch-dynamic-strides setting.
15914 2018-05-07 Luis Machado <luis.machado@linaro.org>
15916 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15917 <minimum_stride>: New const int field.
15918 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15919 minimum_stride field.
15920 (exynosm1_prefetch_tune): Likewise.
15921 (thunderxt88_prefetch_tune): Likewise.
15922 (thunderx_prefetch_tune): Likewise.
15923 (thunderx2t99_prefetch_tune): Likewise.
15924 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15925 (aarch64_override_options_internal): Update to set
15926 PARAM_PREFETCH_MINIMUM_STRIDE.
15927 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15928 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15929 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15930 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15931 stride is constant and is below the minimum stride threshold.
15933 2018-05-06 Jakub Jelinek <jakub@redhat.com>
15936 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15937 the type is addressable. Don't force op into register if it has
15940 2018-05-05 Roland McGrath <mcgrathr@google.com>
15943 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15944 any section for which we don't know a specific type it should have,
15945 regardless of name. Previously this was done only for the exact
15946 names ".init_array", ".fini_array", and ".preinit_array".
15947 (default_elf_asm_named_section): Add comment about
15948 relationship with default_section_type_flags and SECTION_NOTYPE.
15949 (get_section): Don't consider it a type conflict if one side has
15950 SECTION_NOTYPE and the other doesn't, as long as neither has the
15951 SECTION_BSS et al used in the default_section_type_flags logic.
15953 2018-05-05 Tom de Vries <tom@codesourcery.com>
15956 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15957 (workaround_barsyncs): New function.
15958 (nvptx_reorg): Use workaround_barsyncs.
15959 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15960 (define_expand "nvptx_membar_cta"): New define_expand.
15961 (define_insn "*nvptx_membar_cta"): New insn.
15963 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
15965 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15966 To improve optimization opportunities.
15967 * builtin-types.def: The new needed builtin types for the above.
15969 2018-05-04 Richard Biener <rguenther@suse.de>
15971 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15972 * gimple-ssa-store-merging.c
15973 (imm_store_chain_info::output_merged_store): Remove redundant create,
15974 release split_store vector contents on failure.
15975 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15976 scalar stmt vector on cache hit.
15978 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
15980 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15982 * config.gcc (powerpc-xilinx-eabi*): Remove.
15983 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15985 (fusion_addis_mem_combo_load): Ditto.
15986 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15988 (rs6000_cpu_cpp_builtins): Ditto.
15989 * config/rs6000/rs6000-linux.c
15990 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15991 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15992 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15994 (rs6000_setup_reg_addr_masks): Ditto.
15995 (rs6000_init_hard_regno_mode_ok): Ditto.
15996 (rs6000_option_override_internal): Ditto.
15997 (legitimate_lo_sum_address_p): Ditto.
15998 (rs6000_legitimize_address): Ditto.
15999 (rs6000_legitimize_reload_address): Ditto.
16000 (rs6000_legitimate_address_p): Ditto.
16001 (abi_v4_pass_in_fpr): Ditto.
16002 (setup_incoming_varargs): Ditto.
16003 (rs6000_gimplify_va_arg): Ditto.
16004 (rs6000_split_multireg_move): Ditto.
16005 (rs6000_savres_strategy): Ditto.
16006 (rs6000_emit_prologue_components): Ditto.
16007 (rs6000_emit_epilogue_components): Ditto.
16008 (rs6000_emit_prologue): Ditto.
16009 (rs6000_emit_epilogue): Ditto.
16010 (rs6000_elf_file_end): Ditto.
16011 (rs6000_function_value): Ditto.
16012 (rs6000_libcall_value): Ditto.
16013 * config/rs6000/rs6000.h: Ditto.
16014 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16015 (TARGET_MINMAX): ... this. New.
16016 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16017 * config/rs6000/rs6000.md: Remove Xilinx FP support.
16018 (*movsi_internal1_single): Delete.
16019 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16020 mfpu=, mxilinx-fpu): Delete.
16021 * config/rs6000/singlefp.h: Delete.
16022 * config/rs6000/sysv4.h: Remove Xilinx FP support.
16023 * config/rs6000/t-rs6000: Ditto.
16024 * config/rs6000/t-xilinx: Delete.
16025 * config/rs6000/titan.md: Adjust for fp_type removal.
16026 * config/rs6000/vsx.md: Remove Xilinx FP support.
16027 (VStype_simple): Delete.
16028 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16029 * config/rs6000/xfpu.h: Delete.
16030 * config/rs6000/xfpu.md: Delete.
16031 * config/rs6000/xilinx.h: Delete.
16032 * config/rs6000/xilinx.opt: Delete.
16033 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16034 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16036 2018-05-04 Tom de Vries <tom@codesourcery.com>
16039 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16042 2018-05-04 Richard Biener <rguenther@suse.de>
16044 PR middle-end/85627
16045 * tree-complex.c (update_complex_assignment): We are always in SSA form.
16046 (expand_complex_div_wide): Likewise.
16047 (expand_complex_operations_1): Likewise.
16048 (expand_complex_libcall): Preserve EH info of the original stmt.
16049 (tree_lower_complex): Handle removed blocks.
16050 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16051 on complex multiplication and division libcall builtins.
16053 2018-05-04 Richard Biener <rguenther@suse.de>
16055 PR middle-end/85574
16056 * fold-const.c (negate_expr_p): Restrict negation of operand
16057 zero of a division to when we know that can happen without
16059 (fold_negate_expr_1): Likewise.
16061 2018-05-04 Jakub Jelinek <jakub@redhat.com>
16064 * real.h (real_nextafter): Declare.
16065 * real.c (real_nextafter): New function.
16066 * fold-const-call.c (fold_const_nextafter): New function.
16067 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16068 CASE_CFN_NEXTTOWARD.
16069 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16070 even when arg1_mode is different from arg0_mode.
16072 2018-05-03 Nathan Sidwell <nathan@acm.org>
16074 * doc/extend.texi (Deprecated Features): Remove
16075 -ffriend-injection.
16076 (Backwards Compatibility): Likewise.
16077 * doc/invoke.texi (C++ Language Options): Likewise.
16078 (C++ Dialect Options): Likewise.
16080 2018-05-03 Jakub Jelinek <jakub@redhat.com>
16083 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16084 _mm512_mask_mullox_epi64): New intrinsics.
16086 2018-05-03 Tom de Vries <tom@codesourcery.com>
16089 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16090 dump files): Add offload-tree.
16092 2018-05-03 Richard Biener <rguenther@suse.de>
16094 PR tree-optimization/85615
16095 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16096 to loops not nested in BBs loop father to avoid creating multi-entry
16099 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16101 PR tree-optimization/70291
16102 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16103 arguments. Change return type to tree. Emit libcall as a new
16104 statement rather than replacing existing one when inplace_p is true.
16105 (expand_complex_multiplication_components): New function.
16106 (expand_complex_multiplication): Expand floating-point complex
16107 multiplication using the above.
16108 (expand_complex_division): Rename inner_type parameter to type.
16109 Update expand_complex_libcall call-site.
16110 (expand_complex_operations_1): Update expand_complex_multiplication
16111 and expand_complex_division call-sites.
16113 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16116 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16117 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16118 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16119 the highest significant bit of the shift count mask is clear. In
16120 check whether and[sq]i3 is needed verify that all significant bits
16121 of the shift count other than the highest are set.
16123 2018-05-02 Tom de Vries <tom@codesourcery.com>
16126 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16127 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16128 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16129 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16130 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16131 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16132 __builtin_goacc_parlevel_size.
16134 2018-05-02 Richard Biener <rguenther@suse.de>
16136 PR tree-optimization/85597
16137 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16138 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16141 2018-05-02 Tom de Vries <tom@codesourcery.com>
16144 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16145 dump files): Add ltrans-tree.
16147 2018-05-02 Tom de Vries <tom@codesourcery.com>
16150 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16151 dump files): Add wpa-ipa.
16153 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16155 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16156 powerpc*-*-linux*paired* target.
16157 * config/rs6000/750cl.h: Delete.
16158 * config/rs6000/paired.h: Delete.
16159 * config/rs6000/paired.md: Delete.
16160 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16162 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16163 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16164 comment. Remove paired float support.
16165 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16166 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16168 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16169 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16171 * config/rs6000/rs6000.c: Remove paired float support.
16172 (paired_expand_vector_init, paired_expand_vector_move,
16173 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16174 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16175 paired_expand_builtin, paired_expand_predicate_builtin,
16176 paired_init_builtins): Delete.
16177 * config/rs6000/rs6000.h: Remove paired float support.
16178 * config/rs6000/rs6000.md: Remove paired float support.
16179 (move_from_CR_ov_bit): Delete.
16180 * config/rs6000/rs6000.opt (mpaired): Delete.
16181 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16182 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16184 2018-05-02 Richard Biener <rguenther@suse.de>
16186 PR middle-end/85567
16187 * gimplify.c (gimplify_save_expr): When in SSA form allow
16188 SAVE_EXPRs to compute to SSA vars.
16190 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16193 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16194 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16195 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16196 clobber operands[2], instead use a new pseudo. Formatting fixes.
16198 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
16200 PR tree-optimization/85586
16201 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16202 exit early for statements in the same group if the accesses are
16205 2018-05-02 Tom de Vries <tom@codesourcery.com>
16208 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16211 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
16213 PR tree-optimization/85143
16214 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16216 2018-05-01 Tom de Vries <tom@codesourcery.com>
16219 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16220 not found" error message.
16222 2018-05-01 Tom de Vries <tom@codesourcery.com>
16225 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16226 * vec.c (test_ordered_remove_if): New function.
16227 (vec_c_tests): Call test_ordered_remove_if.
16228 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16229 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16230 * tree-vect-patterns.c (vect_pattern_recog_1): Use
16231 VEC_ORDERED_REMOVE_IF.
16233 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16235 PR tree-optimization/82665
16236 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16237 pointer subtraction where arguments come from a memchr call.
16239 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16241 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16242 --push-state --as-needed and --pop-state instead of --as-needed and
16243 --no-as-needed if ld supports it.
16244 * configure: Regenerated.
16247 * doc/install.texi2html: Replace _002d with - and _002a with * in
16248 generated html files using sed.
16250 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16253 * gcc-rich-location.c (blank_line_before_p): New function.
16254 (use_new_line): New function.
16255 (gcc_rich_location::add_fixit_insert_formatted): New function.
16256 * gcc-rich-location.h
16257 (gcc_rich_location::add_fixit_insert_formatted): New function.
16259 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16261 * selftest.c (assert_streq): Rename "expected" and "actual" to
16262 "val1" and "val2". Extend NULL-handling to cover both inputs
16263 symmetrically, while still requiring both to be non-NULL for a pass.
16264 * selftest.h (assert_streq): Rename "expected" and "actual" to
16266 (ASSERT_EQ): Likewise.
16267 (ASSERT_EQ_AT): Likewise.
16268 (ASSERT_KNOWN_EQ): Likewise.
16269 (ASSERT_KNOWN_EQ_AT): Likewise.
16270 (ASSERT_NE): Likewise.
16271 (ASSERT_MAYBE_NE): Likewise.
16272 (ASSERT_MAYBE_NE_AT): Likewise.
16273 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16274 the assertion to pass.
16275 (ASSERT_STREQ_AT): Likewise.
16277 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16279 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16280 interaction with -pie.
16282 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16284 * selftest.h: Fix alphabetization of per-source-file selftest
16287 2018-04-30 Jason Merrill <jason@redhat.com>
16289 PR c++/61982 - dead stores to destroyed objects.
16290 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16293 2018-04-30 Jason Merrill <jason@redhat.com>
16295 * tree.c (build_clobber): New.
16296 * tree.h: Declare it.
16297 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16299 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16301 * diagnostic-show-locus.c (layout::layout): Update for
16302 location_get_source_line returning a char_span.
16303 (struct char_span): Move to input.h.
16304 (struct correction): Update for fields in char_span becoming
16306 (struct source_line): Update for location_get_source_line
16307 returning a char_span.
16308 (layout::print_line): Likewise.
16309 * edit-context.c (edited_file::print_content): Likewise.
16310 (edited_file::print_diff_hunk): Likewise.
16311 (edited_file::print_run_of_changed_lines): Likewise.
16312 (edited_file::get_num_lines): Likewise.
16313 (edited_line::edited_line): Likewise.
16314 * final.c (asm_show_source): Likewise.
16315 * input.c (location_get_source_line): Convert return type
16316 from const char * to char_span, losing the final "line_len"
16318 (dump_location_info): Update for the above.
16319 (get_substring_ranges_for_loc): Likewise. Use a char_span
16320 when handling the literal within the line.
16321 (test_reading_source_line): Update for location_get_source_line
16322 returning a char_span.
16323 * input.h (class char_span): Move here from
16324 diagnostic-show-locus.c, converting from a struct to a class.
16325 Make data members private.
16326 (char_span::operator bool): New.
16327 (char_span::length): New.
16328 (char_span::get_buffer): New.
16329 (char_span::operator[]): New.
16330 (char_span::subspan): Make const.
16331 (char_span::xstrdup): New.
16332 (location_get_source_line): Convert return type from const char *
16333 to char_span, losing the final "line_size" param.
16335 2018-04-30 Jan Hubicka <jh@suse.cz>
16337 * lto-wrapper.c (ltrans_priorities): New static var.
16338 (cmp_priority): New.
16339 (run_gcc): Read priorities and if doing parallel build order
16340 the Makefile by them.
16342 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16344 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16346 2018-04-30 Richard Biener <rguenther@suse.de>
16348 * tree-cfg.c (verify_address): Remove base argument, add
16349 flag whether to check TREE_ADDRESSABLE and do that.
16350 (verify_expr): Remove.
16351 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16352 (verify_gimple_assign_single): Likewise.
16353 (verify_gimple_switch): Likewise.
16354 (verify_expr_location_1): Dereference tp once. Add (disabled)
16355 piece from verify_expr.
16356 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16358 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16360 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16362 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16364 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16365 (small_data_pattern): Likewise.
16366 (arc_rewrite_small_data): Likewise.
16367 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16368 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16369 (get_symbol_alignment): New function.
16370 (legitimate_small_data_address_p): Likewise.
16371 (legitimate_scaled_address): Update, call
16372 legitimate_small_data_address_p.
16373 (output_sdata): New static variable.
16374 (arc_print_operand): Update how we handle small data operands.
16375 (arc_print_operand_address): Likewise.
16376 (arc_legitimate_address_p): Update, use
16377 legitimate_small_data_address_p.
16378 (arc_rewrite_small_data_p): Remove.
16379 (arc_rewrite_small_data_1): Likewise.
16380 (arc_rewrite_small_data): Likewise.
16381 (small_data_pattern): Likewise.
16382 (compact_sda_memory_operand): Update to use
16383 legitimate_small_data_address_p and get_symbol_alignment.
16384 (prepare_move_operands): Don't rewite sdata pattern.
16385 (prepare_extend_operands): Remove.
16386 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16388 (zero_extendqisi2): Likewise.
16389 (zero_extendhisi2): Likewise.
16390 (extendqihi2): Likewise.
16391 (extendqisi2): Likewise.
16392 (extendhisi2): Likewise.
16393 (addsi3): Likewise.
16394 (subsi3): Likewise.
16395 (andsi3): Likewise.
16396 * config/arc/constraints.md (Usd): Change it to memory constraint.
16398 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16400 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16401 as source of std instructions.
16402 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16403 allow 6-bit constants as source for store instructions.
16404 (movdi_insn): Update instruction pattern to allow 6-bit constants
16405 as source for store instructions.
16407 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16409 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16411 2018-04-30 Nathan Sidwell <nathan@acm.org>
16412 Sandra Loosemore <sandra@codesourcery.com>
16414 * dumpfile.c (dump_open): Allow '-' for stdout.
16415 * doc/invoke.texi (Developer Options): Document dump filename
16416 determination early. Document stdin/stdout selection.
16418 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16420 Microblaze Target: PIC data text relative
16422 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16423 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16425 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16426 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16427 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16428 New addressing mode for data-text relative position indepenedent code.
16429 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16430 'ADDRESS_SYMBOLIC_TXT_REL'.
16431 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16432 (microblaze_legitimate_pic_operand): Exclude function calls from
16433 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16434 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16436 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16437 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16438 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16439 for 'address + offset'.
16440 (microblaze_expand_prologue): Add new function prologue call for
16442 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16443 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16444 table in case of TARGET_PIC_DATA_TEXT_REL.
16445 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16446 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16447 Add new macros 'UNSPEC_TEXT',
16448 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16449 + exclude function calls from 'UNSPEC_PLT' in case of data text
16451 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16452 new target hook for generating address diff vector tables in case of
16454 * doc/tm.texi : Regenerate.
16455 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16456 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16457 of addr diff vector generation.
16458 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16459 target hook definition.
16460 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16461 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16462 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16463 option for data text relative.
16465 2018-04-30 Richard Biener <rguenther@suse.de>
16467 * tree-chrec.h (evolution_function_is_constant_p): Remove
16469 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16471 2018-04-30 Richard Biener <rguenther@suse.de>
16474 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16476 2018-04-30 Richard Biener <rguenther@suse.de>
16478 PR tree-optimization/28364
16479 PR tree-optimization/85275
16480 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16481 copying first exit test.
16483 2018-04-28 Mark Wielaard <mark@klomp.org>
16485 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16486 dwarf_version >= 5.
16487 (dwarf_AT): Handle DW_AT_addr_base.
16488 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16490 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16493 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16494 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16495 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16496 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16498 2018-04-28 Richard Biener <rguenther@suse.de>
16500 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16501 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16502 to reflect use. Only add interesting stmts.
16504 2018-04-27 Martin Jambor <mjambor@suse.cz>
16507 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16508 the jump function allows for passing through aggregate values.
16510 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16512 * input.h (in_system_header_at): Convert from macro to inline
16514 (from_macro_expansion_at): Likewise.
16515 (from_macro_definition_at): Likewise.
16517 2018-04-27 Jeff Law <law@redhat.com>
16519 * config.gcc: Mark tile* targets as deprecated/obsolete.
16521 2018-04-27 Richard Biener <rguenther@suse.de>
16523 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16526 2018-04-27 Richard Biener <rguenther@suse.de>
16528 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16530 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16532 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16533 with Yd constraint. Set "preferred_for_speed" attribute from
16534 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16535 with Yd constraint.
16536 (*movdi_internal): Ditto.
16537 (movti_interunit splitters): Remove
16538 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16539 (movdi_interunit splitters): Ditto.
16540 * config/i386/constraints.md (Ye): Remove.
16541 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16543 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16546 * config/aarch64/constraints.md (Usg): Limit to 31.
16547 (Usj): Limit to 63.
16549 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16551 PR tree-optimization/85529
16552 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16553 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16554 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16555 zero extension or masking of the MSB bit.
16556 (optimize_range_tests): Add FIRST_BB argument, pass it through
16557 to optimize_range_tests_var_bound.
16558 (maybe_optimize_range_tests, reassociate_bb): Adjust
16559 optimize_range_tests callers.
16561 2018-04-26 Richard Biener <rguenther@suse.de>
16562 Jakub Jelinek <jakub@redhat.com>
16564 * cgraph.h (symbol_table): Just declare debug method here.
16565 * symtab.c (symbol_table::debug): Define.
16567 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16569 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16571 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16573 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16574 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16575 (*movdi_internal): Substitute Yi and Yj constraint with x
16576 and Ym and Yn constraint with y constraint. Update "isa"
16577 attribute and set "preferred_for_speed" attribute from
16578 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16579 (*movsi_internal): Ditto.
16580 (*movdf_internal): Ditto.
16581 (*movsf_internal): Ditto.
16582 (*zero_extendsidi2): Ditto.
16583 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16584 (sse2_loadld): Ditto.
16585 (*vec_extract<ssevecmodelower>_0): Ditto.
16586 (*vec_extractv4si_0_zext_sse4): Ditto.
16587 (vec_concatv2di): Ditto.
16588 (*vec_dup<mode>): Ditto.
16589 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16590 * config/i386/constraints.md (Yi): Remove.
16595 2018-04-26 Nathan Sidwell <nathan@acm.org>
16597 * dumpfile.c (dump_open): New.
16598 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16599 (dump_finish): Detect stdio/stderr by value not name.
16601 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16603 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16605 2018-04-26 Tom de Vries <tom@codesourcery.com>
16608 * config/nvptx/nvptx.c (verify_neutering_jumps)
16609 (verify_neutering_labels): New function
16610 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16612 2018-04-26 Tom de Vries <tom@codesourcery.com>
16615 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16616 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16619 2018-04-26 Richard Biener <rguenther@suse.de>
16620 Tom de Vries <tom@codesourcery.com>
16623 * lto-streamer-out.c (output_function): Fixup loops if required to match
16624 discovery done in the reader.
16626 2018-04-26 Richard Biener <rguenther@suse.de>
16628 PR tree-optimization/85116
16629 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16630 have a loop exit from the single latch predecessor. Remove
16631 case of header with just condition.
16632 (ch_base::copy_headers): Exclude infinite loops from any
16634 (pass_ch::execute): Record exits.
16636 2018-04-26 Richard Biener <rguenther@suse.de>
16638 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16639 prologue cost vector and pass it to vect_get_load_cost.
16640 (vect_get_peeling_costs_all_drs): Likewise.
16641 (vect_peeling_hash_get_lowest_cost): Likewise.
16642 (vect_enhance_data_refs_alignment): Likewise.
16644 2018-04-26 Richard Biener <rguenther@suse.de>
16646 PR middle-end/85450
16647 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16648 checking of integer<->pointer conversions.
16649 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16650 sign-/zero-extending pointer types.
16651 (expand_omp_for_static_chunk): Likewise.
16653 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16654 Jean Lee <xiaoyur347@gmail.com>
16656 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16657 (TARGET_ASAN_SHADOW_OFFSET): Define.
16658 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16659 true for -fsanitize=address.
16661 2018-04-25 Mark Wielaard <mark@klomp.org>
16663 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16666 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16668 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16669 than "alu", remove explicit "memory" and "imm_disp" attributes.
16670 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16672 PR middle-end/85414
16673 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16674 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16675 gen_lowpart_no_emit.
16677 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16680 * config/i386/i386.c (ix86_expand_builtin): Change memory
16681 operand to XI, extend p0 to Pmode.
16682 * config/i386/i386.md: Change unspec volatile and operand
16683 1 mode to XI, change operand 0 mode to P.
16685 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16687 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16688 GET_MODE_MASK before any checking.
16689 (nds32_can_use_bset_p): Likewise.
16690 (nds32_can_use_btgl_p): Likewise.
16692 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16694 * config/nds32/nds32-doubleword.md: New define_split pattern for
16695 illegal register number.
16697 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16699 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16701 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16703 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16705 2018-04-25 Richard Biener <rguenther@suse.de>
16707 * lto-streamer.h (LTO_major_version): Bump to 8.
16709 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16711 * BASE-VER: Set to 9.0.0.
16713 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16715 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16716 in __abskf2 and __powikf2.
16718 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16721 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16722 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16723 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16724 Use the above on operand 2. Reindent.
16725 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16727 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16730 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16732 * config/i386/i386.opt (mcet): Removed.
16733 * doc/install.texi: Remove -mcet documentation.
16734 * doc/invoke.texi: Likewise.
16736 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16739 * doc/install.texi: Remove -mcet from bootstrap-cet.
16741 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16744 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16745 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16749 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16750 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16751 containing a CONST_VECTOR.
16753 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16755 * doc/install.texi: Update newlib dependency for nvptx.
16757 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16760 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16761 instead of INTVAL when shifting x left.
16763 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16765 PR tree-optimization/85478
16766 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16767 vect_grouped_store_supported for single element vectors.
16769 2018-04-24 Richard Biener <rguenther@suse.de>
16772 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16773 load cost increase to the case of non-constant step.
16775 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16778 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16779 destination if any_malformed_asm.
16781 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
16783 PR middle-end/85496
16784 * expr.c (store_field): In the bitfield case, if the value comes from
16785 a function call and is returned in registers by means of a PARALLEL,
16786 do not change the mode of the temporary unless BLKmode and VOIDmode.
16788 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
16790 PR rtl-optimization/85423
16791 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16792 dependencies to debug insns when the previous insn is non-debug.
16794 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16796 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16797 enums into a single definition.
16798 (fls): Fix predicates and printing.
16801 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16803 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16804 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16805 and short u6 immediate.
16806 (check_if_valid_sleep_operand): Remove.
16807 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16809 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16811 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16812 flag_always_save_lp condition.
16813 * config/nds32/nds32.opt (malways-save-lp): New option.
16815 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16817 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16818 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16819 * config/nds32/nds32.h
16820 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16821 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16823 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16825 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16826 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16828 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16829 Chung-Ju Wu <jasonwucj@gmail.com>
16831 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16833 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16834 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16836 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16838 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16840 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16842 * config/nds32/nds32-protos.h (nds32_data_alignment,
16843 nds32_local_alignment): Declare.
16844 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16845 nds32_local_alignment): New functions.
16846 (TARGET_CONSTANT_ALIGNMENT): Define.
16847 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16849 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16851 * config/nds32/nds32.c
16852 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16853 (TARGET_MODES_TIEABLE_P): Likewise.
16855 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16857 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16858 level Ofast and Og.
16860 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
16861 Chung-Ju Wu <jasonwucj@gmail.com>
16863 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16864 for unaligned access.
16865 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16867 * config/nds32/nds32-intrinsic.md: Likewise.
16868 * config/nds32/nds32_intrinsic.h: Likewise.
16869 * config/nds32/nds32.h (nds32_builtins): Likewise.
16870 * config/nds32/nds32.opt (munaligned-access): New option.
16871 * config/nds32/nds32.c (nds32_asm_file_start): Display
16872 flag_unaligned_access status.
16874 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16876 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16877 -mno-relax is present.
16878 * config/riscv/linux.h (LINK_SPEC): Ditto.
16880 2018-04-20 Martin Sebor <msebor@redhat.com>
16883 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16885 (gimple_fold_builtin_stxcpy_chk): Same.
16886 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16888 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
16891 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16892 __powikf2 when long double is IEEE 128-bit.
16894 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16896 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16897 step to make sure stack always aligned.
16899 2018-04-20 Carl Love <cel@us.ibm.com>
16902 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16903 size check for arg0.
16905 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
16906 Tom de Vries <tom@codesourcery.com>
16909 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16910 Emit insns for calls too.
16911 (nvptx_find_par): Always look for worker-level predecessor insn.
16912 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
16914 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16915 (nvptx_process_pars): Propagate frames for calls.
16917 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
16920 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16922 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16923 (ix86_handle_option): Don't handle OPT_mibt.
16924 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16926 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16928 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16929 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16930 (ix86_target_macros): Define __CET__ with flag_cf_protection
16931 for -fcf-protection.
16932 * config/i386/i386.c (isa2_opts): Remove -mibt.
16933 * config/i386/i386.h (TARGET_IBT): Removed.
16934 (TARGET_IBT_P): Likewise.
16935 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16936 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16937 * config/i386/i386.opt (mcet): Update help message.
16938 (mshstk): Likewise.
16940 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
16941 -mcet as an alias for -mshstk.
16943 2018-04-20 Richard Biener <rguenther@suse.de>
16945 PR middle-end/85475
16946 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16947 complexity by forcing a single use of the multiply operand.
16949 2018-04-20 Martin Jambor <mjambor@suse.cz>
16952 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16953 recursion dependency to only apply to non-clones.
16955 2018-04-20 Martin Jambor <mjambor@suse.cz>
16958 * ipa-cp.c (create_specialized_node): Check that clones of
16959 self-recursive edges exist during IPA-CP.
16961 2018-04-19 Toon Moene <toon@moene.org>
16963 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16966 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16968 PR tree-optimization/85467
16969 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16970 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
16971 VECTOR_CST element to type.
16973 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16976 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16977 * config/i386/i386.md (builtin_setjmp_setup): Removed.
16978 (builtin_longjmp): Likewise.
16979 (save_stack_nonlocal): New pattern.
16980 (restore_stack_nonlocal): Likewise.
16982 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16985 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16986 Replace ASM_OUTPUT_LABEL with fprintf.
16988 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16991 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16992 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16993 * config/i386/i386-c.c (ix86_target_macros_internal): Also
16994 define __IBT__ and __SHSTK__ for -fcf-protection.
16995 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16997 (ix86_trampoline_init): Likewise.
16998 (x86_output_mi_thunk): Likewise.
16999 (ix86_notrack_prefixed_insn_p): Likewise.
17000 (ix86_option_override_internal): Don't disallow -fcf-protection.
17001 * config/i386/i386.md (rdssp<mode>): Also enable for
17003 (incssp<mode>): Likewise.
17004 (nop_endbr): Likewise.
17005 * config/i386/i386.opt (mcet): Change help message to built-in
17008 (mshstk): Likewise.
17009 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17010 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
17011 enable CET built-in functions.
17013 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
17015 * common/config/i386/i386-common.c
17016 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17017 OPTION_MASK_ISA_MOVDIRI_UNSET,
17018 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17019 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17020 * config.gcc (movdirintrin.h): New header.
17021 * config/i386/cpuid.h (bit_MOVDIRI,
17022 bit_MOVDIR64B): New bits.
17023 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17025 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17026 (VOID, PVOID, PCVOID)): New function types.
17027 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17028 __builtin_ia32_directstoreu_u64,
17029 __builtin_ia32_movdir64b): New builtins.
17030 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17031 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17033 (ix86_valid_target_attribute_inner_p): Ditto.
17034 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17035 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17036 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17037 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17038 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17039 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17040 (movdiri<mode>, movdir64b_<mode>): New.
17041 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17042 * config/i386/immintrin.h: Include movdirintrin.h.
17043 * config/i386/movdirintrin.h: New file.
17044 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17046 2018-04-19 Richard Biener <rguenther@suse.de>
17048 PR middle-end/85455
17049 * cfg.c (clear_bb_flags): When loop state says we have
17050 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17052 2018-04-19 Richard Biener <rguenther@suse.de>
17054 PR tree-optimization/84737
17055 * tree-vect-data-refs.c (vect_copy_ref_info): New function
17056 copying restrict info.
17057 (vect_setup_realignment): Use it.
17058 * tree-vectorizer.h (vect_copy_ref_info): Declare.
17059 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17060 the first DR to all generated stores.
17061 (vectorizable_load): Likewise for loads.
17063 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17065 PR tree-optimization/85446
17066 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17067 the integral and pointer types to have the same precision.
17069 * doc/install.texi: Document --disable-cet being the default and
17072 2018-04-18 Martin Liska <mliska@suse.cz>
17074 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17077 2018-04-18 Martin Liska <mliska@suse.cz>
17080 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17083 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17084 arguments if they are comparable.
17086 2018-04-18 Martin Liska <mliska@suse.cz>
17089 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17092 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17095 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
17098 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17099 ENDBR after calling __morestack.
17101 2018-04-18 David Malcolm <dmalcolm@redhat.com>
17104 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17105 by using gcc_base_ver to generate a gcc_driver_version, and use
17106 it when generating GCC_DRIVER_NAME.
17107 * configure: Regenerate.
17109 2018-04-18 Jakub Jelinek <jakub@redhat.com>
17112 * config.gcc: Obsolete powerpc*-*-*spe*.
17114 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17117 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17118 (stabstr_D): Change type of unum from unsigned int to
17119 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17122 2018-04-17 Jim Wilson <jimw@sifive.com>
17125 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17126 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17127 Set arg_pointer_offset after using pretend_args_size.
17129 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17131 PR rtl-optimization/85431
17132 * dse.c (record_store): Ignore zero width stores.
17135 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17136 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17137 __builtin_stack_restore rather than after it.
17138 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17139 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17140 argument instead of virtual_dynamic_stack_rtx.
17142 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17144 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17146 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17147 Add note to error message to explain internal mapping of overloaded
17148 built-in function name to non-overloaded built-in function name.
17149 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17152 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17155 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17156 where the inputs overlap with the output.
17158 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17160 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17161 (=v, v) alternative and explicit "memory" attribute.
17162 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17163 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17165 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17166 "sselog1" type instead of "sselog".
17167 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17168 "sselog". Remove explicit "memory" attribute.
17169 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17170 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17172 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17173 "sselog1" type instead of "sselog". Remove explicit "memory"
17175 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17176 use "sselog1" type instead of "sselog". Remove explicit "memory"
17178 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17179 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17181 (vec_extract_hi_v64qi): Merge all alternatives into one, use
17182 "sselog1" type instead of "sselog". Remove explicit "memory"
17184 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17185 use "sselog1" type instead of "sselog". Remove explicit "memory"
17189 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17191 PR middle-end/85414
17192 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17195 2018-04-17 Martin Jambor <mjambor@suse.cz>
17198 * ipa-cp.c (create_specialized_node): Call
17199 expand_all_artificial_thunks if necessary.
17201 2018-04-17 Martin Liska <mliska@suse.cz>
17204 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17205 in message, remote space in between '_G' and '('.
17207 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17210 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17211 avx512f_vmcmp<mode>3<round_saeonly_name>,
17212 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17213 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17214 avx512f_rndscale<mode><round_saeonly_name>,
17215 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17216 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17217 Use %<iptr>2 instead of %2 for -masm=intel.
17218 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17219 avx512f_vcvttss2usi<round_saeonly_name>,
17220 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17222 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17223 avx512f_vcvttsd2usi<round_saeonly_name>,
17224 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17225 Use %q1 instead of %1 for -masm=intel.
17226 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17227 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17228 of %3 for -masm=intel.
17229 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17231 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17233 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17235 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17236 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17238 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17240 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17241 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17242 %g1 and one with %0 and %1.
17243 (avx512er_vmrcp28<mode><round_saeonly_name>,
17244 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17245 %1 for -masm=intel.
17246 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17247 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17248 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17249 of %0 and %{%4%} for -masm=intel.
17250 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17251 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17252 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17253 order of %0 and %{%5%}%{z%} for -masm=intel.
17255 2018-04-17 Jan Hubicka <jh@suse.cz>
17258 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17260 2018-04-17 Martin Liska <mliska@suse.cz>
17263 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17264 for target_clone error message. Make default implementation
17265 clone to be a local declaration.
17266 (separate_attrs): Add new argument and check for an empty
17268 (expand_target_clones): Handle it.
17269 (ipa_target_clone): Make redirection just for target_clones
17272 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17273 Tom de Vries <tom@codesourcery.com>
17275 PR middle-end/84955
17276 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17277 tiled basic blocks without omp continue statements.
17279 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17282 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17283 vec_extract expression as having side effects to make sure it gets
17286 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17289 * config/i386/i386.c (get_builtin_code_for_version): Check
17292 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17295 * config.gcc: Support "skylake".
17296 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17298 * config/i386/i386.c (m_SKYLAKE): Define.
17299 (processor_target_table): Add "skylake".
17300 (ix86_option_override_internal): Add "skylake".
17301 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17302 PROCESSOR_CANNONLAKE.
17303 (get_builtin_code_for_version): Fix priority for
17304 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17305 PROCESSOR_SKYLAKE-AVX512.
17306 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17307 (processor_type): Add PROCESSOR_SKYLAKE.
17309 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17310 Jason Merrill <jason@redhat.com>
17313 * convert.c (convert_to_integer_1): Use direct recursion for
17314 enumeral types and types with a precision less than the number
17315 of bits in their mode.
17317 2018-04-16 Julia Koval <julia.koval@intel.com>
17320 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17321 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17323 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17326 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17327 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17328 and -mno-direct-move.
17330 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17333 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17334 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17335 Ensure negative shifts result in {0}.
17337 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17339 PR rtl-optimization/79916
17340 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17341 regs (if any) to define how to gnerate SD moves when LRA is in
17344 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17346 PR rtl-optimization/85393
17347 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17348 * except.c (expand_dw2_landing_pad_for_region): Make static.
17349 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17350 a label and unconditional jump to old_bb, rather than
17351 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17354 PR rtl-optimization/85376
17355 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17356 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17357 instead of a specific value.
17359 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17360 Bin Cheng <bin.cheng@arm.com>
17362 PR tree-optimization/82965
17363 PR tree-optimization/83991
17364 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17365 by_profile_only parameter.
17366 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17367 information if the loop was predicted to iterate too many times.
17368 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17370 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17373 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17376 2018-04-13 Martin Liska <mliska@suse.cz>
17377 Jakub Jelinek <jakub@redhat.com>
17379 PR middle-end/81657
17380 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17381 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17382 * builtins.c (expand_builtin_memory_copy_args): Use
17383 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17384 handle dest_addr == pc_rtx.
17386 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17389 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17390 asked to not generate direct moves.
17391 (fix_trunc<mode>si2_stfiwx): Similar.
17392 (fix_trunc<mode>si2_internal): Similar.
17394 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17397 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17398 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17399 lookup if dest in some wider mode is known to be const0_rtx and
17400 if so, record permanent equivalence for it to be ZERO_EXTEND of
17401 the narrower mode destination.
17403 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17405 * lto-streamer-out.c (output_function): Revert 259346.
17406 * omp-expand.c (expand_oacc_for): Likewise.
17408 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17410 PR rtl-optimization/85354
17411 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17412 * sel-sched.c (sel_global_init): ... here.
17414 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17417 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17418 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17419 mode for PE-COFF targets.
17420 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17421 (i386_pe_asm_lto_end): Likewise.
17422 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17423 (TARGET_ASM_LTO_END): Likewise.
17424 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17425 (i386_pe_asm_lto_start): New function.
17426 (i386_pe_asm_lto_end): Likewise.
17428 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17429 Richard Biener <rguenther@suse.de>
17431 PR middle-end/84955
17432 * lto-streamer-out.c (output_function): Fix CFG loop state before
17434 * omp-expand.c (expand_oacc_for): Handle calls to internal
17435 functions like regular functions.
17437 2018-04-12 Richard Biener <rguenther@suse.de>
17440 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17441 for the early LTO debug to properly generate references to it
17442 during DIE emission. Do not re-use that for the skeleton for
17444 (dwarf2out_early_finish): Likewise.
17446 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17449 * config/i386/sse.md
17450 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17451 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17452 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17453 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17454 and output is a reg, avoid creating invalid lowpart subreg, but
17455 instead split into a 512-bit move. Don't split if not AVX512VL,
17456 input is xmm16+ reg and output is a mem.
17457 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17458 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17459 xmm16+ reg and output is a mem.
17461 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17463 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17464 also for flag_dwarf2_cfi_asm.
17466 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17468 PR rtl-optimization/85342
17469 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17470 a bool scalar var inside of the loop instead. Don't try to update
17471 recog_data.operand after failed apply_change_group.
17473 2018-04-12 Tom de Vries <tom@codesourcery.com>
17476 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17477 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17478 array with flexible array member as array without given dimension.
17479 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17480 argument for undefined param to true.
17482 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17485 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17486 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17487 from PowerPC section.
17488 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17489 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17490 help text that is too long.
17491 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17492 help text that is too long.
17493 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17494 help text that is too long.
17496 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17498 * config/alpha/alpha.md (stack_probe_internal): Rename
17499 from "probe_stack". Update all callers.
17501 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17503 PR rtl-optimization/84566
17504 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17505 sched_macro_fuse_insns.
17507 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17510 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17511 (compute_block_dependences): ... from here.
17513 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17515 PR tree-optimization/85331
17516 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17517 from int to HOST_WIDE_INT.
17519 2018-04-11 Martin Jambor <mjambor@suse.cz>
17522 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17523 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17524 not the same as the source val.
17525 (cgraph_edge_brings_value_p): New parameter.
17526 (gather_edges_for_value): Pass destination value to
17527 cgraph_edge_brings_value_p.
17528 (perhaps_add_new_callers): Likewise.
17529 (get_info_about_necessary_edges): Likewise and exclude values brought
17530 only by self-recursive edges.
17531 (create_specialized_node): Redirect only clones of self-calling edges.
17532 (+self_recursive_pass_through_p): New function.
17533 (find_more_scalar_values_for_callers_subset): Use it.
17534 (find_aggregate_values_for_callers_subset): Likewise.
17535 (known_aggs_to_agg_replacement_list): Removed.
17536 (decide_whether_version_node): Re-calculate known constants for all
17537 remaining context clones.
17539 2018-04-11 Richard Biener <rguenther@suse.de>
17542 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17543 from early DWARF output.
17544 (dwarf2out_early_finish): Output line info unconditionally into
17545 early DWARF and add reference to it.
17547 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17550 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17551 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17552 other than V2DFmode using iptr mode attribute.
17553 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17555 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17557 PR rtl-optimization/84659
17558 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17560 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17563 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17565 (output_loc_list): Pass address of a dummy size variable even in the
17566 locview handling loop.
17567 (index_location_lists): Add comment on why skip_loc_list_entry can't
17570 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17573 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17576 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17579 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17580 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17581 and -mstring-compare-inline-limit.
17583 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17586 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17587 for stack clash protection in a register whenever we need it to be in
17590 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17592 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17593 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17595 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17598 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17600 (mlong-double-): Ditto.
17601 * config/rs6000/sysv4.opt (msdata=): Ditto.
17602 (mtls-size=): Ditto.
17604 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17606 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17607 erroneous entries for
17608 "vector int vec_ldl (int, long int *)", and
17609 "vector unsigned int vec_ldl (int, unsigned long int *)".
17610 Add comments and entries for
17611 "vector bool char vec_ldl (int, bool char *)",
17612 "vector bool short vec_ldl (int, bool short *)",
17613 "vector bool int vec_ldl (int, bool int *)",
17614 "vector bool long long vec_ldl (int, bool long long *)",
17615 "vector pixel vec_ldl (int, pixel *)",
17616 "vector long long vec_ldl (int, long long *)",
17617 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17618 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17619 type tree bool_long_long_type_node and correct definition of
17620 bool_V2DI_type_node to make reference to this new type tree.
17621 (rs6000_mangle_type): Replace erroneous reference to
17622 bool_long_type_node with bool_long_long_type_node.
17623 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17624 comments to emphasize sign distinctions for char and int types and
17625 replace RS6000_BTI_bool_long constant with
17626 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17627 use of RS6000_BTI_pixel.
17628 (bool_long_type_node): Remove this macro definition.
17629 (bool_long_long_type_node): New macro definition
17631 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17633 PR rtl-optimization/85300
17634 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17635 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17636 simplify_unary_operation fails.
17638 2018-04-10 Martin Liska <mliska@suse.cz>
17640 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17641 cgraph_edge and ipa_ref.
17643 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17647 * config/i386/sse.md
17648 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17649 computation of the VEC_MERGE selector from mask.
17650 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17651 Fix decoding of the VEC_MERGE selector into mask.
17653 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17655 PR tree-optimization/85286
17656 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17658 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17660 * final.c (final_1): Set insn_last_address as well as
17661 insn_current_address.
17663 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17666 * explow.c (emit_stack_probe): Call validize_mem on memory location
17667 before passing it to gen_probe_stack. Create address operand and
17668 legitimize it for the probe_stack_address case.
17670 2018-04-09 Jan Hubicka <jh@suse.cz>
17673 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17674 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17675 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17677 (free_lang_data): Rebuild type inheritance graph.
17679 2018-04-09 Martin Sebor <msebor@redhat.com>
17681 * invoke.texi (-finline-small-functions): Mention other optimization
17683 (-findirect-inlining, -fpartial-inlining): Same.
17684 (-finline-functions-called-once): Same.
17685 (-freorder-blocks-and-partition): Same.
17687 2018-04-09 Jan Hubicka <jh@suse.cz>
17690 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17691 jumps; choose last target that matches the criteria (i.e.
17692 no partition changes for non-crossing jumps).
17693 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17694 support for redirecting crossing jumps to non-crossing.
17696 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17698 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17699 also for naked functions.
17701 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17703 * config/arc/arc.md (add_shift): New pattern.
17704 (add_shift2): Likewise.
17705 (sub_shift): Likewise.
17706 (sub_shift_cmp0_noout): Likewise.
17707 (compare_si_ashiftsi): Likewise.
17708 (xbfu_cmp0_noout): New combine pattern.
17709 (xbfu_cmp0"): Likewise.
17710 (movsi_set_cc_insn): Place the predicable variant first.
17711 (commutative_binary_cmp0_noout): Remove clobber.
17712 (commutative_binary_cmp0): New pattern.
17713 (noncommutative_binary_cmp0): Likewise.
17714 (noncommutative_binary_cmp0_noout): Likewise.
17715 (noncommutative_binary_comparison_result_used): Removed.
17716 (rsub_cmp0): New pattern.
17717 (rsub_cmp0_noout): Likewise.
17718 (extzvsi): Changed, keep only meaningful variants.
17719 (SQH, SEZ): New iterators.
17720 (SQH_postfix): New mode attribute.
17721 (SEZ_prefix): New code attribute.
17722 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17723 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17724 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17725 of numerical value.
17726 (noncommutative_operator): Check the availability of barrel
17729 2018-04-09 Richard Biener <rguenther@suse.de>
17731 PR tree-optimization/85284
17732 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17733 Only use the niter constraining form of simple_iv when the exit
17734 is always executed.
17736 2018-04-09 Tom de Vries <tom@codesourcery.com>
17739 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17740 (define_expand "*memory_barrier"): New define_expand.
17741 (define_insn "memory_barrier"): New insn.
17743 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17745 PR rtl-optimization/80463
17746 PR rtl-optimization/83972
17747 PR rtl-optimization/83480
17749 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17750 correct producer for the insn.
17751 (tidy_control_flow): Fixup seqnos in case of debug insns.
17753 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17755 PR rtl-optimization/83913
17757 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17758 different sched-times when merging exprs.
17760 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17762 PR rtl-optimization/83962
17764 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17765 tidy_fallthru_edge and tidy_control_flow.
17767 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17769 PR rtl-optimization/83530
17771 * sel-sched.c (force_next_insn): New global variable.
17772 (remove_insn_for_debug): When force_next_insn is true, also leave only
17773 next insn in the ready list.
17774 (sel_sched_region): When the region wasn't scheduled, make another pass
17775 over it with force_next_insn set to 1.
17777 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17779 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17781 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17782 for interrupt control.
17783 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17784 functions for interrupt control.
17785 * config/nds32/nds32-intrinsic.md: Likewise.
17786 * config/nds32/nds32_intrinsic.h: Likewise.
17787 * config/nds32/nds32.h (nds32_builtins): Likewise.
17789 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17791 * config/nds32/nds32.c (nds32_init_machine_status,
17792 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17793 strict_aligned_p field.
17794 (nds32_expand_to_rtl_hook): New function.
17795 (TARGET_EXPAND_TO_RTL_HOOK): Define.
17796 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17798 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17799 Chung-Ju Wu <jasonwucj@gmail.com>
17801 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17802 * config/nds32/nds32-n7.md: New file.
17803 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17804 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17806 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17807 * config/nds32/nds32.md (pipeline_model): Add n7.
17808 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17809 * config/nds32/pipelines.md: Include n7 settings.
17811 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17812 Chung-Ju Wu <jasonwucj@gmail.com>
17814 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17815 * config/nds32/nds32-e8.md: New file.
17816 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17817 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17819 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17820 * config/nds32/nds32.md (pipeline_model): Add e8.
17821 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17822 * config/nds32/pipelines.md: Include e8 settings.
17824 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17825 Chung-Ju Wu <jasonwucj@gmail.com>
17827 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17828 * config/nds32/nds32-n8.md: New file.
17829 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17830 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17832 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17833 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17834 * config/nds32/nds32.md (pipeline_model): Add n8.
17835 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17836 * config/nds32/pipelines.md: Include n8 settings.
17838 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17839 Chung-Ju Wu <jasonwucj@gmail.com>
17841 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17842 * config/nds32/nds32-n9-2r1w.md: New file.
17843 * config/nds32/nds32-n9-3r2w.md: New file.
17844 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17845 nds32_register_ports): New or modify for cpu n9.
17846 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17848 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17849 * config/nds32/nds32-utils.c: New file.
17850 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17851 TARGET_MUL_SLOW): Define.
17852 * config/nds32/nds32.md (pipeline_model): New attribute.
17853 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17854 New options that support cpu n9.
17855 * config/nds32/pipelines.md: Include n9 settings.
17856 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17858 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17860 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17861 information if necessary.
17862 (output_cond_branch_compare_zero): Likewise.
17863 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17864 (nds32_target_alignment): Refine for alignment.
17865 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17866 (FUNCTION_BOUNDARY): Modify.
17867 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17869 * config/nds32/nds32.opt (malways-align, malign-functions): New.
17871 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17873 * config/nds32/constants.md (unspec_volatile_element): Add values for
17874 TLB operation and data prefetch.
17875 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17876 functions for TLB operation and data prefetch.
17877 * config/nds32/nds32-intrinsic.md: Likewise.
17878 * config/nds32/nds32_intrinsic.h: Likewise.
17879 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17880 (nds32_print_operand): Likewise.
17881 * config/nds32/nds32.h (nds32_builtins): Likewise.
17883 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
17884 Andrew Pinski <pinsika@gcc.gnu.org>
17886 PR middle-end/82976
17887 * match.pd: Use constant_boolean_node of correct type instead of
17888 boolean_true_node or boolean_false_node for simplifying
17889 pointer comparisons to zero.
17891 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17893 PR tree-optimization/80021
17894 * tree.c (verify_type_variant): Make error call in verify_variant_match
17895 translatable and remove final full stop.
17897 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17899 * config/nds32/constants.md (unspec_volatile_element): Add
17900 UNSPEC_VOLATILE_EH_RETURN.
17901 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17902 nds32_output_stack_pop): Support dwarf exception handling process.
17903 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17904 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17905 exception handling process.
17906 (nds32_compute_stack_frame): Likewise.
17907 (nds32_return_addr_rtx): Likewise.
17908 (nds32_initial_elimination_offset): Likewise.
17909 (nds32_expand_prologue): Likewise.
17910 (nds32_expand_epilogue): Likewise.
17911 (nds32_dynamic_chain_address): New function.
17912 * config/nds32/nds32.h (machine_function): Add fields for dwarf
17913 exception handling.
17914 (DYNAMIC_CHAIN_ADDRESS): Define.
17915 (EH_RETURN_DATA_REGNO): Define.
17916 (EH_RETURN_STACKADJ_RTX): Define.
17917 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17918 patterns for dwarf exception handling.
17920 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17922 * config/nds32/nds32.h: Clean up obsolete macros.
17924 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17926 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17927 Add enum values for particular instructions.
17928 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17929 particular intrinsic functions.
17930 * config/nds32/nds32-intrinsic.md: Likewise.
17931 * config/nds32/nds32_intrinsic.h: Likewise.
17932 * config/nds32/nds32.h (nds32_builtins): Likewise.
17933 * config/nds32/nds32.md (type): Add pbsad and pbsada.
17934 (btst, ave): New patterns for particular instructions.
17936 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17938 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17939 Add enum values for atomic load/store and memory sync.
17940 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17942 * config/nds32/nds32-intrinsic.md: Likewise.
17943 * config/nds32/nds32_intrinsic.h: Likewise.
17944 * config/nds32/nds32.h (nds32_builtins): Likewise.
17946 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17948 PR tree-optimization/85257
17949 * fold-const.c (native_encode_vector): If not all elts could fit
17950 and off is -1, return 0 rather than offset.
17951 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17952 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17953 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
17954 adjust buffer in native_interpret_expr call.
17956 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17958 * config/nds32/constants.md (unspec_volatile_element): Add cache
17959 control enum values.
17960 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17961 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17962 * config/nds32/nds32.c (nds32_cctl_names): New.
17963 (nds32_print_operand): Handle cache control register names.
17964 * config/nds32/nds32.h (nds32_builtins): New enum values.
17965 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17967 * config/nds32/nds32.md (type): Add mmu.
17968 * config/nds32/pipelines.md (simple_insn): Add mmu.
17970 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17972 * config/nds32/nds32.md (type): Remove call.
17973 * config/nds32/pipelines.md (simple_insn): Likewise.
17975 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17977 * config/nds32/constants.md (unspec_volatile_element): Add
17978 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17979 UNSPEC_VOLATILE_FMFCFG.
17980 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17981 description for fmfcfg and fmfcsr.
17982 (bdesc_1arg): Add fmtcsr.
17983 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17984 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17985 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17986 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17987 unspec_fmfcfg): New patterns.
17988 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17989 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17990 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17991 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17992 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17993 __nds32__fmfcfg): Define.
17995 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17997 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17998 intrinsic register names.
17999 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18000 intrinsic register enum values and macros.
18002 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18004 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18005 for load/store addressing form.
18006 (nds32_print_operand_address): Likewise.
18008 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
18011 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18012 based on LABEL_REF. Remove useless assertion.
18013 (pic_address_needs_scratch): Fix formatting.
18014 (sparc_legitimize_pic_address): Minor tweaks.
18015 (sparc_delegitimize_address): Adjust assertion accordingly.
18016 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18017 into symbolic_operand.
18018 (movsi_high_pic_label_ref): Likewise.
18019 (movsi_lo_sum_pic_label_ref): Likewise.
18020 (movdi_pic_label_ref): Likewise.
18021 (movdi_high_pic_label_ref): Likewise.
18022 (movdi_lo_sum_pic_label_ref): Likewise.
18024 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
18026 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18027 custom LIB_SPEC setup.
18029 2018-04-06 Ruslan Bukin <br@bsdpad.com>
18030 Kito Cheng <kito.cheng@gmail.com>
18032 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18033 * config/riscv/freebsd.h: New.
18035 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18037 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18038 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18041 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18042 Kito Cheng <kito.cheng@gmail.com>
18044 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18045 nds32_output_call, nds32_symbol_binds_local_p): New functions.
18046 * config/nds32/nds32-protos.h (nds32_output_call,
18047 nds32_output_return): Declare.
18048 * config/nds32/nds32.md: Refine all the call and return patterns.
18050 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18053 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18054 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18056 PR rtl-optimization/84872
18057 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18058 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18059 EDGE_CROSSING edge.
18061 2018-04-06 Tamar Christina <tamar.christina@arm.com>
18063 * expr.c (copy_blkmode_to_reg): Revert 254862.
18064 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18066 2018-04-06 Richard Biener <rguenther@suse.de>
18068 PR middle-end/85244
18069 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18070 after seeing a component reference with an adjacent field. Treat
18071 refs to arrays at struct end of external decls similar to
18072 refs to unconstrained commons.
18074 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18077 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18078 look through SAVE_EXPRs with non-side-effects argument. Adjust
18080 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18083 2018-04-06 Richard Biener <rguenther@suse.de>
18085 PR middle-end/85180
18086 * alias.c (find_base_term): New wrapper around find_base_term
18087 unwinding CSELIB_VAL_PTR changes.
18088 (find_base_term): Do not restore CSELIB_VAL_PTR during the
18091 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18093 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18095 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18096 constant definitions.
18097 ("nop"): lr 0,0 -> nopr r0
18098 ("nop_lr0", "nop_lr1"): New insn definitions.
18100 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18102 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18103 NDS32_V3PUSH_AVAILABLE_P macro.
18105 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
18106 Chung-Ju Wu <jasonwucj@gmail.com>
18108 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18109 (nds32*-*-*): Add float and fpu_config into supported_defaults.
18110 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18111 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18112 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18113 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18114 * config/nds32/constraints.md: New constraints and checking for hard
18115 float configuration.
18116 * config/nds32/iterators.md: New mode iterator and attribute for hard
18117 float configuration.
18118 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18120 * config/nds32/nds32-fpu.md: New file.
18121 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18122 deal with hard float code generation.
18123 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18125 (abi_type, float_reg_number): New enum type.
18126 * config/nds32/nds32-predicates.c: New predicates for hard float.
18127 * config/nds32/nds32-protos.h: Declare functions for hard float.
18128 * config/nds32/nds32.c: Implementation for hard float configuration.
18129 * config/nds32/nds32.h: Definitions for hard float configuration.
18130 * config/nds32/nds32.md: Include hard float machine description and
18131 modify patterns for hard float configuration.
18132 * config/nds32/nds32.opt: New options for hard float configuration.
18133 * config/nds32/predicates.md: New predicates for hard float
18136 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18138 * common/config/nds32/nds32-common.c
18139 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18141 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18143 PR middle-end/85195
18144 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18145 CONSTRUCTOR_ELT (ctor, ...)->value.
18147 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18150 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18152 2018-04-05 Tom de Vries <tom@codesourcery.com>
18155 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18158 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18159 Kito Cheng <kito.cheng@gmail.com>
18161 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18162 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18163 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18164 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18166 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18167 Kito Cheng <kito.cheng@gmail.com>
18169 * config/nds32/constraints.md (Ufe): New memory constraint.
18170 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18171 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18172 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18174 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18175 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18177 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18179 * config/nds32/nds32.md: Use optimize_size in the condition for
18180 alu-shift instructions.
18182 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18184 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18186 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18188 * config/nds32/nds32.md (negsi2): Refine pattern.
18190 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18191 Chung-Ju Wu <jasonwucj@gmail.com>
18193 * config/nds32/iterators.md (shift_rotate): New code iterator.
18194 (shift): New code attribute.
18195 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18196 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18197 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18198 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18199 bit-wise operations.
18200 (andsi3, *andsi3): Ditto.
18201 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18202 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18203 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18204 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18205 nds32_ior_operand, nds32_xor_operand): New predicates.
18207 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18209 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18210 (addsi3, subsi3): ... this.
18212 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18214 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18216 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18218 * config/nds32/nds32.md: Adjust indention.
18220 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18222 * config/nds32/nds32.md (feature): New attribute.
18224 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18226 * config/nds32/nds32.md (subtype): New attribute.
18228 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
18231 * config/arm/arm-builtins.c (arm_expand_builtin): Change
18232 expansion to perform a bitwise AND of the argument followed by a
18233 boolean negation of the result.
18235 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
18237 PR rtl-optimization/84878
18238 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18239 the basic block. Assert the use reference is not artificial and that
18240 it has an associated insn.
18242 2018-04-04 Michael Matz <matz@suse.de>
18244 * builtins.c (compute_objsize): Pass correct operand
18245 to array_at_struct_end_p.
18247 2018-04-04 Richard Biener <rguenther@suse.de>
18250 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18251 from contexts for DINFO_LEVEL_TERSE and below.
18253 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18255 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18256 resiter_operand condition.
18257 * config/nds32/nds32.md (*move<mode>): Ditto.
18259 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18260 Monk Chiang <sh.chiang04@gmail.com>
18262 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18264 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18266 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18268 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18269 Kito Cheng <kito.cheng@gmail.com>
18271 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18272 nds32_cond_code_str, output_cond_branch,
18273 output_cond_branch_compare_zero, nds32_expand_cbranch,
18274 nds32_expand_cstore, nds32_expand_movcc,
18275 nds32_output_cbranchsi4_equality_zero,
18276 nds32_output_cbranchsi4_equality_reg,
18277 nds32_output_cbranchsi4_equality_reg_or_const_int,
18278 nds32_output_cbranchsi4_greater_less_zero: New functions.
18279 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18280 nds32_expand_cstore, nds32_expand_movcc,
18281 nds32_output_cbranchsi4_equality_zero,
18282 nds32_output_cbranchsi4_equality_reg,
18283 nds32_output_cbranchsi4_equality_reg_or_const_int,
18284 nds32_output_cbranchsi4_greater_less_zero): Declare.
18285 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18286 nds32_rimm11s_operand): New predicates.
18287 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18288 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18291 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18293 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18294 * config/nds32/nds32.md: Ditto.
18295 * config/nds32/pipelines.md: Ditto.
18297 2018-04-04 Richard Biener <rguenther@suse.de>
18299 PR tree-optimization/85168
18300 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18301 propagating abnormals.
18303 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18305 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18307 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18308 Kito Cheng <kito.cheng@gmail.com>
18310 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18311 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18312 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18313 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18314 * config/nds32/nds32.md (sibcall_internal): New.
18315 (sibcall_register): Remove.
18316 (sibcall_immediate): Remove.
18317 (sibcall_value_internal): New.
18318 (sibcall_value_register): Remove.
18319 (sibcall_value_immediate): Remove.
18320 * config/nds32/predicates.md (nds32_general_register_operand): New.
18321 (nds32_call_address_operand): New.
18323 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18325 PR rtl-optimization/85167
18326 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18327 bb_defs if *split_p, instead preinitialize it to NULL.
18329 PR tree-optimization/85156
18330 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18331 evaluating the argument multiple times.
18333 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18335 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18337 (_mm_cvtpd_ps): Likewise.
18338 (_mm_cvttpd_epi32): Likewise.
18339 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18340 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18341 vector, pixel, and bool following altivec.h include.
18343 2018-04-03 Martin Sebor <msebor@redhat.com>
18345 * doc/extend.texi (Common Function Attributes): Clarify.
18346 (const attribute): Likewise.
18347 (pure attribute): Likewise.
18349 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18352 * config/i386/i386.c (ix86_expand_vector_set): Use
18353 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18355 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18357 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18358 instructions when changing rounding bits to preserve precision bits
18359 in the x87 control word.
18361 2018-04-03 Martin Liska <mliska@suse.cz>
18363 PR tree-optimization/82491
18364 * rtl.h (strip_offset_and_add): Replace += suboffset with
18365 poly_uint64 () + suboffset.
18367 2018-03-29 Martin Liska <mliska@suse.cz>
18368 Martin Jambor <mjambor@suse.cz>
18371 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18372 param_type is not an integral or pointer type.
18374 2018-04-03 Richard Biener <rguenther@suse.de>
18376 * sese.h (recompute_all_dominators): Remove.
18378 2018-04-02 Martin Sebor <msebor@redhat.com>
18380 * doc/invoke.texi (-Wrestrict): Fix typos.
18382 2018-04-02 Jim Wilson <jimw@sifive.com>
18384 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18385 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18386 (<optab>di3, <optab>si3_extend): Likewise.
18387 (<optab>si3_mask, <optab>si3_mask_1): New.
18388 (<optab>di3_mask, <optab>di3_mask_1): New.
18389 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18390 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18391 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18393 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18395 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18398 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18400 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18401 (nds32_canonicalize_comparison): New function.
18403 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18404 Kito Cheng <kito.cheng@gmail.com>
18405 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18407 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18408 * config/nds32/constants.md (unspec_volatile_element): Add
18409 UNSPEC_VOLATILE_RELAX_GROUP.
18410 * config/nds32/nds32-relax-opt.c: New file.
18411 * config/nds32/nds32-predicates.c
18412 (nds32_symbol_load_store_p): New function.
18413 * config/nds32/nds32-protos.h
18414 (nds32_symbol_load_store_p): Declare function.
18415 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18416 * config/nds32/nds32.c
18417 (nds32_register_pass): New function to register pass.
18418 (nds32_register_passes): New function to register passes.
18419 * config/nds32/nds32.md (relax_group): New pattern.
18420 * config/nds32/nds32.opt (mrelax-hint): New option.
18421 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18423 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18425 * config/nds32/t-nds32: Modify files dependency.
18427 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18429 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18430 (PROFILE_HOOK): Define its implementation.
18432 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18434 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18435 type and 32-bit size.
18437 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18439 PR middle-end/85090
18440 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18441 (V_128_256): New mode iterator.
18442 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18443 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18444 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18446 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18447 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18449 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18452 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18453 NaN inputs correctly.
18455 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18458 * config/rs6000/vsx.md (??r): New mode attribute.
18459 (*vsx_mov<mode>_64bit): Use it.
18460 (*vsx_mov<mode>_32bit): Likewise.
18462 2018-03-30 Martin Sebor <msebor@redhat.com>
18464 PR tree-optimization/84818
18465 * builtins.c (check_access): Use warning_n.
18467 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18470 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18472 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18475 2018-03-30 Julia Koval <julia.koval@intel.com>
18478 * x86-tune.def (movx, partial_reg_dependency): Enable for
18481 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18483 PR inline-asm/84985
18484 * lra-constraints.c (process_alt_operands): Move setting
18485 this_alternative_matches below.
18487 2018-03-29 Martin Liska <mliska@suse.cz>
18490 * doc/invoke.texi: Document how LTO works with debug info.
18491 Describe auto-load support of binutils. Mention 'x86-64'
18492 as valid option value of -march option.
18494 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18496 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18499 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18500 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18501 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18504 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18507 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18508 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18509 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18510 for RS6000_BTM_POWERPC64.
18511 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18512 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18513 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18516 (DIVDEU): Likewise.
18518 2018-03-28 Carl Love <cel@us.ibm.com>
18521 2017-09-27 Carl Love <cel@us.ibm.com>
18523 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18524 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18525 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18528 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18530 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18531 instead of __vector bool.
18532 (_mm_max_pu8): Likewise.
18533 (_mm_min_pi16): Likewise.
18535 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18538 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18539 (DIVWEUO): Likewise.
18540 (DIVDEO): Likewise.
18541 (DIVDEUO): Likewise.
18542 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18543 DIVWEUO and DIVDEUO.
18544 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18545 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18546 (div_extend): Likewise.
18547 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18549 (__builtin_divweuo): Likewise.
18550 (__builtin_divdeo): Likewise.
18551 (__builtin_divdeuo): Likewise.
18553 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18556 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18557 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18559 PR tree-optimization/82004
18560 * gimple-match-head.c (optimize_pow_to_exp): New function.
18561 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18562 Don't fold to exp if optimize_pow_to_exp is false.
18564 2018-03-28 Martin Liska <mliska@suse.cz>
18567 * calls.c (initialize_argument_information): Fix trailing space.
18568 * common.opt: Fix typo and provide better explanation for
18569 -fsanitize-coverage option.
18570 * config/i386/i386.opt: Fix typo.
18572 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18573 Martin Liska <mliska@suse.cz>
18576 * gimplify.c (asan_poison_variable): Don't do the check for
18577 gimplify_omp_ctxp here.
18578 (gimplify_decl_expr): Do it here.
18579 (gimplify_target_expr): Likewise.
18581 2018-03-28 Martin Liska <mliska@suse.cz>
18584 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18585 chkp_type_bounds_count if MPX is not enabled.
18587 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18589 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18591 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18594 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18595 function to create the function decl for complex long double
18596 multiply and divide for -mabi=ieeelongdouble.
18597 (init_float128_ieee): Call it.
18599 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18602 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18603 -fcf-protection=branch -mibt.
18604 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18606 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18609 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18610 arm_word_relocations.
18612 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18615 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18616 extern array declarations.
18618 2018-03-27 Richard Biener <rguenther@suse.de>
18620 PR middle-end/84067
18621 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18622 explicit single_use checks.
18624 2018-03-27 Richard Biener <rguenther@suse.de>
18626 PR tree-optimization/85082
18627 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18630 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18632 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18633 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18634 Turn on fasynchronous-unwind-tables and funwind-tables.
18636 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18639 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18640 (*bmi_blsr_<mode>_ccz): Ditto.
18642 2018-03-26 Tom de Vries <tom@codesourcery.com>
18644 PR tree-optimization/85063
18645 * omp-general.c (offloading_function_p): New function. Factor out
18647 * omp-offload.c (pass_omp_target_link::gate): ... here.
18648 * omp-general.h (offloading_function_p): Declare.
18649 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18650 with attribute omp declare target for offloading functions.
18652 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18654 PR tree-optimization/84005
18655 * tree-data-ref.h (get_base_for_alignment): Declare.
18656 * tree-data-ref.c (get_base_for_alignment_1): New function.
18657 (get_base_for_alignment): Likewise.
18658 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18659 get_base_for_alignment to find a suitable base object, instead
18660 of always using drb->base_address.
18662 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18664 PR inline-asm/85022
18665 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18666 known size by default.
18668 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18670 PR inline-asm/85030
18671 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18672 and non BLKmode operands.
18674 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18677 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18678 Clean up attributes.
18680 2018-03-23 Richard Biener <rguenther@suse.de>
18683 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18684 we are going to emit early debug for LTO.
18686 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18688 PR inline-asm/85034
18689 * function.c (match_asm_constraints_1): Don't optimize if input
18690 doesn't satisfy general_operand predicate for output's mode.
18692 PR inline-asm/85022
18693 * alias.c (write_dependence_p): Don't require for x_canonicalized
18694 non-VOIDmode if x has VOIDmode.
18697 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18698 just don't try to optimize it rather than assert it never happens.
18700 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18702 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18703 macro expansions for definition of ST_INTERNAL_<mode> and
18704 LD_INTERNAL_<mode> builtins.
18705 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18707 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18709 (altivec_expand_st_builtin): Likewise.
18710 (altivec_expand_builtin): Remove calls to deleted functions.
18711 (rs6000_address_for_altivec): Delete this function.
18712 * config/rs6000/vector.md: Remove expands for
18713 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18715 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18718 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18719 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18720 re-computing once computed.
18721 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18722 (arm_init_machine_status): Initialize
18723 machine->static_chain_stack_bytes.
18725 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18728 * doc/extend.texi: Add four new prototypes for vec_ld.
18729 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18730 definitions for more logical presentation.
18731 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18732 entries for V1TI variants of __builtin_altivec_ld builtin.
18733 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18734 handling of V1TI variant of LVX icode pattern.
18735 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18736 (rs6000_gimple_fold_builtin): Likewise.
18737 (altivec_init_builtins): Add code to define
18738 __builtin_altivec_lvx_v1ti function.
18740 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18742 PR inline-asm/84941
18743 * function.c (match_asm_constraints_1): Don't do the optimization
18744 if input isn't a REG, SUBREG, MEM or constant.
18746 2018-03-22 Tom de Vries <tom@codesourcery.com>
18748 PR tree-optimization/84956
18749 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18750 bb_has_abnormal_pred.
18752 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18755 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18756 DECL_INITIAL (decl) to decl at the end.
18757 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18758 adjust the comment.
18760 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18762 * doc/extend.texi (__builtin_tgmath): Document when complex
18763 integer types are treated as _Complex _Float64.
18765 2018-03-21 Tom de Vries <tom@codesourcery.com>
18767 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18769 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18771 PR tree-optimization/84960
18772 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18773 if it is ENTRY block, move them into single succ of ENTRY in that case.
18775 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
18777 PR tree-optimization/84811
18778 * poly-int.h (poly_span_traits): Remove the T3 parameter and
18779 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18780 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18781 (known_subrange_p): Update accordingly. Cast each value involved
18782 in the size comparison, rather than casting the result of the
18785 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18787 PR tree-optimization/84982
18788 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18789 by flipping the least significant bit rather than all bits from
18790 bitpos to bitpos + bitsize - 1.
18792 2018-03-21 Nathan Sidwell <nathan@acm.org>
18794 * doc/extend.texi (Deprecated Features): Remove mention of
18795 long-deleted deprecations.
18797 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18800 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18801 * configure: Regenerate.
18803 2018-03-21 Tom de Vries <tom@codesourcery.com>
18805 PR tree-optimization/83126
18806 * tree-parloops.c (num_phis): New function.
18807 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18809 2018-03-21 Nathan Sidwell <nathan@acm.org>
18811 * doc/extend.texi (Deprecated Features): Update deprecated flags,
18812 mention anon-struct/union members and trailing attributes.
18814 2018-03-21 Bin Cheng <bin.cheng@arm.com>
18816 PR tree-optimization/84969
18817 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18818 builtin memset partitions if they set different rhs values.
18820 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18822 PR rtl-optimization/84989
18823 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18824 VEC_DUPLICATE with scalar result mode.
18826 2018-03-21 Martin Liska <mliska@suse.cz>
18829 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18830 not intended return statement.
18832 2018-03-21 Martin Liska <mliska@suse.cz>
18835 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18836 (chkp_find_bound_slots_1): Limit number of iterations.
18838 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
18841 * Minor grammar fixes for x86 options.
18843 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18846 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18847 holding REG_CFA_RESTORE notes, instead turn them into a USE.
18849 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
18852 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18853 (altivec_lvx_<mode>_1op): Likewise.
18854 (altivec_stvx_<mode>_2op): Likewise.
18855 (altivec_stvx_<mode>_1op): Likewise.
18856 (altivec_lvx_<VM2:mode>): New define_expand.
18857 (altivec_stvx_<VM2:mode>): Likewise.
18858 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18859 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18860 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18861 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18862 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18863 (rs6000_gen_lvx): Likewise.
18864 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18865 (altivec_expand_stv_builtin): Likewise.
18866 (altivec_expand_builtin): Likewise.
18867 * config/rs6000/vector.md: Likewise.
18869 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18872 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18875 2018-03-20 Richard Biener <rguenther@suse.de>
18878 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18879 sign-conversions as zero, fall back to standard scalar_stmt
18882 2018-03-20 Martin Liska <mliska@suse.cz>
18885 * predict.c (rebuild_frequencies): Handle case when we have
18886 PROFILE_ABSENT, but flag_guess_branch_prob is false.
18888 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18891 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18892 flag_section_anchors.
18893 * varasm.c (use_blocks_for_decl_p): Remove hack for
18894 dw2_force_const_mem.
18897 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18899 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
18900 be created, use lowpart_subreg of operands[0] rather than operands[0]
18902 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18903 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18904 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18905 and n constraint instead of aarch64_shift_imm_di and Usd.
18906 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18907 (*aarch64_<optab>_reg_minus<mode>3): ... this.
18909 2018-03-20 Sudakshina Das <sudi.das@arm.com>
18912 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18913 to favor GPR over NEON registers.
18914 (<shift>di3_neon): Likewise.
18916 2018-03-20 Tom de Vries <tom@codesourcery.com>
18919 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18920 (nvptx_process_pars): Emit bar.sync asap and alap.
18922 2018-03-20 Tom de Vries <tom@codesourcery.com>
18925 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18926 seen_label if seen_label is already set.
18928 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18931 * config/i386/i386.c (fold_builtin_cpu): For features above 31
18932 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18933 Use 1U instead of 1. Formatting fixes.
18936 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18937 instead of TREE_TYPE (s1) for the return value.
18939 2018-03-19 Jakub Jelinek <jakub@redhat.com>
18941 PR tree-optimization/84946
18942 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18943 bitsize + bitsize in poly_uint64 rather than poly_int64.
18946 * dwarf2asm.c: Include fold-const.c.
18947 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18948 of decl rather than decl itself.
18950 PR rtl-optimization/84643
18951 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18953 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
18956 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18957 calling assemble_variable.
18959 2018-03-19 Sudakshina Das <sudi.das@arm.com>
18962 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18963 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18965 2018-03-19 Jim Wilson <jimw@sifive.com>
18968 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18969 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18970 (riscv_first_stack_step): Likewise.
18971 (riscv_option_override): Use STACK_BOUNDARY instead of
18972 MIN_STACK_BOUNDARY.
18973 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18974 MIN_STACK_BOUNDARY.
18975 (BIGGEST_ALIGNMENT): Set to 128.
18976 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18977 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18980 2018-03-19 Richard Biener <rguenther@suse.de>
18982 PR tree-optimization/84933
18983 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18984 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18986 2018-03-19 Richard Biener <rguenther@suse.de>
18988 PR tree-optimization/84859
18989 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18990 (cond_if_else_store_replacement): Perform sinking operation on
18991 single-store BBs regardless of MAX_STORES_TO_SINK setting.
18992 Generalize what a BB with a single eligible store is.
18994 2018-03-19 Richard Biener <rguenther@suse.de>
18996 PR tree-optimization/84929
18997 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18998 chrec_is_positive against non-chrec arg.
19000 2018-03-19 Tamar Christina <tamar.christina@arm.com>
19003 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19005 2018-03-18 Martin Liska <mliska@suse.cz>
19007 PR rtl-optimization/84635
19008 * regrename.c (build_def_use): Use matches_mode only when
19011 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
19013 PR tree-optimization/84913
19014 * tree-vect-loop.c (vectorizable_reduction): Don't try to
19015 vectorize chains of COND_EXPRs.
19017 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19019 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19021 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19023 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19025 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19027 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19029 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19030 Kito Cheng <kito.cheng@gmail.com>
19032 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19033 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19034 (nds32_adjust_reg_alloc_order): New function.
19035 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19037 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
19039 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19040 nds32_print_operand, nds32_print_operand_address): Use
19041 HOST_WIDE_INT_PRINT_DEC instead.
19043 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19045 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19047 2018-03-17 Jakub Jelinek <jakub@redhat.com>
19050 * config/i386/i386.c (initial_ix86_tune_features,
19051 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19052 unsigned long long.
19053 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19054 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19055 rather than 1u << ix86_tune. Formatting fix.
19056 (ix86_option_override_internal): Change ix86_arch_mask from
19057 unsigned int to unsigned HOST_WIDE_INT, initialize to
19058 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19059 (ix86_function_specific_restore): Likewise.
19061 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19064 * postreload.c (reload_combine_recognize_pattern): Perform
19065 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19066 truncate_int_for_mode the result for the destination's mode.
19069 * hsa-gen.c (mem_type_for_type): Fix comment typo.
19070 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19072 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19075 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
19078 * lra-assigns.c (lra_split_hard_reg_for): Don't use
19079 regno_allocno_class_array and sorted_pseudos.
19080 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19081 insns where regno is used.
19083 2018-03-16 Martin Liska <mliska@suse.cz>
19086 * multiple_target.c (create_dispatcher_calls): Redirect
19087 reference in the symbol table.
19089 2018-03-16 Martin Liska <mliska@suse.cz>
19092 * multiple_target.c (create_dispatcher_calls): Redirect also
19095 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19099 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19100 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19101 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19103 2018-03-16 Julia Koval <julia.koval@intel.com>
19105 * doc/invoke.texi (Skylake Server): Add CLWB.
19106 Cannonlake): Remove CLWB.
19108 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19110 PR tree-optimization/84841
19111 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19113 (FLOAT_ONE_CONST_TYPE): Define.
19114 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19115 (sort_by_operand_rank): Put entries with higher constant_type last
19116 rather than first to match comments.
19118 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19120 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19123 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19126 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19127 check and use address of target always.
19129 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19132 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19133 (indirect_thunk_bnd_needed): Likewise.
19134 (indirect_thunks_used): Likewise.
19135 (indirect_thunks_bnd_used): Likewise.
19136 (indirect_return_needed): New.
19137 (indirect_return_bnd_needed): Likewise.
19138 (output_indirect_thunk_function): Add a bool argument for
19140 (output_indirect_thunk_function): Don't generate alias for
19141 function return thunk.
19142 (ix86_code_end): Call output_indirect_thunk_function to generate
19143 function return thunks.
19144 (ix86_output_function_return): Set indirect_return_bnd_needed
19145 and indirect_return_needed instead of indirect_thunk_bnd_needed
19146 and indirect_thunk_needed.
19148 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19150 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19151 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19152 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19154 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19155 Paul Hua <paul.hua.gm@gmail.com>
19158 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19160 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19162 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19163 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19164 resp. SFmode cases.
19166 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19169 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19170 instead of GET_MODE_SIZE when comparing Units.
19172 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19175 * varasm.c (hash_section): Return an unchangeble hash value
19176 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19177 Return !aarch64_can_use_per_function_literal_pools_p ().
19179 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19182 * optabs.c (emit_conditional_move): Pass address of cmode's copy
19183 rather than address of cmode as last argument to prepare_cmp_insn.
19185 2018-03-15 Julia Koval <julia.koval@intel.com>
19187 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19188 F_AVX512VNNI, F_AVX512BITALG): New.
19190 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
19193 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
19194 insn for floating-point loads and stores.
19196 2018-03-14 Carl Love <cel@us.ibm.com>
19198 * config/rs6000/rs6000-c.c: Add macro definitions for
19199 ALTIVEC_BUILTIN_VEC_PERMXOR.
19200 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19201 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19202 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19203 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19205 * config/doc/extend.texi: Add prototypes for vec_permxor.
19207 2018-03-14 David Malcolm <dmalcolm@redhat.com>
19210 * diagnostic-show-locus.c (class layout_point): Convert m_line
19211 from int to linenum_type.
19212 (line_span::comparator): Use linenum "compare" function when
19213 comparing line numbers.
19214 (test_line_span): New function.
19215 (layout_range::contains_point): Convert param "row" from int to
19217 (layout_range::intersects_line_p): Likewise.
19218 (layout::will_show_line_p): Likewise.
19219 (layout::print_source_line): Likewise.
19220 (layout::should_print_annotation_line_p): Likewise.
19221 (layout::print_annotation_line): Likewise.
19222 (layout::print_leading_fixits): Likewise.
19223 (layout::annotation_line_showed_range_p): Likewise.
19224 (struct line_corrections): Likewise for field m_row.
19225 (line_corrections::line_corrections): Likewise for param "row".
19226 (layout::print_trailing_fixits): Likewise.
19227 (layout::get_state_at_point): Likewise.
19228 (layout::get_x_bound_for_row): Likewise.
19229 (layout::print_line): Likewise.
19230 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19231 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19232 * input.c (selftest::test_linenum_comparisons): New function.
19233 (selftest::input_c_tests): Call it.
19234 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19235 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19236 * selftest.h (ASSERT_GT): New macro.
19237 (ASSERT_GT_AT): New macro.
19238 (ASSERT_LT): New macro.
19239 (ASSERT_LT_AT): New macro.
19241 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19243 PR rtl-optimization/84780
19244 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19246 2018-03-14 Martin Liska <mliska@suse.cz>
19248 * tree.c (record_node_allocation_statistics): Use
19249 get_stats_node_kind.
19250 (get_stats_node_kind): New function extracted from
19251 record_node_allocation_statistics.
19252 (free_node): Use get_stats_node_kind.
19254 2018-03-14 Richard Biener <rguenther@suse.de>
19256 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19257 that the value-set of ANTIC_IN doesn't grow.
19260 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19262 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19263 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19265 2018-03-14 Julia Koval <julia.koval@intel.com>
19267 * config.gcc (icelake-client, icelake-server): New.
19269 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19270 (initial_ix86_arch_features): Ditto.
19271 (PTA_SKYLAKE): Add SGX.
19272 (PTA_ICELAKE): Remove.
19273 (PTA_ICELAKE_CLIENT): New.
19274 (PTA_ICELAKE_SERVER): New.
19275 (ix86_option_override_internal): Split up icelake on icelake client and
19277 (get_builtin_code_for_version): Ditto.
19278 (fold_builtin_cpu): Ditto.
19279 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19280 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19281 * config/i386/i386.h (processor_type): Ditto.
19282 * doc/invoke.texi: Ditto.
19284 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19287 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19288 INTEGER_CST offset, add it together with bitpos / 8 and
19289 sign extend based on POINTER_SIZE.
19293 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19296 * config/i386/constraints.md (Yc): New register constraint.
19297 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19298 Use Yc constraint for alternative 2 of operand 0. Remove
19299 preferred_for_speed attribute.
19301 2018-03-14 Richard Biener <rguenther@suse.de>
19303 PR tree-optimization/84830
19304 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19305 with the old one to avoid oscillations.
19307 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19310 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19312 (assign_by_spills): Return a flag of reload assignment failure.
19313 Do not process the reload assignment failures. Do not spill other
19314 reload pseudos if they has the same reg class. Update n if
19316 (lra_assign): Add a return arg. Set up from the result of
19317 assign_by_spills call.
19318 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19319 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19320 usage_insns if it is not NULL.
19321 (spill_hard_reg_in_range): New function.
19322 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19323 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19324 function prototypes.
19325 (lra_assign): Change prototype.
19326 * lra.c (lra): Add code to deal with fails by splitting hard reg
19329 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19331 * config/riscv/riscv.opt (mrelax): New option.
19332 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19333 "norelax" when riscv_mrelax is disabled.
19334 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19336 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19339 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19340 reassociation for int modes.
19342 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19344 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19345 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19347 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19348 * config/aarch64/aarch64-sve.md
19349 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19350 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19351 (*extend<mode><Vwide>2): Rename to...
19352 (aarch64_sve_extend<mode><Vwide>2): ...this.
19353 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19354 renaming the old pattern to...
19355 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19357 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19358 define_expand, renaming the old pattern to...
19359 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19360 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19361 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19362 account when deciding which SVE instruction the optab should use.
19363 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19365 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19367 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19368 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19369 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19370 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19371 (tlsdesc_small_<mode>): Turn a define_expand and use
19372 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19373 (tlsdesc_small_advsimd_<mode>): ...this.
19374 (tlsdesc_small_sve_<mode>): New pattern.
19376 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19378 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19379 (UNSPEC_UMUL_HIGHPART): New constants.
19380 (MUL_HIGHPART): New int iteraor.
19381 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19382 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19384 (*<su>mul<mode>3_highpart): New define_insn.
19386 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19389 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19392 2018-03-13 Martin Liska <mliska@suse.cz>
19395 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19397 (sem_item_optimizer::~sem_item_optimizer): Release it.
19398 (sem_item_optimizer::merge_classes): Register variable aliases.
19399 (sem_item_optimizer::fixup_pt_set): New function.
19400 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19401 * ipa-icf.h: Declare new variables and functions.
19403 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19405 PR middle-end/84834
19406 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19407 integer_pow2p@2 and test integer_pow2p in condition.
19408 (A < 0 ? C : 0): Similarly for @1.
19410 PR middle-end/84831
19411 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19412 characters starting at p contain '\0' character, don't look beyond
19416 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19417 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19420 * reg-stack.c (change_stack): Change update_end var from int to
19421 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19422 also call set_block_for_insn on the newly added insns and rescan.
19425 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19426 on the last operand.
19429 * tree.c (stabilize_reference_1): Return save_expr (e) for
19430 STATEMENT_LIST even if it doesn't have side-effects.
19432 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19434 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19436 2018-03-12 Renlin Li <renlin.li@arm.com>
19438 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19439 aarch64_output_scalar_simd_mov_immediate.
19441 2018-03-12 Martin Sebor <msebor@redhat.com>
19443 PR tree-optimization/83456
19444 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19445 for perfectly overlapping calls to memcpy.
19446 (gimple_fold_builtin_memory_chk): Same.
19447 (gimple_fold_builtin_strcpy): Handle no-warning.
19448 (gimple_fold_builtin_stxcpy_chk): Same.
19449 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19451 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19453 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19454 parameter. Use it for SFmode.
19455 (rs6000_function_arg_advance_1): Adjust.
19456 (rs6000_function_arg): Adjust.
19457 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19459 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19461 PR rtl-optimization/84169
19462 PR rtl-optimization/84780
19463 * combine.c (can_combine_p): Check for a 2-insn combination whether
19464 the destination register is used between the two insns, too.
19466 2018-03-12 Richard Biener <rguenther@suse.de>
19468 PR tree-optimization/84803
19469 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19470 for refs DR analysis didn't process.
19472 2018-03-12 Richard Biener <rguenther@suse.de>
19474 PR tree-optimization/84777
19475 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19476 force-vectorize loops ignore whether we are optimizing for size.
19478 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19480 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19481 (TARGET_MD_ASM_ADJUST): Define.
19483 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19484 Kito Cheng <kito.cheng@gmail.com>
19485 Chung-Ju Wu <jasonwucj@gmail.com>
19487 * config/nds32/nds32.c (nds32_compute_stack_frame,
19488 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19489 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19490 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19491 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19492 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19493 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19494 * config/nds32/nds32.md (prologue, epilogue): Use macro
19495 NDS32_V3PUSH_AVAILABLE_P to do checking.
19497 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19500 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19501 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19502 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19503 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19504 addition of most attributes on !orig_type_die or the attribute not
19505 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19507 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19508 Chung-Ju Wu <jasonwucj@gmail.com>
19510 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19511 __NDS32_VH__ macro.
19512 * config/nds32/nds32.opt (mvh): New option.
19514 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19515 Chung-Ju Wu <jasonwucj@gmail.com>
19517 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19519 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19520 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19523 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19524 Chung-Ju Wu <jasonwucj@gmail.com>
19526 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19528 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19529 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19531 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19532 Kito Cheng <kito.cheng@gmail.com>
19533 Chung-Ju Wu <jasonwucj@gmail.com>
19535 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19536 UNSPEC_FFMISM and UNSPEC_FLMISM.
19537 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19538 for ffb, ffmism and flmism.
19539 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19540 (unspec_ffmism): Ditto.
19541 (unspec_flmism): Ditto.
19542 (nds32_expand_builtin_impl): Check if string extension is available.
19543 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19544 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19546 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19549 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19552 * lra-assigns.c (assign_by_spills): Return a flag of reload
19553 assignment failure. Do not process the reload assignment
19554 failures. Do not spill other reload pseudos if they has the same
19556 (lra_assign): Add a return arg. Set up from the result of
19557 assign_by_spills call.
19558 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19559 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19560 usage_insns if it is not NULL.
19561 (spill_hard_reg_in_range): New function.
19562 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19563 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19564 function prototypes.
19565 (lra_assign): Change prototype.
19566 * lra.c (lra): Add code to deal with fails by splitting hard reg
19569 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19572 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19574 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19577 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19578 (dw_val_node): Add val_symbolic_view.
19579 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19580 (symview_upper_bound): New.
19581 (new_line_info_table): Initialize symviews_since_reset.
19582 (dwarf2out_source_line): Count symviews_since_reset and set
19583 symview_upper_bound.
19584 (dw_val_equal_p): Handle symview.
19585 (add_AT_symview): New.
19586 (print_dw_val): Handle symview.
19587 (attr_checksum, attr_checksum_ordered): Likewise.
19588 (same_dw_val_p, size_of_die): Likewise.
19589 (value_format, output_die): Likewise.
19590 (add_high_low_attributes): Use add_AT_symview for entry_view.
19591 (dwarf2out_finish): Reset symview_upper_bound, clear
19594 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19597 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19598 Add strict argument and use it.
19599 (rs6000_split_multireg_move): Update for new strict argument.
19600 (mem_operand_gpr): Disallow all non-offsettable addresses.
19601 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19603 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19606 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19607 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19608 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19611 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19612 decl, use remap_type if we want to use the type.
19614 2018-03-09 Martin Sebor <msebor@redhat.com>
19616 PR tree-optimization/84526
19617 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19619 (builtin_access::generic_overlap): Be prepared to handle non-array
19622 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19624 PR rtl-optimization/84682
19625 * lra-constraints.c (process_address_1): Check is_address flag
19626 for address constraints.
19627 (process_alt_operands): Likewise.
19628 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19629 preprocess_constraints.
19630 * recog.h (preprocess_constraints): Add oploc parameter.
19632 * recog.c (preprocess_constraints): Test address_operand for
19633 CT_ADDRESS constraints.
19635 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19638 * lra-assigns.c (assign_by_spills): Return a flag of reload
19639 assignment failure. Do not process the reload assignment
19640 failures. Do not spill other reload pseudos if they has the same
19642 (lra_assign): Add a return arg. Set up from the result of
19643 assign_by_spills call.
19644 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19645 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19646 usage_insns if it is not NULL.
19647 (spill_hard_reg_in_range): New function.
19648 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19649 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19650 function prototypes.
19651 (lra_assign): Change prototype.
19652 * lra.c (lra): Add code to deal with fails by splitting hard reg
19655 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19658 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19659 Accept complain bool parameter. Only emit errors if it is true.
19660 (arm_parse_cpu_option_name): Likewise.
19661 (arm_target_thumb_only): Adjust callers of the above.
19662 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19663 prototype to take a default true bool parameter.
19664 (arm_parse_arch_option_name): Likewise.
19666 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19667 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19671 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19672 * configure: Regenerate.
19673 * configure.ac ("linker --version-script option"): New.
19674 ("linker soname option"): New.
19676 2018-03-09 Richard Biener <rguenther@suse.de>
19678 PR tree-optimization/84775
19679 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19680 immediate uses of predicate stmts and mark them modified.
19683 PR tree-optimization/84178
19684 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19686 (version_loop_for_if_conversion): Delay update_ssa call.
19687 (tree_if_conversion): Delay update_ssa until after predicate
19690 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19693 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19694 when the function accesses prior frames.
19696 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19699 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19700 gen_llsym, otherwise call maybe_gen_llsym.
19702 PR inline-asm/84742
19703 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19704 has ',' character inside of it.
19706 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19709 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19710 as clobbering CC_REGNUM.
19712 2018-03-08 Richard Biener <rguenther@suse.de>
19714 PR middle-end/84552
19715 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19716 (follow_copies_to_constant): Do not follow SSA names registered
19719 2018-03-08 Richard Biener <rguenther@suse.de>
19721 PR tree-optimization/84178
19722 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19724 (version_loop_for_if_conversion): Delay update_ssa call.
19725 (tree_if_conversion): Delay update_ssa until after predicate
19728 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19730 PR tree-optimization/84178
19731 * tree-if-conv.c (release_bb_predicate): Remove the
19732 the assertion that the stmts have NULL use_ops.
19733 Discard the statements, asserting that they haven't
19734 yet been added to a BB.
19736 2018-03-08 Richard Biener <rguenther@suse.de>
19738 PR tree-optimization/84746
19739 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19740 (phi_translate): Pass in destination ANTIC_OUT set.
19741 (phi_translate_1): Likewise. For a simplified result lookup
19742 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19743 (phi_translate_set): Adjust.
19744 (do_pre_regular_insertion): Likewise.
19745 (do_pre_partial_partial_insertion): Likewise.
19747 2018-03-08 Martin Liska <mliska@suse.cz>
19749 PR gcov-profile/84735
19750 * doc/gcov.texi: Document usage of profile files.
19751 * gcov-io.h: Document changes in the format.
19753 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19757 * dwarf2out.c (struct dw_line_info_table): Update comments for
19759 (FORCE_RESET_NEXT_VIEW): New.
19760 (FORCE_RESETTING_VIEW_P): New.
19761 (RESETTING_VIEW_P): Check for -1 too.
19762 (ZERO_VIEW_P): Likewise.
19763 (new_line_info_table): Force-reset next view.
19764 (dwarf2out_begin_function): Likewise.
19765 (dwarf2out_source_line): Simplify zero_view_p initialization.
19766 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19767 view directly. Omit view when omitting .loc at line 0.
19769 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19771 PR tree-optimization/84740
19772 * tree-switch-conversion.c (process_switch): Call build_constructors
19773 only if info.phi_count is non-zero.
19775 PR tree-optimization/84739
19776 * tree-tailcall.c (find_tail_calls): Check call arguments against
19777 DECL_ARGUMENTS (current_function_decl) rather than
19778 DECL_ARGUMENTS (func) when checking for tail recursion.
19780 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19782 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19783 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19784 Volker Reichelt's entry and add entries for people that perform
19785 GCC fuzzy testing and report numerous bugs.
19787 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
19790 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19791 readonly data in sdata, if that is disabled.
19792 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19793 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19794 -mreadonly-in-sdata option.
19796 2018-03-07 Martin Sebor <msebor@redhat.com>
19798 PR tree-optimization/84468
19799 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19800 basic block when looking for nul assignment.
19802 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
19805 * except.h (output_function_exception_table): Adjust prototype.
19806 * except.c (output_function_exception_table): Remove FNNAME parameter
19807 and add SECTION parameter. Ouput one part of the table at a time.
19808 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19809 the first part of the exception table and emit unwind directives.
19810 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19811 (i386_pe_seh_cold_init): Likewise.
19812 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19813 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19814 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19815 (ix86_output_call_insn): Emit a nop in one more case for SEH.
19816 * config/i386/winnt.c: Include except.h.
19817 (struct seh_frame_state): Add reg_offset, after_prologue and
19818 in_cold_section fields.
19819 (i386_pe_seh_end_prologue): Set seh->after_prologue.
19820 (i386_pe_seh_cold_init): New function.
19821 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19822 to seh->in_cold_section.
19823 (seh_emit_push): Record the offset of the push.
19824 (seh_emit_save): Record the offet of the save.
19825 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19826 Test seh->after_prologue to disregard the epilogue.
19827 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19828 (i386_pe_end_cold_function): New function.
19830 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19833 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19834 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19837 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19839 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19840 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19842 PR middle-end/84723
19843 * multiple_target.c: Include tree-inline.h and intl.h.
19844 (expand_target_clones): Diagnose and fail if node->definition and
19845 !tree_versionable_function_p (node->decl).
19847 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
19849 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19851 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19852 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19853 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19855 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19858 * combine.c (try_combine): Use reg_or_subregno instead of handling
19859 just paradoxical SUBREGs and REGs.
19861 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
19863 * config/arc/arc.c (arc_finalize_pic): Remove function.
19864 (arc_must_save_register): We use single base PIC register, remove
19865 checks to save/restore the PIC register.
19866 (arc_expand_prologue): Likewise.
19867 * config/arc/arc-protos.h (arc_set_default_type_attributes):
19869 (arc_verify_short): Likewise.
19870 (arc_attr_type): Likewise.
19871 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19872 (walk_stores): Likewise.
19873 (arc_address_cost): Make it static.
19874 (arc_verify_short): Likewise.
19875 (branch_dest): Likewise.
19876 (arc_attr_type): Likewise.
19877 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19878 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19879 (arc_final_prescan_insn): Remove inserting the nops due to
19880 hardware hazards. It is done in reorg step.
19881 (insn_length_variant_t): Remove.
19882 (insn_length_parameters_t): Likewise.
19883 (arc_insn_length_parameters): Likewise.
19884 (arc_get_insn_variants): Likewise.
19885 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19887 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19889 PR inline-asm/84683
19890 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19893 PR tree-optimization/84687
19894 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19896 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19898 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19900 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19901 Rename to ppc_speculation_barrier.
19902 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19903 __builtin_ppc_speculation_barrier.
19905 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19908 * combine.c (combine_simplify_rtx): Don't try to simplify if
19909 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19912 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
19914 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19915 to 32 bytes when compiling for POWER9.
19917 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19920 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19921 regparm >= 3 with no arg reg available also for calls with
19922 flag_force_indirect_call. Pass decl to ix86_function_regparm.
19925 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19927 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
19929 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
19932 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19934 2018-03-05 Richard Biener <rguenther@suse.de>
19936 PR tree-optimization/84486
19937 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19938 When inserting a __builtin_assume_aligned call set the LHS
19939 SSA name alignment info accordingly.
19941 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
19943 PR tree-optimization/84114
19944 * config/aarch64/aarch64.c (aarch64_reassociation_width)
19945 Avoid reassociation of FLOAT_MODE addition.
19947 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
19949 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19950 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19951 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19952 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19953 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19954 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19955 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19957 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19958 __builtin_ia32_wbinvd): New builtins.
19959 (SPECIAL_ARGS2): New.
19960 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19961 (SPECIAL_ARGS2): New.
19962 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19963 (ix86_valid_target_attribute_inner_p): Ditto.
19964 (ix86_init_mmx_sse_builtins): Add special_args2.
19965 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19966 TARGET_WBNOINVD_P): New.
19967 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19968 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19969 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19970 * config/i386/immintrin.h (_wbinvd): New intrinsic.
19971 * config/i386/pconfigintrin.h: New file.
19972 * config/i386/wbnoinvdintrin.h: Ditto.
19973 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19975 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19977 2018-03-05 Richard Biener <rguenther@suse.de>
19979 PR tree-optimization/84670
19980 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19982 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19983 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19984 (compute_antic_aux): Only assert the number of values in ANTIC_IN
19985 doesn't grow if all successors (recursively) were visited at least
19988 2018-03-05 Richard Biener <rguenther@suse.de>
19990 PR tree-optimization/84650
19991 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19992 if executed in the loop pipeline.
19994 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
19996 * doc/configfiles.texi (Configuration Files): Move info about
19997 conditionalizing $target-protos.h to...
19998 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
19999 differs from $target-protos.h.
20001 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
20002 Chung-Ju Wu <jasonwucj@gmail.com>
20004 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20005 * config/nds32/nds32-multiple.md (setmemsi): Define.
20006 * config/nds32/nds32-memory-manipulation.c
20007 (nds32_gen_dup_4_byte_to_word_value): New.
20008 (emit_setmem_word_loop): New.
20009 (emit_setmem_byte_loop): New.
20010 (nds32_expand_setmem_loop): New.
20011 (nds32_expand_setmem_loop_v3m): New.
20012 (nds32_expand_setmem_unroll): New.
20013 (nds32_expand_setmem): New.
20015 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20016 Chung-Ju Wu <jasonwucj@gmail.com>
20018 * config/nds32/nds32-memory-manipulation.c
20019 (nds32_emit_load_store): New.
20020 (nds32_emit_post_inc_load_store): New.
20021 (nds32_emit_mem_move): New.
20022 (nds32_emit_mem_move_block): New.
20023 (nds32_expand_movmemsi_loop_unknown_size): New.
20024 (nds32_expand_movmemsi_loop_known_size): New.
20025 (nds32_expand_movmemsi_loop): New.
20026 (nds32_expand_movmemsi_unroll): New.
20027 (nds32_expand_movmemqi): Rename ...
20028 (nds32_expand_movmemsi): ... to this.
20029 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20030 (movmemsi): ... to this.
20031 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20032 (nds32_expand_movmemsi): ... to this.
20034 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20035 Monk Chiang <sh.chiang04@gmail.com>
20036 Chung-Ju Wu <jasonwucj@gmail.com>
20038 * config/nds32/nds32-protos.h
20039 (nds32_expand_load_multiple): New arguments.
20040 (nds32_expand_store_multiple): Ditto.
20041 (nds32_valid_multiple_load_store): Rename ...
20042 (nds32_valid_multiple_load_store_p): ... to this.
20043 * config/nds32/nds32-memory-manipulation.c
20044 (nds32_expand_load_multiple): Refine implementation.
20045 (nds32_expand_store_multiple): Ditto.
20046 * config/nds32/nds32-multiple.md
20047 (load_multiple): Update nds32_expand_load_multiple interface.
20048 (store_multiple): Update nds32_expand_store_multiple interface.
20049 * config/nds32/nds32-predicates.c
20050 (nds32_valid_multiple_load_store): Rename ...
20051 (nds32_valid_multiple_load_store_p): ... to this and refine
20053 * config/nds32/predicates.md
20054 (nds32_load_multiple_and_update_address_operation): New predicate.
20055 (nds32_store_multiple_and_update_address_operation): New predicate.
20057 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20058 Chung-Ju Wu <jasonwucj@gmail.com>
20060 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20061 (combo): New attribute.
20062 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20064 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
20066 * config/nds32/nds32.opt: Change -mcmodel= default value.
20068 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
20069 Monk Chiang <sh.chiang04@gmail.com>
20070 Chung-Ju Wu <jasonwucj@gmail.com>
20072 * config/nds32/constants.md (unspec_element): New enum.
20073 * config/nds32/constraints.md (Umw): New constraint.
20074 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20075 * config/nds32/nds32-intrinsic.md: Likewise.
20076 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20077 (nds32_valid_smw_lwm_base_p): New.
20078 (nds32_output_smw_single_word): New.
20079 (nds32_output_lmw_single_word): New.
20080 (nds32_expand_unaligned_load): New.
20081 (nds32_expand_unaligned_store): New.
20082 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20083 (nds32_output_smw_single_word): Declare.
20084 (nds32_output_lmw_single_word): Declare.
20085 (nds32_expand_unaligned_load): Declare.
20086 (nds32_expand_unaligned_store): Declare.
20087 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20088 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20089 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20090 NDS32_BUILTIN_UASTORE_DW.
20091 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20094 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
20095 Kito Cheng <kito.cheng@gmail.com>
20096 Chung-Ju Wu <jasonwucj@gmail.com>
20098 * config/nds32/nds32-intrinsic.c
20099 (nds32_expand_builtin_null_ftype_reg): Delete.
20100 (nds32_expand_builtin_reg_ftype_imm): Ditto.
20101 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20102 (nds32_read_argument): New.
20103 (nds32_legitimize_target): Ditto.
20104 (nds32_legitimize_argument): Ditto.
20105 (nds32_check_constant_argument): Ditto.
20106 (nds32_expand_unop_builtin): Ditto.
20107 (nds32_expand_unopimm_builtin): Ditto.
20108 (nds32_expand_binop_builtin): Ditto.
20109 (nds32_builtin_decl_impl): Ditto.
20110 (builtin_description): Ditto.
20111 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20112 (nds32_init_builtins_impl): Ditto.
20113 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20114 (nds32_builtin_decl): New.
20115 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20116 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20118 2018-03-02 Jeff Law <law@redhat.com>
20120 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20121 (redundant_insn, fill_simple_delay_slots): Likewise.
20122 (fill_slots_from_thread): Likewise.
20123 * resource.c (mark_referenced_resources): Likewise.
20124 (mark_set_resources, find_dead_or_set_registers): Likewise.
20126 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20128 * substring-locations.h (format_warning_va): Formatting fix for
20129 ATTRIBUTE_GCC_DIAG.
20130 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20132 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20133 * substring-locations.c: Include intl.h.
20134 (format_warning_va): Turned into small wrapper around
20135 format_warning_n_va, renamed to ...
20136 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20137 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20139 (format_warning_at_substring_n): New function.
20140 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20141 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20142 format_warning_at_substring with just a shorter name instead of
20143 const function pointer.
20144 (fmtwarn_n): New function.
20145 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20146 appropriate, get rid of all the fmtstr temporaries, move conditionals
20147 with G_() wrapped string literals directly into fmtwarn arguments,
20148 cast dir.len to (int), formatting fixes.
20150 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20152 * doc/invoke.texi: Remove "Cilk Plus" references.
20154 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20155 Richard Biener <rguenther@suse.de>
20158 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20159 for error or warning attributes if CALL_FROM_THUNK_P is set.
20162 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20165 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20166 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20169 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20170 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20172 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20173 instead of -1U in last predictors element's probability member.
20175 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20178 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20179 arguments if they are comparable.
20181 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20183 PR tree-optimization/84634
20184 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20185 masks and masked_loop_p with a single loop_masks, making sure it's
20186 null for bb vectorization.
20188 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20190 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20191 (vect_analyze_data_ref_access): Use loop->safe_len rather than
20192 loop->force_vectorize to check whether there is no alias.
20194 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20197 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20199 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20201 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20202 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20203 instead of a loop around prev_real_insn.
20204 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20207 PR inline-asm/84625
20208 * config/i386/i386.c (ix86_print_operand): Use conditional
20209 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20212 2018-03-02 Richard Biener <rguenther@suse.de>
20214 PR tree-optimization/84427
20215 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20216 (bitmap_set_subtract_values): Rewrite to handle multiple
20219 (prune_clobbered_mems): Likewise.
20220 (phi_translate): Take edge instead of pred/phiblock.
20221 (phi_translate_1): Likewise.
20222 (phi_translate_set): Likewise. Insert all translated
20223 exprs for a value into the set, keeping possibly multiple
20224 expressions per value.
20225 (compute_antic_aux): Adjust for phi_translate changes.
20226 When intersecting union the expressions and prune those
20227 not in the final value set, keeping possibly multiple
20228 expressions per value. Do not use value-insertion
20229 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20230 all expressions. Add verification that the value-sets
20231 only shrink during iteration.
20232 (compute_partial_antic_aux): Adjust for the phi_translate changes.
20233 (do_pre_regular_insertion): Likewise.
20234 (do_pre_partial_partial_insertion): Likewise.
20236 2018-03-02 Richard Biener <rguenther@suse.de>
20239 * config/darwin.c (saved_debug_info_level): New static global.
20240 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20241 (darwin_asm_lto_end): Restore debug info generation settings.
20243 2018-03-01 Martin Liska <mliska@suse.cz>
20246 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20247 volatile arguments.
20249 2018-03-01 Richard Biener <rguenther@suse.de>
20252 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20253 type annotation with LTO when debug was disabled at compile-time.
20255 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20257 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20259 (mips_final_postscan_insn): Likewise.
20261 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20263 PR rtl-optimization/84528
20264 * alias.c (init_alias_target): Add commentary.
20265 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20266 a unique base value if the frame pointer is not eliminated
20267 to the stack pointer.
20269 2018-03-01 Tom de Vries <tom@codesourcery.com>
20271 PR rtl-optimization/83327
20272 * lra-int.h (hard_regs_spilled_into): Declare.
20273 * lra.c (hard_regs_spilled_into): Define.
20274 (init_reg_info): Init hard_regs_spilled_into.
20275 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20276 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20277 (process_bb_lives): Handle hard_regs_spilled_into.
20278 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20279 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20281 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20283 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20284 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20285 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20286 * config/rs6000/aix72.h: New file.
20288 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20290 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20291 instead of warning_at with conditional singular and plural messages
20295 * stor-layout.c (update_alignment_for_field): For
20296 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20297 && !DECL_PACKED (field), do the alignment update, just use
20298 only desired_align instead of MAX (type_align, desired_align)
20300 (place_field): Don't do known_align < desired_align handling
20301 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20302 is non-NULL, instead do it after rli->prev_field handling and
20303 only if not within a bitfield word. For DECL_PACKED (field)
20304 use type_align of BITS_PER_UNIT.
20306 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20308 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20309 superfluous parentheses and trailing spaces.
20311 2018-02-28 Richard Biener <rguenther@suse.de>
20313 PR tree-optimization/84584
20314 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20315 SCoPs with fake exit edge.
20317 2018-02-28 Martin Liska <mliska@suse.cz>
20320 * timevar.c (timer::print): Fix format to properly print 100%
20323 2018-02-28 Richard Biener <rguenther@suse.de>
20325 PR middle-end/84607
20326 * genmatch.c (capture_info::walk_match): Do not mark
20327 captured expressions without operands as expr_p given
20328 they act more like predicates and should be subject to
20329 "lost tail" side-effect preserving.
20331 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20333 PR rtl-optimization/81611
20334 * auto-inc-dec.c (attempt_change): Move dead note from
20335 mem_insn if it's the next use of regno
20336 (find_address): Take address use of reg holding
20337 non-incremented value. Add parm to limit search to the named
20339 (merge_in_block): Attempt to use a mem insn that is the next
20340 use of the original regno.
20342 2018-02-27 Martin Sebor <msebor@redhat.com>
20345 * doc/invoke.texi (-Wmissing-attributes): New option.
20346 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20348 2018-02-27 Martin Sebor <msebor@redhat.com>
20350 PR translation/84207
20351 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20352 n argument to unsigned HOST_WIDE_INT.
20353 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20354 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20355 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20356 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20358 2018-02-27 Richard Biener <rguenther@suse.de>
20360 PR tree-optimization/84512
20361 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20362 Do not use the estimate returned from record_stmt_cost for
20363 the scalar iteration cost but sum properly using add_stmt_cost.
20365 2018-02-27 Richard Biener <rguenther@suse.de>
20367 PR tree-optimization/84466
20368 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20369 Adjust last change to less strictly validate use operands.
20371 2018-02-27 Martin Liska <mliska@suse.cz>
20373 PR gcov-profile/84548
20374 * gcov.c (process_file): Allow partial overlap and consider it
20375 also as group functions.
20376 (output_lines): Properly calculate range of lines for a group.
20378 2018-02-27 Martin Liska <mliska@suse.cz>
20380 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20381 'ggc' suffixes. Change first column width.
20382 (timer::print): Fix formatting of the column.
20384 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20386 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20387 preserve inline entry blocks for the sake of debug inline
20388 entry point markers alone.
20389 (remove_unused_locals): Suggest in comments a better place to
20390 force the preservation of inline entry blocks that are
20391 otherwise unused, but do not preserve them.
20393 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20395 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20397 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20400 * config/i386/constraints.md (Bs): Replace
20401 ix86_indirect_branch_register with
20402 TARGET_INDIRECT_BRANCH_REGISTER.
20404 * config/i386/i386.md (indirect_jump): Likewise.
20405 (tablejump): Likewise.
20406 (*sibcall_memory): Likewise.
20407 (*sibcall_value_memory): Likewise.
20408 Peepholes of indirect call and jump via memory: Likewise.
20409 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20410 (*sibcall_value_GOT_32): Likewise.
20411 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20412 (GOT_memory_operand): Likewise.
20413 (call_insn_operand): Likewise.
20414 (sibcall_insn_operand): Likewise.
20415 (GOT32_symbol_operand): Likewise.
20416 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20418 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20420 PR rtl-optimization/83496
20421 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20422 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20423 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20424 redundant insn, if any.
20425 (relax_delay_slots): Likewise.
20426 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20428 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20430 PR tree-optimization/83965
20431 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20432 that grouped statements are part of a reduction chain. Return
20433 true if the statement is not marked as a reduction itself but
20434 is part of a group.
20435 (vect_recog_dot_prod_pattern): Don't check whether the statement
20436 is part of a group here.
20437 (vect_recog_sad_pattern): Likewise.
20438 (vect_recog_widen_sum_pattern): Likewise.
20440 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20443 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20445 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20448 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20450 (ix86_output_indirect_function_return): New prototype.
20451 (ix86_split_simple_return_pop_internal): Likewise.
20452 * config/i386/i386.c (indirect_return_via_cx): New.
20453 (indirect_return_via_cx_bnd): Likewise.
20454 (indirect_thunk_name): Handle return va CX_REG.
20455 (output_indirect_thunk_function): Create alias for
20456 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20457 (ix86_output_indirect_jmp): Remove the bool argument.
20458 (ix86_output_indirect_function_return): New function.
20459 (ix86_split_simple_return_pop_internal): Likewise.
20460 * config/i386/i386.md (*indirect_jump): Don't pass false
20461 to ix86_output_indirect_jmp.
20462 (*tablejump_1): Likewise.
20463 (simple_return_pop_internal): Change it to define_insn_and_split.
20464 Call ix86_split_simple_return_pop_internal to split it for
20465 -mfunction-return=.
20466 (simple_return_indirect_internal): Call
20467 ix86_output_indirect_function_return instead of
20468 ix86_output_indirect_jmp.
20470 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20473 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20474 memset and value initialization afterwards.
20476 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20478 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20480 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20483 * common/config/aarch64/aarch64-common.c
20484 (aarch_option_optimization_table[]): Switch
20485 off fomit-frame-pointer
20487 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20488 Chung-Ju Wu <jasonwucj@gmail.com>
20490 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20492 (store_multiple): Ditto.
20494 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20496 * config.gcc: Add --with-cpu support for nds32 target.
20497 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20498 * config/nds32/nds32.opt: Add -mcpu= option.
20500 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20502 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20503 isel=yes): Warn for these deprecated options.
20505 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20507 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20508 ISA_2_5_MASKS_EMBEDDED.
20510 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20512 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20513 p->max as pointers rather than using iterative_hash_expr.
20515 2018-02-23 Carl Love <cel@us.ibm.com>
20517 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20518 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20520 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20521 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20522 P8V_BUILTIN_VEC_VUNSIGNED2.
20524 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20527 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20528 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20530 * lra-constraints.c (curr_insn_transform): Set up
20531 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20533 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20534 * lra-eliminations.c (spill_pseudos): Ditto.
20535 (process_insn_for_elimination): Ditto.
20536 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20537 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20538 LRA_NON_CLOBBERED_ALT.
20540 2018-02-22 Martin Sebor <msebor@redhat.com>
20542 PR tree-optimization/84480
20543 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20544 to maybe_diag_stxncpy_trunc. Call it.
20545 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20546 from gimple_fold_builtin_strcpy. Print inlining stack.
20547 (handle_builtin_stxncpy): Print inlining stack.
20548 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20550 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20553 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20554 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20555 and -fcheck-pointer-bounds are used together.
20556 (indirect_thunk_prefix): New enum.
20557 (indirect_thunk_need_prefix): New function.
20558 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20559 "_nt" instead of "_bnd" for NOTRACK prefix.
20560 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20561 (output_indirect_thunk_function): Likewise.
20563 (ix86_code_end): Update output_indirect_thunk_function calls.
20564 (ix86_output_indirect_branch_via_reg): Replace
20565 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20566 (ix86_output_indirect_branch_via_push): Likewise.
20567 (ix86_output_function_return): Likewise.
20568 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20569 incompatible with -fcf-protection=branch and
20570 -fcheck-pointer-bounds.
20572 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20575 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20576 Change gcc_assert call to output_operand_lossage.
20578 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20580 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20582 2018-02-22 DJ Delorie <dj@redhat.com>
20583 Sebastian Perta <sebastian.perta@renesas.com>
20584 Oleg Endo <olegendo@gcc.gnu.org>
20586 * config/rx/rx.c (rx_rtx_costs): New function.
20587 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20589 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20591 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20593 2018-02-22 Martin Liska <mliska@suse.cz>
20596 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20597 Add "native" as a possible value.
20599 2018-02-22 Martin Liska <mliska@suse.cz>
20602 * config/i386/i386.c (ix86_option_override_internal):
20603 Add "native" as a possible value for -march and -mtune.
20605 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20608 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20609 to all type variants.
20611 PR tree-optimization/84503
20612 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20613 width as info->bitpos + info->bitsize - start.
20614 (merged_store_group::merge_overlapping): Simplify width computation.
20615 (check_no_overlap): New function.
20616 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20617 start + width and last_order of the group, fail if check_no_overlap
20619 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20620 to group if check_no_overlap fails.
20622 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20624 * config/rs6000/altivec.md: Delete contraint arguments to
20625 define_expand, define_split, and define_peephole2, and in
20626 define_insn_and_split if always unused.
20627 * config/rs6000/darwin.md: Ditto.
20628 * config/rs6000/dfp.md: Ditto.
20629 * config/rs6000/rs6000.md: Ditto.
20630 * config/rs6000/sync.md: Ditto.
20631 * config/rs6000/vector.md: Ditto.
20632 * config/rs6000/vsx.md: Ditto.
20634 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20636 * config/rs6000/altivec.md: Write output control strings as braced
20637 blocks instead of double-quoted strings.
20638 * config/rs6000/darwin.md: Ditto.
20639 * config/rs6000/rs6000.md: Ditto.
20640 * config/rs6000/vector.md: Ditto.
20641 * config/rs6000/vsx.md: Ditto.
20643 2018-02-21 Jason Merrill <jason@redhat.com>
20645 PR c++/84314 - ICE with templates and fastcall attribute.
20646 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20648 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20650 * ipa-cp.c (determine_versionability): Fix comment typos.
20652 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20655 * ipa-cp.c (determine_versionability): Do not version functions caling
20658 2018-02-21 Martin Liska <mliska@suse.cz>
20661 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20662 Add "native" as a possible value.
20663 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20664 the macro when native cpu detection is available.
20666 2018-02-21 Martin Liska <mliska@suse.cz>
20669 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20670 Add "native" as a possible value.
20671 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20672 when native cpu detection is available.
20674 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20675 Martin Sebor <msebor@redhat.com>
20677 PR tree-optimization/84478
20678 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20680 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20681 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20682 support which is conservatively correct, for 2 only stay conservative
20683 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20684 argument to the 2 argument get_range_strlen, adjust 6 arg
20685 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20687 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20688 (gimple_fold_builtin_strlen): Pass true as last argument to
20691 2018-02-20 Martin Sebor <msebor@redhat.com>
20693 PR middle-end/84095
20694 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20695 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20696 (builtin_memref::builtin_memref): Factor out parts into
20697 set_base_and_offset and call it.
20699 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20701 PR middle-end/84406
20702 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20703 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20704 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20705 search at the associated MODE_INT.
20707 2018-02-20 Jeff Law <law@redhat.com>
20709 PR middle-end/82123
20710 PR tree-optimization/81592
20711 PR middle-end/79257
20712 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20713 for range data rather than using global data.
20714 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20715 range data rather than using global data.
20716 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20717 pass it to children as needed.
20718 (struct directive::fmtresult): Similarly.
20719 (struct directive::set_width): Similarly.
20720 (struct directive::set_precision): Similarly.
20721 (format_integer, format_directive, parse_directive): Similarly.
20722 (format_none): Accept unnamed vr_values parameter.
20723 (format_percent, format_floating, format_character): Similarly.
20724 (format_string, format_plain): Similarly.
20725 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20726 the EVRP range analyzer for range data rather than using global data.
20727 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20728 gimple-ssa-evrp-analyze.h
20729 (class sprintf_dom_walker): Add after_dom_children member function.
20730 Add evrp_range_analyzer member.
20731 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20732 range analyzer as needed.
20733 (sprintf_dom_walker::after_dom_children): New member function.
20734 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20736 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20737 (evrp_range_analyzer::pop_to_marker): Likewise.
20739 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20741 PR tree-optimization/84419
20742 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20743 with the required type if its current type is compatible but
20746 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20748 PR middle-end/82004
20749 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20750 after vectorization.
20752 2018-02-20 Martin Liska <mliska@suse.cz>
20755 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20756 possible values if we don't have a hint.
20758 2018-02-20 Martin Liska <mliska@suse.cz>
20762 * final.c (shorten_branches): Build align_tab array with one
20764 * opts.c (finish_options): Add alignment option limit check.
20765 (MAX_CODE_ALIGN): Likewise.
20766 (MAX_CODE_ALIGN_VALUE): Likewise.
20767 * doc/invoke.texi: Document maximum allowed option value for
20768 all -falign-* options.
20770 2018-02-19 Jakub Jelinek <jakub@redhat.com>
20773 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20774 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20775 * var-tracking.c (emit_note_insn_var_location): Remove all references
20776 to NOTE_INSN_CALL_ARG_LOCATION.
20777 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20778 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20779 Use copy_rtx_if_shared.
20780 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20781 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20782 (dwarf2out_var_location): Remove handling of
20783 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20785 * final.c (final_scan_insn): Remove all references to
20786 NOTE_INSN_CALL_ARG_LOCATION.
20787 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
20788 before dumping final insns.
20789 * except.c (emit_note_eh_region_end): Remove all references to
20790 NOTE_INSN_CALL_ARG_LOCATION.
20791 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20792 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20793 * config/arc/arc.c (hwloop_optimize): Likewise.
20794 * config/arm/arm.c (create_fix_barrier): Likewise.
20795 * config/s390/s390.c (s390_chunkify_start): Likewise.
20796 * config/sh/sh.c (find_barrier): Likewise.
20797 * config/i386/i386.c (rest_of_insert_endbranch,
20798 ix86_seh_fixup_eh_fallthru): Likewise.
20799 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20800 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20801 * config/frv/frv.c (frv_function_prologue): Likewise.
20802 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
20804 (note_outside_basic_block_p): Remove all references to
20805 NOTE_INSN_CALL_ARG_LOCATION.
20806 * gengtype.c (adjust_field_rtx_def): Likewise.
20807 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20809 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20810 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20813 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20816 PR tree-optimization/84452
20817 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20818 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20821 2018-02-19 Martin Liska <mliska@suse.cz>
20824 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20826 2018-02-19 Martin Liska <mliska@suse.cz>
20827 Richard Sandiford <richard.sandiford@linaro.org>
20829 PR tree-optimization/82491
20830 * gimple-fold.c (get_base_constructor): Make earlier bail out
20833 2018-02-19 Carl Love <cel@us.ibm.com>
20835 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20836 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20838 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20839 P8V_BUILTIN_VEC_NEG.
20841 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
20843 * config/rl78/rl78.md (movdf): New define expand.
20845 2018-02-19 Martin Liska <mliska@suse.cz>
20848 * doc/invoke.texi: Fix typo.
20849 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20851 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
20853 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20854 handle rs6000_single_float and rs6000_double_float specially for
20857 2018-02-16 Jeff Law <law@redhat.com>
20859 * config/rx/rx.c (add_pop_cfi_notes): New function.;
20860 (pop_regs): Use it.
20862 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20865 * ipa-inline.c (inline_small_functions): Fix a typo.
20867 2018-02-16 Nathan Sidwell <nathan@acm.org>
20869 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20871 2018-02-16 Carl Love <cel@us.ibm.com>
20873 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20874 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20875 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20876 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20877 expansion to P8V_BUILTIN_VEC_FLOAT2.
20879 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
20881 PR rtl-optimization/70023
20882 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20883 src_regno into account.
20885 2018-02-16 Carl Love <cel@us.ibm.com>
20887 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20888 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20889 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20890 * config/rs6000/rs6000.c: Remove case statements for
20891 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20892 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20893 and P9V_BUILTIN_VEC_VINSERT4B.
20894 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20895 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20896 * config/rs6000/vsx.md:
20897 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20900 2018-02-16 Carl Love <cel@us.ibm.com>
20902 * config/rs6000/altivec.h: Add builtin names vec_extract4b
20904 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20906 * config/rs6000/rs6000-c.c: Add the definitions for
20907 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20908 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20909 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20910 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
20911 definition for insert4b and define insn *insert3b_internal.
20912 * doc/extend.texi: Add documentation for vec_extract4b.
20914 2018-02-16 Nathan Sidwell <nathan@acm.org>
20916 * doc/extend.texi (Backwards Compatibility): Mention friend
20917 injection. Note for-scope is deprecated.
20918 * doc/invoke.texi (-ffriend-injection): Deprecate.
20920 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
20922 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20923 that moved to I2, also allow destinations that are a paradoxical
20924 subreg (instead of a normal reg).
20926 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
20929 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20932 2018-02-16 Richard Biener <rguenther@suse.de>
20934 PR tree-optimization/84037
20935 PR tree-optimization/84016
20937 * config/i386/i386.c (ix86_builtin_vectorization_cost):
20938 Adjust vec_construct for the fact we need additional higher latency
20939 128bit inserts for AVX256 and AVX512 vector builds.
20940 (ix86_add_stmt_cost): Scale vector construction cost for
20943 2018-02-16 Richard Biener <rguenther@suse.de>
20945 PR tree-optimization/84417
20946 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20947 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20948 (non_rewritable_lvalue_p): Likewise, use poly-ints.
20950 2018-02-16 Martin Liska <mliska@suse.cz>
20953 * internal-fn.def (ASAN_CHECK): Set proper flags.
20954 (ASAN_MARK): Likewise.
20956 2018-02-16 Julia Koval <julia.koval@intel.com>
20958 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20959 from PTA_CANNONLAKE.
20961 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20964 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20965 Use ++iter rather than iter++ for std::list iterators.
20966 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
20967 defer deleting them until all nodes in the forest are processed. Do
20968 free even leaf nodes. Change to_process into auto_vec.
20971 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20972 * vec.h (vec_default_construct): Use memset instead of placement new
20973 if BROKEN_VALUE_INITIALIZATION is defined.
20974 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20975 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20978 PR rtl-optimization/83723
20979 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20980 * lra.c (lra_substitute_pseudo): Likewise. If true, use
20981 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
20983 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20985 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20987 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
20989 PR rtl-optimization/81443
20990 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20991 from inner REGs to paradoxical SUBREGs.
20993 2018-02-16 Richard Biener <rguenther@suse.de>
20995 PR tree-optimization/84399
20996 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20997 For operands we can analyze at their definition make sure we can
20998 analyze them at each use as well.
21000 2018-02-16 Richard Biener <rguenther@suse.de>
21002 PR tree-optimization/84190
21003 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21004 volatile accesses if the decl isn't volatile.
21006 2018-02-15 Jason Merrill <jason@redhat.com>
21008 PR c++/84314 - ICE with templates and fastcall attribute.
21009 * attribs.c (build_type_attribute_qual_variant): Don't clobber
21010 TYPE_CANONICAL on an existing type.
21012 2018-02-15 Jakub Jelinek <jakub@redhat.com>
21014 PR tree-optimization/84383
21015 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21016 dstoff nor call operand_equal_p if dstbase is NULL.
21018 PR tree-optimization/84334
21019 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21020 also a CONSTANT_CLASS_P, punt.
21022 2018-02-14 Jim Wilson <jimw@sifive.com>
21024 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21025 first SMALL_OPERAND check. New local min_second_step. Move assert
21026 to where locals are set. Add TARGET_RVC support.
21027 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21029 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
21031 * doc/invoke.texi: Correct -Wformat-overflow code sample.
21033 2018-02-14 Martin Sebor <msebor@redhat.com>
21035 PR tree-optimization/83698
21036 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21037 arrays constrain the offset range to their bounds.
21038 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21039 (builtin_access::overlap): Avoid setting the size of overlap if it's
21041 (maybe_diag_overlap): Also consider arrays when deciding what values
21042 of offsets to include in diagnostics.
21044 2018-02-14 Martin Sebor <msebor@redhat.com>
21047 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21048 that correspond to the kind of a declaration.
21050 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
21053 * config/pa/pa.md: Load address of PIC label using the linkage table
21054 if the label is nonlocal.
21056 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
21058 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21059 warning message if user requests -maltivec=be.
21060 * doc/invoke.texi: Document deprecation of -maltivec=be.
21062 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
21065 * config/rs6000/rs6000-c.c: Update definitions for
21066 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21067 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21069 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21072 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21073 add _get_ssp intrinsics. Remove argument from
21074 __builtin_ia32_rdssp[d|q].
21075 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21076 * config/i386/i386-builtin.def: Remove argument from
21077 __builtin_ia32_rdssp[d|q].
21078 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21079 ix86_expand_special_args_builtin for _rdssp[d|q].
21080 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21081 Clear register before usage.
21082 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21083 Add documentation for new _get_ssp and _inc_ssp intrinsics.
21085 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
21087 PR tree-optimization/84357
21088 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21089 operand 1 of an ARRAY_REF too.
21091 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
21094 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21095 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21097 (set_of_reg): New struct.
21098 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21099 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21100 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21102 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21103 Split into bitclr, bitset, bitinvert patterns if appropriate.
21104 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21105 use rx_fuse_in_memory_bitop.
21106 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21107 to named insn, correct maximum insn length.
21109 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
21112 * machmode.def: Define a complex mode for PARTIAL_INT.
21113 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21115 * doc/rtl.texi: Document CSPImode.
21116 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21118 (msp430_hard_regno_nregs_with_padding): Likewise.
21120 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21123 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21125 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21127 PR rtl-optimization/84169
21128 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21129 we generated a parallel as new i3 and we split that to new i2 and i3
21130 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21131 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21132 those to i2, not i1. Partially rewrite this scan code.
21134 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21137 * stor-layout.c (place_field): For variable length fields, adjust
21138 offset_align afterwards not just based on the field's alignment,
21139 but also on the size.
21141 PR middle-end/84309
21142 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21143 of exps and logs in the use_exp2 case.
21145 2018-02-13 Jeff Law <law@redhat.com>
21147 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21148 entry for "vector".
21150 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21153 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21157 * common.opt (gas-loc-support, gas-locview-support): New.
21158 (ginline-points, ginternal-reset-location-views): New.
21159 * doc/invoke.texi: Document them. Use @itemx where intended.
21160 (gvariable-location-views): Adjust.
21161 * target.def (reset_location_view): New.
21162 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21163 (TARGET_RESET_LOCATION_VIEW): New.
21164 * doc/tm.texi: Rebuilt.
21165 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21166 (dwarf2out_default_as_locview_support): New.
21167 (output_asm_line_debug_info): Use option variables.
21168 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21169 (output_loc_list): Likewise.
21170 (add_high_low_attributes): Check option variables.
21171 Don't output entry view attribute in strict mode.
21172 (gen_inlined_subroutine_die): Check option variables.
21173 (dwarf2out_inline_entry): Likewise.
21174 (init_sections_and_labels): Likewise.
21175 (dwarf2out_early_finish): Likewise.
21176 (maybe_reset_location_view): New, from...
21177 (dwarf2out_var_location): ... here. Call it.
21178 * debug.h (dwarf2out_default_as_loc_support): Declare.
21179 (dwarf2out_default_as_locview_support): Declare.
21180 * hooks.c (hook_int_rtx_insn_0): New.
21181 * hooks.h (hook_int_rtx_insn_0): Declare.
21182 * toplev.c (process_options): Take -gas-loc-support and
21183 -gas-locview-support from dwarf2out. Enable
21184 -gvariable-location-views by default only with locview
21185 assembler support. Enable -ginternal-reset-location-views by
21186 default only if the target defines the corresponding hook.
21187 Enable -ginline-points by default if location views are
21188 enabled; force it disabled if statement frontiers are
21190 * tree-inline.c (expand_call_inline): Check option variables.
21191 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21193 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
21195 PR tree-optimization/84321
21196 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21197 handling. Also check whether the anti-range contains any values
21198 that satisfy the mask; switch to a VR_RANGE if not.
21200 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
21203 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21205 2018-02-13 Martin Jambor <mjambor@suse.cz>
21208 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21209 of call statements, also set location of a load to a temporary.
21211 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
21213 * config/rl78/rl78.c (add_vector_labels): New function.
21214 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21215 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21216 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21217 which checks that no arguments are passed.
21218 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21219 * doc/extend.texi: Documentation for the new attribute.
21221 2018-02-13 Andreas Schwab <schwab@suse.de>
21223 * config/riscv/linux.h (CPP_SPEC): Define.
21225 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21228 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21229 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21230 OPTION_MASK_ISA_AES as first argument to def_builtin_const
21231 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21232 instead of OPTION_MASK_ISA_PCLMUL as first argument to
21233 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21234 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21235 temporarily for AES and PCLMUL builtins.
21237 PR tree-optimization/84339
21238 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21239 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21242 PR middle-end/84309
21243 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21244 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21245 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21247 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21249 * omp-simd-clone.h: New file.
21250 * omp-simd-clone.c: Include omp-simd-clone.h.
21251 (expand_simd_clones): No longer static.
21252 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21253 cgraph.h and omp-simd-clone.h.
21254 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21255 (vect_recog_widen_shift_pattern): Formatting fix.
21256 (vect_pattern_recog_1): Don't check optab for calls.
21259 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21260 operands[2] into a REG before using gen_lowpart on it.
21262 2018-02-12 Jeff Law <law@redhat.com>
21265 * config/sh/sh.c (find_barrier): Consider a sibling call
21268 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21269 successfully back substituting a reg.
21271 2018-02-12 Richard Biener <rguenther@suse.de>
21273 PR tree-optimization/84037
21274 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21275 parameter, move visited init to caller.
21276 (vect_slp_analyze_operations): Separate cost from validity
21277 check, initialize visited once for all instances.
21278 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21280 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21282 (vect_model_promotion_demotion_cost): Likewise.
21283 (vectorizable_bswap): Guard cost modeling with !slp_node
21284 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21286 (vectorizable_call): Likewise.
21287 (vectorizable_conversion): Likewise.
21288 (vectorizable_assignment): Likewise.
21289 (vectorizable_shift): Likewise.
21290 (vectorizable_operation): Likewise.
21291 (vectorizable_store): Likewise.
21292 (vectorizable_load): Likewise.
21293 (vectorizable_condition): Likewise.
21294 (vectorizable_comparison): Likewise.
21296 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21299 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21300 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21301 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21303 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21305 PR middle-end/83665
21306 * params.def (inline-min-speedup): Increase from 8 to 15.
21307 (max-inline-insns-auto): Decrease from 40 to 30.
21308 * ipa-split.c (consider_split): Add some buffer for function to
21309 be considered inlining candidate.
21310 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21313 2018-02-12 Richard Biener <rguenther@suse.de>
21315 PR tree-optimization/84037
21316 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21317 matched stmts if we cannot swap the non-matched ones.
21319 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21321 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21322 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21323 _mm_maskz_scalef_round_ss): New intrinsics.
21324 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21325 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21326 __builtin_ia32_scalefss_round): Remove.
21327 (__builtin_ia32_scalefsd_mask_round,
21328 __builtin_ia32_scalefss_mask_round): New intrinsics.
21329 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21330 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21331 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21332 "<round_constraint>")): Changed to ...
21333 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21334 "<round_scalar_constraint>")): ... this.
21335 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21336 %0, %1, %2<round_op3>}"): Changed to ...
21337 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21338 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21339 %2<round_scalar_mask_op3>}"): ... this.
21340 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21342 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21344 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21345 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21346 (_mm_maskz_sqrt_round_ss): New intrinsics.
21347 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21348 (__builtin_ia32_sqrtsd_mask_round)
21349 (__builtin_ia32_sqrtss_mask_round): New builtins.
21350 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21351 (__builtin_ia32_sqrtss_round): Remove.
21352 (__builtin_ia32_sqrtsd_mask_round)
21353 (__builtin_ia32_sqrtss_mask_round): New builtins.
21354 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21355 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21356 ((match_operand:VF_128 1 "vector_operand"
21357 "xBm,<round_constraint>")): Changed to ...
21358 ((match_operand:VF_128 1 "vector_operand"
21359 "xBm,<round_scalar_constraint>")): ... this.
21360 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21361 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21362 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21363 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21364 %<iptr>1<round_scalar_mask_op3>}): ... this.
21365 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21366 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21368 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21371 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21372 Cast vec_cmpeq result to correct type.
21373 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21374 Cast vec_cmpgt result to correct type.
21376 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21378 * final.c (final_scan_insn_1): Renamed from...
21379 (final_scan_insn): ... this. New wrapper, to recover
21380 seen from the outermost call in recursive ones.
21381 * config/sparc/sparc.c (output_return): Drop seen from call.
21382 (output_sibcall): Likewise.
21383 * config/visium/visium.c (output_branch): Likewise.
21385 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21387 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21390 2018-02-10 Alan Modra <amodra@gmail.com>
21393 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21394 Specify LR as an input.
21396 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21399 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21400 remove_member_access_dummy_vars): New functions.
21401 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21402 lower_omp_1, execute_lower_omp): Use them.
21404 PR rtl-optimization/84308
21405 * shrink-wrap.c (spread_components): Release todo vector.
21407 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21409 PR rtl-optimization/57193
21410 * ira-color.c (struct allocno_color_data): Add member
21411 conflict_allocno_hard_prefs.
21412 (update_conflict_allocno_hard_prefs): New.
21413 (bucket_allocno_compare_func): Add a preference based on
21414 conflict_allocno_hard_prefs.
21415 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21416 (color_allocnos): Remove a dead code. Initiate
21417 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21419 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21422 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21423 constraint from =wa to wa. Avoid a subreg on the output operand,
21424 instead use a pseudo and subreg it in a move.
21425 (p9_xxbrd_<mode>): Changed to ...
21426 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21427 (p9_xxbrd_v2df): New expander.
21428 (p9_xxbrw_<mode>): Changed to ...
21429 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21430 (p9_xxbrw_v4sf): New expander.
21432 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21434 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21436 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21439 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21440 multiply in 32-bit mode.
21441 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21442 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21445 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21447 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21448 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21449 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21450 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21452 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21455 * dwarf2out.c (is_trivial_indirect_ref): New function.
21456 (dwarf2out_late_global_decl): Do not generate a location
21457 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21458 and that are not defined in the current unit.
21460 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21462 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21463 instead of a libcall for UNORDERED.
21465 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21468 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21469 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21471 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21474 * config/s390/s390.c (s390_set_current_function): Invoke
21475 s390_indirect_branch_settings also if fndecl didn't change.
21477 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21479 * config/rs6000/rs6000.md (blockage): Set length to zero.
21481 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21483 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21485 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21488 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21489 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21493 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21494 PARALLEL incoming that failed vt_get_decl_and_offset check.
21496 PR middle-end/84237
21497 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21498 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21500 (get_variable_section): For decls in named .bss* sections pass true as
21501 second argument to bss_initializer_p.
21503 2018-02-09 Marek Polacek <polacek@redhat.com>
21504 Jakub Jelinek <jakub@redhat.com>
21507 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21508 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21509 Sync some changes from cxx_fold_indirect_ref.
21511 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21513 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21515 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21516 (BLOCK_INLINE_ENTRY_LABEL): New.
21517 (dwarf2out_var_location): Disregard inline entry markers.
21518 (inline_entry_data): New struct.
21519 (inline_entry_data_hasher): New hashtable type.
21520 (inline_entry_data_hasher::hash): New.
21521 (inline_entry_data_hasher::equal): New.
21522 (inline_entry_data_table): New variable.
21523 (add_high_low_attributes): Add DW_AT_entry_pc and
21524 DW_AT_GNU_entry_view attributes if a pending entry is found
21525 in inline_entry_data_table. Add old entry_pc attribute only
21526 if debug nonbinding markers are disabled.
21527 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21528 markers are enabled.
21529 (block_within_block_p, dwarf2out_inline_entry): New.
21530 (dwarf2out_finish): Check that no entries remained in
21531 inline_entry_data_table.
21532 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21533 (final_scan_insn, notice_source_line): Likewise.
21534 (rest_of_clean_state): Skip inline entry markers.
21535 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21537 * gimple.c (gimple_build_debug_inline_entry): New.
21538 * gimple.h (enum gimple_debug_subcode): Add
21539 GIMPLE_DEBUG_INLINE_ENTRY.
21540 (gimple_build_debug_inline_entry): Declare.
21541 (gimple_debug_inline_entry_p): New.
21542 (gimple_debug_nonbind_marker_p): Adjust.
21543 * insn-notes.def (INLINE_ENTRY): New.
21544 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21545 inline entry marker notes.
21546 (print_insn): Likewise.
21547 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21548 (INSN_DEBUG_MARKER_KIND): Likewise.
21549 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21550 * tree-inline.c (expand_call_inline): Build and insert
21551 debug_inline_entry stmt.
21552 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21553 inline entry blocks early, if nonbind markers are enabled.
21554 (dump_scope_block): Dump fragment info.
21555 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21556 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21557 (gimple_build_debug_inline_entry): New.
21558 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21559 Enable/disable inline entry points too.
21560 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21561 (DEBUG_INSN): Describe inline entry markers.
21563 * common.opt (gvariable-location-views): New.
21564 (gvariable-location-views=incompat5): New.
21565 * config.in: Rebuilt.
21566 * configure: Rebuilt.
21567 * configure.ac: Test assembler for view support.
21568 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21569 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21570 * dwarf2out.c (var_loc_view): New typedef.
21571 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21572 (dwarf2out_locviews_in_attribute): New.
21573 (dwarf2out_locviews_in_loclist): New.
21574 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21575 (enum dw_line_info_opcode): Add LI_adv_address.
21576 (struct dw_line_info_table): Add view.
21577 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21578 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21579 (zero_view_p): New variable.
21580 (ZERO_VIEW_P): New macro.
21581 (output_asm_line_debug_info): New.
21582 (struct var_loc_node): Add view.
21583 (add_AT_view_list, AT_loc_list): New.
21584 (add_var_loc_to_decl): Add view param. Test it against last.
21585 (new_loc_list): Add view params. Record them.
21586 (AT_loc_list_ptr): Handle loc and view lists.
21587 (view_list_to_loc_list_val_node): New.
21588 (print_dw_val): Handle dw_val_class_view_list.
21589 (size_of_die): Likewise.
21590 (value_format): Likewise.
21591 (loc_list_has_views): New.
21592 (gen_llsym): Set vl_symbol too.
21593 (maybe_gen_llsym, skip_loc_list_entry): New.
21594 (dwarf2out_maybe_output_loclist_view_pair): New.
21595 (output_loc_list): Output view list or entries too.
21596 (output_view_list_offset): New.
21597 (output_die): Handle dw_val_class_view_list.
21598 (output_dwarf_version): New.
21599 (output_compilation_unit_header): Use it.
21600 (output_skeleton_debug_sections): Likewise.
21601 (output_rnglists, output_line_info): Likewise.
21602 (output_pubnames, output_aranges): Update version comments.
21603 (output_one_line_info_table): Output view numbers in asm comments.
21604 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21605 Call maybe_gen_llsym.
21606 (loc_list_from_tree_1): Adjust.
21607 (add_AT_location_description): Create view list attribute if
21608 needed, check it's absent otherwise.
21609 (convert_cfa_to_fb_loc_list): Adjust.
21610 (maybe_emit_file): Call output_asm_line_debug_info for test.
21611 (dwarf2out_var_location): Reset views as needed. Precompute
21612 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21613 attribute. Set view.
21614 (new_line_info_table): Reset next view.
21615 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21616 (dwarf2out_source_line): Likewise. Output view resets and labels to
21617 the assembler, or select appropriate line info opcodes.
21618 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21619 (optimize_string_length): Catch it. Adjust.
21620 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21621 dw_val_class_view_list, and remove it if no longer needed.
21622 (hash_loc_list): Hash view numbers.
21623 (loc_list_hasher::equal): Compare them.
21624 (optimize_location_lists): Check whether a view list symbol is
21625 needed, and whether the locview attribute is present, and
21626 whether they match. Remove the locview attribute if no longer
21628 (index_location_lists): Call skip_loc_list_entry for test.
21629 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21630 Use output_dwarf_version.
21631 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21632 (struct dw_val_node): Add val_view_list.
21633 * final.c (SEEN_NEXT_VIEW): New.
21634 (set_next_view_needed): New.
21635 (clear_next_view_needed): New.
21636 (maybe_output_next_view): New.
21637 (final_start_function): Rename to...
21638 (final_start_function_1): ... this. Take pointer to FIRST,
21639 add SEEN parameter. Emit param bindings in the initial view.
21640 (final_start_function): Reintroduce SEEN-less interface.
21641 (final): Rename to...
21642 (final_1): ... this. Take SEEN parameter. Output final pending
21643 next view at the end.
21644 (final): Reintroduce seen-less interface.
21645 (final_scan_insn): Output pending next view before switching
21646 sections or ending a block. Mark the next view as needed when
21647 outputting variable locations. Notify debug backend of section
21648 changes, and of location view changes.
21649 (rest_of_handle_final): Adjust.
21650 * toplev.c (process_options): Autodetect value for debug variable
21651 location views option. Warn on incompat5 without -gdwarf-5.
21652 * doc/invoke.texi (gvariable-location-views): New.
21653 (gvariable-location-views=incompat5): New.
21654 (gno-variable-location-views): New.
21656 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21658 PR tree-optimization/84136
21659 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21660 that the result of find_edge is non-NULL.
21662 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21665 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21666 storing integer register in SImode. Fix cost of 256 and 512
21667 byte aligned SSE register store.
21669 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21671 * config/i386/i386.c (ix86_multiplication_cost): Fix
21672 multiplication cost for TARGET_AVX512DQ.
21674 2018-02-08 Marek Polacek <polacek@redhat.com>
21676 PR tree-optimization/84238
21677 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21680 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21682 PR tree-optimization/84265
21683 * tree-vect-stmts.c (vectorizable_store): Don't treat
21684 VMAT_CONTIGUOUS accesses as grouped.
21685 (vectorizable_load): Likewise.
21687 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21689 PR tree-optimization/81635
21690 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21691 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21692 (test_round_for_mask): New functions.
21693 (wide_int_cc_tests): Call test_round_for_mask.
21694 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21695 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21696 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21697 range returned by get_range_info.
21699 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21702 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21703 * symtab.c: Include builtins.h
21704 (symtab_node::output_to_lto_symbol_table_p): Move here
21705 from lto-streamer-out.c:output_symbol_p.
21706 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21707 (output_symbol_p): Move all logic to symtab.c
21708 (produce_symtab): Update.
21710 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21712 * config/s390/s390-opts.h (enum indirect_branch): Define.
21713 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21714 (s390_indirect_branch_via_thunk)
21715 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21716 (enum s390_indirect_branch_type): Define.
21717 * config/s390/s390.c (struct s390_frame_layout, struct
21718 machine_function): Remove.
21719 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21720 (indirect_branch_table_label_no, indirect_branch_table_name):
21722 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21723 (enum s390_indirect_branch_option): Define.
21724 (s390_return_addr_from_memory): New function.
21725 (s390_handle_string_attribute): New function.
21726 (s390_attribute_table): Add new attribute handler.
21727 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21728 (s390_indirect_branch_via_thunk): New function.
21729 (s390_indirect_branch_via_inline_thunk): New function.
21730 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21731 sibling call optimization for non z10 compiles.
21732 (s390_emit_call): Force indirect branch target to be a single
21733 register. Add r1 clobber for non-z10 compiles.
21734 (s390_emit_epilogue): Emit return jump via return_use expander.
21735 (s390_reorg): Handle JUMP_INSNs as execute targets.
21736 (s390_option_override_internal): Perform validity checks for the
21737 new command line options.
21738 (s390_indirect_branch_attrvalue): New function.
21739 (s390_indirect_branch_settings): New function.
21740 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21741 (s390_output_indirect_thunk_function): New function.
21742 (s390_code_end): Implement target hook.
21743 (s390_case_values_threshold): Implement target hook.
21744 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21746 * config/s390/s390.h (struct s390_frame_layout)
21747 (struct machine_function): Move here from s390.c.
21748 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21749 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21750 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21751 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21752 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21753 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21754 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21755 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21756 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21757 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21758 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21759 (mnemonic attribute): Add values which aren't recognized
21761 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21762 pattern for branch conversion. Fix mnemonic attribute.
21763 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21764 indirect branch via thunk if requested.
21765 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21766 ("*indirect_jump"): Disable for branch conversion using out of
21768 ("indirect_jump_via_thunk<mode>_z10")
21769 ("indirect_jump_via_thunk<mode>")
21770 ("indirect_jump_via_inlinethunk<mode>_z10")
21771 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21772 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21773 ("casesi_jump_via_inlinethunk<mode>_z10")
21774 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21775 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21776 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21777 ("*indirect2_jump"): Disable for branch conversion.
21778 ("casesi_jump"): Turn into expander and expand patterns for branch
21780 ("return_use"): New expander.
21781 ("*return"): Emit return via thunk and rename it to ...
21782 ("*return<mode>"): ... this one.
21783 * config/s390/s390.opt: Add new options and and enum for the
21786 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21788 * lra-constraints.c (match_reload): Unconditionally use
21789 gen_lowpart_SUBREG, rather than selecting between that
21790 and equivalent gen_rtx_SUBREG code.
21792 2018-02-08 Richard Biener <rguenther@suse.de>
21794 PR tree-optimization/84233
21795 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21796 changed flag instead of boguously re-using phi_inserted.
21798 2018-02-08 Martin Jambor <mjambor@suse.cz>
21800 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21801 static local variables.
21803 2018-02-08 Richard Biener <rguenther@suse.de>
21805 PR tree-optimization/84278
21806 * tree-vect-stmts.c (vectorizable_store): When looking for
21807 smaller vector types to perform grouped strided loads/stores
21808 make sure the mode is supported by the target.
21809 (vectorizable_load): Likewise.
21811 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21813 * config/aarch64/aarch64.c (aarch64_components_for_bb):
21814 Increase LDP/STP opportunities by adding adjacent callee-saves.
21816 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21818 PR rtl-optimization/84068
21819 PR rtl-optimization/83459
21820 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21822 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
21824 PR tree-optimization/84224
21825 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21826 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21827 non-zero arguments.
21829 2018-02-07 Iain Sandoe <iain@codesourcery.com>
21832 * config/rs6000/altivec.md (*restore_world): Remove LR use.
21833 * config/rs6000/predicates.md (restore_world_operation): Adjust op
21834 count, remove one USE.
21836 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
21838 * doc/install.texi (Configuration): Document the
21839 --with-long-double-format={ibm,ieee} PowerPC configuration
21843 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21844 Convert from define_expand to be define_insn_and_split. Rework
21845 float/double/_Float128 conversions to QI/HI/SImode to work with
21846 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
21847 conversions to QI/HImode types did a store and then a load to
21848 truncate the value. For conversions to VSX registers, don't split
21849 the insn, instead emit the code directly. Use the code iterator
21850 any_fix to combine signed and unsigned conversions.
21851 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21852 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21853 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21854 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21855 (fix_<mode>di2_hw): Likewise.
21856 (fixuns_<mode>di2_hw): Likewise.
21857 (fix_<mode>si2_hw): Likewise.
21858 (fixuns_<mode>si2_hw): Likewise.
21859 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21860 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21861 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21862 fix<uns>_trunc<SFDF:mode>si2_p8.
21863 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21864 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21865 (fix<uns>_<mode>_mem): Likewise.
21866 (fctiw<u>z_<mode>_mem): Likewise.
21867 (fix<uns>_<mode>_mem): Likewise.
21868 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21869 the register allocator from doing a direct move to the GPRs to do
21870 a store, and instead use the ISA 3.0 store byte/half-word from
21871 vector register instruction. For IEEE 128-bit floating point,
21872 also optimize stores of 32-bit ints.
21873 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21875 2018-02-07 Alan Hayward <alan.hayward@arm.com>
21877 * genextract.c (push_pathstr_operand): New function to support
21879 (walk_rtx): Call push_pathstr_operand.
21880 (print_path): Support [a-zA-Z].
21882 2018-02-07 Richard Biener <rguenther@suse.de>
21884 PR tree-optimization/84037
21885 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21886 (cse_and_gimplify_to_preheader): Declare.
21887 (vect_get_place_in_interleaving_chain): Likewise.
21888 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21890 (_loop_vec_info::~_loop_vec_info): Delete it.
21891 (cse_and_gimplify_to_preheader): New function.
21892 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21893 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21894 (vectorizable_load): Likewise. For grouped stores always base
21895 the IV on the first element.
21896 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21897 condition before gimplifying.
21899 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21901 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21902 *DIV_EXPR and *MOD_EXPR.
21904 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
21907 * config/i386/i386.c (ix86_option_override_internal): Mask out
21908 the CF_SET bit when checking -fcf-protection.
21910 2018-02-07 Tom de Vries <tom@codesourcery.com>
21913 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21916 2018-02-07 Richard Biener <rguenther@suse.de>
21918 PR tree-optimization/84204
21919 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21922 PR tree-optimization/84205
21923 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21924 special-case isl_ast_op_zdiv_r.
21926 PR tree-optimization/84223
21927 * graphite-scop-detection.c (gather_bbs::before_dom_children):
21928 Only add conditions from within the region.
21929 (gather_bbs::after_dom_children): Adjust.
21931 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
21934 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21935 * config/avr/avr.md: Only post-reload split REG-REG moves if
21936 either register is GENERAL_REG_P.
21938 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21940 PR tree-optimization/84235
21941 * tree-ssa-scopedtables.c
21942 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21943 if the subtraction is performed in floating point type where NaNs are
21944 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21945 build 1. Formatting fix.
21947 2018-02-06 Jakub Jelinek <jakub@redhat.com>
21950 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21951 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21952 and skip it regardless of bb boundaries. Use CALL_P macro,
21953 don't test INSN_P (insn) together with CALL_P or JUMP_P check
21954 unnecessarily, formatting fix.
21956 2018-02-06 Michael Collison <michael.collison@arm.com>
21958 * config/arm/thumb2.md:
21959 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21960 (*thumb_mov_notscc): Ditto.
21962 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
21965 * config/rs6000/rs6000.md (su code attribute): Use "u" for
21966 unsigned_fix, not "s".
21968 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21970 * configure.ac (gcc_fn_eh_frame_ro): New function.
21971 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21972 correct .eh_frame permissions.
21973 * configure: Regenerate.
21975 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
21977 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21978 irrelevant options.
21980 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21982 * config/rs6000/rs6000.c (rs6000_option_override_internal):
21983 Display warning message for -mno-speculate-indirect-jumps.
21985 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
21987 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21989 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21991 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
21993 PR tree-optimization/84225
21994 * tree-eh.c (find_trapping_overflow): Only call
21995 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21997 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22000 * config/i386/i386.c: Reimplement the check of possible options
22001 -mibt/-mshstk conbination. Change error messages.
22002 * doc/invoke.texi: Fix a typo: remove extra '='.
22004 2018-02-06 Marek Polacek <polacek@redhat.com>
22006 PR tree-optimization/84228
22007 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22009 2018-02-06 Tamar Christina <tamar.christina@arm.com>
22012 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22013 emitted arch directives.
22014 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22015 __ARM_FEATURE_COPROC before changing architectures.
22017 2018-02-06 Richard Biener <rguenther@suse.de>
22019 * config/i386/i386.c (print_reg): Fix typo.
22020 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22022 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
22024 * configure: Regenerate.
22026 2018-02-05 Martin Sebor <msebor@redhat.com>
22028 PR tree-optimization/83369
22029 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22032 2018-02-05 Martin Liska <mliska@suse.cz>
22034 * doc/invoke.texi: Cherry-pick upstream r323995.
22036 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
22038 * ira.c (ira_init_register_move_cost): Adjust comment.
22040 2018-02-05 Martin Liska <mliska@suse.cz>
22042 PR gcov-profile/84137
22043 * doc/gcov.texi: Fix typo in documentation.
22045 2018-02-05 Martin Liska <mliska@suse.cz>
22047 PR gcov-profile/83879
22048 * doc/gcov.texi: Document necessity of --dynamic-list-data when
22049 using dlopen functionality.
22051 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
22053 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22054 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22055 _mm_maskz_range_ss, _mm_mask_range_round_ss,
22056 _mm_maskz_range_round_ss): New intrinsics.
22057 (__builtin_ia32_rangesd128_round)
22058 (__builtin_ia32_rangess128_round): Remove.
22059 (__builtin_ia32_rangesd128_mask_round,
22060 __builtin_ia32_rangess128_mask_round): New builtins.
22061 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22062 __builtin_ia32_rangess128_round): Remove.
22063 (__builtin_ia32_rangesd128_mask_round,
22064 __builtin_ia32_rangess128_mask_round): New builtins.
22065 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22066 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22067 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22068 "<round_saeonly_constraint>")): Changed to ...
22069 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22070 "<round_saeonly_scalar_constraint>")): ... this.
22071 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22072 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22073 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22074 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22075 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22077 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
22079 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22081 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22082 Remove all values except native, 8540 and 8548.
22084 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
22086 * config/i386/i386.c (ix86_output_function_return): Pass
22087 INVALID_REGNUM, instead of -1, as invalid register number to
22088 indirect_thunk_name and output_indirect_thunk.
22090 2018-02-02 Julia Koval <julia.koval@intel.com>
22092 * config.gcc: Add -march=icelake.
22093 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22094 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22095 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22096 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22097 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22098 (processor_target_table): Add icelake.
22099 (ix86_option_override_internal): Handle new PTAs.
22100 (get_builtin_code_for_version): Handle icelake.
22101 (M_INTEL_COREI7_ICELAKE): New.
22102 (fold_builtin_cpu): Handle icelake.
22103 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22104 * doc/invoke.texi: Add -march=icelake.
22106 2018-02-02 Julia Koval <julia.koval@intel.com>
22108 * config/i386/i386.c (ix86_option_override_internal): Change flags type
22109 to wide_int_bitmask.
22110 * wide-int-bitmask.h: New.
22112 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22115 * config/i386/i386.md: Replace Pmode with word_mode in
22116 builtin_setjmp_setup and builtin_longjmp to support x32.
22118 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22122 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22124 (rs6000_supported_cpu_names): New static variable.
22125 (linux_cpu_translation_table): Likewise.
22126 (elf_platform) <cpu>: Define new static variable and use it.
22127 Translate kernel AT_PLATFORM name to canonical name if needed.
22128 Error if platform name is unknown.
22130 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22133 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22135 2018-02-01 Jeff Law <law@redhat.com>
22138 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22139 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22140 the scratch if RELEASE_VIA_POP is false.
22141 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22142 If we have to save a temporary register, decrement SIZE appropriately.
22143 Pass new arguments to release_scratch_register_on_entry.
22144 (ix86_adjust_stack_and_probe): Likewise.
22145 (ix86_emit_probe_stack_range): Pass new arguments to
22146 release_scratch_register_on_entry.
22148 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22150 PR rtl-optimization/84157
22151 * combine.c (change_zero_ext): Use REG_P predicate in
22152 front of HARD_REGISTER_P predicate.
22154 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22156 * config/avr/avr.c (avr_option_override): Move disabling of
22157 -fdelete-null-pointer-checks to...
22158 * common/config/avr/avr-common.c (avr_option_optimization_table):
22161 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22163 PR tree-optimization/81635
22164 * tree-data-ref.c (split_constant_offset_1): For types that
22165 wrap on overflow, try to use range info to prove that wrapping
22168 2018-02-01 Renlin Li <renlin.li@arm.com>
22171 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22172 TAILCALL_ADDR_REGS.
22173 (aarch64_register_move_cost): Likewise.
22174 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22175 TAILCALL_ADDR_REGS.
22176 (REG_CLASS_NAMES): Likewise.
22177 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22178 TAILCALL_ADDR_REGS. Remove IP registers.
22179 * config/aarch64/aarch64.md (Ucs): Update register constraint.
22181 2018-02-01 Richard Biener <rguenther@suse.de>
22183 * domwalk.h (dom_walker::dom_walker): Add additional constructor
22184 for specifying RPO order and allow NULL for that.
22185 * domwalk.c (dom_walker::dom_walker): Likewise.
22186 (dom_walker::walk): Handle NULL RPO order.
22187 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22189 (rewrite_update_dom_walker): Likewise.
22190 (mark_def_dom_walker): Likewise.
22192 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22194 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22195 (aarch64_maybe_expand_sve_subreg_move): Declare.
22196 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22197 * config/aarch64/predicates.md (aarch64_any_register_operand): New
22199 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22200 that are semantically a reverse operation.
22201 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22202 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22203 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22205 (aarch64_can_change_mode_class): For big-endian, forbid changes
22206 between two SVE modes if they have different element sizes.
22208 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22210 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22211 the TImode handling for big-endian targets.
22213 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22215 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22216 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
22218 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22219 Remove BSWAP handing for big-endian targets and use the form of
22220 LD1RQ appropariate for the mode.
22222 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22224 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22225 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22226 duplicated element.
22228 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22231 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22232 check for operands that need to go through aarch64_sve_reload_be.
22234 2018-02-01 Jakub Jelinek <jakub@redhat.com>
22236 PR tree-optimization/81661
22237 PR tree-optimization/84117
22238 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22239 * tree-eh.c: Include gimplify.h.
22240 (find_trapping_overflow, replace_trapping_overflow,
22241 rewrite_to_non_trapping_overflow): New functions.
22242 * tree-vect-loop.c: Include tree-eh.h.
22243 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22244 * tree-data-ref.c: Include tree-eh.h.
22245 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22247 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22249 PR rtl-optimization/84123
22250 * combine.c (change_zero_ext): Check if hard register satisfies
22251 can_change_dest_mode before calling gen_lowpart_SUBREG.
22253 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22256 * ira.c (ira_init_register_move_cost): Remove assert.
22258 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22260 PR rtl-optimization/84071
22261 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22262 * doc/tm.texi: Regenerate.
22264 2018-01-31 Richard Biener <rguenther@suse.de>
22266 PR tree-optimization/84132
22267 * tree-data-ref.c (analyze_miv_subscript): Properly
22268 check whether evolution_function_is_affine_multivariate_p
22269 before calling gcd_of_steps_may_divide_p.
22271 2018-01-31 Julia Koval <julia.koval@intel.com>
22274 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22275 * config/i386/i386.md (rdpid_rex64) New.
22276 (rdpid): Make 32bit only.
22278 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22281 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22282 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22284 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22287 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22289 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22291 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22293 PR rtl-optimization/84071
22294 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22295 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22297 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22299 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22300 (arc_attribute_table): Add 'aux' attribute.
22301 (arc_in_small_data_p): Consider aux like variables.
22302 (arc_is_aux_reg_p): New function.
22303 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22304 (arc_get_aux_arg): New function.
22305 (prepare_move_operands): Handle aux-register access.
22306 (arc_handle_aux_attribute): New function.
22307 * doc/extend.texi (ARC Variable attributes): Add subsection.
22309 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22311 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22312 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22313 (arc_attribute_table): Add 'uncached' attribute.
22314 (arc_print_operand): Print '.di' flag for uncached memory
22316 (arc_in_small_data_p): Do not consider for small data the uncached
22318 (arc_is_uncached_mem_p): New function.
22319 * config/arc/predicates.md (compact_store_memory_operand): Check
22320 for uncached memory accesses.
22321 (nonvol_nonimm_operand): Likewise.
22322 * doc/extend.texi (ARC Type Attribute): New subsection.
22324 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22327 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22328 falign-loops=): Add Optimization flag.
22330 2018-01-30 Jeff Law <law@redhat.com>
22333 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22334 INT_REGISTERS_SAVED. Check it prior to calling
22335 get_scratch_register_on_entry.
22336 (ix86_adjust_stack_and_probe): Similarly.
22337 (ix86_emit_probe_stack_range): Similarly.
22338 (ix86_expand_prologue): Corresponding changes.
22340 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22343 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22344 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22346 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22349 * lra-constraints.c (curr_insn_transform): Process AND in the
22352 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22354 PR rtl-optimization/83986
22355 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22356 dependence against last_pending_memory_flush in addition to
22357 pending_jump_insns.
22359 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22361 PR tree-optimization/81611
22362 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22365 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22368 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22371 2018-01-30 Richard Biener <rguenther@suse.de>
22372 Jakub Jelinek <jakub@redhat.com>
22374 PR tree-optimization/84111
22375 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22376 inner loops added during recursion, as they don't have up-to-date
22379 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22382 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22383 (can_inline_edge_by_limits_p): ... here.
22384 (can_early_inline_edge_p, check_callers,
22385 update_caller_keys, update_callee_keys, recursive_inlining,
22386 add_new_edges_to_heap, speculation_useful_p,
22387 inline_small_functions,
22388 inline_small_functions, flatten_function,
22389 inline_to_all_callers_1): Update.
22391 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22393 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22396 2018-01-30 Richard Biener <rguenther@suse.de>
22398 PR tree-optimization/83008
22399 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22400 invariant and constant vector uses in stmts when they need
22401 more than one stmt.
22403 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22406 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22407 * configure: Regenerate.
22409 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22411 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22413 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22414 Use gen_rtx_REG rather than gen_lowpart.
22416 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22418 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22419 rather than 0 when creating partial subregs.
22421 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22423 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22426 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22429 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22430 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22431 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22432 flags. This restores the settings used before the 2017-07-24.
22433 Turning off pre increment/decrement/modify allows IVOPTS to
22434 optimize DF/SF loops where the index is an int.
22436 2018-01-29 Richard Biener <rguenther@suse.de>
22437 Kelvin Nilsen <kelvin@gcc.gnu.org>
22440 * tree-vect-stmts.c (vectorizable_call): Don't call
22441 targetm.vectorize_builtin_md_vectorized_function if callee is
22444 2018-01-22 Carl Love <cel@us.ibm.com>
22446 * doc/extend.tex: Fix typo in second arg in
22447 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22449 2018-01-29 Richard Biener <rguenther@suse.de>
22451 PR tree-optimization/84086
22452 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22453 (flush_ssaname_freelist): When SSA names were released reset
22454 the SCEV hash table.
22456 2018-01-29 Richard Biener <rguenther@suse.de>
22458 PR tree-optimization/84057
22459 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22460 removed paths when removing edges.
22462 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22464 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22465 -mfunction-return=@var{choice}.
22467 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22469 PR diagnostic/84034
22470 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22471 Handle CR like TAB.
22472 (layout::print_source_line): Likewise.
22473 (test_get_line_width_without_trailing_whitespace): Add test cases.
22475 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22477 PR middle-end/84040
22478 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22481 2018-01-26 Jim Wilson <jimw@sifive.com>
22483 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22485 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22488 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22490 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22491 and CMP + SUB-immediate -> SUBS.
22493 2018-01-26 Martin Sebor <msebor@redhat.com>
22495 PR tree-optimization/83896
22496 * tree-ssa-strlen.c (get_string_len): Rename...
22497 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22498 Avoid assuming length is constant.
22499 (handle_char_store): Use HOST_WIDE_INT for string length.
22501 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22504 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22505 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22507 2018-01-26 Richard Biener <rguenther@suse.de>
22509 PR rtl-optimization/84003
22510 * dse.c (record_store): Only record redundant stores when
22511 the earlier store aliases at least all accesses the later one does.
22513 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22515 PR rtl-optimization/83985
22516 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22517 REG_CFA_RESTORE insns.
22518 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22519 REG_CFA_RESTORE insns here.
22522 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22523 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22525 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22527 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22528 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22529 (arc_init): Likewise.
22530 (arc_override_options): Likewise.
22531 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22533 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22535 * config/arc/arc.h (TARGET_DBNZ): Define.
22536 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22537 properly set the tune attribute.
22538 (dbnz): Use TARGET_DBNZ guard.
22539 * config/arc/arc.opt (mtune): Add core3 option.
22541 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22543 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22544 recognize new pic like addresses.
22545 (arc_delegitimize_address): Clean up.
22547 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22549 * config/arc/arc-arches.def: Option mrf16 valid for all
22551 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22552 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22553 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22554 * config/arc/arc-tables.opt: Regenerate.
22555 * config/arc/arc.c (arc_conditional_register_usage): Handle
22556 reduced register file case.
22557 (arc_file_start): Set must have build attributes.
22558 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22559 mrf16 option value.
22560 * config/arc/arc.opt (mrf16): Add new option.
22561 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22562 * config/arc/genmultilib.awk: Handle new mrf16 option.
22563 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22564 * config/arc/t-multilib: Regenerate.
22565 * doc/invoke.texi (ARC Options): Document mrf16 option.
22567 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22569 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22570 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22571 (arc_attribute_table): Add 'secure_call' attribute.
22572 (arc_print_operand): Print secure call operand.
22573 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22575 (arc_is_secure_call_p): New function. * config/arc/arc.md
22576 (call_i): Add support for sjli instruction.
22577 (call_value_i): Likewise.
22578 * config/arc/constraints.md (Csc): New constraint.
22580 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22581 John Eric Martin <John.Martin@emmicro-us.com>
22583 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22584 * config/arc/arc.c (_arc_jli_section): New struct.
22585 (arc_jli_section): New type.
22586 (rc_jli_sections): New static variable.
22587 (arc_handle_jli_attribute): New function.
22588 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22589 (arc_file_end): New function.
22590 (TARGET_ASM_FILE_END): Define.
22591 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22592 (arc_add_jli_section): New function.
22593 (jli_call_scan): Likewise.
22594 (arc_reorg): Call jli_call_scan.
22595 (arc_output_addsi): Remove 'S' from printing asm operand.
22596 (arc_is_jli_call_p): New function.
22597 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22599 (movhi_insn): Likewise.
22600 (movsi_insn): Likewise.
22601 (movsi_set_cc_insn): Likewise.
22602 (loadqi_update): Likewise.
22603 (load_zeroextendqisi_update): Likewise.
22604 (load_signextendqisi_update): Likewise.
22605 (loadhi_update): Likewise.
22606 (load_zeroextendhisi_update): Likewise.
22607 (load_signextendhisi_update): Likewise.
22608 (loadsi_update): Likewise.
22609 (loadsf_update): Likewise.
22610 (movsicc_insn): Likewise.
22611 (bset_insn): Likewise.
22612 (bxor_insn): Likewise.
22613 (bclr_insn): Likewise.
22614 (bmsk_insn): Likewise.
22615 (bicsi3_insn): Likewise.
22616 (cmpsi_cc_c_insn): Likewise.
22617 (movsi_ne): Likewise.
22618 (movsi_cond_exec): Likewise.
22619 (clrsbsi2): Likewise.
22620 (norm_f): Likewise.
22630 (call_i): Remove 'S' asm letter, add jli instruction.
22631 (call_value_i): Likewise.
22632 * config/arc/arc.op (mjli-always): New option.
22633 * config/arc/constraints.md (Cji): New constraint.
22634 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22636 (subsf3_fpx): Likewise.
22637 (mulsf3_fpx): Likewise.
22638 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22640 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22641 function attrbutes.
22642 * doc/invoke.texi (ARC): Document mjli-always option.
22644 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22646 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22647 avoid addition with 0 and use incw and decw where possible.
22649 2018-01-26 Richard Biener <rguenther@suse.de>
22651 PR tree-optimization/81082
22652 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22653 association if it requires casting to unsigned.
22654 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22655 from fold_plusminus_mult_expr to catch important cases late when
22656 range info is available.
22658 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22660 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22661 * configure.ac (hidden_linkonce): New test.
22662 * configure: Regenerate.
22663 * config.in: Regenerate.
22665 2018-01-26 Julia Koval <julia.koval@intel.com>
22667 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22668 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22669 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22670 _mm_mask_bitshuffle_epi64_mask): Fix type.
22671 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22672 USI_FTYPE_V4DI_V4DI_USI): Remove.
22673 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22674 __builtin_ia32_vpshufbitqmb256_mask,
22675 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22676 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22677 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22679 2018-01-26 Alan Modra <amodra@gmail.com>
22682 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22683 UNSPEC_VBPERMQ. Sort other unspecs.
22685 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22687 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22689 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22691 PR middle-end/83055
22692 * predict.c (drop_profile): Do not push/pop cfun; update also
22694 (handle_missing_profiles): Fix logic looking for zero profiles.
22696 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22698 PR middle-end/83977
22699 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22700 on functions with #pragma omp declare simd or functions with simd
22702 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22703 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22704 Remove trailing \n from warning_at calls.
22706 2018-01-25 Tom de Vries <tom@codesourcery.com>
22709 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22710 for neutered workers.
22712 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22715 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22716 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22718 2018-01-24 Jeff Law <law@redhat.com>
22721 * i386.c (get_probe_interval): Move to earlier point.
22722 (ix86_compute_frame_layout): If -fstack-clash-protection and
22723 the frame is larger than the probe interval, then use pushes
22724 to save registers rather than reg->mem moves.
22725 (ix86_expand_prologue): Remove conditional for int_registers_saved
22728 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22731 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22732 min/max for never referenced object.
22734 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22736 PR middle-end/83977
22737 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22739 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22740 attributes from DECL_ATTRIBUTES (decl) without affecting
22741 DECL_ATTRIBUTES (current_function_decl).
22742 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22743 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22745 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22747 PR tree-optimization/83979
22748 * fold-const.c (fold_comparison): Use constant_boolean_node
22749 instead of boolean_{true,false}_node.
22751 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22753 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22756 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22758 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22759 Simplify the clause that sets the length attribute.
22760 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22761 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22762 clause that sets the length attribute.
22763 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22765 2018-01-24 Tom de Vries <tom@codesourcery.com>
22768 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22769 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22770 Add strict parameter.
22771 (prevent_branch_around_nothing): Insert dummy insn between branch to
22772 label and label with no ptx insn inbetween.
22773 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22775 2018-01-24 Tom de Vries <tom@codesourcery.com>
22778 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22779 for neutered threads in warp.
22780 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22782 2018-01-24 Richard Biener <rguenther@suse.de>
22784 PR tree-optimization/83176
22785 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22788 2018-01-24 Richard Biener <rguenther@suse.de>
22790 PR tree-optimization/82819
22791 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22792 code generating pluses that are no-ops in the target precision.
22794 2018-01-24 Richard Biener <rguenther@suse.de>
22796 PR middle-end/84000
22797 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22799 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22801 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22802 to merge probabilities.
22803 * predict.c (probably_never_executed): Also mark as cold functions
22804 with global 0 profile and guessed local profile.
22805 * profile-count.c (profile_probability::combine_with_count): New
22807 * profile-count.h (profile_probability::operator*,
22808 profile_probability::operator*=, profile_probability::operator/,
22809 profile_probability::operator/=): Reduce precision to adjusted
22810 and set value to guessed on contradictory divisions.
22811 (profile_probability::combine_with_freq): Remove.
22812 (profile_probability::combine_wiht_count): Declare.
22813 (profile_count::force_nonzero):: Set to adjusted.
22814 (profile_count::probability_in):: Set quality to adjusted.
22815 * tree-ssa-tail-merge.c (replace_block_by): Use
22816 combine_with_count.
22818 2018-01-23 Andrew Waterman <andrew@sifive.com>
22819 Jim Wilson <jimw@sifive.com>
22821 * config/riscv/riscv.c (riscv_stack_boundary): New.
22822 (riscv_option_override): Set riscv_stack_boundary. Handle
22823 riscv_preferred_stack_boundary_arg.
22824 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22825 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22826 (STACK_BOUNDARY): Set to riscv_stack_boundary.
22827 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22828 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22829 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22831 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
22834 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22835 of struct ix86_frame.
22836 (ix86_expand_epilogue): Likewise. Add a local variable for
22837 the reg_save_offset field in struct ix86_frame.
22839 2018-01-23 Bin Cheng <bin.cheng@arm.com>
22841 PR tree-optimization/82604
22842 * tree-loop-distribution.c (enum partition_kind): New enum item
22843 PKIND_PARTIAL_MEMSET.
22844 (partition_builtin_p): Support above new enum item.
22845 (generate_code_for_partition): Ditto.
22846 (compute_access_range): Differentiate cases that equality can be
22847 proven at all loops, the innermost loops or no loops.
22848 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22849 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
22850 (finalize_partitions, distribute_loop): Don't fuse partition of
22851 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22852 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22853 parloop is enabled.
22855 2018-01-23 Martin Liska <mliska@suse.cz>
22857 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22858 order to ignore the predictor.
22859 (PRED_POLYMORPHIC_CALL): Likewise.
22860 (PRED_RECURSIVE_CALL): Likewise.
22862 2018-01-23 Martin Liska <mliska@suse.cz>
22864 * tree-profile.c (tree_profiling): Print function header to
22865 aware reader which function we are working on.
22866 * value-prof.c (gimple_find_values_to_profile): Do not print
22867 not interesting value histograms.
22869 2018-01-23 Martin Liska <mliska@suse.cz>
22871 * profile-count.h (enum profile_quality): Add
22872 profile_uninitialized as the first value. Do not number values
22873 as they are zero based.
22874 (profile_count::verify): Update sanity check.
22875 (profile_probability::verify): Likewise.
22877 2018-01-23 Nathan Sidwell <nathan@acm.org>
22879 * doc/invoke.texi (ffor-scope): Deprecate.
22881 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22883 PR tree-optimization/83510
22884 * domwalk.c (set_all_edges_as_executable): New function.
22885 (dom_walker::dom_walker): Convert bool param
22886 "skip_unreachable_blocks" to enum reachability. Move setup of
22887 edge flags to set_all_edges_as_executable and only do it when
22888 reachability is REACHABLE_BLOCKS.
22889 * domwalk.h (enum dom_walker::reachability): New enum.
22890 (dom_walker::dom_walker): Convert bool param
22891 "skip_unreachable_blocks" to enum reachability.
22892 (set_all_edges_as_executable): New decl.
22893 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
22894 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22896 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22897 but converting true to REACHABLE_BLOCKS.
22898 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22900 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22901 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22902 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22904 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22905 if check_all_array_refs will be called.
22907 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22909 * tree.c (selftest::test_location_wrappers): Add more test
22912 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22914 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22915 (selftest::test_bit_in_range): Likewise.
22917 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22920 * doc/sourcebuild.texi (vect_float): Say that the selector
22921 only describes the situation when -funsafe-math-optimizations is on.
22922 (vect_float_strict): Document.
22924 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22926 PR tree-optimization/83965
22927 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22928 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22929 instead of checking only for a reduction.
22930 (vect_recog_widen_sum_pattern): Likewise.
22932 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22934 * predict.c (probably_never_executed): Only use precise profile info.
22935 (compute_function_frequency): Skip after inlining hack since we now
22936 have quality checking.
22938 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22940 * profile-count.h (profile_probability::very_unlikely,
22941 profile_probability::unlikely, profile_probability::even): Set
22942 precision to guessed.
22944 2018-01-23 Richard Biener <rguenther@suse.de>
22946 PR tree-optimization/83963
22947 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22948 Properly terminate dominator walk when crossing the exit edge not
22949 when visiting its source block.
22951 2018-01-23 Jakub Jelinek <jakub@redhat.com>
22954 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22955 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22957 2018-01-22 Jakub Jelinek <jakub@redhat.com>
22959 PR tree-optimization/83957
22960 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
22961 semicolon after for body surrounded by braces.
22963 PR tree-optimization/83081
22964 * profile-count.h (profile_probability::split): New method.
22965 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22966 Use profile_probability::split.
22967 (do_compare_rtx_and_jump): Fix adjustment of probabilities
22968 when splitting a single conditional jump into 2.
22970 2018-01-22 David Malcolm <dmalcolm@redhat.com>
22972 PR tree-optimization/69452
22973 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22976 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22978 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22979 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22980 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22982 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22984 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22986 * config/rl78/rl78.md (movdi): New define_expand.
22987 * config/rl78/rl78.c (rl78_split_movdi): New function.
22989 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
22992 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22994 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22995 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22996 128-bit to produce an UNSPEC move to get the double word with the
22997 signbit and then a shift directly to do signbit.
22998 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22999 implementation with a new version that just does either a direct
23000 move or a regular move. Move memory interface to separate insns.
23001 Move insns so they are next to the expander.
23002 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23003 with signbit move. Split big and little endian case.
23004 (signbit<mode>2_dm_mem_le): Likewise.
23005 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23006 (signbit<mode>2_dm2): Likewise.
23008 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23010 * config/rl78/rl78.md (anddi3): New define_expand.
23012 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23014 * config/rl78/rl78.md (umindi3): New define_expand.
23016 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23018 * config/rl78/rl78.md (smindi3): New define_expand.
23020 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23022 * config/rl78/rl78.md (smaxdi3): New define_expand.
23024 2018-01-22 Carl Love <cel@us.ibm.com>
23026 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23027 LVX_V1TI): Add macro expansion.
23028 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23029 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23030 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23031 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23032 Change check to determine if the instruction is a byte reversing
23033 entry. Fix typo in comment.
23034 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23035 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23036 Add def_builtin calls for new builtins.
23037 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23038 Add define_insn expansion.
23040 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23042 * config/rl78/rl78.md (umaxdi3): New define_expand.
23044 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23046 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23047 for non-QImode registers.
23049 2018-01-22 Richard Biener <rguenther@suse.de>
23051 PR tree-optimization/83963
23052 * graphite-scop-detection.c (scop_detection::get_sese): Delay
23053 including the loop exit block.
23054 (scop_detection::merge_sese): Likewise.
23055 (scop_detection::add_scop): Do it here instead.
23057 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23059 * doc/sourcebuild.texi (arm_softfloat): Document.
23061 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
23064 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23065 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23066 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23068 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23069 David Edelsohn <dje.gcc@gmail.com>
23072 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23073 Change "crset eq" to "crset 2".
23074 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23075 (*call_indirect_aix<mode>_nospec): Likewise.
23076 (*call_value_indirect_aix<mode>_nospec): Likewise.
23077 (*call_indirect_elfv2<mode>_nospec): Likewise.
23078 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23079 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23080 change assembly output from . to $.
23081 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23082 (indirect_jump<mode>_nospec): Change assembly output from . to $.
23083 (*tablejump<mode>_internal1_nospec): Likewise.
23085 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
23088 * config/sh/sh_optimize_sett_clrt.cc:
23089 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23091 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
23093 PR tree-optimization/83940
23094 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23095 offset_dt to vect_constant_def rather than vect_unknown_def_type.
23096 (vect_check_load_store_mask): Add a mask_dt_out parameter and
23097 use it to pass back the definition type.
23098 (vect_check_store_rhs): Likewise rhs_dt_out.
23099 (vect_build_gather_load_calls): Add a mask_dt argument and use
23100 it instead of a call to vect_is_simple_use.
23101 (vectorizable_store): Update calls to vect_check_load_store_mask
23102 and vect_check_store_rhs. Use the dt returned by the latter instead
23103 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
23104 instead of calls to vect_is_simple_use. Pass the scalar rather
23105 than the vector operand to vect_is_simple_use when handling
23106 second and subsequent copies of an rhs value.
23107 (vectorizable_load): Update calls to vect_check_load_store_mask
23108 and vect_build_gather_load_calls. Use the cached mask_dt and
23109 gs_info.offset_dt instead of calls to vect_is_simple_use.
23111 2018-01-20 Jakub Jelinek <jakub@redhat.com>
23113 PR middle-end/83945
23114 * tree-emutls.c: Include gimplify.h.
23115 (lower_emutls_2): New function.
23116 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23117 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23118 it before further processing.
23121 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23122 UINTVAL (trueop1) instead of INTVAL (op1).
23124 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23128 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23129 INCOMING_FRAME_SP_OFFSET if not defined.
23130 (scan_trace): Add ENTRY argument. If true and
23131 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23132 emit a note to adjust the CFA offset.
23133 (create_cfi_notes): Adjust scan_trace callers.
23134 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23135 INCOMING_FRAME_SP_OFFSET in the CIE.
23136 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23137 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23139 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23140 * doc/tm.texi: Regenerated.
23142 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23144 PR rtl-optimization/83147
23145 * lra-constraints.c (remove_inheritance_pseudos): Use
23146 lra_substitute_pseudo_within_insn.
23148 2018-01-19 Tom de Vries <tom@codesourcery.com>
23149 Cesar Philippidis <cesar@codesourcery.com>
23152 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23154 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23157 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23158 spaces for function labels.
23160 2018-01-19 Martin Liska <mliska@suse.cz>
23162 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23163 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23164 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23165 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23166 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23167 (PRED_CONST_RETURN): Change from 69 to 65.
23168 (PRED_NULL_RETURN): Change from 91 to 71.
23169 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23170 (PRED_LOOP_GUARD): Change from 66 to 73.
23172 2018-01-19 Martin Liska <mliska@suse.cz>
23174 * predict.c (predict_insn_def): Add new assert.
23175 (struct branch_predictor): Change type to signed integer.
23176 (test_prediction_value_range): Amend test to cover
23177 PROB_UNINITIALIZED.
23178 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23179 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23180 (PRED_LOOP_ITERATIONS_MAX): Likewise.
23181 (PRED_LOOP_IV_COMPARE): Likewise.
23182 * predict.h (PROB_UNINITIALIZED): Define new constant.
23184 2018-01-19 Martin Liska <mliska@suse.cz>
23186 * predict.c (dump_prediction): Add new format for
23187 analyze_brprob.py script which is enabled with -details
23189 * profile-count.h (precise_p): New function.
23191 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23193 PR tree-optimization/83922
23194 * tree-vect-loop.c (vect_verify_full_masking): Return false if
23195 there are no statements that need masking.
23196 (vect_active_double_reduction_p): New function.
23197 (vect_analyze_loop_operations): Use it when handling phis that
23198 are not in the loop header.
23200 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23202 PR tree-optimization/83914
23203 * tree-vect-loop.c (vectorizable_induction): Don't convert
23204 init_expr or apply the peeling adjustment for inductions
23205 that are nested within the vectorized loop.
23207 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23209 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23212 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23216 * function.h (gimplify_parameters): Add gimple_seq * argument.
23217 * function.c: Include gimple.h and options.h.
23218 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23219 for the added local temporaries if needed.
23220 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23221 if there are any parameter cleanups, wrap whole body into a
23222 try/finally with the cleanups.
23224 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
23227 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23228 Use GET_MODE_CLASS for scalar floating point.
23230 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23234 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23235 Fix call of call_cgraph_insertion_hooks.
23237 2018-01-18 Martin Sebor <msebor@redhat.com>
23239 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23241 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23244 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23247 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23250 * common.opt: (-ffile-prefix-map): New option.
23251 * opts.c (common_handle_option): Defer it.
23252 * opts-global.c (handle_common_deferred_options): Handle it.
23253 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23254 * file-prefix-map.h: New file.
23255 (remap_debug_filename, add_debug_prefix_map): ...here.
23256 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23257 * final.c (debug_prefix_map, add_debug_prefix_map
23258 remap_debug_filename): Move to...
23259 * file-prefix-map.c: New file.
23260 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23261 generalize, get rid of alloca(), use strrchr() instead of strchr().
23262 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23263 Implement in terms of add_prefix_map().
23264 (remap_macro_filename, remap_debug_filename): Implement in term of
23266 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23267 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23268 * dbxout.c: Include file-prefix-map.h.
23269 * varasm.c: Likewise.
23270 * vmsdbgout.c: Likewise.
23271 * xcoffout.c: Likewise.
23272 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23273 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23274 * doc/invoke.texi (-ffile-prefix-map): Document.
23275 (-fdebug-prefix-map): Update description.
23277 2018-01-18 Martin Liska <mliska@suse.cz>
23279 * config/i386/i386.c (indirect_thunk_name): Document that also
23281 (output_indirect_thunk): Document why both instructions
23282 (pause and lfence) are generated.
23284 2018-01-18 Richard Biener <rguenther@suse.de>
23286 PR tree-optimization/83887
23287 * graphite-scop-detection.c
23288 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23289 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23290 (scop_detection::merge_sese): Re-implement with a flood-fill
23291 algorithm that properly finds a SESE region if it exists.
23293 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23296 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23297 pointer_diff optimizations use view_convert instead of convert.
23299 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23301 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23302 Generate different code for -mno-speculate-indirect-jumps.
23303 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23304 (*call_indirect_aix<mode>): Disable for
23305 -mno-speculate-indirect-jumps.
23306 (*call_indirect_aix<mode>_nospec): New define_insn.
23307 (*call_value_indirect_aix<mode>): Disable for
23308 -mno-speculate-indirect-jumps.
23309 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23310 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23311 -mno-speculate-indirect-jumps.
23312 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23314 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23316 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23317 long double type, set the flags for noting the default long double
23318 type, even if we don't pass or return a long double type.
23320 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23323 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23326 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23328 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23329 support for merge[hl].
23330 (fold_mergehl_helper): New helper function.
23331 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23332 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23333 (altivec_vmrglw_direct): Add xxmrglw insn.
23335 2018-01-17 Andrew Waterman <andrew@sifive.com>
23337 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23338 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23340 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23343 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23344 call the lto_location_cache before reading the
23345 DECL_SOURCE_LOCATION of the types.
23347 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23348 Richard Sandiford <richard.sandiford@linaro.org>
23350 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23351 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23352 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23353 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23354 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23356 * config/aarch64/constraints.md (aarch64_movti_operand):
23358 * config/aarch64/predicates.md (Uti): Add new constraint.
23360 2018-01-17 Carl Love <cel@us.ibm.com>
23362 * config/rs6000/vsx.md (define_expand xl_len_r,
23363 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23364 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23366 (define_expand, define_insn): Move the shift left from the
23367 define_insn to the define_expand for lxvl and stxvl instructions.
23368 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23369 and XL_LEN_R definitions to PURE.
23371 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23373 * config/i386/i386.c (indirect_thunk_name): Declare regno
23374 as unsigned int. Compare regno with INVALID_REGNUM.
23375 (output_indirect_thunk): Ditto.
23376 (output_indirect_thunk_function): Ditto.
23377 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23378 in the call to output_indirect_thunk_function.
23380 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23382 PR middle-end/83884
23383 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23384 rather than the size of inner_type to determine the stack slot size
23385 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23387 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23390 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23393 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23395 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23396 endian Linux systems to optionally enable multilibs for selecting
23397 the long double type if the user configured an explicit type.
23398 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23399 have no long double multilibs if not defined.
23400 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23401 warn if the user used -mabi={ieee,ibm}longdouble and we built
23402 multilibs for long double.
23403 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23404 appropriate multilib option.
23405 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23407 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23408 for building long double multilibs.
23409 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23411 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23413 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23416 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23418 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23421 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23424 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23427 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23429 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23430 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23432 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23434 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23435 different rtl trees depending on TARGET_64BIT.
23436 (rs6000_gen_lvx): Likewise.
23438 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23440 * config/visium/visium.md (nop): Tweak comment.
23441 (hazard_nop): Likewise.
23443 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23445 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23446 -mspeculate-indirect-jumps.
23447 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23448 for -mno-speculate-indirect-jumps.
23449 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23450 (*call_value_indirect_elfv2<mode>): Disable for
23451 -mno-speculate-indirect-jumps.
23452 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23453 (indirect_jump): Emit different RTL for
23454 -mno-speculate-indirect-jumps.
23455 (*indirect_jump<mode>): Disable for
23456 -mno-speculate-indirect-jumps.
23457 (*indirect_jump<mode>_nospec): New define_insn.
23458 (tablejump): Emit different RTL for
23459 -mno-speculate-indirect-jumps.
23460 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23461 (tablejumpsi_nospec): New define_expand.
23462 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23463 (tablejumpdi_nospec): New define_expand.
23464 (*tablejump<mode>_internal1): Disable for
23465 -mno-speculate-indirect-jumps.
23466 (*tablejump<mode>_internal1_nospec): New define_insn.
23467 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23470 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23472 * caller-save.c (insert_save): Drop unnecessary parameter. All
23475 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23476 Richard Biener <rguenth@suse.de>
23479 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23480 return early, inline manually is_gimple_sizepos. Make sure if we
23481 call gimplify_expr we don't end up with a gimple constant.
23482 * tree.c (variably_modified_type_p): Don't return true for
23483 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23484 * gimplify.h (is_gimple_sizepos): Remove.
23486 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23488 PR tree-optimization/83857
23489 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23490 vectorizable_live_operation for pure SLP statements.
23491 (vectorizable_live_operation): Handle PHIs.
23493 2018-01-16 Richard Biener <rguenther@suse.de>
23495 PR tree-optimization/83867
23496 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23497 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23499 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23502 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23503 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23504 If off is not INTEGER_CST, issue a may not be aligned warning
23505 rather than isn't aligned. Use isn%'t rather than isn't.
23506 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23508 <case MULT_EXPR>: Improve the case when bottom and one of the
23509 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23510 operand, in that case check if the other operand is multiple of
23511 bottom divided by the INTEGER_CST operand.
23513 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23516 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23517 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23518 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23519 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23520 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23521 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23522 (pa_function_arg_size): New function.
23524 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23526 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23527 in a separate statement.
23529 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23531 PR tree-optimization/83847
23532 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23533 group gathers and scatters.
23535 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23537 PR rtl-optimization/86620
23538 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23540 PR rtl-optimization/83213
23541 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23542 to last if both are JUMP_INSNs.
23544 PR tree-optimization/83843
23545 * gimple-ssa-store-merging.c
23546 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23547 store_immediate_info for bswap/nop orig_stores.
23549 2018-01-15 Andrew Waterman <andrew@sifive.com>
23551 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23553 <UDIV>: Increase cost if !TARGET_DIV.
23555 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23557 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23558 (define_attr "cr_logical_3op"): New.
23559 (cceq_ior_compare): Adjust.
23560 (cceq_ior_compare_complement): Adjust.
23561 (*cceq_rev_compare): Adjust.
23562 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23563 (is_cracked_insn): Adjust.
23564 (insn_must_be_first_in_group): Adjust.
23565 * config/rs6000/40x.md: Adjust.
23566 * config/rs6000/440.md: Adjust.
23567 * config/rs6000/476.md: Adjust.
23568 * config/rs6000/601.md: Adjust.
23569 * config/rs6000/603.md: Adjust.
23570 * config/rs6000/6xx.md: Adjust.
23571 * config/rs6000/7450.md: Adjust.
23572 * config/rs6000/7xx.md: Adjust.
23573 * config/rs6000/8540.md: Adjust.
23574 * config/rs6000/cell.md: Adjust.
23575 * config/rs6000/e300c2c3.md: Adjust.
23576 * config/rs6000/e500mc.md: Adjust.
23577 * config/rs6000/e500mc64.md: Adjust.
23578 * config/rs6000/e5500.md: Adjust.
23579 * config/rs6000/e6500.md: Adjust.
23580 * config/rs6000/mpc.md: Adjust.
23581 * config/rs6000/power4.md: Adjust.
23582 * config/rs6000/power5.md: Adjust.
23583 * config/rs6000/power6.md: Adjust.
23584 * config/rs6000/power7.md: Adjust.
23585 * config/rs6000/power8.md: Adjust.
23586 * config/rs6000/power9.md: Adjust.
23587 * config/rs6000/rs64.md: Adjust.
23588 * config/rs6000/titan.md: Adjust.
23590 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23592 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23593 ix86_indirect_branch_register logic.
23595 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23597 * config/i386/constraints.md (Bs): Update
23598 ix86_indirect_branch_register check. Don't check
23599 ix86_indirect_branch_register with GOT_memory_operand.
23601 * config/i386/predicates.md (GOT_memory_operand): Don't check
23602 ix86_indirect_branch_register here.
23603 (GOT32_symbol_operand): Likewise.
23605 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23607 * config/i386/predicates.md (constant_call_address_operand):
23608 Rewrite ix86_indirect_branch_register logic.
23609 (sibcall_insn_operand): Likewise.
23611 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23613 * config/i386/constraints.md (Bs): Replace
23614 ix86_indirect_branch_thunk_register with
23615 ix86_indirect_branch_register.
23617 * config/i386/i386.md (indirect_jump): Likewise.
23618 (tablejump): Likewise.
23619 (*sibcall_memory): Likewise.
23620 (*sibcall_value_memory): Likewise.
23621 Peepholes of indirect call and jump via memory: Likewise.
23622 * config/i386/i386.opt: Likewise.
23623 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23624 (GOT_memory_operand): Likewise.
23625 (call_insn_operand): Likewise.
23626 (sibcall_insn_operand): Likewise.
23627 (GOT32_symbol_operand): Likewise.
23629 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23631 PR middle-end/83837
23632 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23633 type rather than type addr's type points to.
23634 (expand_omp_atomic_mutex): Likewise.
23635 (expand_omp_atomic): Likewise.
23637 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23640 * config/i386/i386.c (output_indirect_thunk_function): Use
23641 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23642 for __x86_return_thunk.
23644 2018-01-15 Richard Biener <rguenther@suse.de>
23646 PR middle-end/83850
23647 * expmed.c (extract_bit_field_1): Fix typo.
23649 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23652 * config/arm/iterators.md (VF): New mode iterator.
23653 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23654 Remove integer-related logic from pattern.
23655 (neon_vabd<mode>_3): Likewise.
23657 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23659 PR middle-end/82694
23660 * common.opt (fstrict-overflow): No longer an alias.
23661 (fwrapv-pointer): New option.
23662 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23663 also for pointer types based on flag_wrapv_pointer.
23664 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23665 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23666 opts->x_flag_wrapv got set.
23667 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23668 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23669 POINTER_TYPE_OVERFLOW_UNDEFINED.
23670 * match.pd: Likewise in address comparison pattern.
23671 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23673 2018-01-15 Richard Biener <rguenther@suse.de>
23676 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23677 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23678 Reset type names to their identifier if their TYPE_DECL doesn't
23679 have linkage (and thus is used for ODR and devirt).
23680 (save_debug_info_for_decl): Remove.
23681 (save_debug_info_for_type): Likewise.
23682 (add_tree_to_fld_list): Adjust.
23683 * tree-pretty-print.c (dump_generic_node): Make dumping of
23684 type names more robust.
23686 2018-01-15 Richard Biener <rguenther@suse.de>
23688 * BASE-VER: Bump to 8.0.1.
23690 2018-01-14 Martin Sebor <msebor@redhat.com>
23693 * builtins.c (check_access): Avoid warning when the no-warning bit
23696 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23698 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23699 * ira-color (allocno_hard_regs_compare): Likewise.
23701 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23704 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23705 Use .pushsection/.popsection.
23707 2018-01-14 Martin Sebor <msebor@redhat.com>
23710 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23712 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23714 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23715 entry from extra_headers.
23716 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23717 extra_headers, make the list bitwise identical to the i?86-*-* one.
23719 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23721 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23722 -mcmodel=large with -mindirect-branch=thunk,
23723 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23724 -mfunction-return=thunk-extern.
23725 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23726 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23727 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23729 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23731 * config/i386/i386.c (print_reg): Print the name of the full
23732 integer register without '%'.
23733 (ix86_print_operand): Handle 'V'.
23734 * doc/extend.texi: Document 'V' modifier.
23736 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23738 * config/i386/constraints.md (Bs): Disallow memory operand for
23739 -mindirect-branch-register.
23741 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23742 (GOT_memory_operand): Likewise.
23743 (call_insn_operand): Likewise.
23744 (sibcall_insn_operand): Likewise.
23745 (GOT32_symbol_operand): Likewise.
23746 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23747 for -mindirect-branch-register.
23748 (tablejump): Likewise.
23749 (*sibcall_memory): Likewise.
23750 (*sibcall_value_memory): Likewise.
23751 Disallow peepholes of indirect call and jump via memory for
23752 -mindirect-branch-register.
23753 (*call_pop): Replace m with Bw.
23754 (*call_value_pop): Likewise.
23755 (*sibcall_pop_memory): Replace m with Bs.
23756 * config/i386/i386.opt (mindirect-branch-register): New option.
23757 * doc/invoke.texi: Document -mindirect-branch-register option.
23759 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23761 * config/i386/i386-protos.h (ix86_output_function_return): New.
23762 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23763 set function_return_type.
23764 (indirect_thunk_name): Add ret_p to indicate thunk for function
23766 (output_indirect_thunk_function): Pass false to
23767 indirect_thunk_name.
23768 (ix86_output_indirect_branch_via_reg): Likewise.
23769 (ix86_output_indirect_branch_via_push): Likewise.
23770 (output_indirect_thunk_function): Create alias for function
23771 return thunk if regno < 0.
23772 (ix86_output_function_return): New function.
23773 (ix86_handle_fndecl_attribute): Handle function_return.
23774 (ix86_attribute_table): Add function_return.
23775 * config/i386/i386.h (machine_function): Add
23776 function_return_type.
23777 * config/i386/i386.md (simple_return_internal): Use
23778 ix86_output_function_return.
23779 (simple_return_internal_long): Likewise.
23780 * config/i386/i386.opt (mfunction-return=): New option.
23781 (indirect_branch): Mention -mfunction-return=.
23782 * doc/extend.texi: Document function_return function attribute.
23783 * doc/invoke.texi: Document -mfunction-return= option.
23785 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23787 * config/i386/i386-opts.h (indirect_branch): New.
23788 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23789 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23790 with local indirect jump when converting indirect call and jump.
23791 (ix86_set_indirect_branch_type): New.
23792 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23793 (indirectlabelno): New.
23794 (indirect_thunk_needed): Likewise.
23795 (indirect_thunk_bnd_needed): Likewise.
23796 (indirect_thunks_used): Likewise.
23797 (indirect_thunks_bnd_used): Likewise.
23798 (INDIRECT_LABEL): Likewise.
23799 (indirect_thunk_name): Likewise.
23800 (output_indirect_thunk): Likewise.
23801 (output_indirect_thunk_function): Likewise.
23802 (ix86_output_indirect_branch_via_reg): Likewise.
23803 (ix86_output_indirect_branch_via_push): Likewise.
23804 (ix86_output_indirect_branch): Likewise.
23805 (ix86_output_indirect_jmp): Likewise.
23806 (ix86_code_end): Call output_indirect_thunk_function if needed.
23807 (ix86_output_call_insn): Call ix86_output_indirect_branch if
23809 (ix86_handle_fndecl_attribute): Handle indirect_branch.
23810 (ix86_attribute_table): Add indirect_branch.
23811 * config/i386/i386.h (machine_function): Add indirect_branch_type
23812 and has_local_indirect_jump.
23813 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23815 (tablejump): Likewise.
23816 (*indirect_jump): Use ix86_output_indirect_jmp.
23817 (*tablejump_1): Likewise.
23818 (simple_return_indirect_internal): Likewise.
23819 * config/i386/i386.opt (mindirect-branch=): New option.
23820 (indirect_branch): New.
23823 (thunk-inline): Likewise.
23824 (thunk-extern): Likewise.
23825 * doc/extend.texi: Document indirect_branch function attribute.
23826 * doc/invoke.texi: Document -mindirect-branch= option.
23828 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
23831 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23833 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
23835 * ipa-inline.c (want_inline_small_function_p): Return false if
23836 inlining has already failed with CIF_FINAL_ERROR.
23837 (update_caller_keys): Call want_inline_small_function_p before
23839 (update_callee_keys): Likewise.
23841 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23843 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23845 (rs6000_quadword_masked_address_p): Likewise.
23846 (quad_aligned_load_p): Likewise.
23847 (quad_aligned_store_p): Likewise.
23848 (const_load_sequence_p): Add comment to describe the outer-most loop.
23849 (mimic_memory_attributes_and_flags): New function.
23850 (rs6000_gen_stvx): Likewise.
23851 (replace_swapped_aligned_store): Likewise.
23852 (rs6000_gen_lvx): Likewise.
23853 (replace_swapped_aligned_load): Likewise.
23854 (replace_swapped_load_constant): Capitalize argument name in
23855 comment describing this function.
23856 (rs6000_analyze_swaps): Add a third pass to search for vector loads
23857 and stores that access quad-word aligned addresses and replace
23858 with stvx or lvx instructions when appropriate.
23859 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23860 New function prototype.
23861 (rs6000_quadword_masked_address_p): Likewise.
23862 (rs6000_gen_lvx): Likewise.
23863 (rs6000_gen_stvx): Likewise.
23864 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23865 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23866 when memory address is aligned.
23867 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23868 this split to select lvx instruction when memory address is aligned.
23869 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23870 instruction when memory address is aligned.
23871 (*vsx_le_perm_load_v16qi): Likewise.
23872 (four unnamed splitters): Modify to select the stvx instruction
23873 when memory is aligned.
23875 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
23877 * predict.c (determine_unlikely_bbs): Handle correctly BBs
23878 which appears in the queue multiple times.
23880 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23881 Alan Hayward <alan.hayward@arm.com>
23882 David Sherwood <david.sherwood@arm.com>
23884 * tree-vectorizer.h (vec_lower_bound): New structure.
23885 (_loop_vec_info): Add check_nonzero and lower_bounds.
23886 (LOOP_VINFO_CHECK_NONZERO): New macro.
23887 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23888 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23889 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23890 fields. Make seg_len the distance travelled, not including the
23892 (dr_direction_indicator): Declare.
23893 (dr_zero_step_indicator): Likewise.
23894 (dr_known_forward_stride_p): Likewise.
23895 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23897 (runtime_alias_check_p): Allow runtime alias checks with
23899 (operator ==): Compare access_size and align.
23900 (prune_runtime_alias_test_list): Rework for new distinction between
23901 the access_size and seg_len.
23902 (create_intersect_range_checks_index): Likewise. Cope with polynomial
23904 (get_segment_min_max): New function.
23905 (create_intersect_range_checks): Use it.
23906 (dr_step_indicator): New function.
23907 (dr_direction_indicator): Likewise.
23908 (dr_zero_step_indicator): Likewise.
23909 (dr_known_forward_stride_p): Likewise.
23910 * tree-loop-distribution.c (data_ref_segment_size): Return
23911 DR_STEP * (niters - 1).
23912 (compute_alias_check_pairs): Update call to the dr_with_seg_len
23914 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23915 (vect_preserves_scalar_order_p): New function, split out from...
23916 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
23917 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23918 (vect_vfa_access_size): New function.
23919 (vect_vfa_align): Likewise.
23920 (vect_compile_time_alias): Take access_size_a and access_b arguments.
23921 (dump_lower_bound): New function.
23922 (vect_check_lower_bound): Likewise.
23923 (vect_small_gap_p): Likewise.
23924 (vectorizable_with_step_bound_p): Likewise.
23925 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23926 depencies if the vectorization factor is 1. Convert the checks
23927 for nonzero steps into checks on the bounds of DR_STEP. Try using
23928 a bunds check for variable steps if the minimum required step is
23929 relatively small. Update calls to the dr_with_seg_len
23930 constructor and to vect_compile_time_alias.
23931 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23933 (vect_loop_versioning): Call it.
23934 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23936 (vect_estimate_min_profitable_iters): Account for any bounds checks.
23938 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23939 Alan Hayward <alan.hayward@arm.com>
23940 David Sherwood <david.sherwood@arm.com>
23942 * doc/sourcebuild.texi (vect_scatter_store): Document.
23943 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23945 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23947 * genopinit.c (main): Add supports_vec_scatter_store and
23948 supports_vec_scatter_store_cached to target_optabs.
23949 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23950 IFN_MASK_SCATTER_STORE.
23951 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23953 * internal-fn.h (internal_store_fn_p): Declare.
23954 (internal_fn_stored_value_index): Likewise.
23955 * internal-fn.c (scatter_store_direct): New macro.
23956 (expand_scatter_store_optab_fn): New function.
23957 (direct_scatter_store_optab_supported_p): New macro.
23958 (internal_store_fn_p): New function.
23959 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23960 IFN_MASK_SCATTER_STORE.
23961 (internal_fn_mask_index): Likewise.
23962 (internal_fn_stored_value_index): New function.
23963 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23964 for scatter stores.
23965 * optabs-query.h (supports_vec_scatter_store_p): Declare.
23966 * optabs-query.c (supports_vec_scatter_store_p): New function.
23967 * tree-vectorizer.h (vect_get_store_rhs): Declare.
23968 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23969 true for scatter stores.
23970 (vect_gather_scatter_fn_p): Handle scatter stores too.
23971 (vect_check_gather_scatter): Consider using scatter stores if
23972 supports_vec_scatter_store_p.
23973 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23974 scatter stores too.
23975 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23976 internal_fn_stored_value_index.
23977 (check_load_store_masking): Handle scatter stores too.
23978 (vect_get_store_rhs): Make public.
23979 (vectorizable_call): Use internal_store_fn_p.
23980 (vectorizable_store): Handle scatter store internal functions.
23981 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23982 when deciding whether the end of the group has been reached.
23983 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23984 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23985 (mask_scatter_store<mode>): New insns.
23987 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23988 Alan Hayward <alan.hayward@arm.com>
23989 David Sherwood <david.sherwood@arm.com>
23991 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23992 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23993 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23995 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23996 Use vect_truncate_gather_scatter_offset if we can't treat the
23997 operation as a normal gather load or scatter store.
23998 (get_group_load_store_type): Take the gather_scatter_info
23999 as argument. Try using a gather load or scatter store for
24000 single-element groups.
24001 (get_load_store_type): Update calls to get_group_load_store_type
24002 and vect_use_strided_gather_scatters_p.
24004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24005 Alan Hayward <alan.hayward@arm.com>
24006 David Sherwood <david.sherwood@arm.com>
24008 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24009 optional tree argument.
24010 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24012 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24013 but continue to use the current value as a fallback.
24014 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24015 to compare the updates.
24016 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24017 (get_load_store_type): Use it when handling a strided access.
24018 (vect_get_strided_load_store_ops): New function.
24019 (vect_get_data_ptr_increment): Likewise.
24020 (vectorizable_load): Handle strided gather loads. Always pass
24021 a step to vect_create_data_ref_ptr and bump_vector_ptr.
24023 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24024 Alan Hayward <alan.hayward@arm.com>
24025 David Sherwood <david.sherwood@arm.com>
24027 * doc/md.texi (gather_load@var{m}): Document.
24028 (mask_gather_load@var{m}): Likewise.
24029 * genopinit.c (main): Add supports_vec_gather_load and
24030 supports_vec_gather_load_cached to target_optabs.
24031 * optabs-tree.c (init_tree_optimization_optabs): Use
24032 ggc_cleared_alloc to allocate target_optabs.
24033 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24034 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24036 * internal-fn.h (internal_load_fn_p): Declare.
24037 (internal_gather_scatter_fn_p): Likewise.
24038 (internal_fn_mask_index): Likewise.
24039 (internal_gather_scatter_fn_supported_p): Likewise.
24040 * internal-fn.c (gather_load_direct): New macro.
24041 (expand_gather_load_optab_fn): New function.
24042 (direct_gather_load_optab_supported_p): New macro.
24043 (direct_internal_fn_optab): New function.
24044 (internal_load_fn_p): Likewise.
24045 (internal_gather_scatter_fn_p): Likewise.
24046 (internal_fn_mask_index): Likewise.
24047 (internal_gather_scatter_fn_supported_p): Likewise.
24048 * optabs-query.c (supports_at_least_one_mode_p): New function.
24049 (supports_vec_gather_load_p): Likewise.
24050 * optabs-query.h (supports_vec_gather_load_p): Declare.
24051 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24052 and memory_type field.
24053 (NUM_PATTERNS): Bump to 15.
24054 * tree-vect-data-refs.c: Include internal-fn.h.
24055 (vect_gather_scatter_fn_p): New function.
24056 (vect_describe_gather_scatter_call): Likewise.
24057 (vect_check_gather_scatter): Try using internal functions for
24058 gather loads. Recognize existing calls to a gather load function.
24059 (vect_analyze_data_refs): Consider using gather loads if
24060 supports_vec_gather_load_p.
24061 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24062 (vect_get_gather_scatter_offset_type): Likewise.
24063 (vect_convert_mask_for_vectype): Likewise.
24064 (vect_add_conversion_to_patterm): Likewise.
24065 (vect_try_gather_scatter_pattern): Likewise.
24066 (vect_recog_gather_scatter_pattern): New pattern recognizer.
24067 (vect_vect_recog_func_ptrs): Add it.
24068 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24069 internal_fn_mask_index and internal_gather_scatter_fn_p.
24070 (check_load_store_masking): Take the gather_scatter_info as an
24071 argument and handle gather loads.
24072 (vect_get_gather_scatter_ops): New function.
24073 (vectorizable_call): Check internal_load_fn_p.
24074 (vectorizable_load): Likewise. Handle gather load internal
24076 (vectorizable_store): Update call to check_load_store_masking.
24077 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24078 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24079 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24080 (aarch64_gather_scale_operand_d): New predicates.
24081 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24082 (mask_gather_load<mode>): New insns.
24084 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24085 Alan Hayward <alan.hayward@arm.com>
24086 David Sherwood <david.sherwood@arm.com>
24088 * optabs.def (fold_left_plus_optab): New optab.
24089 * doc/md.texi (fold_left_plus_@var{m}): Document.
24090 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24091 * internal-fn.c (fold_left_direct): Define.
24092 (expand_fold_left_optab_fn): Likewise.
24093 (direct_fold_left_optab_supported_p): Likewise.
24094 * fold-const-call.c (fold_const_fold_left): New function.
24095 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24096 * tree-parloops.c (valid_reduction_p): New function.
24097 (gather_scalar_reductions): Use it.
24098 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24099 (vect_finish_replace_stmt): Declare.
24100 * tree-vect-loop.c (fold_left_reduction_fn): New function.
24101 (needs_fold_left_reduction_p): New function, split out from...
24102 (vect_is_simple_reduction): ...here. Accept reductions that
24103 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24104 (vect_force_simple_reduction): Also store the reduction type in
24105 the assignment's STMT_VINFO_REDUC_TYPE.
24106 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24107 (merge_with_identity): New function.
24108 (vect_expand_fold_left): Likewise.
24109 (vectorize_fold_left_reduction): Likewise.
24110 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
24111 scalar phi in place for it. Check for target support and reject
24112 cases that would reassociate the operation. Defer the transform
24113 phase to vectorize_fold_left_reduction.
24114 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24115 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24116 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24120 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24121 call to ifc_temp_var.
24123 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24124 Alan Hayward <alan.hayward@arm.com>
24125 David Sherwood <david.sherwood@arm.com>
24127 * target.def (legitimize_address_displacement): Take the original
24128 offset as a poly_int.
24129 * targhooks.h (default_legitimize_address_displacement): Update
24131 * targhooks.c (default_legitimize_address_displacement): Likewise.
24132 * doc/tm.texi: Regenerate.
24133 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24134 as an argument, moving assert of ad->disp == ad->disp_term to...
24135 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24136 Try calling targetm.legitimize_address_displacement before expanding
24137 the address rather than afterwards, and adjust for the new interface.
24138 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24139 Match the new hook interface. Handle SVE addresses.
24140 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24141 new hook interface.
24143 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24145 * Makefile.in (OBJS): Add early-remat.o.
24146 * target.def (select_early_remat_modes): New hook.
24147 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24148 * doc/tm.texi: Regenerate.
24149 * targhooks.h (default_select_early_remat_modes): Declare.
24150 * targhooks.c (default_select_early_remat_modes): New function.
24151 * timevar.def (TV_EARLY_REMAT): New timevar.
24152 * passes.def (pass_early_remat): New pass.
24153 * tree-pass.h (make_pass_early_remat): Declare.
24154 * early-remat.c: New file.
24155 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24157 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24159 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24160 Alan Hayward <alan.hayward@arm.com>
24161 David Sherwood <david.sherwood@arm.com>
24163 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24164 vfm1 with a bound_epilog parameter.
24165 (vect_do_peeling): Update calls accordingly, and move the prologue
24166 call earlier in the function. Treat the base bound_epilog as 0 for
24167 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24168 this base when peeling for gaps.
24169 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24170 with fully-masked loops.
24171 (vect_estimate_min_profitable_iters): Handle the single peeled
24172 iteration in that case.
24174 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24175 Alan Hayward <alan.hayward@arm.com>
24176 David Sherwood <david.sherwood@arm.com>
24178 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24179 single-element interleaving even if the size is not a power of 2.
24180 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24181 accesses for single-element interleaving if the group size is
24184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24185 Alan Hayward <alan.hayward@arm.com>
24186 David Sherwood <david.sherwood@arm.com>
24188 * doc/md.texi (fold_extract_last_@var{m}): Document.
24189 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24190 * optabs.def (fold_extract_last_optab): New optab.
24191 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24192 * internal-fn.c (fold_extract_direct): New macro.
24193 (expand_fold_extract_optab_fn): Likewise.
24194 (direct_fold_extract_optab_supported_p): Likewise.
24195 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24196 * tree-vect-loop.c (vect_model_reduction_cost): Handle
24197 EXTRACT_LAST_REDUCTION.
24198 (get_initial_def_for_reduction): Do not create an initial vector
24199 for EXTRACT_LAST_REDUCTION reductions.
24200 (vectorizable_reduction): Leave the scalar phi in place for
24201 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
24202 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
24203 epilogue code for EXTRACT_LAST_REDUCTION and defer the
24204 transform phase to vectorizable_condition.
24205 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24207 (vect_finish_stmt_generation): ...here.
24208 (vect_finish_replace_stmt): New function.
24209 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24210 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24212 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24215 Alan Hayward <alan.hayward@arm.com>
24216 David Sherwood <david.sherwood@arm.com>
24218 * doc/md.texi (extract_last_@var{m}): Document.
24219 * optabs.def (extract_last_optab): New optab.
24220 * internal-fn.def (EXTRACT_LAST): New internal function.
24221 * internal-fn.c (cond_unary_direct): New macro.
24222 (expand_cond_unary_optab_fn): Likewise.
24223 (direct_cond_unary_optab_supported_p): Likewise.
24224 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24225 loops using EXTRACT_LAST.
24226 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24227 (extract_last_<mode>): ...this optab.
24228 (vec_extract<mode><Vel>): Update accordingly.
24230 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24231 Alan Hayward <alan.hayward@arm.com>
24232 David Sherwood <david.sherwood@arm.com>
24234 * target.def (empty_mask_is_expensive): New hook.
24235 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24236 * doc/tm.texi: Regenerate.
24237 * targhooks.h (default_empty_mask_is_expensive): Declare.
24238 * targhooks.c (default_empty_mask_is_expensive): New function.
24239 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24240 if the target says that empty masks are expensive.
24241 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24243 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24245 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24246 Alan Hayward <alan.hayward@arm.com>
24247 David Sherwood <david.sherwood@arm.com>
24249 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24250 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24251 (vect_use_loop_mask_for_alignment_p): New function.
24252 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24253 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24254 niters_skip argument. Make sure that the first niters_skip elements
24255 of the first iteration are inactive.
24256 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24257 Update call to vect_set_loop_masks_directly.
24258 (get_misalign_in_elems): New function, split out from...
24259 (vect_gen_prolog_loop_niters): ...here.
24260 (vect_update_init_of_dr): Take a code argument that specifies whether
24261 the adjustment should be added or subtracted.
24262 (vect_update_init_of_drs): Likewise.
24263 (vect_prepare_for_masked_peels): New function.
24264 (vect_do_peeling): Skip prologue peeling if we're using a mask
24265 instead. Update call to vect_update_inits_of_drs.
24266 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24268 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24269 alignment. Do not include the number of peeled iterations in
24270 the minimum threshold in that case.
24271 (vectorizable_induction): Adjust the start value down by
24272 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24273 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24274 Take the number of skipped iterations into account when calculating
24276 * tree-vect-stmts.c (vect_gen_while_not): New function.
24278 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24279 Alan Hayward <alan.hayward@arm.com>
24280 David Sherwood <david.sherwood@arm.com>
24282 * doc/sourcebuild.texi (vect_fully_masked): Document.
24283 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24284 default value to 0.
24285 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24287 (vect_analyze_loop_2): ...here. Don't check the vectorization
24288 factor against the number of loop iterations if the loop is
24291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24292 Alan Hayward <alan.hayward@arm.com>
24293 David Sherwood <david.sherwood@arm.com>
24295 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24296 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24297 (dump_groups): Update accordingly.
24298 (iv_use::mem_type): New member variable.
24299 (address_p): New function.
24300 (record_use): Add a mem_type argument and initialize the new
24302 (record_group_use): Add a mem_type argument. Use address_p.
24303 Remove obsolete null checks of base_object. Update call to record_use.
24304 (find_interesting_uses_op): Update call to record_group_use.
24305 (find_interesting_uses_cond): Likewise.
24306 (find_interesting_uses_address): Likewise.
24307 (get_mem_type_for_internal_fn): New function.
24308 (find_address_like_use): Likewise.
24309 (find_interesting_uses_stmt): Try find_address_like_use before
24310 calling find_interesting_uses_op.
24311 (addr_offset_valid_p): Use the iv mem_type field as the type
24312 of the addressed memory.
24313 (add_autoinc_candidates): Likewise.
24314 (get_address_cost): Likewise.
24315 (split_small_address_groups_p): Use address_p.
24316 (split_address_groups): Likewise.
24317 (add_iv_candidate_for_use): Likewise.
24318 (autoinc_possible_for_pair): Likewise.
24319 (rewrite_groups): Likewise.
24320 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24321 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24322 (get_alias_ptr_type_for_ptr_address): New function.
24323 (rewrite_use_address): Rewrite address uses in calls that were
24324 identified by find_address_like_use.
24326 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24327 Alan Hayward <alan.hayward@arm.com>
24328 David Sherwood <david.sherwood@arm.com>
24330 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24332 * gimple-expr.h (is_gimple_addressable: Likewise.
24333 * gimple-expr.c (is_gimple_address): Likewise.
24334 * internal-fn.c (expand_call_mem_ref): New function.
24335 (expand_mask_load_optab_fn): Use it.
24336 (expand_mask_store_optab_fn): Likewise.
24338 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24339 Alan Hayward <alan.hayward@arm.com>
24340 David Sherwood <david.sherwood@arm.com>
24342 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24343 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24344 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24345 (cond_umax@var{mode}): Document.
24346 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24347 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24348 (cond_umin_optab, cond_umax_optab): New optabs.
24349 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24350 (COND_IOR, COND_XOR): New internal functions.
24351 * internal-fn.h (get_conditional_internal_fn): Declare.
24352 * internal-fn.c (cond_binary_direct): New macro.
24353 (expand_cond_binary_optab_fn): Likewise.
24354 (direct_cond_binary_optab_supported_p): Likewise.
24355 (get_conditional_internal_fn): New function.
24356 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24357 Cope with reduction statements that are vectorized as calls rather
24359 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24360 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24361 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24362 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24363 (UNSPEC_COND_EOR): New unspecs.
24364 (optab): Add mappings for them.
24365 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24366 (sve_int_op, sve_fp_op): New int attributes.
24368 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24369 Alan Hayward <alan.hayward@arm.com>
24370 David Sherwood <david.sherwood@arm.com>
24372 * optabs.def (while_ult_optab): New optab.
24373 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24374 * internal-fn.def (WHILE_ULT): New internal function.
24375 * internal-fn.h (direct_internal_fn_supported_p): New override
24376 that takes two types as argument.
24377 * internal-fn.c (while_direct): New macro.
24378 (expand_while_optab_fn): New function.
24379 (convert_optab_supported_p): Likewise.
24380 (direct_while_optab_supported_p): New macro.
24381 * wide-int.h (wi::udiv_ceil): New function.
24382 * tree-vectorizer.h (rgroup_masks): New structure.
24383 (vec_loop_masks): New typedef.
24384 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24385 and fully_masked_p.
24386 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24387 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24388 (vect_max_vf): New function.
24389 (slpeel_make_loop_iterate_ntimes): Delete.
24390 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24391 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24392 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24393 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24394 internal-fn.h, stor-layout.h and optabs-query.h.
24395 (vect_set_loop_mask): New function.
24396 (add_preheader_seq): Likewise.
24397 (add_header_seq): Likewise.
24398 (interleave_supported_p): Likewise.
24399 (vect_maybe_permute_loop_masks): Likewise.
24400 (vect_set_loop_masks_directly): Likewise.
24401 (vect_set_loop_condition_masked): Likewise.
24402 (vect_set_loop_condition_unmasked): New function, split out from
24403 slpeel_make_loop_iterate_ntimes.
24404 (slpeel_make_loop_iterate_ntimes): Rename to..
24405 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24406 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24407 (vect_do_peeling): Update call accordingly.
24408 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24410 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24411 mask_compare_type, can_fully_mask_p and fully_masked_p.
24412 (release_vec_loop_masks): New function.
24413 (_loop_vec_info): Use it to free the loop masks.
24414 (can_produce_all_loop_masks_p): New function.
24415 (vect_get_max_nscalars_per_iter): Likewise.
24416 (vect_verify_full_masking): Likewise.
24417 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24418 retries, and free the mask rgroups before retrying. Check loop-wide
24419 reasons for disallowing fully-masked loops. Make the final decision
24420 about whether use a fully-masked loop or not.
24421 (vect_estimate_min_profitable_iters): Do not assume that peeling
24422 for the number of iterations will be needed for fully-masked loops.
24423 (vectorizable_reduction): Disable fully-masked loops.
24424 (vectorizable_live_operation): Likewise.
24425 (vect_halve_mask_nunits): New function.
24426 (vect_double_mask_nunits): Likewise.
24427 (vect_record_loop_mask): Likewise.
24428 (vect_get_loop_mask): Likewise.
24429 (vect_transform_loop): Handle the case in which the final loop
24430 iteration might handle a partial vector. Call vect_set_loop_condition
24431 instead of slpeel_make_loop_iterate_ntimes.
24432 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24433 (check_load_store_masking): New function.
24434 (prepare_load_store_mask): Likewise.
24435 (vectorizable_store): Handle fully-masked loops.
24436 (vectorizable_load): Likewise.
24437 (supportable_widening_operation): Use vect_halve_mask_nunits for
24439 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24440 (vect_gen_while): New function.
24441 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24442 (aarch64_uqdec<mode>): New insn.
24444 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24445 Alan Hayward <alan.hayward@arm.com>
24446 David Sherwood <david.sherwood@arm.com>
24448 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24449 (reduc_xor_scal_optab): New optabs.
24450 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24451 (reduc_xor_scal_@var{m}): Document.
24452 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24453 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24454 internal functions.
24455 * fold-const-call.c (fold_const_call): Handle them.
24456 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24457 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24458 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24459 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24460 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24461 (UNSPEC_XORV): New unspecs.
24462 (optab): Add entries for them.
24463 (BITWISEV): New int iterator.
24464 (bit_reduc_op): New int attributes.
24466 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24467 Alan Hayward <alan.hayward@arm.com>
24468 David Sherwood <david.sherwood@arm.com>
24470 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24471 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24472 * optabs.def (vec_shl_insert_optab): New optab.
24473 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24474 (duplicate_and_interleave): Likewise.
24475 * tree-vect-loop.c: Include internal-fn.h.
24476 (neutral_op_for_slp_reduction): New function, split out from
24477 get_initial_defs_for_reduction.
24478 (get_initial_def_for_reduction): Handle option 2 for variable-length
24479 vectors by loading the neutral value into a vector and then shifting
24480 the initial value into element 0.
24481 (get_initial_defs_for_reduction): Replace the code argument with
24482 the neutral value calculated by neutral_op_for_slp_reduction.
24483 Use gimple_build_vector for constant-length vectors.
24484 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24485 but the first group_size elements have a neutral value.
24486 Use duplicate_and_interleave otherwise.
24487 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24488 Update call to get_initial_defs_for_reduction. Handle SLP
24489 reductions for variable-length vectors by creating one vector
24490 result for each scalar result, with the elements associated
24491 with other scalar results stubbed out with the neutral value.
24492 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24493 Require IFN_VEC_SHL_INSERT for double reductions on
24494 variable-length vectors, or SLP reductions that have
24495 a neutral value. Require can_duplicate_and_interleave_p
24496 support for variable-length unchained SLP reductions if there
24497 is no neutral value, such as for MIN/MAX reductions. Also require
24498 the number of vector elements to be a multiple of the number of
24499 SLP statements when doing variable-length unchained SLP reductions.
24500 Update call to vect_create_epilog_for_reduction.
24501 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24502 and remove initial values.
24503 (duplicate_and_interleave): Make public.
24504 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24505 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24507 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24508 Alan Hayward <alan.hayward@arm.com>
24509 David Sherwood <david.sherwood@arm.com>
24511 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24512 (can_duplicate_and_interleave_p): New function.
24513 (vect_get_and_check_slp_defs): Take the vector of statements
24514 rather than just the current one. Remove excess parentheses.
24515 Restriction rejectinon of vect_constant_def and vect_external_def
24516 for variable-length vectors to boolean types, or types for which
24517 can_duplicate_and_interleave_p is false.
24518 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24519 (duplicate_and_interleave): New function.
24520 (vect_get_constant_vectors): Use gimple_build_vector for
24521 constant-length vectors and suitable variable-length constant
24522 vectors. Use duplicate_and_interleave for other variable-length
24523 vectors. Don't defer the update when inserting new statements.
24525 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24526 Alan Hayward <alan.hayward@arm.com>
24527 David Sherwood <david.sherwood@arm.com>
24529 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24530 min_profitable_iters doesn't go negative.
24532 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24533 Alan Hayward <alan.hayward@arm.com>
24534 David Sherwood <david.sherwood@arm.com>
24536 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24537 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24538 * optabs.def (vec_mask_load_lanes_optab): New optab.
24539 (vec_mask_store_lanes_optab): Likewise.
24540 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24541 (MASK_STORE_LANES): Likewise.
24542 * internal-fn.c (mask_load_lanes_direct): New macro.
24543 (mask_store_lanes_direct): Likewise.
24544 (expand_mask_load_optab_fn): Handle masked operations.
24545 (expand_mask_load_lanes_optab_fn): New macro.
24546 (expand_mask_store_optab_fn): Handle masked operations.
24547 (expand_mask_store_lanes_optab_fn): New macro.
24548 (direct_mask_load_lanes_optab_supported_p): Likewise.
24549 (direct_mask_store_lanes_optab_supported_p): Likewise.
24550 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24552 (vect_load_lanes_supported): Likewise.
24553 * tree-vect-data-refs.c (strip_conversion): New function.
24554 (can_group_stmts_p): Likewise.
24555 (vect_analyze_data_ref_accesses): Use it instead of checking
24556 for a pair of assignments.
24557 (vect_store_lanes_supported): Take a masked_p parameter.
24558 (vect_load_lanes_supported): Likewise.
24559 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24560 vect_store_lanes_supported and vect_load_lanes_supported.
24561 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24562 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24563 parameter. Don't allow gaps for masked accesses.
24564 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24565 and vect_load_lanes_supported.
24566 (get_load_store_type): Take a masked_p parameter and update
24567 call to get_group_load_store_type.
24568 (vectorizable_store): Update call to get_load_store_type.
24569 Handle IFN_MASK_STORE_LANES.
24570 (vectorizable_load): Update call to get_load_store_type.
24571 Handle IFN_MASK_LOAD_LANES.
24573 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24574 Alan Hayward <alan.hayward@arm.com>
24575 David Sherwood <david.sherwood@arm.com>
24577 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24579 * config/aarch64/aarch64-protos.h
24580 (aarch64_sve_struct_memory_operand_p): Declare.
24581 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24582 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24583 (VPRED, vpred): Handle SVE structure modes.
24584 * config/aarch64/constraints.md (Utx): New constraint.
24585 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24586 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24587 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24588 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24589 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24590 structure modes. Split into pieces after RA.
24591 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24592 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24594 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24595 SVE structure modes.
24596 (aarch64_classify_address): Likewise.
24597 (sizetochar): Move earlier in file.
24598 (aarch64_print_operand): Handle SVE register lists.
24599 (aarch64_array_mode): New function.
24600 (aarch64_sve_struct_memory_operand_p): Likewise.
24601 (TARGET_ARRAY_MODE): Redefine.
24603 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24604 Alan Hayward <alan.hayward@arm.com>
24605 David Sherwood <david.sherwood@arm.com>
24607 * target.def (array_mode): New target hook.
24608 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24609 * doc/tm.texi: Regenerate.
24610 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24611 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24612 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24613 targetm.array_mode.
24614 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24618 Alan Hayward <alan.hayward@arm.com>
24619 David Sherwood <david.sherwood@arm.com>
24621 * fold-const.c (fold_binary_loc): Check the argument types
24622 rather than the result type when testing for a vector operation.
24624 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24626 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24627 * doc/tm.texi: Regenerate.
24629 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24630 Alan Hayward <alan.hayward@arm.com>
24631 David Sherwood <david.sherwood@arm.com>
24633 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24634 (sve): Document new AArch64 extension.
24635 * doc/md.texi (w): Extend the description of the AArch64
24636 constraint to include SVE vectors.
24637 (Upl, Upa): Document new AArch64 predicate constraints.
24638 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24640 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24641 (msve-vector-bits=): New option.
24642 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24643 SVE when these are disabled.
24644 (sve): New extension.
24645 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24646 modes. Adjust their number of units based on aarch64_sve_vg.
24647 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24648 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24649 aarch64_addr_query_type.
24650 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24651 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24652 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24653 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24654 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24655 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24656 (aarch64_simd_imm_zero_p): Delete.
24657 (aarch64_check_zero_based_sve_index_immediate): Declare.
24658 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24659 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24660 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24661 (aarch64_sve_float_mul_immediate_p): Likewise.
24662 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24663 rather than an rtx.
24664 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24665 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24666 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24667 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24668 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24669 (aarch64_regmode_natural_size): Likewise.
24670 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24671 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24673 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24674 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24675 for VG and the SVE predicate registers.
24676 (V_ALIASES): Add a "z"-prefixed alias.
24677 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24678 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24679 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24680 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24681 (REG_CLASS_NAMES): Add entries for them.
24682 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24683 and the predicate registers.
24684 (aarch64_sve_vg): Declare.
24685 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24686 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24687 (REGMODE_NATURAL_SIZE): Define.
24688 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24690 * config/aarch64/aarch64.c: Include cfgrtl.h.
24691 (simd_immediate_info): Add a constructor for series vectors,
24692 and an associated step field.
24693 (aarch64_sve_vg): New variable.
24694 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24695 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24696 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24697 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24698 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24699 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24700 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24701 (aarch64_get_mask_mode): New functions.
24702 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24703 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24704 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24705 predicate modes and predicate registers. Explicitly restrict
24706 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24707 to store a vector mode if it is recognized by
24708 aarch64_classify_vector_mode.
24709 (aarch64_regmode_natural_size): New function.
24710 (aarch64_hard_regno_caller_save_mode): Return the original mode
24712 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24713 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24714 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24715 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24717 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24718 does not overlap dest if the function is frame-related. Handle
24720 (aarch64_split_add_offset): New function.
24721 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24722 them aarch64_add_offset.
24723 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24724 and update call to aarch64_sub_sp.
24725 (aarch64_add_cfa_expression): New function.
24726 (aarch64_expand_prologue): Pass extra temporary registers to the
24727 functions above. Handle the case in which we need to emit new
24728 DW_CFA_expressions for registers that were originally saved
24729 relative to the stack pointer, but now have to be expressed
24730 relative to the frame pointer.
24731 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24733 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24734 IP0 and IP1 values for SVE frames.
24735 (aarch64_expand_vec_series): New function.
24736 (aarch64_expand_sve_widened_duplicate): Likewise.
24737 (aarch64_expand_sve_const_vector): Likewise.
24738 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24739 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24740 into the register, rather than emitting a SET directly.
24741 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24742 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24743 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24744 (offset_9bit_signed_scaled_p): New functions.
24745 (aarch64_replicate_bitmask_imm): New function.
24746 (aarch64_bitmask_imm): Use it.
24747 (aarch64_cannot_force_const_mem): Reject expressions involving
24748 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24749 (aarch64_classify_index): Handle SVE indices, by requiring
24750 a plain register index with a scale that matches the element size.
24751 (aarch64_classify_address): Handle SVE addresses. Assert that
24752 the mode of the address is VOIDmode or an integer mode.
24753 Update call to aarch64_classify_symbol.
24754 (aarch64_classify_symbolic_expression): Update call to
24755 aarch64_classify_symbol.
24756 (aarch64_const_vec_all_in_range_p): New function.
24757 (aarch64_print_vector_float_operand): Likewise.
24758 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24759 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24760 and the FP immediates 1.0 and 0.5.
24761 (aarch64_print_address_internal): Handle SVE addresses.
24762 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24763 (aarch64_regno_regclass): Handle predicate registers.
24764 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24766 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24767 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24768 (aarch64_convert_sve_vector_bits): New function.
24769 (aarch64_override_options): Use it to handle -msve-vector-bits=.
24770 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24771 rather than an rtx.
24772 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24773 Handle SVE vector and predicate modes. Accept VL-based constants
24774 that need only one temporary register, and VL offsets that require
24775 no temporary registers.
24776 (aarch64_conditional_register_usage): Mark the predicate registers
24777 as fixed if SVE isn't available.
24778 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24779 Return true for SVE vector and predicate modes.
24780 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24781 rather than an unsigned int. Handle SVE modes.
24782 (aarch64_preferred_simd_mode): Update call accordingly. Handle
24784 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24786 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24787 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24788 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24789 (aarch64_sve_float_mul_immediate_p): New functions.
24790 (aarch64_sve_valid_immediate): New function.
24791 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24792 Explicitly reject structure modes. Check for INDEX constants.
24793 Handle PTRUE and PFALSE constants.
24794 (aarch64_check_zero_based_sve_index_immediate): New function.
24795 (aarch64_simd_imm_zero_p): Delete.
24796 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24797 vector modes. Accept constants in the range of CNT[BHWD].
24798 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24799 ask for an Advanced SIMD mode.
24800 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24801 (aarch64_simd_vector_alignment): Handle SVE predicates.
24802 (aarch64_vectorize_preferred_vector_alignment): New function.
24803 (aarch64_simd_vector_alignment_reachable): Use it instead of
24805 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24806 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24808 (MAX_VECT_LEN): Delete.
24809 (expand_vec_perm_d): Add a vec_flags field.
24810 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24811 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24812 (aarch64_evpc_ext): Don't apply a big-endian lane correction
24814 (aarch64_evpc_rev): Rename to...
24815 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
24816 (aarch64_evpc_rev_global): New function.
24817 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24818 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24820 (aarch64_evpc_sve_tbl): New function.
24821 (aarch64_expand_vec_perm_const_1): Update after rename of
24822 aarch64_evpc_rev. Handle SVE permutes too, trying
24823 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24824 than aarch64_evpc_tbl.
24825 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24826 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24827 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24828 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24829 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24830 (aarch64_expand_sve_vcond): New functions.
24831 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24832 of aarch64_vector_mode_p.
24833 (aarch64_dwarf_poly_indeterminate_value): New function.
24834 (aarch64_compute_pressure_classes): Likewise.
24835 (aarch64_can_change_mode_class): Likewise.
24836 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24837 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24838 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24839 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24840 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24841 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24842 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24843 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24845 (Dn, Dl, Dr): Accept const as well as const_vector.
24846 (Dz): Likewise. Compare against CONST0_RTX.
24847 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24848 of "vector" where appropriate.
24849 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24850 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24851 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24852 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24853 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24854 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24855 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24856 (v_int_equiv): Extend to SVE modes.
24857 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24859 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24860 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24861 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24862 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24863 (SVE_COND_FP_CMP): New int iterators.
24864 (perm_hilo): Handle the new unpack unspecs.
24865 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24867 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24868 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24869 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24870 (aarch64_equality_operator, aarch64_constant_vector_operand)
24871 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24872 (aarch64_sve_nonimmediate_operand): Likewise.
24873 (aarch64_sve_general_operand): Likewise.
24874 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24875 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24876 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24877 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24878 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24879 (aarch64_sve_float_arith_immediate): Likewise.
24880 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24881 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24882 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24883 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24884 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24885 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24886 (aarch64_sve_float_arith_operand): Likewise.
24887 (aarch64_sve_float_arith_with_sub_operand): Likewise.
24888 (aarch64_sve_float_mul_operand): Likewise.
24889 (aarch64_sve_vec_perm_operand): Likewise.
24890 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24891 (aarch64_mov_operand): Accept const_poly_int and const_vector.
24892 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24893 as well as const_vector.
24894 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24895 in file. Use CONST0_RTX and CONSTM1_RTX.
24896 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
24897 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24898 Use aarch64_simd_imm_zero.
24899 * config/aarch64/aarch64-sve.md: New file.
24900 * config/aarch64/aarch64.md: Include it.
24901 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24902 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24903 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24904 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24905 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24906 (sve): New attribute.
24907 (enabled): Disable instructions with the sve attribute unless
24909 (movqi, movhi): Pass CONST_POLY_INT operaneds through
24910 aarch64_expand_mov_immediate.
24911 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24912 CNT[BHSD] immediates.
24913 (movti): Split CONST_POLY_INT moves into two halves.
24914 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24915 Split additions that need a temporary here if the destination
24916 is the stack pointer.
24917 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24918 (*add<mode>3_poly_1): New instruction.
24919 (set_clobber_cc): New expander.
24921 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24923 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24924 parameter and use it instead of GET_MODE_SIZE (innermode). Use
24925 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24926 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24927 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
24928 Change innermode from fixed_mode_size to machine_mode.
24929 (simplify_subreg): Update call accordingly. Handle a constant-sized
24930 subreg of a variable-length CONST_VECTOR.
24932 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24933 Alan Hayward <alan.hayward@arm.com>
24934 David Sherwood <david.sherwood@arm.com>
24936 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24937 (add_offset_to_base): New function, split out from...
24938 (create_mem_ref): ...here. When handling a scale other than 1,
24939 check first whether the address is valid without the offset.
24940 Add it into the base if so, leaving the index and scale as-is.
24942 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24945 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24946 fold_for_warn before checking if arg2 is INTEGER_CST.
24948 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
24950 * config/rs6000/predicates.md (load_multiple_operation): Delete.
24951 (store_multiple_operation): Delete.
24952 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24953 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24954 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24955 guarded by TARGET_STRING.
24956 (rs6000_output_load_multiple): Delete.
24957 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24958 OPTION_MASK_STRING / TARGET_STRING handling.
24959 (print_operand) <'N', 'O'>: Add comment that these are unused now.
24960 (const rs6000_opt_masks) <"string">: Change mask to 0.
24961 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24962 (MASK_STRING): Delete.
24963 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24965 (load_multiple): Delete.
24972 (store_multiple): Delete.
24979 (movmemsi_8reg): Delete.
24980 (corresponding unnamed define_insn): Delete.
24981 (movmemsi_6reg): Delete.
24982 (corresponding unnamed define_insn): Delete.
24983 (movmemsi_4reg): Delete.
24984 (corresponding unnamed define_insn): Delete.
24985 (movmemsi_2reg): Delete.
24986 (corresponding unnamed define_insn): Delete.
24987 (movmemsi_1reg): Delete.
24988 (corresponding unnamed define_insn): Delete.
24989 * config/rs6000/rs6000.opt (mno-string): New.
24990 (mstring): Replace by deprecation warning stub.
24991 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24993 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24995 * regrename.c (regrename_do_replace): If replacing the same
24996 reg multiple times, try to reuse last created gen_raw_REG.
24999 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25000 main to workaround a bug in GDB.
25002 2018-01-12 Tom de Vries <tom@codesourcery.com>
25005 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25007 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
25009 PR rtl-optimization/80481
25010 * ira-color.c (get_cap_member): New function.
25011 (allocnos_conflict_by_live_ranges_p): Use it.
25012 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25013 (setup_slot_coalesced_allocno_live_ranges): Ditto.
25015 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
25018 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25019 (*saddl_se_1): Ditto.
25020 (*ssubsi_1): Ditto.
25021 (*ssubl_se_1): Ditto.
25023 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25025 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25026 rather than wi::to_widest for DR_INITs.
25027 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25028 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25029 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25031 (vect_analyze_group_access_1): Note that here.
25033 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25035 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25036 polynomial type sizes.
25038 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25040 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25041 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25042 (gimple_add_tmp_var): Likewise.
25044 2018-01-12 Martin Liska <mliska@suse.cz>
25046 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25047 (gimple_alloc_sizes): Likewise.
25048 (dump_gimple_statistics): Use PRIu64 in printf format.
25049 * gimple.h: Change uint64_t to int.
25051 2018-01-12 Martin Liska <mliska@suse.cz>
25053 * tree-core.h: Use uint64_t instead of int.
25054 * tree.c (tree_node_counts): Likewise.
25055 (tree_node_sizes): Likewise.
25056 (dump_tree_statistics): Use PRIu64 in printf format.
25058 2018-01-12 Martin Liska <mliska@suse.cz>
25060 * Makefile.in: As qsort_chk is implemented in vec.c, add
25061 vec.o to linkage of gencfn-macros.
25062 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25063 passing the info to record_node_allocation_statistics.
25064 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25066 * ggc-common.c (struct ggc_usage): Add operator== and use
25067 it in operator< and compare function.
25068 * mem-stats.h (struct mem_usage): Likewise.
25069 * vec.c (struct vec_usage): Remove operator< and compare
25070 function. Can be simply inherited.
25072 2018-01-12 Martin Jambor <mjambor@suse.cz>
25075 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25076 * tree-ssa-math-opts.c: Include domwalk.h.
25077 (convert_mult_to_fma_1): New function.
25078 (fma_transformation_info): New type.
25079 (fma_deferring_state): Likewise.
25080 (cancel_fma_deferring): New function.
25081 (result_of_phi): Likewise.
25082 (last_fma_candidate_feeds_initial_phi): Likewise.
25083 (convert_mult_to_fma): Added deferring logic, split actual
25084 transformation to convert_mult_to_fma_1.
25085 (math_opts_dom_walker): New type.
25086 (math_opts_dom_walker::after_dom_children): New method, body moved
25087 here from pass_optimize_widening_mul::execute, added deferring logic
25089 (pass_optimize_widening_mul::execute): Moved most of code to
25090 math_opts_dom_walker::after_dom_children.
25091 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25092 * config/i386/i386.c (ix86_option_override_internal): Added
25093 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25095 2018-01-12 Richard Biener <rguenther@suse.de>
25098 * dwarf2out.c (gen_variable_die): Do not reset old_die for
25099 inline instance vars.
25101 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
25104 * config/rx/rx.c (rx_is_restricted_memory_address):
25105 Handle SUBREG case.
25107 2018-01-12 Richard Biener <rguenther@suse.de>
25109 PR tree-optimization/80846
25110 * target.def (split_reduction): New target hook.
25111 * targhooks.c (default_split_reduction): New function.
25112 * targhooks.h (default_split_reduction): Declare.
25113 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25114 target requests first reduce vectors by combining low and high
25116 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25117 (get_vectype_for_scalar_type_and_size): Export.
25118 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25119 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25120 * doc/tm.texi: Regenerate.
25121 * config/i386/i386.c (ix86_split_reduction): Implement
25122 TARGET_VECTORIZE_SPLIT_REDUCTION.
25124 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25127 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25128 in PIC mode except for TARGET_VXWORKS_RTP.
25129 * config/sparc/sparc.c: Include cfgrtl.h.
25130 (TARGET_INIT_PIC_REG): Define.
25131 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25132 (sparc_pic_register_p): New predicate.
25133 (sparc_legitimate_address_p): Use it.
25134 (sparc_legitimize_pic_address): Likewise.
25135 (sparc_delegitimize_address): Likewise.
25136 (sparc_mode_dependent_address_p): Likewise.
25137 (gen_load_pcrel_sym): Remove 4th parameter.
25138 (load_got_register): Adjust call to above. Remove obsolete stuff.
25139 (sparc_expand_prologue): Do not call load_got_register here.
25140 (sparc_flat_expand_prologue): Likewise.
25141 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25142 (sparc_use_pseudo_pic_reg): New function.
25143 (sparc_init_pic_reg): Likewise.
25144 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25145 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25147 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25149 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25150 Add item for branch_cost.
25152 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25154 PR rtl-optimization/83565
25155 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25156 not extend the result to a larger mode for rotate operations.
25157 (num_sign_bit_copies1): Likewise.
25159 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25162 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25164 Use values-Xc.o for -pedantic.
25165 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25167 2018-01-12 Martin Liska <mliska@suse.cz>
25170 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25172 (possible_polymorphic_call_targets): Use it.
25173 (ipa_devirt): Likewise.
25175 2018-01-12 Martin Liska <mliska@suse.cz>
25177 * profile-count.h (enum profile_quality): Use 0 as invalid
25178 enum value of profile_quality.
25180 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
25182 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25183 -mext-string options.
25185 2018-01-12 Richard Biener <rguenther@suse.de>
25187 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25188 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25189 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25191 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25193 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
25195 * configure.ac (--with-long-double-format): Add support for the
25196 configuration option to change the default long double format on
25198 * config.gcc (powerpc*-linux*-*): Likewise.
25199 * configure: Regenerate.
25200 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25201 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25202 used without modification.
25204 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25206 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25207 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25208 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25209 MISC_BUILTIN_SPEC_BARRIER.
25210 (rs6000_init_builtins): Likewise.
25211 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25213 (speculation_barrier): New define_insn.
25214 * doc/extend.texi: Document __builtin_speculation_barrier.
25216 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25219 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25220 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25221 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25223 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
25224 integral modes instead of "ss" and "sd".
25225 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25226 vectors with 32-bit and 64-bit elements.
25227 (vecdupssescalarmodesuffix): New mode attribute.
25228 (vec_dup<mode>): Use it.
25230 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
25233 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25234 frame if argument is passed on stack.
25236 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25239 * ree.c (combine_reaching_defs): Optimize also
25240 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25241 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25243 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25245 PR middle-end/83189
25246 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25248 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25250 PR middle-end/83718
25251 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25252 after they are computed.
25254 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25256 PR tree-optimization/83695
25257 * gimple-loop-linterchange.cc
25258 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25259 reset cached scev information after interchange.
25260 (pass_linterchange::execute): Remove call to scev_reset_htab.
25262 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25264 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25265 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25266 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25267 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25268 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25269 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25270 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25271 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25272 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25273 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25274 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25275 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25276 (V_lane_reg): Likewise.
25277 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25279 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25280 (vfmal_lane_low<mode>_intrinsic,
25281 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25282 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25283 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25284 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25285 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25286 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25288 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25290 * config/arm/arm-cpus.in (fp16fml): New feature.
25291 (ALL_SIMD): Add fp16fml.
25292 (armv8.2-a): Add fp16fml as an option.
25293 (armv8.3-a): Likewise.
25294 (armv8.4-a): Add fp16fml as part of fp16.
25295 * config/arm/arm.h (TARGET_FP16FML): Define.
25296 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25298 * config/arm/arm-modes.def (V2HF): Define.
25299 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25300 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25301 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25302 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25303 vfmsl_low, vfmsl_high): New set of builtins.
25304 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25305 (vfml_op): New code attribute.
25306 (VFMLHALVES): New int iterator.
25307 (VFML, VFMLSEL): New mode attributes.
25308 (V_reg): Define mapping for V2HF.
25309 (V_hi, V_lo): New mode attributes.
25310 (VF_constraint): Likewise.
25311 (vfml_half, vfml_half_selector): New int attributes.
25312 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25314 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25315 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25317 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25318 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25319 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25320 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25322 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25323 Document new effective target and option set.
25325 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25327 * config/arm/arm-cpus.in (armv8_4): New feature.
25328 (ARMv8_4a): New fgroup.
25329 (armv8.4-a): New arch.
25330 * config/arm/arm-tables.opt: Regenerate.
25331 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25332 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25333 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25334 Add matching rules for -march=armv8.4-a and extensions.
25335 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25337 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25340 * config/rx/rx.md (BW): New mode attribute.
25341 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25343 2018-01-11 Richard Biener <rguenther@suse.de>
25345 PR tree-optimization/83435
25346 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25347 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25348 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25350 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25351 Alan Hayward <alan.hayward@arm.com>
25352 David Sherwood <david.sherwood@arm.com>
25354 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25356 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25357 (aarch64_print_address_internal): Use it to check for a zero offset.
25359 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25360 Alan Hayward <alan.hayward@arm.com>
25361 David Sherwood <david.sherwood@arm.com>
25363 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25364 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25365 Return a poly_int64 rather than a HOST_WIDE_INT.
25366 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25367 rather than a HOST_WIDE_INT.
25368 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25369 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25370 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25371 final_offset from HOST_WIDE_INT to poly_int64.
25372 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25373 to_constant when getting the number of units in an Advanced SIMD
25375 (aarch64_builtin_vectorized_function): Check for a constant number
25377 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25379 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25380 attribute instead of GET_MODE_NUNITS.
25381 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25382 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25383 GET_MODE_SIZE for fixed-size registers.
25384 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25385 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25386 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25387 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25388 (aarch64_print_operand, aarch64_print_address_internal)
25389 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25390 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25391 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25392 Handle polynomial GET_MODE_SIZE.
25393 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25394 wider than SImode without modification.
25395 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25396 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25397 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25398 passing and returning SVE modes.
25399 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25400 rather than GEN_INT.
25401 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25402 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25403 (aarch64_allocate_and_probe_stack_space): Likewise.
25404 (aarch64_layout_frame): Cope with polynomial offsets.
25405 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25406 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25407 polynomial offsets.
25408 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25409 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25410 poly_int64 rather than a HOST_WIDE_INT.
25411 (aarch64_get_separate_components, aarch64_process_components)
25412 (aarch64_expand_prologue, aarch64_expand_epilogue)
25413 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25414 (aarch64_anchor_offset): New function, split out from...
25415 (aarch64_legitimize_address): ...here.
25416 (aarch64_builtin_vectorization_cost): Handle polynomial
25417 TYPE_VECTOR_SUBPARTS.
25418 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25420 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25421 number of elements from the PARALLEL rather than the mode.
25422 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25423 rather than GET_MODE_BITSIZE.
25424 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25425 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25426 (aarch64_expand_vec_perm_const_1): Handle polynomial
25427 d->perm.length () and d->perm elements.
25428 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25429 Apply to_constant to d->perm elements.
25430 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25431 polynomial CONST_VECTOR_NUNITS.
25432 (aarch64_move_pointer): Take amount as a poly_int64 rather
25434 (aarch64_progress_pointer): Avoid temporary variable.
25435 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25436 the mode attribute instead of GET_MODE.
25438 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25439 Alan Hayward <alan.hayward@arm.com>
25440 David Sherwood <david.sherwood@arm.com>
25442 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25443 x exists before using it.
25444 (aarch64_add_constant_internal): Rename to...
25445 (aarch64_add_offset_1): ...this. Replace regnum with separate
25446 src and dest rtxes. Handle the case in which they're different,
25447 including when the offset is zero. Replace scratchreg with an rtx.
25448 Use 2 additions if there is no spare register into which we can
25449 move a 16-bit constant.
25450 (aarch64_add_constant): Delete.
25451 (aarch64_add_offset): Replace reg with separate src and dest
25452 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25453 Use aarch64_add_offset_1.
25454 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25455 an rtx rather than an int. Take the delta as a poly_int64
25456 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25457 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25458 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25459 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25460 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25461 and aarch64_add_sp.
25462 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25463 aarch64_add_constant.
25465 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25467 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25468 Use scalar_float_mode.
25470 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25472 * config/aarch64/aarch64-simd.md
25473 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25474 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25475 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25476 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25477 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25478 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25479 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25480 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25481 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25482 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25484 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25487 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25488 targ_options->x_arm_arch_string is non NULL.
25490 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25492 * config/aarch64/aarch64.h
25493 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25495 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25498 * expmed.c (emit_store_flag_force): Swap if const op0
25499 and change VOIDmode to mode of op0.
25501 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25503 PR rtl-optimization/83761
25504 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25505 than bytes to mode_for_size.
25507 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25509 PR middle-end/83189
25510 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25511 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25514 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25516 PR middle-end/83575
25517 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25518 when in layout mode.
25519 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25520 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25523 2018-01-10 Michael Collison <michael.collison@arm.com>
25525 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25526 * config/aarch64/aarch64-option-extension.def: Add
25527 AARCH64_OPT_EXTENSION of 'fp16fml'.
25528 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25529 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25530 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25531 * config/aarch64/constraints.md (Ui7): New constraint.
25532 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25533 (VFMLA_SEL_W): Ditto.
25536 (VFMLA16_LOW): New int iterator.
25537 (VFMLA16_HIGH): Ditto.
25538 (UNSPEC_FMLAL): New unspec.
25539 (UNSPEC_FMLSL): Ditto.
25540 (UNSPEC_FMLAL2): Ditto.
25541 (UNSPEC_FMLSL2): Ditto.
25542 (f16mac): New code attribute.
25543 * config/aarch64/aarch64-simd-builtins.def
25544 (aarch64_fmlal_lowv2sf): Ditto.
25545 (aarch64_fmlsl_lowv2sf): Ditto.
25546 (aarch64_fmlalq_lowv4sf): Ditto.
25547 (aarch64_fmlslq_lowv4sf): Ditto.
25548 (aarch64_fmlal_highv2sf): Ditto.
25549 (aarch64_fmlsl_highv2sf): Ditto.
25550 (aarch64_fmlalq_highv4sf): Ditto.
25551 (aarch64_fmlslq_highv4sf): Ditto.
25552 (aarch64_fmlal_lane_lowv2sf): Ditto.
25553 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25554 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25555 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25556 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25557 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25558 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25559 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25560 (aarch64_fmlal_lane_highv2sf): Ditto.
25561 (aarch64_fmlsl_lane_highv2sf): Ditto.
25562 (aarch64_fmlal_laneq_highv2sf): Ditto.
25563 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25564 (aarch64_fmlalq_lane_highv4sf): Ditto.
25565 (aarch64_fmlsl_lane_highv4sf): Ditto.
25566 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25567 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25568 * config/aarch64/aarch64-simd.md:
25569 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25570 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25571 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25572 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25573 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25574 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25575 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25576 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25577 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25578 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25579 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25580 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25581 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25582 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25583 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25584 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25585 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25586 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25587 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25588 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25589 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25590 (vfmlsl_low_u32): Ditto.
25591 (vfmlalq_low_u32): Ditto.
25592 (vfmlslq_low_u32): Ditto.
25593 (vfmlal_high_u32): Ditto.
25594 (vfmlsl_high_u32): Ditto.
25595 (vfmlalq_high_u32): Ditto.
25596 (vfmlslq_high_u32): Ditto.
25597 (vfmlal_lane_low_u32): Ditto.
25598 (vfmlsl_lane_low_u32): Ditto.
25599 (vfmlal_laneq_low_u32): Ditto.
25600 (vfmlsl_laneq_low_u32): Ditto.
25601 (vfmlalq_lane_low_u32): Ditto.
25602 (vfmlslq_lane_low_u32): Ditto.
25603 (vfmlalq_laneq_low_u32): Ditto.
25604 (vfmlslq_laneq_low_u32): Ditto.
25605 (vfmlal_lane_high_u32): Ditto.
25606 (vfmlsl_lane_high_u32): Ditto.
25607 (vfmlal_laneq_high_u32): Ditto.
25608 (vfmlsl_laneq_high_u32): Ditto.
25609 (vfmlalq_lane_high_u32): Ditto.
25610 (vfmlslq_lane_high_u32): Ditto.
25611 (vfmlalq_laneq_high_u32): Ditto.
25612 (vfmlslq_laneq_high_u32): Ditto.
25613 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25614 (AARCH64_FL_FOR_ARCH8_4): New.
25615 (AARCH64_ISA_F16FML): New ISA flag.
25616 (TARGET_F16FML): New feature flag for fp16fml.
25617 (doc/invoke.texi): Document new fp16fml option.
25619 2018-01-10 Michael Collison <michael.collison@arm.com>
25621 * config/aarch64/aarch64-builtins.c:
25622 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25623 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25624 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25625 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25626 (AARCH64_ISA_SHA3): New ISA flag.
25627 (TARGET_SHA3): New feature flag for sha3.
25628 * config/aarch64/iterators.md (sha512_op): New int attribute.
25629 (CRYPTO_SHA512): New int iterator.
25630 (UNSPEC_SHA512H): New unspec.
25631 (UNSPEC_SHA512H2): Ditto.
25632 (UNSPEC_SHA512SU0): Ditto.
25633 (UNSPEC_SHA512SU1): Ditto.
25634 * config/aarch64/aarch64-simd-builtins.def
25635 (aarch64_crypto_sha512hqv2di): New builtin.
25636 (aarch64_crypto_sha512h2qv2di): Ditto.
25637 (aarch64_crypto_sha512su0qv2di): Ditto.
25638 (aarch64_crypto_sha512su1qv2di): Ditto.
25639 (aarch64_eor3qv8hi): Ditto.
25640 (aarch64_rax1qv2di): Ditto.
25641 (aarch64_xarqv2di): Ditto.
25642 (aarch64_bcaxqv8hi): Ditto.
25643 * config/aarch64/aarch64-simd.md:
25644 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25645 (aarch64_crypto_sha512su0qv2di): Ditto.
25646 (aarch64_crypto_sha512su1qv2di): Ditto.
25647 (aarch64_eor3qv8hi): Ditto.
25648 (aarch64_rax1qv2di): Ditto.
25649 (aarch64_xarqv2di): Ditto.
25650 (aarch64_bcaxqv8hi): Ditto.
25651 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25652 (vsha512h2q_u64): Ditto.
25653 (vsha512su0q_u64): Ditto.
25654 (vsha512su1q_u64): Ditto.
25655 (veor3q_u16): Ditto.
25656 (vrax1q_u64): Ditto.
25657 (vxarq_u64): Ditto.
25658 (vbcaxq_u16): Ditto.
25659 * config/arm/types.md (crypto_sha512): New type attribute.
25660 (crypto_sha3): Ditto.
25661 (doc/invoke.texi): Document new sha3 option.
25663 2018-01-10 Michael Collison <michael.collison@arm.com>
25665 * config/aarch64/aarch64-builtins.c:
25666 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25667 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25668 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25669 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25670 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25671 (AARCH64_ISA_SM4): New ISA flag.
25672 (TARGET_SM4): New feature flag for sm4.
25673 * config/aarch64/aarch64-simd-builtins.def
25674 (aarch64_sm3ss1qv4si): Ditto.
25675 (aarch64_sm3tt1aq4si): Ditto.
25676 (aarch64_sm3tt1bq4si): Ditto.
25677 (aarch64_sm3tt2aq4si): Ditto.
25678 (aarch64_sm3tt2bq4si): Ditto.
25679 (aarch64_sm3partw1qv4si): Ditto.
25680 (aarch64_sm3partw2qv4si): Ditto.
25681 (aarch64_sm4eqv4si): Ditto.
25682 (aarch64_sm4ekeyqv4si): Ditto.
25683 * config/aarch64/aarch64-simd.md:
25684 (aarch64_sm3ss1qv4si): Ditto.
25685 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25686 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25687 (aarch64_sm4eqv4si): Ditto.
25688 (aarch64_sm4ekeyqv4si): Ditto.
25689 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25690 (sm3part_op): Ditto.
25691 (CRYPTO_SM3TT): Ditto.
25692 (CRYPTO_SM3PART): Ditto.
25693 (UNSPEC_SM3SS1): New unspec.
25694 (UNSPEC_SM3TT1A): Ditto.
25695 (UNSPEC_SM3TT1B): Ditto.
25696 (UNSPEC_SM3TT2A): Ditto.
25697 (UNSPEC_SM3TT2B): Ditto.
25698 (UNSPEC_SM3PARTW1): Ditto.
25699 (UNSPEC_SM3PARTW2): Ditto.
25700 (UNSPEC_SM4E): Ditto.
25701 (UNSPEC_SM4EKEY): Ditto.
25702 * config/aarch64/constraints.md (Ui2): New constraint.
25703 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25704 * config/arm/types.md (crypto_sm3): New type attribute.
25705 (crypto_sm4): Ditto.
25706 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25707 (vsm3tt1aq_u32): Ditto.
25708 (vsm3tt1bq_u32): Ditto.
25709 (vsm3tt2aq_u32): Ditto.
25710 (vsm3tt2bq_u32): Ditto.
25711 (vsm3partw1q_u32): Ditto.
25712 (vsm3partw2q_u32): Ditto.
25713 (vsm4eq_u32): Ditto.
25714 (vsm4ekeyq_u32): Ditto.
25715 (doc/invoke.texi): Document new sm4 option.
25717 2018-01-10 Michael Collison <michael.collison@arm.com>
25719 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25720 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25721 (AARCH64_FL_FOR_ARCH8_4): New.
25722 (AARCH64_FL_V8_4): New flag.
25723 (doc/invoke.texi): Document new armv8.4-a option.
25725 2018-01-10 Michael Collison <michael.collison@arm.com>
25727 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25728 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25729 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25730 * config/aarch64/aarch64-option-extension.def: Add
25731 AARCH64_OPT_EXTENSION of 'sha2'.
25732 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25733 (crypto): Disable sha2 and aes if crypto disabled.
25734 (crypto): Enable aes and sha2 if enabled.
25735 (simd): Disable sha2 and aes if simd disabled.
25736 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25738 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25739 (TARGET_SHA2): New feature flag for sha2.
25740 (TARGET_AES): New feature flag for aes.
25741 * config/aarch64/aarch64-simd.md:
25742 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25743 conditional on TARGET_AES.
25744 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25745 (aarch64_crypto_sha1hsi): Make pattern conditional
25747 (aarch64_crypto_sha1hv4si): Ditto.
25748 (aarch64_be_crypto_sha1hv4si): Ditto.
25749 (aarch64_crypto_sha1su1v4si): Ditto.
25750 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25751 (aarch64_crypto_sha1su0v4si): Ditto.
25752 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25753 (aarch64_crypto_sha256su0v4si): Ditto.
25754 (aarch64_crypto_sha256su1v4si): Ditto.
25755 (doc/invoke.texi): Document new aes and sha2 options.
25757 2018-01-10 Martin Sebor <msebor@redhat.com>
25759 PR tree-optimization/83781
25760 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25763 2018-01-11 Martin Sebor <msebor@gmail.com>
25764 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25766 PR tree-optimization/83501
25767 PR tree-optimization/81703
25769 * tree-ssa-strlen.c (get_string_cst): Rename...
25770 (get_string_len): ...to this. Handle global constants.
25771 (handle_char_store): Adjust.
25773 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
25774 Jim Wilson <jimw@sifive.com>
25776 * config/riscv/riscv-protos.h (riscv_output_return): New.
25777 * config/riscv/riscv.c (struct machine_function): New naked_p field.
25778 (riscv_attribute_table, riscv_output_return),
25779 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25780 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25781 (riscv_compute_frame_info): Only compute frame->mask if not a naked
25783 (riscv_expand_prologue): Add early return for naked function.
25784 (riscv_expand_epilogue): Likewise.
25785 (riscv_function_ok_for_sibcall): Return false for naked function.
25786 (riscv_set_current_function): New.
25787 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25788 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25789 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25790 * doc/extend.texi (RISC-V Function Attributes): New.
25792 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
25794 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25795 check for 128-bit long double before checking TCmode.
25796 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25797 128-bit long doubles before checking TFmode or TCmode.
25798 (FLOAT128_IBM_P): Likewise.
25800 2018-01-10 Martin Sebor <msebor@redhat.com>
25802 PR tree-optimization/83671
25803 * builtins.c (c_strlen): Unconditionally return zero for the empty
25805 Use -Warray-bounds for warnings.
25806 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25807 for non-constant array indices with COMPONENT_REF, arrays of
25808 arrays, and pointers to arrays.
25809 (gimple_fold_builtin_strlen): Determine and set length range for
25810 non-constant character arrays.
25812 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
25814 PR middle-end/81897
25815 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25818 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
25820 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25822 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25825 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25826 VECTOR_MEM_ALTIVEC_OR_VSX_P.
25827 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25828 indexed_or_indirect_operand predicate.
25829 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25830 (*vsx_le_perm_load_v8hi): Likewise.
25831 (*vsx_le_perm_load_v16qi): Likewise.
25832 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25833 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25834 (*vsx_le_perm_store_v8hi): Likewise.
25835 (*vsx_le_perm_store_v16qi): Likewise.
25836 (eight unnamed splitters): Likewise.
25838 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25840 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25841 * config/rs6000/emmintrin.h: Likewise.
25842 * config/rs6000/mmintrin.h: Likewise.
25843 * config/rs6000/xmmintrin.h: Likewise.
25845 2018-01-10 David Malcolm <dmalcolm@redhat.com>
25848 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25850 * tree.c (tree_nop_conversion): Return true for location wrapper
25852 (maybe_wrap_with_location): New function.
25853 (selftest::check_strip_nops): New function.
25854 (selftest::test_location_wrappers): New function.
25855 (selftest::tree_c_tests): Call it.
25856 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25857 (maybe_wrap_with_location): New decl.
25858 (EXPR_LOCATION_WRAPPER_P): New macro.
25859 (location_wrapper_p): New inline function.
25860 (tree_strip_any_location_wrapper): New inline function.
25862 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
25865 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25866 stack_realign_offset for the largest alignment of stack slot
25868 (ix86_find_max_used_stack_alignment): New function.
25869 (ix86_finalize_stack_frame_flags): Use it. Set
25870 max_used_stack_alignment if we don't realign stack.
25871 * config/i386/i386.h (machine_function): Add
25872 max_used_stack_alignment.
25874 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
25876 * config/arm/arm.opt (-mbranch-cost): New option.
25877 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25880 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
25883 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25884 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25886 2018-01-10 Richard Biener <rguenther@suse.de>
25889 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25890 early out so it also covers the case where we have a non-NULL
25893 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25895 PR tree-optimization/83753
25896 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25897 for non-strided grouped accesses if the number of elements is 1.
25899 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25902 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25903 * i386.h (TARGET_USE_GATHER): Define.
25904 * x86-tune.def (X86_TUNE_USE_GATHER): New.
25906 2018-01-10 Martin Liska <mliska@suse.cz>
25909 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25910 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25912 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25913 CLEANUP_NO_PARTITIONING is not set.
25915 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25917 * doc/rtl.texi: Remove documentation of (const ...) wrappers
25918 for vectors, as a partial revert of r254296.
25919 * rtl.h (const_vec_p): Delete.
25920 (const_vec_duplicate_p): Don't test for vector CONSTs.
25921 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25922 * expmed.c (make_tree): Likewise.
25925 * common.md (E, F): Use CONSTANT_P instead of checking for
25927 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25928 checking for CONST_VECTOR.
25930 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25932 PR middle-end/83575
25933 * predict.c (force_edge_cold): Handle in more sane way edges
25934 with no prediction.
25936 2018-01-09 Carl Love <cel@us.ibm.com>
25938 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25940 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25941 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25942 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25943 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
25944 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25945 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
25946 * config/rs6000/rs6000-protos.h: Add extern defition for
25947 rs6000_generate_float2_double_code.
25948 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25950 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25951 (float2_v2df): Add define_expand.
25953 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
25956 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25957 op_mode in the force_to_mode call.
25959 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25961 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25962 instead of checking each element individually.
25963 (aarch64_evpc_uzp): Likewise.
25964 (aarch64_evpc_zip): Likewise.
25965 (aarch64_evpc_ext): Likewise.
25966 (aarch64_evpc_rev): Likewise.
25967 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25968 instead of checking each element individually. Return true without
25970 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25971 whether all selected elements come from the same input, instead of
25972 checking each element individually. Remove calls to gen_rtx_REG,
25973 start_sequence and end_sequence and instead assert that no rtl is
25976 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25978 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25979 order of HIGH and CONST checks.
25981 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25983 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25984 if the destination isn't an SSA_NAME.
25986 2018-01-09 Richard Biener <rguenther@suse.de>
25988 PR tree-optimization/83668
25989 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25991 (canonicalize_loop_form): ... here, renamed from ...
25992 (canonicalize_loop_closed_ssa_form): ... this and amended to
25993 swap successor edges for loop exit blocks to make us use
25994 the RPO order we need for initial schedule generation.
25996 2018-01-09 Joseph Myers <joseph@codesourcery.com>
25998 PR tree-optimization/64811
25999 * match.pd: When optimizing comparisons with Inf, avoid
26000 introducing or losing exceptions from comparisons with NaN.
26002 2018-01-09 Martin Liska <mliska@suse.cz>
26005 * asan.c (shadow_mem_size): Add gcc_assert.
26007 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
26009 Don't save registers in main().
26012 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26013 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26014 * config/avr/avr.c (avr_set_current_function): Don't error if
26015 naked, OS_task or OS_main are specified at the same time.
26016 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26018 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26020 * common/config/avr/avr-common.c (avr_option_optimization_table):
26021 Switch on -mmain-is-OS_task for optimizing compilations.
26023 2018-01-09 Richard Biener <rguenther@suse.de>
26025 PR tree-optimization/83572
26026 * graphite.c: Include cfganal.h.
26027 (graphite_transform_loops): Connect infinite loops to exit
26028 and remove fake edges at the end.
26030 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26032 * ipa-inline.c (edge_badness): Revert accidental checkin.
26034 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26037 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26038 symbols; not inline clones.
26040 2018-01-09 Jakub Jelinek <jakub@redhat.com>
26043 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26044 hard registers. Formatting fixes.
26046 PR preprocessor/83722
26047 * gcc.c (try_generate_repro): Pass
26048 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26049 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26052 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
26053 Kito Cheng <kito.cheng@gmail.com>
26055 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26056 (riscv_leaf_function_p): Delete.
26057 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26059 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26061 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26063 (do_ifelse): New function.
26064 (do_isel): New function.
26065 (do_sub3): New function.
26066 (do_add3): New function.
26067 (do_load_mask_compare): New function.
26068 (do_overlap_load_compare): New function.
26069 (expand_compare_loop): New function.
26070 (expand_block_compare): Call expand_compare_loop() when appropriate.
26071 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26072 option description.
26073 (-mblock-compare-inline-loop-limit): New option.
26075 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26078 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26079 Reverse order of second and third operands in first alternative.
26080 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26081 of first and second elements in UNSPEC_VPERMR vector.
26082 (altivec_expand_vec_perm_le): Likewise.
26084 2018-01-08 Jeff Law <law@redhat.com>
26086 PR rtl-optimizatin/81308
26087 * tree-switch-conversion.c (cfg_altered): New file scoped static.
26088 (process_switch): If group_case_labels makes a change, then set
26090 (pass_convert_switch::execute): If a switch is converted, then
26091 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
26093 PR rtl-optimization/81308
26094 * recog.c (split_all_insns): Conditionally cleanup the CFG after
26097 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
26099 PR target/83663 - Revert r255946
26100 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26101 generation for cases where splatting a value is not useful.
26102 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26103 across a vec_duplicate and a paradoxical subreg forming a vector
26104 mode to a vec_concat.
26106 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26108 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26109 -march=armv8.3-a variants.
26110 * config/arm/t-multilib: Likewise.
26111 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
26113 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26115 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26117 (cceq_ior_compare_complement): Give it a name so I can use it, and
26118 change boolean_or_operator predicate to boolean_operator so it can
26119 be used to generate a crand.
26120 (eqne): New code iterator.
26121 (bd/bd_neg): New code_attrs.
26122 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26123 a single define_insn.
26124 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26125 decrement (bdnzt/bdnzf/bdzt/bdzf).
26126 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26127 with the new names of the branch decrement patterns, and added the
26128 names of the branch decrement conditional patterns.
26130 2018-01-08 Richard Biener <rguenther@suse.de>
26132 PR tree-optimization/83563
26133 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26136 2018-01-08 Richard Biener <rguenther@suse.de>
26138 PR middle-end/83713
26139 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26141 2018-01-08 Richard Biener <rguenther@suse.de>
26143 PR tree-optimization/83685
26144 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26145 references to abnormals.
26147 2018-01-08 Richard Biener <rguenther@suse.de>
26150 * dwarf2out.c (output_indirect_strings): Handle empty
26151 skeleton_debug_str_hash.
26152 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26154 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26156 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26157 (emit_store_direct): Likewise.
26158 (arc_trampoline_adjust_address): Likewise.
26159 (arc_asm_trampoline_template): New function.
26160 (arc_initialize_trampoline): Use asm_trampoline_template.
26161 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26162 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26163 * config/arc/arc.md (flush_icache): Delete pattern.
26165 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26167 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26168 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26171 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26174 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26175 by not USED_FOR_TARGET.
26176 (make_pass_resolve_sw_modes): Likewise.
26178 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26180 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26183 2018-01-08 Richard Biener <rguenther@suse.de>
26185 PR middle-end/83580
26186 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26188 2018-01-08 Richard Biener <rguenther@suse.de>
26190 PR middle-end/83517
26191 * match.pd ((t * 2) / 2) -> t): Add missing :c.
26193 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
26195 PR middle-end/81897
26196 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26197 basic blocks with a small number of successors.
26198 (convert_control_dep_chain_into_preds): Improve handling of
26200 (dump_predicates): Split apart into...
26201 (dump_pred_chain): ...here...
26202 (dump_pred_info): ...and here.
26203 (can_one_predicate_be_invalidated_p): Add debugging printfs.
26204 (can_chain_union_be_invalidated_p): Improve check for invalidation
26206 (uninit_uses_cannot_happen): Avoid unnecessary if
26207 convert_control_dep_chain_into_preds yielded nothing.
26209 2018-01-06 Martin Sebor <msebor@redhat.com>
26211 PR tree-optimization/83640
26212 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26213 subtracting negative offset from size.
26214 (builtin_access::overlap): Adjust offset bounds of the access to fall
26215 within the size of the object if possible.
26217 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
26219 PR rtl-optimization/83699
26220 * expmed.c (extract_bit_field_1): Restrict the vector usage of
26221 extract_bit_field_as_subreg to cases in which the extracted
26222 value is also a vector.
26224 * lra-constraints.c (process_alt_operands): Test for the equivalence
26225 substitutions when detecting a possible reload cycle.
26227 2018-01-06 Jakub Jelinek <jakub@redhat.com>
26230 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26231 by default if flag_selective_schedling{,2}. Formatting fixes.
26233 PR rtl-optimization/83682
26234 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26235 if it has non-VECTOR_MODE element mode.
26236 (vec_duplicate_p): Likewise.
26238 PR middle-end/83694
26239 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26240 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26242 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26245 * config/i386/i386-builtin.def
26246 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26247 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26248 Require also OPTION_MASK_ISA_AVX512F in addition to
26249 OPTION_MASK_ISA_GFNI.
26250 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26251 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26252 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26253 to OPTION_MASK_ISA_GFNI.
26254 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26255 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26256 OPTION_MASK_ISA_AVX512BW.
26257 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26258 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26259 addition to OPTION_MASK_ISA_GFNI.
26260 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26261 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26262 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26263 to OPTION_MASK_ISA_GFNI.
26264 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26265 a requirement for all ISAs rather than any of them with a few
26267 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26269 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26270 bitmasks to be enabled with 3 exceptions, instead of requiring any
26271 enabled ISA with lots of exceptions.
26272 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26273 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26274 Change avx512bw in isa attribute to avx512f.
26275 * config/i386/sgxintrin.h: Add license boilerplate.
26276 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26277 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26278 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26279 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26281 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26282 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26283 temporarily sse2 rather than sse if not enabled already.
26286 * config/i386/sse.md (VI248_VLBW): Rename to ...
26287 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26288 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26289 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26290 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26291 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26292 mode iterator instead of VI248_VLBW.
26294 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26296 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26297 (record_modified): Skip clobbers; add debug output.
26298 (param_change_prob): Use sreal frequencies.
26300 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26302 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26303 punt for user-aligned variables.
26305 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26307 * tree-chrec.c (chrec_contains_symbols): Return true for
26310 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26313 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26314 of (x|y) == x for BICS pattern.
26316 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26318 PR tree-optimization/83605
26319 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26320 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26323 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26325 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26326 * config/epiphany/rtems.h: New file.
26328 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26329 Uros Bizjak <ubizjak@gmail.com>
26332 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26333 QIreg_operand instead of register_operand predicate.
26334 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26335 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26336 comments instead of -fmitigate[-_]rop.
26338 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26341 * cgraphunit.c (symbol_table::compile): Switch to text_section
26342 before calling assembly_start debug hook.
26343 * run-rtl-passes.c (run_rtl_passes): Likewise.
26346 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26348 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26349 range_int_cst_p rather than !symbolic_range_p before calling
26350 extract_range_from_multiplicative_op_1.
26352 2018-01-04 Jeff Law <law@redhat.com>
26354 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26355 redundant test in assertion.
26357 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26359 * doc/rtl.texi: Document machine_mode wrapper classes.
26361 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26363 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26364 using tree_to_uhwi.
26366 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26368 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26369 the VEC_PERM_EXPR fold to fail.
26371 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26374 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26375 to switched_sections.
26377 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26380 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26381 test for d.testing.
26383 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26386 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26387 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26389 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26392 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26393 is BLKmode and bitpos not zero or mode change is needed.
26395 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26398 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26401 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26404 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26405 instead of MULT rtx. Update all corresponding splitters.
26406 (*saddl_se): Ditto.
26407 (*ssub<modesuffix>): Ditto.
26408 (*ssubl_se): Ditto.
26409 (*cmp_sadd_di): Update split patterns.
26410 (*cmp_sadd_si): Ditto.
26411 (*cmp_sadd_sidi): Ditto.
26412 (*cmp_ssub_di): Ditto.
26413 (*cmp_ssub_si): Ditto.
26414 (*cmp_ssub_sidi): Ditto.
26415 * config/alpha/predicates.md (const23_operand): New predicate.
26416 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26417 Look for ASHIFT, not MULT inner operand.
26418 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26420 2018-01-04 Martin Liska <mliska@suse.cz>
26422 PR gcov-profile/83669
26423 * gcov.c (output_intermediate_file): Add version to intermediate
26425 * doc/gcov.texi: Document new field 'version' in intermediate
26426 file format. Fix location of '-k' option of gcov command.
26428 2018-01-04 Martin Liska <mliska@suse.cz>
26431 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26433 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26435 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26437 2018-01-03 Martin Sebor <msebor@redhat.com>
26439 PR tree-optimization/83655
26440 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26441 checking calls with invalid arguments.
26443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26445 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26446 (vectorizable_mask_load_store): Delete.
26447 (vectorizable_call): Return false for masked loads and stores.
26448 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26449 instead of gimple_assign_rhs1.
26450 (vectorizable_load): Handle IFN_MASK_LOAD.
26451 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26453 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26455 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26457 (vectorizable_mask_load_store): ...here.
26458 (vectorizable_load): ...and here.
26460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26462 * tree-vect-stmts.c (vect_build_all_ones_mask)
26463 (vect_build_zero_merge_argument): New functions, split out from...
26464 (vectorizable_load): ...here.
26466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26468 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26470 (vectorizable_mask_load_store): ...here.
26471 (vectorizable_store): ...and here.
26473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26475 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26477 (vectorizable_mask_load_store): ...here.
26479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26481 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26482 (vect_model_store_cost): Take a vec_load_store_type instead of a
26484 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26485 (vect_model_store_cost): Take a vec_load_store_type instead of a
26487 (vectorizable_mask_load_store): Update accordingly.
26488 (vectorizable_store): Likewise.
26489 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26493 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26494 IFN_MASK_LOAD calls here rather than...
26495 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26498 Alan Hayward <alan.hayward@arm.com>
26499 David Sherwood <david.sherwood@arm.com>
26501 * expmed.c (extract_bit_field_1): For vector extracts,
26502 fall back to extract_bit_field_as_subreg if vec_extract
26505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26506 Alan Hayward <alan.hayward@arm.com>
26507 David Sherwood <david.sherwood@arm.com>
26509 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26510 they are variable or constant sized.
26511 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26512 slots for constant-sized data.
26514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26515 Alan Hayward <alan.hayward@arm.com>
26516 David Sherwood <david.sherwood@arm.com>
26518 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26519 handling COND_EXPRs with boolean comparisons, try to find a better
26520 basis for the mask type than the boolean itself.
26522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26524 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26525 is calculated and how it can be overridden.
26526 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26527 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26529 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26533 Alan Hayward <alan.hayward@arm.com>
26534 David Sherwood <david.sherwood@arm.com>
26536 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26537 Remove the mode argument.
26538 (aarch64_simd_valid_immediate): Remove the mode and inverse
26540 * config/aarch64/iterators.md (bitsize): New iterator.
26541 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26542 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26543 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26544 aarch64_simd_valid_immediate.
26545 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26546 (aarch64_reg_or_bic_imm): Likewise.
26547 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26548 with an insn_type enum and msl with a modifier_type enum.
26549 Replace element_width with a scalar_mode. Change the shift
26550 to unsigned int. Add constructors for scalar_float_mode and
26551 scalar_int_mode elements.
26552 (aarch64_vect_float_const_representable_p): Delete.
26553 (aarch64_can_const_movi_rtx_p)
26554 (aarch64_simd_scalar_immediate_valid_for_move)
26555 (aarch64_simd_make_constant): Update call to
26556 aarch64_simd_valid_immediate.
26557 (aarch64_advsimd_valid_immediate_hs): New function.
26558 (aarch64_advsimd_valid_immediate): Likewise.
26559 (aarch64_simd_valid_immediate): Remove mode and inverse
26560 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26561 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26562 and aarch64_float_const_representable_p on the result.
26563 (aarch64_output_simd_mov_immediate): Remove mode argument.
26564 Update call to aarch64_simd_valid_immediate and use of
26565 simd_immediate_info.
26566 (aarch64_output_scalar_simd_mov_immediate): Update call
26569 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26570 Alan Hayward <alan.hayward@arm.com>
26571 David Sherwood <david.sherwood@arm.com>
26573 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26574 (mode_nunits): Likewise CONST_MODE_NUNITS.
26575 * machmode.def (ADJUST_NUNITS): Document.
26576 * genmodes.c (mode_data::need_nunits_adj): New field.
26577 (blank_mode): Update accordingly.
26578 (adj_nunits): New variable.
26579 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26581 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26582 listed in adj_nunits.
26583 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26584 listed in adj_nunits. Don't emit case statements for such modes.
26585 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26586 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26587 nothing if adj_nunits is nonnull.
26588 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26589 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26590 (emit_mode_fbit): Update use of print_maybe_const_decl.
26591 (emit_move_size): Likewise. Treat the array as non-const
26593 (emit_mode_adjustments): Handle adj_nunits.
26595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26597 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26598 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26599 (VECTOR_MODES): Use it.
26600 (make_vector_modes): Take the prefix as an argument.
26602 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26603 Alan Hayward <alan.hayward@arm.com>
26604 David Sherwood <david.sherwood@arm.com>
26606 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26607 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26608 for MODE_VECTOR_BOOL.
26609 * machmode.def (VECTOR_BOOL_MODE): Document.
26610 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26611 (make_vector_bool_mode): New function.
26612 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26614 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26615 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26617 * stor-layout.c (int_mode_for_mode): Likewise.
26618 * tree.c (build_vector_type_for_mode): Likewise.
26619 * varasm.c (output_constant_pool_2): Likewise.
26620 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26621 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26622 for MODE_VECTOR_BOOL.
26623 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26624 of mode class checks.
26625 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26626 instead of a list of mode class checks.
26627 (expand_vector_scalar_condition): Likewise.
26628 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26631 Alan Hayward <alan.hayward@arm.com>
26632 David Sherwood <david.sherwood@arm.com>
26634 * machmode.h (mode_size): Change from unsigned short to
26636 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26637 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26638 or if measurement_type is not polynomial.
26639 (fixed_size_mode::includes_p): Check for constant-sized modes.
26640 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26641 return a poly_uint16 rather than an unsigned short.
26642 (emit_mode_size): Change the type of mode_size from unsigned short
26643 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26644 (emit_mode_adjustments): Cope with polynomial vector sizes.
26645 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26647 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26649 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26650 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26651 * caller-save.c (setup_save_areas): Likewise.
26652 (replace_reg_with_saved_mem): Likewise.
26653 * calls.c (emit_library_call_value_1): Likewise.
26654 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26655 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26656 (gen_lowpart_for_combine): Likewise.
26657 * convert.c (convert_to_integer_1): Likewise.
26658 * cse.c (equiv_constant, cse_insn): Likewise.
26659 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26660 (cselib_subst_to_values): Likewise.
26661 * dce.c (word_dce_process_block): Likewise.
26662 * df-problems.c (df_word_lr_mark_ref): Likewise.
26663 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26664 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26665 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26666 (rtl_for_decl_location): Likewise.
26667 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26668 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26669 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26670 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26671 (expand_expr_real_1): Likewise.
26672 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26673 (pad_below): Likewise.
26674 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26675 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26676 * ira.c (get_subreg_tracking_sizes): Likewise.
26677 * ira-build.c (ira_create_allocno_objects): Likewise.
26678 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26679 (ira_sort_regnos_for_alter_reg): Likewise.
26680 * ira-costs.c (record_operand_costs): Likewise.
26681 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26682 (resolve_simple_move): Likewise.
26683 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26684 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26685 (lra_constraints): Likewise.
26686 (CONST_POOL_OK_P): Reject variable-sized modes.
26687 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26688 (add_pseudo_to_slot, lra_spill): Likewise.
26689 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26690 * optabs-query.c (get_best_extraction_insn): Likewise.
26691 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26692 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26693 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26694 * recog.c (offsettable_address_addr_space_p): Likewise.
26695 * regcprop.c (maybe_mode_change): Likewise.
26696 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26697 * regrename.c (build_def_use): Likewise.
26698 * regstat.c (dump_reg_info): Likewise.
26699 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26700 (find_reloads, find_reloads_subreg_address): Likewise.
26701 * reload1.c (eliminate_regs_1): Likewise.
26702 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26703 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26704 (simplify_binary_operation_1, simplify_subreg): Likewise.
26705 * targhooks.c (default_function_arg_padding): Likewise.
26706 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26707 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26708 (verify_gimple_assign_ternary): Likewise.
26709 * tree-inline.c (estimate_move_cost): Likewise.
26710 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26711 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26712 (get_address_cost_ainc): Likewise.
26713 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26714 (vect_supportable_dr_alignment): Likewise.
26715 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26716 (vectorizable_reduction): Likewise.
26717 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26718 (vectorizable_operation, vectorizable_load): Likewise.
26719 * tree.c (build_same_sized_truth_vector_type): Likewise.
26720 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26721 * var-tracking.c (emit_note_insn_var_location): Likewise.
26722 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26723 (ADDR_VEC_ALIGN): Likewise.
26725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26726 Alan Hayward <alan.hayward@arm.com>
26727 David Sherwood <david.sherwood@arm.com>
26729 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26731 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26732 or if measurement_type is polynomial.
26733 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26734 * combine.c (make_extraction): Likewise.
26735 * dse.c (find_shift_sequence): Likewise.
26736 * dwarf2out.c (mem_loc_descriptor): Likewise.
26737 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26738 (extract_bit_field, extract_low_bits): Likewise.
26739 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26740 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26741 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26742 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26743 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26744 * reload.c (find_reloads): Likewise.
26745 * reload1.c (alter_reg): Likewise.
26746 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26747 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26748 * tree-if-conv.c (predicate_mem_writes): Likewise.
26749 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26750 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26751 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26752 * valtrack.c (dead_debug_insert_temp): Likewise.
26753 * varasm.c (mergeable_constant_section): Likewise.
26754 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26757 Alan Hayward <alan.hayward@arm.com>
26758 David Sherwood <david.sherwood@arm.com>
26760 * expr.c (expand_assignment): Cope with polynomial mode sizes
26761 when assigning to a CONCAT.
26763 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26764 Alan Hayward <alan.hayward@arm.com>
26765 David Sherwood <david.sherwood@arm.com>
26767 * machmode.h (mode_precision): Change from unsigned short to
26769 (mode_to_precision): Return a poly_uint16 rather than an unsigned
26771 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26772 or if measurement_type is not polynomial.
26773 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
26774 in which the mode is already known to be a scalar_int_mode.
26775 * genmodes.c (emit_mode_precision): Change the type of mode_precision
26776 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
26778 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26779 for GET_MODE_PRECISION.
26780 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26781 for GET_MODE_PRECISION.
26782 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26784 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26785 (expand_field_assignment, make_extraction): Likewise.
26786 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26787 (get_last_value): Likewise.
26788 * convert.c (convert_to_integer_1): Likewise.
26789 * cse.c (cse_insn): Likewise.
26790 * expr.c (expand_expr_real_1): Likewise.
26791 * lra-constraints.c (simplify_operand_subreg): Likewise.
26792 * optabs-query.c (can_atomic_load_p): Likewise.
26793 * optabs.c (expand_atomic_load): Likewise.
26794 (expand_atomic_store): Likewise.
26795 * ree.c (combine_reaching_defs): Likewise.
26796 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26797 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26798 * tree.h (type_has_mode_precision_p): Likewise.
26799 * ubsan.c (instrument_si_overflow): Likewise.
26801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26802 Alan Hayward <alan.hayward@arm.com>
26803 David Sherwood <david.sherwood@arm.com>
26805 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26806 polynomial numbers of units.
26807 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26808 (valid_vector_subparts_p): New function.
26809 (build_vector_type): Remove temporary shim and take the number
26810 of units as a poly_uint64 rather than an int.
26811 (build_opaque_vector_type): Take the number of units as a
26812 poly_uint64 rather than an int.
26813 * tree.c (build_vector_from_ctor): Handle polynomial
26814 TYPE_VECTOR_SUBPARTS.
26815 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26816 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26817 (build_vector_from_val): If the number of units is variable,
26818 use build_vec_duplicate_cst for constant operands and
26819 VEC_DUPLICATE_EXPR otherwise.
26820 (make_vector_type): Remove temporary is_constant ().
26821 (build_vector_type, build_opaque_vector_type): Take the number of
26822 units as a poly_uint64 rather than an int.
26823 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26825 * cfgexpand.c (expand_debug_expr): Likewise.
26826 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26827 (store_constructor, expand_expr_real_1): Likewise.
26828 (const_scalar_mask_from_tree): Likewise.
26829 * fold-const-call.c (fold_const_reduction): Likewise.
26830 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26831 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26832 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26833 (fold_relational_const): Likewise.
26834 (native_interpret_vector): Likewise. Change the size from an
26835 int to an unsigned int.
26836 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26837 TYPE_VECTOR_SUBPARTS.
26838 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26839 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26840 duplicating a non-constant operand into a variable-length vector.
26841 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26842 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26843 * ipa-icf.c (sem_variable::equals): Likewise.
26844 * match.pd: Likewise.
26845 * omp-simd-clone.c (simd_clone_subparts): Likewise.
26846 * print-tree.c (print_node): Likewise.
26847 * stor-layout.c (layout_type): Likewise.
26848 * targhooks.c (default_builtin_vectorization_cost): Likewise.
26849 * tree-cfg.c (verify_gimple_comparison): Likewise.
26850 (verify_gimple_assign_binary): Likewise.
26851 (verify_gimple_assign_ternary): Likewise.
26852 (verify_gimple_assign_single): Likewise.
26853 * tree-pretty-print.c (dump_generic_node): Likewise.
26854 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26855 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26856 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26857 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26858 (vect_shift_permute_load_chain): Likewise.
26859 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26860 (expand_vector_condition, optimize_vector_constructor): Likewise.
26861 (lower_vec_perm, get_compute_type): Likewise.
26862 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26863 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26864 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26865 (vect_recog_mask_conversion_pattern): Likewise.
26866 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26867 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26868 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26869 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26870 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26871 (vectorizable_shift, vectorizable_operation, vectorizable_store)
26872 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26873 (supportable_widening_operation): Likewise.
26874 (supportable_narrowing_operation): Likewise.
26875 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26877 * varasm.c (output_constant): Likewise.
26879 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26880 Alan Hayward <alan.hayward@arm.com>
26881 David Sherwood <david.sherwood@arm.com>
26883 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26884 so that both the length == 3 and length != 3 cases set up their
26885 own permute vectors. Add comments explaining why we know the
26886 number of elements is constant.
26887 (vect_permute_load_chain): Likewise.
26889 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26890 Alan Hayward <alan.hayward@arm.com>
26891 David Sherwood <david.sherwood@arm.com>
26893 * machmode.h (mode_nunits): Change from unsigned char to
26895 (ONLY_FIXED_SIZE_MODES): New macro.
26896 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26897 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26898 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26900 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26901 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26902 or if measurement_type is not polynomial.
26903 * genmodes.c (ZERO_COEFFS): New macro.
26904 (emit_mode_nunits_inline): Make mode_nunits_inline return a
26906 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26907 Use ZERO_COEFFS when emitting initializers.
26908 * data-streamer.h (bp_pack_poly_value): New function.
26909 (bp_unpack_poly_value): Likewise.
26910 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26911 for GET_MODE_NUNITS.
26912 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26913 for GET_MODE_NUNITS.
26914 * tree.c (make_vector_type): Remove temporary shim and make
26915 the real function take the number of units as a poly_uint64
26916 rather than an int.
26917 (build_vector_type_for_mode): Handle polynomial nunits.
26918 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26919 * emit-rtl.c (const_vec_series_p_1): Likewise.
26920 (gen_rtx_CONST_VECTOR): Likewise.
26921 * fold-const.c (test_vec_duplicate_folding): Likewise.
26922 * genrecog.c (validate_pattern): Likewise.
26923 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26924 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26925 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26926 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26927 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26928 * rtlanal.c (subreg_get_info): Likewise.
26929 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26930 (vect_grouped_load_supported): Likewise.
26931 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26932 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26933 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26934 (simplify_const_unary_operation, simplify_binary_operation_1)
26935 (simplify_const_binary_operation, simplify_ternary_operation)
26936 (test_vector_ops_duplicate, test_vector_ops): Likewise.
26937 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26938 instead of CONST_VECTOR_NUNITS.
26939 * varasm.c (output_constant_pool_2): Likewise.
26940 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26941 explicit-encoded elements in the XVEC for variable-length vectors.
26943 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26945 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26947 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26948 Alan Hayward <alan.hayward@arm.com>
26949 David Sherwood <david.sherwood@arm.com>
26951 * coretypes.h (fixed_size_mode): Declare.
26952 (fixed_size_mode_pod): New typedef.
26953 * builtins.h (target_builtins::x_apply_args_mode)
26954 (target_builtins::x_apply_result_mode): Change type to
26955 fixed_size_mode_pod.
26956 * builtins.c (apply_args_size, apply_result_size, result_vector)
26957 (expand_builtin_apply_args_1, expand_builtin_apply)
26958 (expand_builtin_return): Update accordingly.
26960 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26962 * cse.c (hash_rtx_cb): Hash only the encoded elements.
26963 * cselib.c (cselib_hash_rtx): Likewise.
26964 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26965 CONST_VECTOR encoding.
26967 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26968 Jeff Law <law@redhat.com>
26971 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26972 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26973 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26974 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26977 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26978 explicitly probe *sp in a noreturn function if there were any callee
26979 register saves or frame pointer is needed.
26981 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26984 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26985 BLKmode for ternary, binary or unary expressions.
26988 * var-tracking.c (delete_vta_debug_insn): New inline function.
26989 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26990 insns from get_insns () to NULL instead of each bb separately.
26991 Use delete_vta_debug_insn. No longer static.
26992 (vt_debug_insns_local, variable_tracking_main_1): Adjust
26993 delete_vta_debug_insns callers.
26994 * rtl.h (delete_vta_debug_insns): Declare.
26995 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26996 instead of variable_tracking_main.
26998 2018-01-03 Martin Sebor <msebor@redhat.com>
27000 PR tree-optimization/83603
27001 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27002 arguments past the endof the argument list in functions declared
27003 without a prototype.
27004 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27005 Avoid checking when arguments are null.
27007 2018-01-03 Martin Sebor <msebor@redhat.com>
27010 * doc/extend.texi (attribute const): Fix a typo.
27011 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27012 issuing -Wsuggest-attribute for void functions.
27014 2018-01-03 Martin Sebor <msebor@redhat.com>
27016 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27017 offset_int::from instead of wide_int::to_shwi.
27018 (maybe_diag_overlap): Remove assertion.
27019 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27020 * gimple-ssa-sprintf.c (format_directive): Same.
27021 (parse_directive): Same.
27022 (sprintf_dom_walker::compute_format_length): Same.
27023 (try_substitute_return_value): Same.
27025 2018-01-03 Jeff Law <law@redhat.com>
27027 PR middle-end/83654
27028 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27029 non-constant residual for zero at runtime and avoid probing in
27030 that case. Reorganize code for trailing problem to mirror handling
27033 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27035 PR tree-optimization/83501
27036 * tree-ssa-strlen.c (get_string_cst): New.
27037 (handle_char_store): Call get_string_cst.
27039 2018-01-03 Martin Liska <mliska@suse.cz>
27041 PR tree-optimization/83593
27042 * tree-ssa-strlen.c: Include tree-cfg.h.
27043 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27044 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27045 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27047 (strlen_dom_walker::before_dom_children): Call
27048 gimple_purge_dead_eh_edges. Dump tranformation with details
27050 (strlen_dom_walker::before_dom_children): Update call by adding
27051 new argument cleanup_eh.
27052 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27054 2018-01-03 Martin Liska <mliska@suse.cz>
27057 * cif-code.def (VARIADIC_THUNK): New enum value.
27058 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27061 2018-01-03 Jan Beulich <jbeulich@suse.com>
27063 * sse.md (mov<mode>_internal): Tighten condition for when to use
27064 vmovdqu<ssescalarsize> for TI and OI modes.
27066 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27068 Update copyright years.
27070 2018-01-03 Martin Liska <mliska@suse.cz>
27073 * ipa-visibility.c (function_and_variable_visibility): Skip
27074 functions with noipa attribure.
27076 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27078 * gcc.c (process_command): Update copyright notice dates.
27079 * gcov-dump.c (print_version): Ditto.
27080 * gcov.c (print_version): Ditto.
27081 * gcov-tool.c (print_version): Ditto.
27082 * gengtype.c (create_file): Ditto.
27083 * doc/cpp.texi: Bump @copying's copyright year.
27084 * doc/cppinternals.texi: Ditto.
27085 * doc/gcc.texi: Ditto.
27086 * doc/gccint.texi: Ditto.
27087 * doc/gcov.texi: Ditto.
27088 * doc/install.texi: Ditto.
27089 * doc/invoke.texi: Ditto.
27091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27093 * vector-builder.h (vector_builder::m_full_nelts): Change from
27094 unsigned int to poly_uint64.
27095 (vector_builder::full_nelts): Update prototype accordingly.
27096 (vector_builder::new_vector): Likewise.
27097 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27098 (vector_builder::operator ==): Likewise.
27099 (vector_builder::finalize): Likewise.
27100 * int-vector-builder.h (int_vector_builder::int_vector_builder):
27101 Take the number of elements as a poly_uint64 rather than an
27103 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27104 from unsigned int to poly_uint64.
27105 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27106 (vec_perm_indices::new_vector): Likewise.
27107 (vec_perm_indices::length): Likewise.
27108 (vec_perm_indices::nelts_per_input): Likewise.
27109 (vec_perm_indices::input_nelts): Likewise.
27110 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27111 number of elements per input as a poly_uint64 rather than an
27112 unsigned int. Use the original encoding for variable-length
27113 vectors, rather than clamping each individual element.
27114 For the second and subsequent elements in each pattern,
27115 clamp the step and base before clamping their sum.
27116 (vec_perm_indices::series_p): Handle polynomial element counts.
27117 (vec_perm_indices::all_in_range_p): Likewise.
27118 (vec_perm_indices_to_tree): Likewise.
27119 (vec_perm_indices_to_rtx): Likewise.
27120 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27121 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27122 (tree_vector_builder::new_binary_operation): Handle polynomial
27123 element counts. Return false if we need to know the number
27124 of elements at compile time.
27125 * fold-const.c (fold_vec_perm): Punt if the number of elements
27126 isn't known at compile time.
27128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27130 * vec-perm-indices.h (vec_perm_builder): Change element type
27131 from HOST_WIDE_INT to poly_int64.
27132 (vec_perm_indices::element_type): Update accordingly.
27133 (vec_perm_indices::clamp): Handle polynomial element_types.
27134 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27135 (vec_perm_indices::all_in_range_p): Likewise.
27136 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27138 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27139 polynomial vec_perm_indices element types.
27140 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27141 * fold-const.c (fold_vec_perm): Likewise.
27142 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27143 * tree-vect-generic.c (lower_vec_perm): Likewise.
27144 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27145 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27146 element type to HOST_WIDE_INT.
27148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27149 Alan Hayward <alan.hayward@arm.com>
27150 David Sherwood <david.sherwood@arm.com>
27152 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27153 rather than an int. Use plus_constant.
27154 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27155 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27158 Alan Hayward <alan.hayward@arm.com>
27159 David Sherwood <david.sherwood@arm.com>
27161 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27162 a HOST_WIDE_INT to a poly_int64.
27164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27165 Alan Hayward <alan.hayward@arm.com>
27166 David Sherwood <david.sherwood@arm.com>
27168 * calls.c (load_register_parameters): Cope with polynomial
27169 mode sizes. Require a constant size for BLKmode parameters
27170 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27171 forces a parameter to be padded at the lsb end in order to
27172 fill a complete number of words, require the parameter size
27173 to be ordered wrt UNITS_PER_WORD.
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 * reload1.c (spill_stack_slot_width): Change element type
27180 from unsigned int to poly_uint64_pod.
27181 (alter_reg): Treat mode sizes as polynomial.
27183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27184 Alan Hayward <alan.hayward@arm.com>
27185 David Sherwood <david.sherwood@arm.com>
27187 * reload.c (complex_word_subreg_p): New function.
27188 (reload_inner_reg_of_subreg, push_reload): Use it.
27190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27191 Alan Hayward <alan.hayward@arm.com>
27192 David Sherwood <david.sherwood@arm.com>
27194 * lra-constraints.c (process_alt_operands): Reject matched
27195 operands whose sizes aren't ordered.
27196 (match_reload): Refer to this check here.
27198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27199 Alan Hayward <alan.hayward@arm.com>
27200 David Sherwood <david.sherwood@arm.com>
27202 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27203 that the mode size is in the set {1, 2, 4, 8, 16}.
27205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27206 Alan Hayward <alan.hayward@arm.com>
27207 David Sherwood <david.sherwood@arm.com>
27209 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27210 Use plus_constant instead of gen_rtx_PLUS.
27212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27213 Alan Hayward <alan.hayward@arm.com>
27214 David Sherwood <david.sherwood@arm.com>
27216 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27217 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27218 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27219 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27220 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27221 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27222 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27223 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27224 * config/i386/i386.c (ix86_push_rounding): ...this new function.
27225 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27227 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27228 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27229 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27230 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27231 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27232 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27233 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27234 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27235 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27236 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27238 * expr.c (emit_move_resolve_push): Treat the input and result
27239 of PUSH_ROUNDING as a poly_int64.
27240 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27241 (emit_push_insn): Likewise.
27242 * lra-eliminations.c (mark_not_eliminable): Likewise.
27243 * recog.c (push_operand): Likewise.
27244 * reload1.c (elimination_effects): Likewise.
27245 * rtlanal.c (nonzero_bits1): Likewise.
27246 * calls.c (store_one_arg): Likewise. Require the padding to be
27247 known at compile time.
27249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27250 Alan Hayward <alan.hayward@arm.com>
27251 David Sherwood <david.sherwood@arm.com>
27253 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27254 Use plus_constant instead of gen_rtx_PLUS.
27256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27257 Alan Hayward <alan.hayward@arm.com>
27258 David Sherwood <david.sherwood@arm.com>
27260 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27261 rather than an int.
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 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27268 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27269 via stack temporaries. Treat the mode size as polynomial too.
27271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27272 Alan Hayward <alan.hayward@arm.com>
27273 David Sherwood <david.sherwood@arm.com>
27275 * expr.c (expand_expr_real_2): When handling conversions involving
27276 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27277 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27278 as a poly_uint64 too.
27280 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27281 Alan Hayward <alan.hayward@arm.com>
27282 David Sherwood <david.sherwood@arm.com>
27284 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27287 Alan Hayward <alan.hayward@arm.com>
27288 David Sherwood <david.sherwood@arm.com>
27290 * combine.c (can_change_dest_mode): Handle polynomial
27291 REGMODE_NATURAL_SIZE.
27292 * expmed.c (store_bit_field_1): Likewise.
27293 * expr.c (store_constructor): Likewise.
27294 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27295 and polynomial REGMODE_NATURAL_SIZE.
27296 (gen_lowpart_common): Likewise.
27297 * reginfo.c (record_subregs_of_mode): Likewise.
27298 * rtlanal.c (read_modify_subreg_p): Likewise.
27300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27301 Alan Hayward <alan.hayward@arm.com>
27302 David Sherwood <david.sherwood@arm.com>
27304 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27305 numbers of elements.
27307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27308 Alan Hayward <alan.hayward@arm.com>
27309 David Sherwood <david.sherwood@arm.com>
27311 * match.pd: Cope with polynomial numbers of vector elements.
27313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27314 Alan Hayward <alan.hayward@arm.com>
27315 David Sherwood <david.sherwood@arm.com>
27317 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27318 in a POINTER_PLUS_EXPR.
27320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27321 Alan Hayward <alan.hayward@arm.com>
27322 David Sherwood <david.sherwood@arm.com>
27324 * omp-simd-clone.c (simd_clone_subparts): New function.
27325 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27326 (ipa_simd_modify_function_body): Likewise.
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-generic.c (nunits_for_known_piecewise_op): New function.
27333 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27334 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27335 (expand_vector_condition, vector_element): Likewise.
27336 (subparts_gt): New function.
27337 (get_compute_type): Use subparts_gt.
27338 (count_type_subparts): Delete.
27339 (expand_vector_operations_1): Use subparts_gt instead of
27340 count_type_subparts.
27342 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27343 Alan Hayward <alan.hayward@arm.com>
27344 David Sherwood <david.sherwood@arm.com>
27346 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27347 (vect_compile_time_alias): ...this new function. Do the calculation
27348 on poly_ints rather than trees.
27349 (vect_prune_runtime_alias_test_list): Update call accordingly.
27351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27352 Alan Hayward <alan.hayward@arm.com>
27353 David Sherwood <david.sherwood@arm.com>
27355 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27357 (vect_schedule_slp_instance): Likewise.
27359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27360 Alan Hayward <alan.hayward@arm.com>
27361 David Sherwood <david.sherwood@arm.com>
27363 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27364 constant and extern definitions for variable-length vectors.
27365 (vect_get_constant_vectors): Note that the number of units
27366 is known to be constant.
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 (vectorizable_conversion): Treat the number
27373 of units as polynomial. Choose between WIDE and NARROW based
27376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27377 Alan Hayward <alan.hayward@arm.com>
27378 David Sherwood <david.sherwood@arm.com>
27380 * tree-vect-stmts.c (simd_clone_subparts): New function.
27381 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27384 Alan Hayward <alan.hayward@arm.com>
27385 David Sherwood <david.sherwood@arm.com>
27387 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27388 vectors as polynomial. Use build_index_vector for
27389 IFN_GOMP_SIMD_LANE.
27391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27392 Alan Hayward <alan.hayward@arm.com>
27393 David Sherwood <david.sherwood@arm.com>
27395 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27396 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27397 for variable-length vectors.
27398 (vectorizable_mask_load_store): Treat the number of units as
27399 polynomial, asserting that it is constant if the condition has
27400 already been enforced.
27401 (vectorizable_store, vectorizable_load): Likewise.
27403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27404 Alan Hayward <alan.hayward@arm.com>
27405 David Sherwood <david.sherwood@arm.com>
27407 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27408 of units as polynomial. Punt if we can't tell at compile time
27409 which vector contains the final result.
27411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27412 Alan Hayward <alan.hayward@arm.com>
27413 David Sherwood <david.sherwood@arm.com>
27415 * tree-vect-loop.c (vectorizable_induction): Treat the number
27416 of units as polynomial. Punt on SLP inductions. Use an integer
27417 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27418 cast of such a series for variable-length floating-point
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 * tree.h (build_index_vector): Declare.
27426 * tree.c (build_index_vector): New function.
27427 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27428 of units as polynomial, forcibly converting it to a constant if
27429 vectorizable_reduction has already enforced the condition.
27430 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27431 to create a {1,2,3,...} vector.
27432 (vectorizable_reduction): Treat the number of units as polynomial.
27433 Choose vectype_in based on the largest scalar element size rather
27434 than the smallest number of units. Enforce the restrictions
27437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27438 Alan Hayward <alan.hayward@arm.com>
27439 David Sherwood <david.sherwood@arm.com>
27441 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27442 number of units as polynomial.
27444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27445 Alan Hayward <alan.hayward@arm.com>
27446 David Sherwood <david.sherwood@arm.com>
27448 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27449 * target.def (autovectorize_vector_sizes): Return the vector sizes
27450 by pointer, using vector_sizes rather than a bitmask.
27451 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27452 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27453 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27455 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27456 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27457 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27458 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27459 * omp-general.c (omp_max_vf): Likewise.
27460 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27461 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27462 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27463 * tree-vect-slp.c (vect_slp_bb): Likewise.
27464 * doc/tm.texi: Regenerate.
27465 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27467 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27468 the vector size as a poly_uint64 rather than an unsigned int.
27469 (current_vector_size): Change from an unsigned int to a poly_uint64.
27470 (get_vectype_for_scalar_type): Update accordingly.
27471 * tree.h (build_truth_vector_type): Take the size and number of
27472 units as a poly_uint64 rather than an unsigned int.
27473 (build_vector_type): Add a temporary overload that takes
27474 the number of units as a poly_uint64 rather than an unsigned int.
27475 * tree.c (make_vector_type): Likewise.
27476 (build_truth_vector_type): Take the number of units as a poly_uint64
27477 rather than an unsigned int.
27479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27480 Alan Hayward <alan.hayward@arm.com>
27481 David Sherwood <david.sherwood@arm.com>
27483 * target.def (get_mask_mode): Take the number of units and length
27484 as poly_uint64s rather than unsigned ints.
27485 * targhooks.h (default_get_mask_mode): Update accordingly.
27486 * targhooks.c (default_get_mask_mode): Likewise.
27487 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27488 * doc/tm.texi: Regenerate.
27490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27491 Alan Hayward <alan.hayward@arm.com>
27492 David Sherwood <david.sherwood@arm.com>
27494 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27495 * omp-general.c (omp_max_vf): Likewise.
27496 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27497 (expand_omp_simd): Handle polynomial safelen.
27498 * omp-low.c (omplow_simd_context): Add a default constructor.
27499 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27500 (lower_rec_simd_input_clauses): Update accordingly.
27501 (lower_rec_input_clauses): Likewise.
27503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27504 Alan Hayward <alan.hayward@arm.com>
27505 David Sherwood <david.sherwood@arm.com>
27507 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27508 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27509 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27510 (vect_analyze_slp_cost): Likewise.
27511 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27512 (vect_model_load_cost): Likewise.
27514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27515 Alan Hayward <alan.hayward@arm.com>
27516 David Sherwood <david.sherwood@arm.com>
27518 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27519 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27520 from an unsigned int * to a poly_uint64_pod *.
27521 (calculate_unrolling_factor): New function.
27522 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27525 Alan Hayward <alan.hayward@arm.com>
27526 David Sherwood <david.sherwood@arm.com>
27528 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27529 from an unsigned int to a poly_uint64.
27530 (_loop_vec_info::slp_unrolling_factor): Likewise.
27531 (_loop_vec_info::vectorization_factor): Change from an int
27533 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27534 (vect_get_num_vectors): New function.
27535 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27536 (vect_get_num_copies): Use vect_get_num_vectors.
27537 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27538 to an unsigned int *.
27539 (vect_analyze_data_refs): Change min_vf from an int * to a
27541 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27542 than an unsigned HOST_WIDE_INT.
27543 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27544 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27545 to an unsigned int *.
27546 (vect_analyze_data_ref_dependences): Likewise.
27547 (vect_compute_data_ref_alignment): Handle polynomial vf.
27548 (vect_enhance_data_refs_alignment): Likewise.
27549 (vect_prune_runtime_alias_test_list): Likewise.
27550 (vect_shift_permute_load_chain): Likewise.
27551 (vect_supportable_dr_alignment): Likewise.
27552 (dependence_distance_ge_vf): Take the vectorization factor as a
27553 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27554 (vect_analyze_data_refs): Change min_vf from an int * to a
27556 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27557 vfm1 as a poly_uint64 rather than an int. Make the same change
27558 for the returned bound_scalar.
27559 (vect_gen_vector_loop_niters): Handle polynomial vf.
27560 (vect_do_peeling): Likewise. Update call to
27561 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27562 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27564 * tree-vect-loop.c (vect_determine_vectorization_factor)
27565 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27566 (vect_get_known_peeling_cost): Likewise.
27567 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27568 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27569 (vect_transform_loop): Likewise. Use the lowest possible VF when
27570 updating the upper bounds of the loop.
27571 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27572 rather than an int.
27573 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27574 polynomial unroll factors.
27575 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27576 (vect_make_slp_decision): Likewise.
27577 (vect_supported_load_permutation_p): Likewise, and polynomial
27579 (vect_analyze_slp_cost): Handle polynomial vf.
27580 (vect_slp_analyze_node_operations): Likewise.
27581 (vect_slp_analyze_bb_1): Likewise.
27582 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27583 than an unsigned HOST_WIDE_INT.
27584 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27585 (vectorizable_load): Handle polynomial vf.
27586 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27588 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27591 Alan Hayward <alan.hayward@arm.com>
27592 David Sherwood <david.sherwood@arm.com>
27594 * match.pd: Handle bit operations involving three constants
27595 and try to fold one pair.
27597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27599 * tree-vect-loop-manip.c: Include gimple-fold.h.
27600 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27601 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27602 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27603 Add a path that uses a step of VF instead of 1, but disable it
27605 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27606 and niters_no_overflow parameters. Update calls to
27607 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27608 Create a new SSA name if the latter choses to use a ste other
27609 than zero, and return it via niters_vector_mult_vf_var.
27610 * tree-vect-loop.c (vect_transform_loop): Update calls to
27611 vect_do_peeling, vect_gen_vector_loop_niters and
27612 slpeel_make_loop_iterate_ntimes.
27613 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27614 (vect_gen_vector_loop_niters): Update declarations after above changes.
27616 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27618 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27619 128-bit round to integer instructions.
27620 (ceil<mode>2): Likewise.
27621 (btrunc<mode>2): Likewise.
27622 (round<mode>2): Likewise.
27624 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27626 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27627 unaligned VSX load/store on P8/P9.
27628 (expand_block_clear): Allow the use of unaligned VSX
27629 load/store on P8/P9.
27631 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27633 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27635 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27636 swap associated with both a load and a store.
27638 2018-01-02 Andrew Waterman <andrew@sifive.com>
27640 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27641 * config/riscv/riscv.md (clear_cache): Use it.
27643 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27645 * web.c: Remove out-of-date comment.
27647 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27649 * expr.c (fixup_args_size_notes): Check that any existing
27650 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27651 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27652 (emit_single_push_insn): ...here.
27654 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27656 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27657 (const_vector_encoded_nelts): New function.
27658 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27659 (const_vector_int_elt, const_vector_elt): Declare.
27660 * emit-rtl.c (const_vector_int_elt_1): New function.
27661 (const_vector_elt): Likewise.
27662 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27663 of CONST_VECTOR_ELT.
27665 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27667 * expr.c: Include rtx-vector-builder.h.
27668 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27669 directly on the tree encoding.
27670 (const_vector_from_tree): Likewise.
27671 * optabs.c: Include rtx-vector-builder.h.
27672 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27673 sequence of "u" values.
27674 * vec-perm-indices.c: Include rtx-vector-builder.h.
27675 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27676 directly on the vec_perm_indices encoding.
27678 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27680 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27681 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27682 * rtx-vector-builder.h: New file.
27683 * rtx-vector-builder.c: Likewise.
27684 * rtl.h (rtx_def::u2): Add a const_vector field.
27685 (CONST_VECTOR_NPATTERNS): New macro.
27686 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27687 (CONST_VECTOR_DUPLICATE_P): Likewise.
27688 (CONST_VECTOR_STEPPED_P): Likewise.
27689 (CONST_VECTOR_ENCODED_ELT): Likewise.
27690 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27691 (unwrap_const_vec_duplicate): Likewise.
27692 (const_vec_series_p): Check for a non-duplicated vector encoding.
27693 Say that the function only returns true for integer vectors.
27694 * emit-rtl.c: Include rtx-vector-builder.h.
27695 (gen_const_vec_duplicate_1): Delete.
27696 (gen_const_vector): Call gen_const_vec_duplicate instead of
27697 gen_const_vec_duplicate_1.
27698 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27699 (gen_const_vec_duplicate): Use rtx_vector_builder.
27700 (gen_const_vec_series): Likewise.
27701 (gen_rtx_CONST_VECTOR): Likewise.
27702 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27703 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27704 Build a new vector rather than modifying a CONST_VECTOR in-place.
27705 (handle_special_swappables): Update call accordingly.
27706 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27707 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27708 Build a new vector rather than modifying a CONST_VECTOR in-place.
27709 (handle_special_swappables): Update call accordingly.
27711 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27713 * simplify-rtx.c (simplify_const_binary_operation): Use
27714 CONST_VECTOR_ELT instead of XVECEXP.
27716 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27718 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27719 the selector elements to be different from the data elements
27720 if the selector is a VECTOR_CST.
27721 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27722 ssizetype for the selector.
27724 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27726 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27727 before testing each element individually.
27728 * tree-vect-generic.c (lower_vec_perm): Likewise.
27730 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27732 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27733 * selftest-run-tests.c (selftest::run_tests): Call it.
27734 * vector-builder.h (vector_builder::operator ==): New function.
27735 (vector_builder::operator !=): Likewise.
27736 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27737 (vec_perm_indices::all_from_input_p): New function.
27738 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27739 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27740 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27741 instead of reading the VECTOR_CST directly. Detect whether both
27742 vector inputs are the same before constructing the vec_perm_indices,
27743 and update the number of inputs argument accordingly. Use the
27744 utility functions added above. Only construct sel2 if we need to.
27746 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27748 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27749 the broadcast of the low byte.
27750 (expand_mult_highpart): Use an explicit encoding for the permutes.
27751 * optabs-query.c (can_mult_highpart_p): Likewise.
27752 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27753 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27754 (vectorizable_bswap): Likewise.
27755 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27756 explicit encoding for the power-of-2 permutes.
27757 (vect_permute_store_chain): Likewise.
27758 (vect_grouped_load_supported): Likewise.
27759 (vect_permute_load_chain): Likewise.
27761 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27763 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27764 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27765 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27766 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27767 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27768 (vect_gen_perm_mask_any): Likewise.
27770 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27772 * int-vector-builder.h: New file.
27773 * vec-perm-indices.h: Include int-vector-builder.h.
27774 (vec_perm_indices): Redefine as an int_vector_builder.
27775 (auto_vec_perm_indices): Delete.
27776 (vec_perm_builder): Redefine as a stand-alone class.
27777 (vec_perm_indices::vec_perm_indices): New function.
27778 (vec_perm_indices::clamp): Likewise.
27779 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27780 (vec_perm_indices::new_vector): New function.
27781 (vec_perm_indices::new_expanded_vector): Update for new
27782 vec_perm_indices class.
27783 (vec_perm_indices::rotate_inputs): New function.
27784 (vec_perm_indices::all_in_range_p): Operate directly on the
27785 encoded form, without computing elided elements.
27786 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27787 encoding. Update for new vec_perm_indices class.
27788 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27789 the given vec_perm_builder.
27790 (expand_vec_perm_var): Update vec_perm_builder constructor.
27791 (expand_mult_highpart): Use vec_perm_builder instead of
27792 auto_vec_perm_indices.
27793 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27794 vec_perm_indices instead of auto_vec_perm_indices. Use a single
27795 or double series encoding as appropriate.
27796 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27797 vec_perm_indices instead of auto_vec_perm_indices.
27798 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27799 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27800 (vect_permute_store_chain): Likewise.
27801 (vect_grouped_load_supported): Likewise.
27802 (vect_permute_load_chain): Likewise.
27803 (vect_shift_permute_load_chain): Likewise.
27804 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27805 (vect_transform_slp_perm_load): Likewise.
27806 (vect_schedule_slp_instance): Likewise.
27807 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27808 (vectorizable_mask_load_store): Likewise.
27809 (vectorizable_bswap): Likewise.
27810 (vectorizable_store): Likewise.
27811 (vectorizable_load): Likewise.
27812 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27813 vec_perm_indices instead of auto_vec_perm_indices. Use
27814 tree_to_vec_perm_builder to read the vector from a tree.
27815 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27816 vec_perm_builder instead of a vec_perm_indices.
27817 (have_whole_vector_shift): Use vec_perm_builder and
27818 vec_perm_indices instead of auto_vec_perm_indices. Leave the
27819 truncation to calc_vec_perm_mask_for_shift.
27820 (vect_create_epilog_for_reduction): Likewise.
27821 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27822 from auto_vec_perm_indices to vec_perm_indices.
27823 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27824 instead of changing individual elements.
27825 (aarch64_vectorize_vec_perm_const): Use new_vector to install
27826 the vector in d.perm.
27827 * config/arm/arm.c (expand_vec_perm_d::perm): Change
27828 from auto_vec_perm_indices to vec_perm_indices.
27829 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27830 instead of changing individual elements.
27831 (arm_vectorize_vec_perm_const): Use new_vector to install
27832 the vector in d.perm.
27833 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27834 Update vec_perm_builder constructor.
27835 (rs6000_expand_interleave): Likewise.
27836 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27837 (rs6000_expand_interleave): Likewise.
27839 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27841 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27842 to qimode could truncate the indices.
27843 * optabs.c (expand_vec_perm_var): Likewise.
27845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27847 * Makefile.in (OBJS): Add vec-perm-indices.o.
27848 * vec-perm-indices.h: New file.
27849 * vec-perm-indices.c: Likewise.
27850 * target.h (vec_perm_indices): Replace with a forward class
27852 (auto_vec_perm_indices): Move to vec-perm-indices.h.
27853 * optabs.h: Include vec-perm-indices.h.
27854 (expand_vec_perm): Delete.
27855 (selector_fits_mode_p, expand_vec_perm_var): Declare.
27856 (expand_vec_perm_const): Declare.
27857 * target.def (vec_perm_const_ok): Replace with...
27858 (vec_perm_const): ...this new hook.
27859 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27860 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27861 * doc/tm.texi: Regenerate.
27862 * optabs.def (vec_perm_const): Delete.
27863 * doc/md.texi (vec_perm_const): Likewise.
27864 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27865 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27866 expand_vec_perm for constant permutation vectors. Assert that
27867 the mode of variable permutation vectors is the integer equivalent
27868 of the mode that is being permuted.
27869 * optabs-query.h (selector_fits_mode_p): Declare.
27870 * optabs-query.c: Include vec-perm-indices.h.
27871 (selector_fits_mode_p): New function.
27872 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27873 is defined, instead of checking whether the vec_perm_const_optab
27874 exists. Use targetm.vectorize.vec_perm_const instead of
27875 targetm.vectorize.vec_perm_const_ok. Check whether the indices
27876 fit in the vector mode before using a variable permute.
27877 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27878 vec_perm_indices instead of an rtx.
27879 (expand_vec_perm): Replace with...
27880 (expand_vec_perm_const): ...this new function. Take the selector
27881 as a vec_perm_indices rather than an rtx. Also take the mode of
27882 the selector. Update call to shift_amt_for_vec_perm_mask.
27883 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27884 Use vec_perm_indices::new_expanded_vector to expand the original
27885 selector into bytes. Check whether the indices fit in the vector
27886 mode before using a variable permute.
27887 (expand_vec_perm_var): Make global.
27888 (expand_mult_highpart): Use expand_vec_perm_const.
27889 * fold-const.c: Includes vec-perm-indices.h.
27890 * tree-ssa-forwprop.c: Likewise.
27891 * tree-vect-data-refs.c: Likewise.
27892 * tree-vect-generic.c: Likewise.
27893 * tree-vect-loop.c: Likewise.
27894 * tree-vect-slp.c: Likewise.
27895 * tree-vect-stmts.c: Likewise.
27896 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27898 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27899 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27900 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27901 (aarch64_vectorize_vec_perm_const): ...this new function.
27902 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27903 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27904 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27905 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27906 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27907 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27908 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27910 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
27911 check for NEON modes.
27912 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27913 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27914 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27915 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27917 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
27918 the old VEC_PERM_CONST conditions.
27919 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27920 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27921 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27922 (ia64_vectorize_vec_perm_const_ok): Merge into...
27923 (ia64_vectorize_vec_perm_const): ...this new function.
27924 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27925 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27926 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27927 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27928 * config/mips/mips.c (mips_expand_vec_perm_const)
27929 (mips_vectorize_vec_perm_const_ok): Merge into...
27930 (mips_vectorize_vec_perm_const): ...this new function.
27931 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27932 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27933 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27934 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27935 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27936 (rs6000_expand_vec_perm_const): Delete.
27937 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27939 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27940 (altivec_expand_vec_perm_const_le): Take each operand individually.
27941 Operate on constant selectors rather than rtxes.
27942 (altivec_expand_vec_perm_const): Likewise. Update call to
27943 altivec_expand_vec_perm_const_le.
27944 (rs6000_expand_vec_perm_const): Delete.
27945 (rs6000_vectorize_vec_perm_const_ok): Delete.
27946 (rs6000_vectorize_vec_perm_const): New function.
27947 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27948 an element count and rtx array.
27949 (rs6000_expand_extract_even): Update call accordingly.
27950 (rs6000_expand_interleave): Likewise.
27951 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27952 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27953 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27954 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27955 (rs6000_expand_vec_perm_const): Delete.
27956 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27957 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27958 (altivec_expand_vec_perm_const_le): Take each operand individually.
27959 Operate on constant selectors rather than rtxes.
27960 (altivec_expand_vec_perm_const): Likewise. Update call to
27961 altivec_expand_vec_perm_const_le.
27962 (rs6000_expand_vec_perm_const): Delete.
27963 (rs6000_vectorize_vec_perm_const_ok): Delete.
27964 (rs6000_vectorize_vec_perm_const): New function. Remove stray
27965 reference to the SPE evmerge intructions.
27966 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27967 an element count and rtx array.
27968 (rs6000_expand_extract_even): Update call accordingly.
27969 (rs6000_expand_interleave): Likewise.
27970 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27971 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27973 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27975 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27977 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27978 vector mode and that that mode matches the mode of the data
27980 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27981 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
27982 directly using expand_vec_perm_1 when forcing selectors into
27984 (expand_vec_perm_var): New function, split out from expand_vec_perm.
27986 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27988 * optabs-query.h (can_vec_perm_p): Delete.
27989 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27990 * optabs-query.c (can_vec_perm_p): Split into...
27991 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27992 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27993 particular selector is valid.
27994 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27995 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27996 (vect_grouped_load_supported): Likewise.
27997 (vect_shift_permute_load_chain): Likewise.
27998 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27999 (vect_transform_slp_perm_load): Likewise.
28000 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28001 (vectorizable_bswap): Likewise.
28002 (vect_gen_perm_mask_checked): Likewise.
28003 * fold-const.c (fold_ternary_loc): Likewise. Don't take
28004 implementations of variable permutation vectors into account
28005 when deciding which selector to use.
28006 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28007 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28008 with a false third argument.
28009 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28010 to test whether the constant selector is valid and can_vec_perm_var_p
28011 to test whether a variable selector is valid.
28013 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28015 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28016 * optabs-query.c (can_vec_perm_p): Likewise.
28017 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28018 instead of vec_perm_indices.
28019 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28020 (vect_gen_perm_mask_checked): Likewise,
28021 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28022 (vect_gen_perm_mask_checked): Likewise,
28024 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28026 * optabs-query.h (qimode_for_vec_perm): Declare.
28027 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28028 (qimode_for_vec_perm): ...this new function.
28029 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28031 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28033 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28034 does not have a conditional at the top.
28036 2018-01-02 Richard Biener <rguenther@suse.de>
28038 * ipa-inline.c (big_speedup_p): Fix expression.
28040 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28043 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28046 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28050 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28051 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28052 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28053 cond_taken_branch_cost 3->4.
28055 2018-01-01 Jakub Jelinek <jakub@redhat.com>
28057 PR tree-optimization/83581
28058 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28059 TODO_cleanup_cfg if any changes have been made.
28061 PR middle-end/83608
28062 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28063 convert_modes if target mode has the right side, but different mode
28066 PR middle-end/83609
28067 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28068 last argument when extracting from CONCAT. If either from_real or
28069 from_imag is NULL, use expansion through memory. If result is not
28070 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28071 the parts directly to inner mode, if even that fails, use expansion
28074 PR middle-end/83623
28075 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28076 check for bswap in mode rather than HImode and use that in expand_unop
28079 Copyright (C) 2018 Free Software Foundation, Inc.
28081 Copying and distribution of this file, with or without modification,
28082 are permitted in any medium without royalty provided the copyright
28083 notice and this notice are preserved.