1 2018-10-09 Aldy Hernandez <aldyh@redhat.com>
3 * bitmap.c (bitmap_head::dump): New.
4 * bitmap.h (bitmap_head): Add dump().
5 * gimple-ssa-evrp-analyze.c
6 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
7 (evrp_range_analyzer::set_ssa_range_info): Same.
8 (evrp_range_analyzer::record_ranges_from_phis): Same.
9 (evrp_range_analyzer::record_ranges_from_stmt): Same.
10 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
11 * gimple-ssa-sprintf.c (get_int_range): Same.
12 (format_integer): Same.
13 (sprintf_dom_walker::handle_gimple_call): Same.
14 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
15 (ipcp_vr_lattice::top_p): Same.
16 (ipcp_vr_lattice::bottom_p): Same.
17 (ipcp_vr_lattice::set_to_bottom): Same.
18 (ipa_vr_operation_and_type_effects): Same.
19 (propagate_vr_across_jump_function): Same.
20 (ipcp_store_vr_results): Same.
21 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
22 (ipa_print_node_jump_functions_for_edge): Same.
23 (ipa_get_value_range): Same.
24 (ipa_compute_jump_functions_for_edge): Same.
25 (ipa_write_jump_function): Same.
26 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
27 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
29 * vr-values.c (set_value_range_to_nonnegative): Same.
30 (set_value_range_to_truthvalue): Same.
31 (vr_values::get_value_range): Same.
32 (vr_values::set_defs_to_varying): Same.
33 (vr_values::update_value_range): Same.
34 (symbolic_range_based_on_p): Same.
35 (vr_values::op_with_boolean_value_range_p): Same.
36 (vr_values::extract_range_for_var_from_comparison_expr): Same.
37 (vr_values::extract_range_from_ssa_name): Same.
38 (vr_values::extract_range_from_binary_expr): Same.
39 (vr_values::extract_range_from_unary_expr): Same.
40 (vr_values::extract_range_from_cond_expr): Same.
41 (vr_values::extract_range_from_comparison): Same.
42 (vr_values::check_for_binary_op_overflow): Same.
43 (vr_values::extract_range_basic): Same.
44 (vr_values::extract_range_from_assignment): Same.
45 (compare_ranges): Same.
46 (compare_range_with_value): Same.
47 (vr_values::adjust_range_with_scev): Same.
49 (vrp_valueize_1): Same.
50 (vr_values::get_vr_for_comparison): Same.
51 (vr_values::compare_name_with_value): Same.
52 (vr_values::compare_names): Same.
53 (vr_values::vrp_evaluate_conditional): Same.
54 (find_case_label_ranges): Same.
55 (vr_values::vrp_visit_switch_stmt): Same.
56 (vr_values::extract_range_from_phi_node): Same.
57 (vr_values::simplify_div_or_mod_using_ranges): Same.
58 (vr_values::simplify_bit_ops_using_ranges): Same.
59 (test_for_singularity): Same.
60 (range_fits_type_p): Same.
61 (vr_values::simplify_cond_using_ranges_1): Same.
62 (vr_values::simplify_switch_using_ranges): Same.
63 (vr_values::simplify_float_conversion_using_ranges): Same.
64 (vr_values::two_valued_val_range_p): Same.
65 (vr_values::add_equivalence): Move to value_range::equiv_add.
66 * vr-values.h (vr_values::add_equivalence): Remove.
67 (VR_INITIALIZER): Remove.
68 * tree-vrp.c (value_range::set): New.
69 (value_range::equiv_add): New.
70 (value_range::value_range): New.
71 (value_range::deep_copy): New.
72 (value_range::check): New.
73 (value_range::equal_p): New.
74 (value_range::ignore_equivs_equal_p): New.
75 (value_range::operator==): New.
76 (value_range::operator!=): New.
77 (value_range::symbolic_p): New.
78 (value_range::numeric_p): New.
79 (value_range::set_undefined): New.
80 (value_range::set_varying): New.
81 (value_range::may_contain_p): New.
82 (value_range::equiv_clear): New.
83 (value_range::singleton_p): New.
84 (value_range::intersect): New.
85 (value_range::dump): New.
86 (value_range::set_and_canonicalize): New.
87 (set_value_range): Adjust for value_range API.
88 (set_value_range_to_undefined): Same.
89 (set_value_range_to_varying): Same.
90 (set_and_canonicalize_value_range): Same.
91 (set_value_range_to_nonnull): Same.
92 (set_value_range_to_null): Same.
93 (range_is_null): Same.
94 (range_is_nonnull): Same.
95 (range_int_cst_p): Same.
96 (range_int_cst_singleton_p): Same.
97 (symbolic_range_p): Same.
98 (range_includes_zero_p): Same.
99 (value_range_constant_singleton): Same.
100 (vrp_set_zero_nonzero_bits): Same.
101 (ranges_from_anti_range): Same.
102 (extract_range_into_wide_ints): Same.
103 (extract_range_from_multiplicative_op): Same.
104 (set_value_range_with_overflow): Same.
105 (extract_range_from_binary_expr_1): Same.
106 (extract_range_from_unary_expr): Same.
107 (dump_value_range): Same.
108 (debug_value_range): Same.
109 (vrp_prop::check_array_ref): Same.
110 (vrp_prop::check_mem_ref): Same.
111 (vrp_prop::vrp_initialize): Same.
112 (vrp_prop::visit_stmt): Same.
113 (intersect_ranges): Same.
114 (vrp_prop::visit_phi): Same.
115 (vrp_prop::vrp_finalize): Same.
116 (determine_value_range_1): Same.
117 (determine_value_range): Same.
118 (vrp_intersect_ranges_1): Rename to...
119 (vrp_intersect_1): this.
120 (vrp_intersect_ranges): Rename to...
121 (value_range::intersect_helper): ...this.
122 (vrp_meet_1): Rename to...
123 (value_range::union_helper): ...this.
124 (vrp_meet): Rename to...
125 (value_range::union_): ...this.
126 (copy_value_range): Remove.
127 * tree-vrp.h (struct value_range): Rewrite into a proper class.
128 (value_range::vrtype): New.
129 (value_range::type): New.
130 (value_range::equiv): New.
131 (value_range::min): New.
132 (value_range::max): New.
133 (value_range::varying_p): New.
134 (value_range::undefined_p): New.
135 (value_range::null_p): New.
136 (value_range::equiv_add): New.
137 (copy_value_range): Remove.
139 2018-10-17 David Malcolm <dmalcolm@redhat.com>
141 * Makefile.in (SELFTEST_TARGETS): New.
142 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
143 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
144 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
146 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
147 (selftest-c++-gdb, selftest-c++-valgrind): Move to
149 * configure: Regenerate.
150 * configure.ac (selftest_languages): New.
152 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
154 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
155 overflow wraps argument.
156 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
157 wide_int_range_multiplicative_op.
158 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
159 overflow wraps argument.
160 (wide_int_range_multiplicative_op): Same.
161 (wide_int_range_lshift): Same.
162 (wide_int_range_div): Same.
163 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
164 (wide_int_range_lshift): Same.
165 (wide_int_range_div): Same.
167 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
169 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
170 use sign as argument.
171 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
172 wide_int_range_shift_undefined_p.
174 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
176 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
178 (@despeculate_copy<ALLI_TI:mode>): ... This.
179 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
182 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
184 * config.gcc: Obsolete *-*-solaris2.10*.
185 * doc/install.texi (Specific, *-*-solaris2*): Document it.
187 2018-10-12 Jeff Law <law@redhat.com>
189 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
190 reg + sym +- const_int addressing modes.
192 2018-10-15 David Malcolm <dmalcolm@redhat.com>
194 * common.opt (fdiagnostics-minimum-margin-width=): New option.
195 * diagnostic-show-locus.c (layout::layout): Apply the minimum
197 (layout::start_annotation_line): Only print up to 3 of the
198 margin character, to avoid touching the left-hand side.
199 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
200 minimum margin width, as set by test_diagnostic_context's ctor.
201 (selftest::test_fixit_insert_containing_newline): Likewise.
202 (selftest::test_fixit_insert_containing_newline_2): Likewise.
203 (selftest::test_line_numbers_multiline_range): Clear
205 * diagnostic.c (diagnostic_initialize): Initialize
207 * diagnostic.h (struct diagnostic_context): Add field
209 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
210 * opts.c (common_handle_option): Handle
211 OPT_fdiagnostics_minimum_margin_width_.
212 * selftest-diagnostic.c
213 (selftest::test_diagnostic_context::test_diagnostic_context):
214 Initialize min_margin_width to 6.
215 * toplev.c (general_init): Initialize global_dc->min_margin_width.
217 2018-10-15 David Malcolm <dmalcolm@redhat.com>
219 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
220 Fix usage of "error_at_rich_loc" in the comment.
222 2018-10-15 Renlin Li <renlin.li@arm.com>
225 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
226 if-conversioned loop when it contains ifn with types not
227 supported by backend.
228 * internal-fn.c (expand_direct_optab_fn): Add an assert.
229 (direct_internal_fn_supported_p): New helper function.
230 * internal-fn.h (direct_internal_fn_supported_p): Declare.
232 2018-10-15 Jakub Jelinek <jakub@redhat.com>
235 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
236 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
237 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
239 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
241 PR tree-optimization/87022
242 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
243 bits in dist vector rather than the first one.
245 2018-10-15 Richard Biener <rguenther@suse.de>
248 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
249 (visit_loadstore): When a used restrict tag escaped verify that
250 the points-to solution of "other" pointers do not include
252 (compute_dependence_clique): If a used restrict tag escaped
253 communicated that down to visit_loadstore.
255 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
257 * config/s390/s390.c (s390_expand_vec_init): Force vector element
258 into reg if it isn't a general operand.
260 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
263 * config/i386/sse.md (*vec_dupv2di): Add register source to
266 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
269 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
270 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
271 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
272 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
274 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
276 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
277 (notice_args_size): Set it in the current trace if no insn that can
278 throw internally has been seen yet.
279 (connect_traces): When connecting args_size between traces, allow the
280 incoming values not to match if there is an insn setting it before the
281 first insn that can throw internally; in that case, force the creation
282 of a CFI note on this latter insn.
284 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
286 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
287 the base class, because using the injected-class-name was not clearly
288 specified until DR 176.
290 2018-10-12 Paul Koning <ni1d@arrl.net>
292 * config/pdp11/pdp11.md (doloop_end): New expander.
293 (doloop_end_insn): renamed from "doloop_end".
294 (addqi3): New pattern.
295 (subqi3): New pattern.
296 * config/pdp11/predicates.md (incdec_operand): New predicate.
298 2018-10-12 Yury Gribov <tetra2005@gmail.com>
301 * real.c (format_helper::can_represent_integral_type_p): New function
302 * real.h (format_helper::can_represent_integral_type_p): Ditto.
303 * match.pd: New pattern.
305 2018-10-12 Alexandre Oliva <oliva@adacore.com>
307 * configure.ac: Introduce --enable-large-address-aware
308 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
309 * doc/install.texi: Document it.
310 * configure, config.in: Rebuilt.
311 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
312 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
313 (LINK_SPEC): Insert it.
314 * config/i386/mingw-264.h: Likewise.
316 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
318 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
320 PR rtl-optimization/87600
321 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
323 2018-10-12 Paul Koning <ni1d@arrl.net>
325 * doc/md.texi (doloop_end): Document that the pattern code may
326 need to check operand mode.
328 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
330 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
331 to zero-extend between int and floating-point registers.
332 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
333 ldp into floating-point registers. Add type and arch attributes.
334 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
335 Use f_loads for type attribute.
337 2018-10-11 Martin Sebor <msebor@redhat.com>
339 * doc/extend.texi (attribute packed): Correct typos.
341 2018-10-11 Martin Sebor <msebor@redhat.com>
343 * doc/extend.texi (attribute flatten): Mention interaction with
346 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
349 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
350 Set new_decl virtual flag to zero.
352 2018-10-11 Martin Sebor <msebor@redhat.com>
355 * doc/extend.texi (attribute format_arg): Discuss using multiple
356 attributes on a single function.
358 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
360 PR tree-optimization/86829
361 * match.pd (sin (atan (x))): New simplification rules.
362 (cos (atan (x))): Likewise.
363 * real.c (build_sinatan_real): New function.
364 * real.h (build_sinatan_real): Prototype.
366 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
368 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
370 (fold_mergeeo_helper): New helper function.
371 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
372 intrinsics. Correct some whitespace indentation issues.
374 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
377 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
378 Use HOST_WIDE_INT_1U for shift.
380 2018-10-11 Doug Rupp <rupp@adacore.com>
381 Olivier Hainque <hainque@adacore.com>
383 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
384 Pass --relax to the linker for RTPs.
385 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
387 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
388 Jan Hubicka <jh@suse.cz>
389 Martin Jambor <mjambor@suse.cz>
391 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
392 the same elements are repeated rather than printing all of them.
393 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
395 * read-rtl-function.c (test_loading_repeat): New function.
396 (read_rtl_function_c_tests): Call test_loading_repeat.
397 * rtl-tests.c (test_dumping_repeat): New function.
398 (rtl_tests_c_tests): Call test_dumping_repeat.
400 2018-10-11 Richard Biener <rguenther@suse.de>
402 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
403 bdver?_cost): Unify to ...
404 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
405 * config/i386/i386.c (processor_cost_table): Adjust.
407 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
410 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
411 the thunk when expanding to GIMPLE.
413 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
415 * varasm.c (mergeable_string_section): Don't try to move zero-length
416 strings to the merge section.
418 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
421 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
423 2018-10-10 Jakub Jelinek <jakub@redhat.com>
426 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
429 2018-10-10 Richard Biener <rguenther@suse.de>
431 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
432 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
433 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
434 and recursing and pattern terminating the recursion on SSE
435 vector width using ix86_expand_reduc.
436 (reduc_sminmax_scal_<mode>): Split into part reducing to half
437 width and recursing and SSE2 vector variant doing the final
438 reduction with ix86_expand_reduc.
439 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
440 with terminating the recursion at AVX level, splitting that
443 2018-10-09 David Malcolm <dmalcolm@redhat.com>
445 * genmatch.c (error_cb): Rename to...
446 (diagnostic_cb): ...this, converting int params to enums.
447 (fatal_at): Update for renaming.
448 (warning_at): Likewise.
450 * input.c (selftest::ebcdic_execution_charset::apply):
451 Update for renaming of...
452 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
454 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
455 converting level and reason to enums.
456 (class selftest::lexer_error_sink): Rename to...
457 (class selftest::lexer_test_options): ...this, renaming field
458 "m_errors" to "m_diagnostics".
459 (selftest::lexer_test_options::apply): Update for renaming of...
460 (selftest::lexer_test_options::on_error): ...this, renaming to...
461 (selftest::lexer_test_options::on_diagnostic): ...this
462 converting level and reason to enums.
463 (selftest::test_lexer_string_locations_raw_string_unterminated):
464 Update for renamings.
465 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
468 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
470 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
471 * config/rs6000/pmmintrin.h: New file.
473 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
475 PR tree-optimization/86659
476 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
478 2018-10-09 Richard Biener <rguenther@suse.de>
480 PR tree-optimization/63155
481 * tree-ssa-structalias.c: Include tree-ssa.h.
482 (get_constraint_for_ssa_var): For undefs return nothing_id.
483 (find_func_aliases): Cleanup PHI handling.
485 2018-10-09 Richard Biener <rguenther@suse.de>
487 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
490 2018-10-09 Martin Liska <mliska@suse.cz>
492 * asan.c (asan_emit_stack_protection): If a stack variable
493 is located in a same file as current function, then emit
494 line info into variable definition string.
496 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
498 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
501 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
503 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
506 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
508 PR tree-optimization/86659
509 * gimple-match.h (struct gimple_match_op): Add reverse field.
510 (gimple_match_op::set_op): New overloaded method.
511 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
512 the REF_REVERSE_STORAGE_ORDER flag on the value.
513 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
514 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
516 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
519 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
520 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
522 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
525 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
526 Defined with __builtin_ia32_vfmaddsubpd512_mask.
528 2018-10-08 Richard Biener <rguenther@suse.de>
530 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
531 cost the same as AVX128 ones.
533 2018-10-08 Paul Koning <ni1d@arrl.net>
535 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
536 (expand_block_move): New function.
537 * config/pdp11/pdp11.c (output_block_move): Remove.
538 (expand_block_move): New function.
539 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
540 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
541 (*movmemhi1): Remove.
543 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
545 * config/s390/2827.md: Increase latencies for some FP instructions.
547 2018-10-08 Richard Biener <rguenther@suse.de>
549 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
551 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
552 * tree-vectorizer.h (dump_stmt_cost): Adjust.
553 (add_stmt_cost): Dump return value of the hook.
555 2018-10-08 Richard Biener <rguenther@suse.de>
557 PR tree-optimization/63155
558 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
559 (ssa_propagation_engine::ssa_propagate): Remove redundant
562 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
564 PR rtl-optimization/86939
565 PR rtl-optimization/87479
566 * ira.h (non_conflicting_reg_copy_p): New prototype.
567 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
568 (make_hard_regno_dead): Don't add conflicts for register
569 ignore_reg_for_conflicts.
570 (make_object_dead): Likewise.
571 (non_conflicting_reg_copy_p): New function.
572 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
573 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
574 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
575 (make_hard_regno_dead): Don't add conflicts for register
576 ignore_reg_for_conflicts. Remove special conflict handling of
577 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
578 check_pic_pseudo_p and update callers.
579 (mark_pseudo_dead): Don't add conflicts for register
580 ignore_reg_for_conflicts.
581 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
583 2018-10-05 Andrew Waterman <andrew@sifive.com>
584 Jim Wilson <jimw@sifive.com>
586 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
587 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
588 new pattern using HONOR_SNANS that emits one extra instruction.
590 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
592 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
593 patterns): Merge SI and DI patterns to a GPR pattern.
594 (unnamed define_insn and define_split for record form of that): Merge
595 to a single define_insn_and_split pattern.
597 2018-10-05 David Malcolm <dmalcolm@redhat.com>
600 * input.c (expand_location_to_spelling_point): Add param "aspect"
601 and use rather than hardcoding LOCATION_ASPECT_CARET.
602 (get_substring_ranges_for_loc): Handle the case of a single token
603 within a macro expansion.
604 * input.h (expand_location_to_spelling_point): Add "aspect" param,
605 defaulting to LOCATION_ASPECT_CARET.
607 2018-10-05 Paul Koning <ni1d@arrl.net>
609 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
610 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
611 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
612 (pdp11_guard_type): New function.
614 2018-10-05 Paul Koning <ni1d@arrl.net>
616 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
617 * config/pdp11/pdp11.opt (mfloat32): Remove.
619 * doc/invoke.texi (pdp11 -mfloat32): Remove:
620 (pdp11 -mfloat64): Remove.
622 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
624 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
625 (*cmp<mode>_cc_i387): Ditto.
626 (*cmpu<mode>_cc_i387): Ditto.
627 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
628 * config/i386/i386.c (ix86_expand_fp_compare): Remove
630 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
631 Emit x86_sahf_1 pattern.
632 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
633 (ix86_expand_carry_flag_compare): Ditto.
635 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
637 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
638 to reg_or_0_operand. Add "C" constraint.
639 (*cmpxf_cc_i387): Ditto.
640 (*cmp<mode>_i387): Change operand 2 predicate
641 to nonimm_or_0_operand. Add "C" constraint.
642 (*cmp<mode>_cc_i387): Ditto.
643 (*cmp<mode>_0_i387): Remove insn pattern.
644 (*cmp<mode>_0_cc_i387): Ditto.
646 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
648 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
649 * config/i386/predicates.md (nonimm_or_0_operand): Rename
650 from vector_move_operand. Update all uses.
652 2018-10-05 Martin Sebor <msebor@redhat.com>
654 PR tree-optimization/87490
655 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
658 2018-10-05 Richard Biener <rguenther@suse.de>
660 PR tree-optimization/63155
661 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
662 vertical space in dumpfiles.
663 * tree-ssa-propagate.h
664 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
665 * tree-ssa-propagate.c (cfg_blocks_back): New global.
666 (ssa_edge_worklist_back): Likewise.
667 (curr_order): Likewise.
668 (cfg_blocks_get): Remove abstraction.
669 (cfg_blocks_add): Likewise.
670 (cfg_blocks_empty_p): Likewise.
671 (add_ssa_edge): Add to current or next worklist based on
673 (add_control_edge): Likewise.
674 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
676 (ssa_propagation_engine::ssa_propagate): ... here. Unify
677 iteration from CFG and SSA edge worklist so we process
678 everything in RPO order, prioritizing forward progress
680 (ssa_prop_init): Allocate new worklists, do not dump
682 (ssa_prop_fini): Free new worklists.
684 2018-10-05 Richard Biener <rguenther@suse.de>
686 * tree-core.h (tree_block::abstract_flag): Remove.
687 (tree_block::block_num): Make full 32bits.
688 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
689 * tree.h (BLOCK_ABSTRACT): Remove.
690 * dwarf2out.c (gen_lexical_block_die): Remove dead code
691 resulting from BLOCK_ABSTRACT being always false.
692 (gen_inlined_subroutine_die): Likewise.
693 (gen_block_die): Likewise.
694 * tree.c (block_ultimate_origin): Likewise.
695 * tree-pretty-print.c (dump_block_node): Remove code dealing
697 * tree-ssa-live.c (dump_scope_block): Likewise.
698 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
699 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
701 2018-10-05 Richard Biener <rguenther@suse.de>
703 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
704 is asked for initialize mode to the component mode of the
707 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
710 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
712 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
714 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
717 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
719 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
720 to be DImode. When using mffscrn, force the operand to a register.
722 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
724 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
725 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
726 X87MODEF mode iterator.
727 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
728 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
729 X87MODEF mode iterator.
731 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
733 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
736 2018-10-04 David Malcolm <dmalcolm@redhat.com>
738 * Makefile.in (OBJS): Add opt-problem.o.
739 * dump-context.h: Include "selftest.h.
740 (selftest::temp_dump_context): New forward decl.
741 (class dump_context): Make friend of class
742 selftest::temp_dump_context.
743 (dump_context::dump_loc_immediate): New decl.
744 (class dump_pretty_printer): Move here from dumpfile.c.
745 (class temp_dump_context): Move to namespace selftest.
746 (temp_dump_context::temp_dump_context): Add param
747 "forcibly_enable_dumping".
748 (selftest::verify_dumped_text):
749 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
750 (selftest::verify_item):
751 (ASSERT_IS_TEXT): Move here from dumpfile.c.
752 (ASSERT_IS_TREE): Likewise.
753 (ASSERT_IS_GIMPLE): Likewise.
754 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
756 (dump_context::dump_loc_immediate): ...this new function.
757 (class dump_pretty_printer): Move to dump-context.h.
758 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
759 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
760 (temp_dump_context::temp_dump_context): Move to "selftest"
761 namespace. Add param "forcibly_enable_dumping", and use it to
762 conditionalize the use of m_pp;
763 (selftest::verify_dumped_text): Make non-static.
764 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
765 (selftest::verify_item): Make non-static.
766 (ASSERT_IS_TEXT): Move to dump-context.h.
767 (ASSERT_IS_TREE): Likewise.
768 (ASSERT_IS_GIMPLE): Likewise.
769 (selftest::test_capture_of_dump_calls): Pass "true" for new
770 param of temp_dump_context.
771 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
772 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
774 * opt-problem.cc: New file.
775 * opt-problem.h: New file.
776 * optinfo-emit-json.cc
777 (selftest::test_building_json_from_dump_calls): Pass "true" for
778 new param of temp_dump_context.
779 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
780 (optinfo::emit_for_opt_problem): New function.
781 (optinfo::emit): Clarity which emit_item is used.
782 * optinfo.h (optinfo::get_dump_location): New accessor.
783 (optinfo::emit_for_opt_problem): New decl.
784 (optinfo::emit): Make const.
785 * selftest-run-tests.c (selftest::run_tests): Call
786 selftest::opt_problem_cc_tests.
787 * selftest.h (selftest::opt_problem_cc_tests): New decl.
788 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
789 bool to opt_result, converting fprintf messages to
790 opt_result::failure_at calls. Add "stmt" param for use by the
792 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
793 (runtime_alias_check_p): Convert return type from bool to
794 opt_result, converting dump_printf calls to
795 opt_result::failure_at, using the statement DDR_A for their
797 (find_data_references_in_stmt): Convert return type from bool to
798 opt_result, converting "return false" to opt_result::failure_at
800 * tree-data-ref.h: Include "opt-problem.h".
801 (dr_analyze_innermost): Convert return type from bool to opt_result,
802 and add a const gimple * param.
803 (find_data_references_in_stmt): Convert return type from bool to
805 (runtime_alias_check_p): Likewise.
806 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
807 dr_analyze_innermost.
808 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
809 Convert return type from bool to opt_result, adding a message for
810 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
811 (vect_analyze_data_ref_dependence): Convert return type from bool
812 to opt_result. Change sense of return type from "false"
813 effectively meaning "no problems" to "false" meaning a problem,
814 so that "return false" becomes "return opt_result::success".
815 Convert "return true" calls to opt_result::failure_at, using
816 the location of statement A rather than vect_location.
817 (vect_analyze_data_ref_dependences): Convert return type from bool
819 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
820 calls to opt_result::failure_at, using the stmt location rather
822 (vect_verify_datarefs_alignment): Convert return type from bool
824 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
825 into multiple more-tightly-scoped copies.
826 (vect_analyze_data_refs_alignment): Convert return type from bool
828 (vect_analyze_data_ref_accesses): Likewise, converting a
829 "return false" to a "return opt_result::failure_at", adding a
831 (vect_prune_runtime_alias_test_list): Convert return type from
832 bool to opt_result, converting dump_printf_loc to
833 opt_result::failure_at. Add a %G to show the pertinent statement,
834 and use the stmt's location rather than vect_location.
835 (vect_find_stmt_data_reference): Convert return type from
836 bool to opt_result, converting dump_printf_loc to
837 opt_result::failure_at, using stmt's location.
838 (vect_analyze_data_refs): Convert return type from bool to
839 opt_result. Convert "return false" to "return
840 opt_result::failure_at", adding messages as needed.
841 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
842 type from bool to opt_result.
843 (vect_determine_vf_for_stmt): Likewise.
844 (vect_determine_vectorization_factor): Likewise, converting
845 dump_printf_loc to opt_result::failure_at, using location of phi
846 rather than vect_location.
847 (vect_analyze_loop_form_1): Convert return type from bool to
848 opt_result, converting dump_printf_loc calls, retaining the use of
850 (vect_analyze_loop_form): Convert return type from loop_vec_info
851 to opt_loop_vec_info.
852 (vect_analyze_loop_operations): Convert return type from bool to
853 opt_result, converting dump_printf_loc calls, using the location
854 of phi/stmt rather than vect_location where available. Convert
855 various "return false" to "return opt_result::failure_at" with
856 "unsupported phi" messages.
857 (vect_get_datarefs_in_loop): Convert return type from bool to
858 opt_result. Add a message for the
859 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
860 (vect_analyze_loop_2): Convert return type from bool to
861 opt_result. Ensure "ok" is set to a opt_result::failure_at before
862 each "goto again;", adding new messages where needed.
863 Add "unsupported grouped {store|load}" messages.
864 (vect_analyze_loop): Convert return type from loop_vec_info to
866 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
868 * tree-vect-stmts.c (process_use): Likewise, converting
869 dump_printf_loc call and using stmt location, rather than
871 (vect_mark_stmts_to_be_vectorized): Likeise.
872 (vect_analyze_stmt): Likewise, adding a %G.
873 (vect_get_vector_types_for_stmt): Convert return type from bool to
874 opt_result, converting dump_printf_loc calls and using stmt
875 location, rather than vect_location.
876 (vect_get_mask_type_for_stmt): Convert return type from tree to
877 opt_tree, converting dump_printf_loc calls and using stmt location.
878 * tree-vectorizer.c: Include "opt-problem.h.
879 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
880 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
881 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
882 enabled, use it to report at the top level "couldn't vectorize
883 loop" followed by the problem.
884 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
885 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
887 (vect_analyze_stmt): Likewise.
888 (vect_get_vector_types_for_stmt): Likewise.
889 (tree vect_get_mask_type_for_stmt): Likewise.
890 (vect_analyze_data_ref_dependences): Likewise.
891 (vect_enhance_data_refs_alignment): Likewise.
892 (vect_analyze_data_refs_alignment): Likewise.
893 (vect_verify_datarefs_alignment): Likewise.
894 (vect_analyze_data_ref_accesses): Likewise.
895 (vect_prune_runtime_alias_test_list): Likewise.
896 (vect_find_stmt_data_reference): Likewise.
897 (vect_analyze_data_refs): Likewise.
898 (vect_analyze_loop): Convert return type from loop_vec_info to
900 (vect_analyze_loop_form): Likewise.
901 (vect_analyze_slp): Convert return type from bool to opt_result.
903 2018-10-04 David Malcolm <dmalcolm@redhat.com>
905 * doc/invoke.texi (-fopt-info): Document new "internals"
907 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
908 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
910 (optinfo_verbosity_options): Add "internals".
911 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
912 (dump_context::apply_dump_filter_p): New member function.
913 (dump_context::dump_loc): Use apply_dump_filter_p rather than
914 explicitly masking the dump_kind.
915 (dump_context::begin_scope): Increment the scope depth first. Use
916 apply_dump_filter_p rather than explicitly masking the dump_kind.
917 (dump_context::emit_item): Use apply_dump_filter_p rather than
918 explicitly masking the dump_kind.
919 (dump_dec): Likewise.
920 (dump_hex): Likewise.
921 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
922 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
923 (opt_info_switch_p): Update handling of default
924 MSG_OPTIMIZED_LOCATIONS to cope with default of
925 MSG_PRIORITY_USER_FACING.
926 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
927 masking the dump_kind.
928 (selftest::test_capture_of_dump_calls): Update test_dump_context
929 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
930 than MSG_ALL. Generalize scope test to be run at all four
931 combinations of with/without MSG_PRIORITY_USER_FACING and
932 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
933 for each of the two values.
934 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
935 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
936 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
937 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
938 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
940 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
941 dump messages as MSG_PRIORITY_USER_FACING.
942 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
943 about the interaction with MSG_PRIORITY_*.
945 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
947 * varasm.c (output_constant): Add new parameter merge_strings.
948 Make strings properly zero terminated in merge string sections.
949 (mergeable_string_section): Don't fail if the last char is non-zero.
950 (assemble_variable_contents): Handle merge string sections.
951 (assemble_variable): Likewise.
952 (assemble_constant_contents): Likewise.
953 (output_constant_def_contents): Likewise.
954 (output_constructor_array_range,
955 output_constructor_regular_field): Adjust call to output_constant.
956 (output_object_block): Adjust call to assemble_constant_contents
957 and assemble_variable_contents.
959 2018-10-04 Martin Liska <mliska@suse.cz>
962 * cgraphunit.c (process_function_and_variable_attributes):
963 Warn about a function with alias attribute and a body.
965 2018-10-04 Martin Liska <mliska@suse.cz>
968 * multiple_target.c (redirect_to_specific_clone): New function.
969 (ipa_target_clone): Use it.
970 * tree-inline.c: Fix comment.
972 2018-10-04 David Malcolm <dmalcolm@redhat.com>
974 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
976 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
977 (gcc::dump_manager::register_pass): New member function, adapted
978 from loop body in gcc::pass_manager::register_pass, adding a
979 call to update_dfi_for_opt_info.
980 (gcc::dump_manager::opt_info_enable_passes): Store the
981 -fopt-info options into the new fields. Move the loop
983 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
985 * dumpfile.h (struct opt_pass): New forward decl.
986 (gcc::dump_manager::register_pass): New decl.
987 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
988 (class gcc::dump_manager): Add fields "m_optgroup_flags",
989 "m_optinfo_flags", and "m_optinfo_filename".
990 * passes.c (gcc::pass_manager::register_pass): Move all of the
991 dump-handling code to gcc::dump_manager::register_pass.
993 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
995 PR rtl-optimization/87466
996 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
997 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
998 * doc/tm.texi: Regenerate.
999 * ira-lives.c (process_bb_node_lives): Use the new target hook.
1000 * lra-lives.c (process_bb_lives): Likewise.
1001 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1004 2018-10-04 Tamar Christina <tamar.christina@arm.com>
1006 * params.c (add_params): Fix initialization.
1008 2018-10-04 Martin Liska <mliska@suse.cz>
1010 PR gcov-profile/84107
1011 * tree-profile.c (init_ic_make_global_vars):
1012 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1013 Come up with new ic_tuple* variables. Emit
1014 __gcov_indirect_call{,_topn} variables.
1015 (gimple_gen_ic_profiler): Access the variable
1017 (gimple_gen_ic_func_profiler): Access
1018 __gcov_indirect_call.callee field.
1019 (gimple_init_gcov_profiler): Use ptr_type_node.
1020 * value-prof.c (gimple_ic): Use ptr_type_node.
1022 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1024 PR tree-optimization/85787
1025 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1026 into this function and add support for detecting multiple phis.
1027 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1029 2018-10-04 Martin Liska <mliska@suse.cz>
1032 * ipa-inline.c (inline_to_all_callers_1):
1033 Call ultimate_alias_target for node being inlined.
1035 2018-10-03 Jeff Law <law@redhat.com>
1037 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1039 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1040 * tree.h (get_typenode_from_name): Prototype.
1042 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
1044 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1045 Change operand 2 predicate to nonimmediate_operand.
1046 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1048 2018-10-03 Martin Sebor <msebor@redhat.com>
1049 Jeff Law <law@redhat.com>
1051 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1053 (get_string_length): Detect unterminated arrays.
1054 (format_string): Same.
1055 (format_directive): Warn about unterminated arrays.
1056 (handle_gimple_call): Mark statements with no_warning as needed.
1058 2018-10-03 Jim Wilson <jimw@sifive.com>
1060 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1061 also define __riscv_abi_rve. Delete trailing white space.
1063 2018-10-03 Paul Koning <ni1d@arrl.net>
1065 Enable LRA register allocator for PDP11.
1066 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1069 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1070 * config/pdp11/pdp11.opt (-mlra): New option.
1071 * doc/invoke.texi (PDP-11 Options): Document -mlra.
1073 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
1075 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1076 (*<absneg:code>extend<mode>xf2): Ditto.
1078 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
1080 PR tree-optimization/87415
1081 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1084 2018-10-02 Jeff Law <law@redhat.com>
1086 * gimple-fold.c (get_range_strlen): Only set *nonstr when
1087 an unterminated string is discovered. Bubble up range
1088 even for unterminated strings.
1089 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1090 indicates the string was not terminated via NONSTR.
1092 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
1094 * tree-vrp.c (extract_range_from_unary_expr): Special case all
1095 pointer conversions.
1096 Do not do anything special for anti-ranges.
1098 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
1100 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1101 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1103 2018-10-03 Martin Liska <mliska@suse.cz>
1105 PR gcov-profile/86109
1106 * coverage.c (coverage_begin_function): Do not
1107 mark lambdas as artificial.
1108 * tree-core.h (struct GTY): Remove tm_clone_flag
1109 and introduce new lambda_function.
1110 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1112 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1115 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1116 P8_VECTOR and VSX are enabled.
1118 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
1120 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1121 0x3907 as CPU model number.
1123 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
1125 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1126 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1127 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1128 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1129 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1130 * config/s390/s390.md: Likewise. Rename also the cpu attribute
1131 value from arch12 to z14.
1133 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
1135 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1137 (isinf<mode>2): Ditto.
1139 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
1141 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1142 before emitting fxam. Perform calculations in XFmode.
1144 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
1146 * match.pd (((X /[ex] A) +- B) * A): New transformation.
1148 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
1151 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1152 * tree.c (signed_or_unsigned_type_for): Handle complex.
1154 2018-10-02 Jeff Law <law@redhat.com>
1156 * gimple-fold.c (get_range_strlen): Remove dead code.
1158 2018-10-02 Martin Sebor <msebor@redhat.com>
1159 Jeff Law <law@redhat.com>
1161 * builtins.c (unterminated_array): Add new arguments.
1162 If argument is not terminated, bubble up size and exact
1164 (expand_builtin_strnlen): Detect, avoid expanding
1165 and diagnose unterminated arrays.
1166 (c_strlen): Fill in offset of start of unterminated strings.
1167 * builtins.h (unterminated_array): Update prototype.
1169 2018-10-02 Richard Biener <rguenther@suse.de>
1171 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1172 of haddv4df, first reduce to SSE width and exploit the fact
1173 that we only need element zero with the reduction result.
1174 (reduc_plus_scal_v2df): Likewise.
1176 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1178 * dojump.h (do_jump): Delete.
1179 (do_jump_1): Likewise.
1180 (split_comparison): Move around.
1181 * dojump.c (do_jump): Make static.
1182 (do_jump_1): Likewise.
1183 (jumpifnot): Move around.
1184 (jumpifnot_1): Likewise.
1186 (jumpif_1): Likewise.
1187 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1189 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1191 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1192 insns in the delay slot and add_insn_after for the jump insn.
1194 2018-10-02 Richard Biener <rguenther@suse.de>
1196 * tree-inline.c (expand_call_inline): Use the location of
1197 the callee declaration for the inline-entry marker.
1198 * final.c (notice_source_line): Remove special-casing of
1199 NOTE_INSN_INLINE_ENTRY.
1201 2018-10-01 Carl Love <cel@us.ibm.com>
1204 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1205 (__builtin_mtfsb0): New.
1206 (__builtin_mtfsb1): New.
1207 ( __builtin_set_fpscr_rn): New.
1208 (__builtin_set_fpscr_drn): New.
1209 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1210 (rs6000_expand_set_fpscr_rn_builtin): Add.
1211 (rs6000_expand_set_fpscr_drn_builtin): Add.
1212 (rs6000_expand_builtin): Add case statement entries for
1213 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1214 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1215 RS6000_BUILTIN_MFFSL.
1216 (rs6000_init_builtins): Add ftype initialization and def_builtin
1217 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1218 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1219 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1220 rs6000_mffscdrn): Add define_insn.
1221 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1222 * doc/extend.texi: Add documentation for the builtins.
1224 2018-10-01 Richard Biener <rguenther@suse.de>
1226 PR tree-optimization/87465
1227 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1228 causing branch miscounts.
1230 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1232 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1233 aarch64_option_default_param): New.
1234 (params.h): Include.
1235 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1236 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1237 stack-clash protection validation code.
1239 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1241 * params.c (validate_param): New.
1242 (add_params): Use it.
1243 (set_param_value): Refactor param validation into validate_param.
1244 (diagnostic.h): Include.
1245 * diagnostic.h (diagnostic_ready_p): New.
1247 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1249 * params.c (set_param_value):
1250 Add index of parameter being validated.
1251 * common/common-target.def (option_validate_param): New.
1252 * common/common-targhooks.h (default_option_validate_param): New.
1253 * common/common-targhooks.c (default_option_validate_param): New.
1254 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1255 * doc/tm.texi: Regenerate.
1257 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1260 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1261 Add validation for stack-clash parameters and set defaults.
1263 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1266 * configure.ac: Add stack-clash-protection-guard-size.
1267 * doc/install.texi: Document it.
1268 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1269 * params.def: Update comment for guard-size.
1270 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1271 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1272 * configure: Regenerate.
1274 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1277 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1278 STACK_DYNAMIC_OFFSET): New.
1279 * config/aarch64/aarch64.c (aarch64_layout_frame):
1280 Update outgoing args size.
1281 (aarch64_stack_clash_protection_alloca_probe_range,
1282 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1284 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1287 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1289 * target.def (stack_clash_protection_alloca_probe_range): New.
1290 (stack_clash_protection_final_dynamic_probe): Remove.
1291 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1292 (default_stack_clash_protection_final_dynamic_probe): Remove.
1293 * targhooks.c: Likewise.
1294 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1295 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1296 * doc/tm.texi: Regenerate.
1298 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1301 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1302 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1303 aarch64_clamp_to_uimm12_shift): New.
1304 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1305 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1307 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1310 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1312 2018-10-01 Jeff Law <law@redhat.com>
1313 Richard Sandiford <richard.sandiford@linaro.org>
1314 Tamar Christina <tamar.christina@arm.com>
1317 * config/aarch64/aarch64.md
1318 (probe_stack_range): Add k (SP) constraint.
1319 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1320 STACK_CLASH_MAX_UNROLL_PAGES): New.
1321 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1322 stack probes for stack clash.
1323 (aarch64_allocate_and_probe_stack_space): New.
1324 (aarch64_expand_prologue): Use it.
1325 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1326 (aarch64_sub_sp): Add emit_move_imm optional param.
1328 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
1330 PR tree-optimization/87261
1331 * match.pd: Remove trailing whitespace.
1332 Add (x & y) | ~(x | y) -> ~(x ^ y),
1333 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1335 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1337 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1339 (ashlsi3_insn): Update instruction constraints.
1340 (ashrsi3_insn): Likewise.
1341 (rotrsi3): Likewise.
1342 (add_shift): Likewise.
1343 * config/arc/constraints.md (Csz): New 32 bit constraint. It
1344 avoids placing in the limm field small constants which, otherwise,
1345 could end into a small instruction.
1347 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1349 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1350 destination register is not odd-even.
1351 (umaddsidi4_split): Likewise.
1353 2018-10-01 Richard Biener <rguenther@suse.de>
1355 * tree-inline.c (expand_call_inline): Store origin of fn
1356 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1357 * tree.c (block_ultimate_origin): Simplify and do some
1360 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1362 * config/i386/mmx.md (EMMS): New int iterator.
1363 (emms): New int attribute.
1364 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1365 EMMS int iterator. Explicitly declare clobbers.
1366 (mmx_emms): Remove expander.
1368 * config/i386/predicates.md (emms_operation): Remove predicate.
1369 (vzeroall_pattern): New predicate.
1370 (vzeroupper_pattern): Rename from vzeroupper_operation.
1371 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1372 vzeroupper_pattern and vzeroall_pattern predicates.
1374 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1376 PR rtl-optimization/86939
1377 * ira-lives.c (make_hard_regno_born): Rename from this...
1378 (make_hard_regno_live): ... to this. Remove update to conflict
1379 information. Update function comment.
1380 (make_hard_regno_dead): Add conflict information update. Update
1382 (make_object_born): Rename from this...
1383 (make_object_live): ... to this. Remove update to conflict information.
1384 Update function comment.
1385 (make_object_dead): Add conflict information update. Update function
1387 (mark_pseudo_regno_live): Call make_object_live.
1388 (mark_pseudo_regno_subword_live): Likewise.
1389 (mark_hard_reg_dead): Update function comment.
1390 (mark_hard_reg_live): Call make_hard_regno_live.
1391 (process_bb_node_lives): Likewise.
1392 * lra-lives.c (make_hard_regno_born): Rename from this...
1393 (make_hard_regno_live): ... to this. Remove update to conflict
1394 information. Remove now uneeded check_pic_pseudo_p argument.
1395 Update function comment.
1396 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1397 to conflict information. Update function comment.
1398 (mark_pseudo_live): Remove update to conflict information. Update
1400 (mark_pseudo_dead): Add conflict information update.
1401 (mark_regno_live): Call make_hard_regno_live.
1402 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1403 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1405 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1408 * config/i386/i386.c (construct_container): Use TImode for
1409 BLKmode values in 2 integer registers.
1411 2018-09-29 Jeff Law <law@redhat.com>
1413 * builtins.c (unterminated_array): Pass in c_strlen_data * to
1414 c_strlen rather than just a tree *.
1415 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1416 Update recursive calls appropriately. If caller did not provide a
1417 suitable data pointer, create a local one. When a non-terminated
1418 string is discovered, bubble up information about the string via the
1419 c_strlen_data object.
1420 * builtins.h (c_strlen): Update prototype.
1421 (c_strlen_data): New structure.
1422 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1423 For a type 2 call, if c_strlen indicates a non-terminated string
1424 use the length of the non-terminated string.
1425 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1427 2018-09-29 Jakub Jelinek <jakub@redhat.com>
1430 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1431 __m512d type for __A argument rather than __m512.
1433 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
1435 * match.pd (simple_comparison): Don't optimize if either operand is
1436 a function pointer when target needs function pointer canonicalization.
1438 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1440 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1441 power5 .. power9 to remove indirection.
1442 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1443 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1444 ASM_CPU_476_SPEC): Delete.
1445 (ASM_CPU_SPEC): Adjust.
1446 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1447 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1449 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1451 * config.in: Delete HAVE_AS_DCI.
1452 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1453 * config/rs6000/rs6000.h: Ditto.
1454 * configure.ac: Delete HAVE_AS_DCI.
1455 * configure: Regenerate.
1457 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1459 * config.in (HAVE_AS_LWSYNC): Delete.
1460 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1461 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1463 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1464 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1466 * configure.ac: Delete HAVE_AS_LWSYNC.
1467 * configure: Regenerate.
1469 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1470 Pierre-Marie de Rodat <derodat@adacore.com>
1472 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1473 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1474 (cgraph_node::create_thunk): Add indirect_offset parameter.
1475 (thunk_adjust): Likewise.
1476 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1477 and initialize the corresponding field with it.
1478 (cgraph_node::dump): Dump indirect_offset field.
1479 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1480 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1481 (thunk_adjust): Add indirect_offset parameter and deal with it.
1482 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1483 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1484 or if the thunk is external or local. Fix formatting. Do not chain
1485 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1486 if any, in the GIMPLE representation.
1487 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1488 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1489 (input_node): Read indirect_offset field.
1490 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1491 call to thunk_adjust.
1492 * tree-nested.c (struct nesting_info): Add thunk_p field.
1493 (create_nesting_tree): Set it.
1494 (convert_all_function_calls): Copy static chain from targets to thunks.
1495 (finalize_nesting_tree_1): Return early for thunks.
1496 (unnest_nesting_tree_1): Do not finalize thunks.
1497 (gimplify_all_functions): Do not gimplify thunks.
1499 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1501 * opt-suggestions.c (option_proposer::build_option_suggestions):
1502 Release "option_values".
1504 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1506 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1507 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1508 * dumpfile.c (kind_as_string): New function.
1509 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1510 kind_as_string to vary the prefix based on dump_kind.
1511 (selftest::test_capture_of_dump_calls): Update for above.
1513 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1515 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1516 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1518 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1520 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1521 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1522 INVALID_REGNUM instead of FPSR_REG.
1523 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1524 * config/i386/i386.md: Update comment of FP compares.
1525 (fldenv): Do not clobber FPSR_REG.
1527 2018-09-28 Richard Biener <rguenther@suse.de>
1529 * tree.h (BLOCK_ORIGIN): New.
1530 * omp-expand.c (grid_expand_target_grid_body): Assign
1531 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1532 * tree-inline.c (remap_block): Likewise.
1533 * auto-profile.c (get_function_decl_from_block): Simplify
1534 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1535 * langhooks.c (lhd_print_error_function): Likewise.
1536 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1538 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1539 * tree.c (block_nonartificial_location): Likewise.
1540 (block_ultimate_origin): Likewise.
1541 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1542 no longer needed LTO case.
1544 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1545 Jan Hubicka <jh@suse.cz>
1546 Martin Jambor <mjambor@suse.cz>
1548 * simplify-rtx.c (simplify_merge_mask): New function.
1549 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1550 same masks are used in op1 or op2.
1551 (test_vec_merge): New function.
1552 (test_vector_ops): Call test_vec_merge.
1554 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1556 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1557 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1558 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1559 (cypress_costs): Set it.
1560 (supersparc_costs): Likewise.
1561 (hypersparc_costs): Likewise.
1562 (leon_cost): Likewise.
1563 (leon3_costs): Likewise.
1564 (sparclet_costs): Likewise.
1565 (ultrasparc_costs): Likewise.
1566 (ultrasparc_costs): Likewise.
1567 (niagara_costs): Likewise.
1568 (niagara2_costs): Likewise.
1569 (niagara3_costs): Likewise.
1570 (niagara4_costs): Likewise.
1571 (niagara7_costs): Likewise.
1572 (m8_costs): Likewise.
1573 (TARGET_CAN_FOLLOW_JUMP): Define.
1574 (pass_work_around_errata::gate): Minor tweak.
1575 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1576 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1577 Automaitcally clear MASK_FSMULD mask for V7 processors.
1578 (sparc_can_follow_jump): New static function.
1579 (output_ubranch): Deal with CROSSING_JUMP_P.
1580 (sparc_use_sched_lookahead): Rewrite using switch statement.
1581 (sparc_issue_rate): Reorder.
1582 (sparc_branch_cost): New function.
1584 2018-09-27 Martin Sebor <msebor@redhat.com>
1586 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1587 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1588 (int_fits_type_p): Same.
1590 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1592 * config/i386/i386.md (FPCR_REG): Remove.
1593 (UNSPEC_FLDCW): Remove.
1594 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1595 (x86_fldcw_1): Remove insn pattern.
1596 (fnstenv): Do not clobber FPCR_REG.
1598 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1599 (CALL_USED_REGISTERS): Ditto.
1600 (REG_ALLOC_ORDER): Ditto.
1601 (REG_CLASS_CONTENTS): Ditto.
1602 (HI_REGISTER_NAMES): Ditto.
1603 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1604 of numerical constants.
1605 * config/i386/i386.c (regclass_map): Remove fpsr register.
1606 (dbx_register_map): Ditto.
1607 (dbx64_register_map): Ditto.
1608 (svr4_dbx_register_map): Ditto.
1609 (print_reg): Do not handle FPCR_REG.
1611 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1614 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1615 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1616 Delete, always treat as true.
1617 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1618 Ditto. Simplify remaining code.
1619 * config/powerpcspe/powerpcspe.h: Ditto.
1620 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1621 Simplify remaining code.
1622 (rs6000_expand_builtin): Ditto.
1623 * config/rs6000/rs6000.h: Ditto.
1624 * configure.ac: Ditto.
1625 * configure: Regenerate.
1627 2018-09-27 Martin Liska <mliska@suse.cz>
1629 * coverage.c (get_coverage_counts): Revert the formatting
1630 of missing profile opt info.
1632 2018-09-27 Richard Biener <rguenther@suse.de>
1636 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1637 block as we do not output that.
1638 (gen_inlined_subroutine_die): Elide the originally outermost
1639 block, matching what we do for concrete instances.
1640 (decls_for_scope): Add parameter specifying whether to recurse
1643 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1644 Tom de Vries <tom@codesourcery.com>
1648 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1649 STORE_FLAG_VALUE == 1.
1651 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1653 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1654 constant definitions.
1655 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1656 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1657 ("speculation_barrier"): New expander definition.
1659 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1661 PR gcov-profile/86957
1662 * common.opt: New warning option -Wmissing-profile.
1663 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1664 * doc/invoke.texi: Document -Wmissing-profile.
1666 2018-09-26 Jim Wilson <jimw@sifive.com>
1668 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1669 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1671 2018-09-26 Martin Sebor <msebor@redhat.com>
1673 * tree.c (zerop): Change return type to bool.
1674 (integer_zerop, integer_onep, integer_each_onep): Same.
1675 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1676 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1677 (real_onep, real_minus_onep, chain_index): Same.
1678 (print_type_hash_statistics, type_list_equal): Same.
1679 * tree.h (zerop): Same.
1680 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1681 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1682 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1683 (real_onep, real_minus_onep, chain_index): Same.
1684 (print_type_hash_statistics, type_list_equal): Same.
1686 2018-09-26 Jim Wilson <jimw@sifive.com>
1688 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1690 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1693 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1694 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1697 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1699 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1701 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1703 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1704 and FP_SECOND_SSE_REGS.
1705 (REG_CLASS_NAMES): Ditto.
1706 (REG_CLASS_CONTENTS): Ditto.
1707 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1708 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1709 (ix86_preferred_output_reload_class): Ditto.
1710 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1711 clobber constraint to "=&f".
1712 (fix_truncdi_i387): Ditto.
1713 (lrintxfdi2): Ditto.
1714 (fistdi2_<rounding>): Ditto.
1715 (fpremxf4_i387): Change "=u" constraint to "=f".
1716 (fprem1xf4_i387): Ditto.
1718 (fptanxf4_i387): Ditto.
1719 (fxtractxf3_i387): Ditto.
1720 (fscalexf4_i387): Ditto.
1721 (atan2xf3): Change "u" constraint to "f".
1722 (fyl2xxf3_i387): Ditto.
1723 (fyl2xp1xf3_i387): Ditto.
1725 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1728 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1729 for removed I387_MASK_PM entity.
1732 2018-09-26 Jeff Law <law@redhat.com>
1734 2018-09-26 Alexey Neyman <stilor@att.net>
1736 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1737 headers are no longer pulled in by <isl/val.h>.
1739 2018-09-26 Richard Biener <rguenther@suse.de>
1742 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1743 or concrete instance DIE to the tree. Create abstract origin
1744 attributes also for concrete instances.
1746 2018-09-26 Alexey Neyman <stilor@att.net>
1748 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1749 headers are no longer pulled in by <isl/val.h>.
1751 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1753 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1754 Use new helper functions.
1755 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1756 Use new helper functions.
1757 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1758 aarch_mm_needs_release): New declarations.
1759 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1760 aarch_mm_needs_release): New.
1762 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1764 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1765 (arm32_output_mi_thunk): Deal with long calls.
1767 2018-09-26 Richard Biener <rguenther@suse.de>
1771 * tree-inline.c (expand_call_inline): When the location
1772 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1773 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1774 the inserted BLOCK to make inlined_function_outer_scope_p
1776 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1777 coords for reserved locations.
1779 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1781 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1782 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1783 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1784 (*sibcall_nonlocal_sysv<mode>): Ditto.
1785 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1786 (<bd>_<mode>): Ditto.
1787 (<bd>tf_<mode>): Ditto.
1789 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1791 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1792 control string as a list of templates instead of as C code.
1793 (*altivec_movti): Ditto.
1794 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1796 2018-09-25 Jim Wilson <jimw@sifive.com>
1798 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1799 when target symbol is weak.
1801 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1804 * builtins.c (unterminated_array): Simplify.
1805 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1806 where pointer arithmetic is safe.
1808 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1811 * config/rs6000/altivec.md (altivec_vspltb): Use
1812 const_0_to_15_operand instead of u5bit_cint_operand.
1813 (*altivec_vspltb_internal): Ditto.
1814 (altivec_vspltb_direct): Ditto.
1815 (altivec_vsplth): Use const_0_to_7_operand instead of
1817 (*altivec_vsplth_internal): Ditto.
1818 (altivec_vsplth_direct): Ditto.
1819 (altivec_vspltw): Use const_0_to_3_operand instead of
1821 (*altivec_vspltw_internal): Ditto.
1822 (altivec_vspltw_direct): Ditto.
1823 (altivec_vspltsf): Ditto.
1824 (*altivec_vspltsf_internal): Ditto.
1825 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1826 various splats with the proper size immediate. Reorder the various
1827 cases by ascending size of immediate, and put all such together.
1829 2018-09-25 Richard Biener <rguenther@suse.de>
1832 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1834 (maybe_create_die_with_external_ref): Do not create
1835 DW_TAG_imported_unit here.
1836 (add_abstract_origin_attribute): Handle external BLOCK refs.
1837 (dwarf2out_abstract_function): Simplify LTO case.
1838 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1839 rather than using maybe_create_die_with_external_ref.
1841 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1844 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1845 (frndintxf2_mask_pm_i387): Ditto.
1846 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1847 Enable for !flag_trapping_math.
1848 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1849 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1850 Change operand 1 predicate to nonimmediate_operand.
1851 (attr "i387_cw"): Remove mask_pm.
1852 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1853 (enum ix86_entity): Remove I387_MASK_PM.
1854 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1855 handle I387_MASK_PM.
1856 (ix86_mode_needed): Ditto.
1857 (ix86_mode_after): Ditto.
1858 (ix86_mode_entry): Ditto.
1859 (ix86_mode_exit): Ditto.
1860 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1862 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1864 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1865 to_update_switch_stmts to vNULL instead of calling create on them
1868 2018-09-25 Richard Biener <rguenther@suse.de>
1870 PR tree-optimization/87402
1871 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1872 (visit_phi): Re-instantiate handling of supposed to be VARYING
1873 but non-VARYING backedge value.
1875 2018-09-25 Richard Biener <rguenther@suse.de>
1878 * dwarf2out.c (struct sym_off_pair): New.
1879 (external_die_map): New global.
1880 (lookup_decl_die): When in LTO create DIEs lazily from the
1882 (lookup_block_die): New function, create DIEs lazily in LTO.
1883 (equate_block_to_die): New function.
1884 (dwarf2out_die_ref_for_decl): During WPA get the association
1885 from the external DIE map.
1886 (dwarf2out_register_external_die): Record mapping into the
1888 (maybe_create_die_with_external_ref): New function split out from
1889 DIE generation part of old dwarf2out_register_external_die.
1890 (add_abstract_origin_attribute): Do not return the DIE. When
1891 in LTO reference externals directly.
1892 (dwarf2out_abstract_function): When in LTO ignore calls for
1893 decls with external DIEs (already present abstract instances).
1894 (gen_call_site_die): Adjust.
1895 (add_high_low_attributes): Likewise.
1896 (gen_lexical_block_die): Likewise.
1897 (gen_inlined_subroutine_die): Likewie.
1898 (gen_block_die): Likewise.
1899 (dwarf2out_inline_entry): Likewise.
1900 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1903 2018-09-25 Martin Liska <mliska@suse.cz>
1905 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1906 integers and not by a float value.
1908 2018-09-25 Martin Liska <mliska@suse.cz>
1911 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1913 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1914 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1915 * godump.c (go_format_type): Remove extra parenthesis.
1917 2018-09-25 Martin Liska <mliska@suse.cz>
1919 * alias.c (set_dest_equal_p): Remove unused function.
1920 * config/i386/i386.c (def_builtin_pure2): Likewise.
1921 * diagnostic-show-locus.c (class layout): Remove
1923 (layout::layout): Likewise here.
1924 * dump-context.h (class temp_dump_context): Likewise.
1925 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1926 (add_AT_loclistsptr): Likewise.
1927 (add_AT_offset): Likewise.
1928 (get_AT_hi_pc): Likewise.
1929 (is_comdat_die): Likewise.
1930 (type_is_enum): Likewise.
1931 (ceiling): Likewise.
1932 (add_AT_vms_delta): Likewise.
1933 (is_class_die): Likewise.
1934 * edit-context.c (class line_event): Remove unused field.
1935 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1937 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1938 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1939 (ok_for_base_p_nonstrict): Likewise.
1940 * tree-chrec.c (is_not_constant_evolution): Likewise.
1941 (chrec_fold_poly_cst): Likewise.
1942 * tree-if-conv.c (has_pred_critical_p): Likewise.
1943 * tree-ssa-coalesce.c (print_exprs): Likewise.
1944 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1945 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1946 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1947 (value_range_nonnegative_p): Likewise.
1949 2018-09-25 Martin Liska <mliska@suse.cz>
1951 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1952 Do not handle "GNU Pascal".
1953 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1955 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1956 from documentation. Likewise.
1957 * dbxout.c (dbxout_range_type): Likewise.
1958 * doc/cpp.texi: Likewise.
1959 * doc/extend.texi: Likewise.
1960 * doc/frontends.texi: Likewise.
1961 * doc/invoke.texi: Remove Pascal entry.
1962 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1963 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1965 2018-09-25 Martin Liska <mliska@suse.cz>
1968 * doc/invoke.texi: Document all parameters and remove default
1971 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1974 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1975 contains HOST_WIDE_INTs when computing its size.
1977 2018-09-24 Jim Wilson <jimw@sifive.com>
1980 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1982 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1984 2018-09-24 Andrew Pinski <apinski@marvell.com>
1986 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1987 access prev before checking it for NULLness in the
1988 AARCH64_FUSE_CMP_BRANCH case.
1990 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1993 * config/i386/i386.c (rest_of_insert_endbranch): Set
1994 endbr_queued_at_entrance to true and don't insert ENDBR if
1995 x86_function_profiler will be called.
1996 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1998 * config/i386/i386.h (machine_function): Add
1999 endbr_queued_at_entrance.
2001 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
2003 * genattrtab.c (mk_attr_alt): Use alternative_mask.
2004 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2006 (check_attr_test): Use alternative_mask.
2007 (get_attr_value): Likewise.
2008 (compute_alternative_mask): Use alternative_mask and XWINT.
2009 (make_alternative_compare): Use alternative_mask.
2010 (attr_alt_subset_p): Use XWINT.
2011 (attr_alt_subset_of_compl_p): Likewise.
2012 (attr_alt_intersection): Use alternative_mask and XWINT.
2013 (attr_alt_union): Likewise.
2014 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2015 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2016 (simplify_test_exp): Use alternative_mask and XWINT.
2017 (write_test_expr): Use alternative_mask and XWINT, adjust bit
2018 number calculation to support 64 bits. Generate code that
2019 checks 64-bit masks.
2020 (main): Use alternative_mask.
2021 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2023 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
2026 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2027 RETURN+USE when returning via %r14.
2029 2018-09-24 Martin Liska <mliska@suse.cz>
2031 * gcov.c (output_lines): Print colorization legend
2032 for both flag_use_colors and flag_use_hotness_colors.
2035 2018-09-24 Martin Liska <mliska@suse.cz>
2037 * coverage.c (get_coverage_counts): Use warning_at
2038 with current_function_decl location. Use %qD in warning
2041 2018-09-24 Martin Liska <mliska@suse.cz>
2043 * memory-block.h (memory_block_pool::release): Annotate with
2044 valgrind that the memory is not accessible.
2046 2018-09-24 Martin Liska <mliska@suse.cz>
2049 * asan.c: Make asan_handled_variables extern.
2051 * cfgexpand.c (expand_stack_vars): Make sure
2052 a representative is unpoison if another
2053 variable in the partition is handled by
2054 use-after-scope sanitization.
2056 2018-09-24 Richard Biener <rguenther@suse.de>
2058 PR tree-optimization/63155
2059 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2060 the worklist when the edge of the respective argument isn't
2063 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2065 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2066 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2067 (MASK_CLASS_P): Update for rename.
2068 (MAYBE_MASK_CLASS_P): Ditto.
2069 (REG_CLASS_NAMES): Update.
2070 (REG_CLASS_CONTENT): Update.
2071 * config/i386/i386.c (regclass_map): Update for MASK_REG
2072 and ALL_MASK_REGS rename.
2073 * config/i386/constraints.md (Yk): Update for rename.
2076 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2078 * config/i386/i386.h (enum reg_class): Remove
2079 EVEX_SSE_REGS and MOD4_SSE_REGS.
2080 (REG_CLASS_NAMES): Update.
2081 (REG_CLASS_CONTENT): Update.
2082 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2083 registers as ALL_SSE_REGS.
2084 (ix86_additional_allocno_class_p): Remove.
2085 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2086 (ix86_register_priority): Lower priority of EVEX SSE registers.
2087 Use IN_RANGE macro where appropriate.
2088 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2089 AVX-5124VNNIW checks.
2090 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2091 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2092 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2093 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2094 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2095 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2096 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2097 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2098 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2099 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2100 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2101 * config/i386/constraints.md (Yh): Remove.
2103 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2105 * config/i386/i386.c (regclass_map): Declare integer REX registers
2108 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
2110 * doc/service.texi (Service): Switch the fsf.org link to https.
2112 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
2115 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2116 Define to speculation_safe_value_not_needed.
2118 2018-09-21 Florian Weimer <fweimer@redhat.com>
2121 * doc/extend.texi (Common Function Attributes): Mention that
2122 noreturn suppresses tail call optimization.
2124 2018-09-21 Jeff Law <law@redhat.com>
2126 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2127 vr_values::cleanup_edges_and_switches.
2128 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2130 (identify_jump_threads): Remove EDGE_IGNORE handling.
2131 (execute_vrp): Move handling of to_remove_edges and
2132 to_update_switch_stmts into vr_values class member functions.
2133 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2134 (to_update_switch_stmts): Likewise.
2135 * vr-values.c: Include cfghooks.h.
2136 (vr_values::vr_values): Initialize to_remove_edges and
2137 to_update_switch_stmts.
2138 (vr_values::~vr_values): Verify to_remove_edges and
2139 to_update_switch_stmts are empty.
2140 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2141 (vr_values::cleanup_edges_and_switches): New member function.
2142 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2143 function. Add new data members.
2145 2018-09-21 David Malcolm <dmalcolm@redhat.com>
2147 PR tree-optimization/87309
2148 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2149 calls with pflags and alt_flags.
2150 (selftest::test_capture_of_dump_calls): Add test of interaction of
2151 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2153 2018-09-21 Olivier Hainque <hainque@adacore.com>
2155 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2157 2018-09-21 Olivier Hainque <hainque@adacore.com>
2159 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2161 2018-09-21 Olivier Hainque <hainque@adacore.com>
2163 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2164 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2165 (VXWORKS_LIBS_RTP): Minor reordering.
2167 2018-09-21 Olivier Hainque <hainque@adacore.com>
2169 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2170 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2172 2018-09-21 Olivier Hainque <hainque@adacore.com>
2174 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2175 (PTRDIFF_TYPE): Likewise.
2177 2018-09-21 Olivier Hainque <hainque@adacore.com>
2179 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2180 triplet, similar to support for VxWorks7.
2181 * config/vxworks-dummy.h: Provide a default definition
2182 of TARGET_VXWORKS64 to 0.
2184 2018-09-21 Olivier Hainque <hainque@adacore.com>
2186 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2187 * config/vxworks-dummy.h: here.
2189 2018-09-21 Olivier Hainque <hainque@adacore.com>
2191 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2193 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
2194 Bo Zhou <zbo.zhou@hisilicon.com>
2196 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2197 * config/aarch64/aarch64-tune.md: Regenerated.
2198 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2199 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2200 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2202 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
2203 Julian Brown <julian@codesourcery.com>
2205 * builtins.c (get_builtin_sync_mem): Handle address spaces.
2207 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2209 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2210 if the call takes a static chain.
2212 2018-09-21 Martin Liska <mliska@suse.cz>
2214 * auto-profile.c (autofdo_source_profile::read): Do not
2216 (read_profile): Do not add working sets.
2217 (read_autofdo_file): Remove sum_all.
2218 (afdo_callsite_hot_enough_for_early_inline): Remove const
2220 * coverage.c (struct counts_entry): Remove gcov_summary.
2221 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2222 do not support GCOV_TAG_PROGRAM_SUMMARY.
2223 (get_coverage_counts): Remove summary and expected
2225 * coverage.h (get_coverage_counts): Likewise.
2226 * doc/gcov-dump.texi: Remove -w option.
2227 * gcov-dump.c (dump_working_sets): Remove.
2228 (main): Do not support '-w' option.
2229 (print_usage): Likewise.
2230 (tag_summary): Likewise.
2231 * gcov-io.c (gcov_write_summary): Do not dump
2233 (gcov_read_summary): Likewise.
2234 (gcov_histo_index): Remove.
2235 (gcov_histogram_merge): Likewise.
2236 (compute_working_sets): Likewise.
2237 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2239 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2240 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2241 (GCOV_HISTOGRAM_SIZE): Remove.
2242 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2243 (struct gcov_summary): Simplify rapidly just
2244 to runs and sum_max fields.
2245 (gcov_histo_index): Remove.
2246 (NUM_GCOV_WORKING_SETS): Likewise.
2247 (compute_working_sets): Likewise.
2248 * gcov-tool.c (print_overlap_usage_message): Remove
2249 trailing empty line.
2250 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2251 (output_lines): Remove program related line.
2252 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2253 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2255 (input_profile_summary): Do not read it.
2256 (merge_profile_summaries): And do not merge it.
2257 (input_symtab): Do not call removed function.
2258 * modulo-sched.c (sms_schedule): Do not print sum_max.
2259 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2260 removed when histogram method was invented.
2261 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2263 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2265 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2266 and dump selected value.
2267 * profile.c (add_working_set): Remove.
2268 (get_working_sets): Likewise.
2269 (find_working_set): Likewise.
2270 (get_exec_counts): Do not work with working sets.
2271 (read_profile_edge_counts): Do not inform as sum_max is removed.
2272 (compute_branch_probabilities): Likewise.
2273 (compute_value_histograms): Remove argument for call of
2274 get_coverage_counts.
2275 * profile.h: Do not make gcov_summary const.
2277 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
2279 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2281 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2283 PR tree-optimization/86990
2284 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2285 Check that the entire merged store group is made of constants only for
2288 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
2290 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2291 (VTABLE_VERIFICATION_SPEC): Likewise.
2292 (SANITIZER_EARLY_SPEC): Likewise.
2293 (SANITIZER_SPEC): Likewise.
2294 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2295 * doc/invoke.texi (Link Options): Document -r.
2297 2018-09-20 Richard Biener <rguenther@suse.de>
2300 * gimplify.c (gimplify_expr): Retain alignment of
2301 addressable lvalue in dereference.
2303 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
2306 * configure.ac: Check for .loc is_stmt support.
2307 * configure, config.in: Rebuilt.
2308 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2311 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2313 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2314 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2317 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2319 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2321 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2324 2018-09-20 Marek Polacek <polacek@redhat.com>
2326 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2328 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2330 PR tree-optimization/87288
2331 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2332 into account when determining PEELING_FOR_NITERS.
2334 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2336 PR tree-optimization/86877
2337 * tree-vect-loop.c (vect_analyze_loop_2): Call
2338 vect_verify_datarefs_alignment.
2340 2018-09-19 Marek Polacek <polacek@redhat.com>
2342 * doc/invoke.texi: Document -Wclass-conversion.
2344 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2346 * config/pa/pa.c (pa_adjust_priority): Delete.
2347 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2349 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2350 (atomic_storehi): Likewise.
2351 (atomic_storesi): Likewise.
2352 (atomic_loaddi): Restore compare and swap exchange loop code.
2354 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2356 PR rtl-optimization/86902
2357 * combine.c (try_combine): When changing the CC mode used, don't change
2358 an unrelated mode in other_insn to that new CC mode.
2360 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2362 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2363 with %T in place of calls to dump_generic_expr.
2364 (prune_runtime_alias_test_list): Likewise.
2365 (create_runtime_alias_checks): Likewise.
2366 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2367 (vect_analyze_data_ref_dependence): Likewise.
2368 (vect_slp_analyze_data_ref_dependence): Likewise.
2369 (vect_record_base_alignment): Likewise. Use %G in place of call
2370 to dump_gimple_stmt.
2371 (vect_compute_data_ref_alignment): Likewise.
2372 (verify_data_ref_alignment): Likewise.
2373 (vect_find_same_alignment_drs): Likewise.
2374 (vect_analyze_group_access_1): Likewise.
2375 (vect_analyze_data_ref_accesses): Likewise.
2376 (dependence_distance_ge_vf): Likewise.
2377 (dump_lower_bound): Likewise.
2378 (vect_prune_runtime_alias_test_list): Likewise.
2379 (vect_find_stmt_data_reference): Likewise.
2380 (vect_analyze_data_refs): Likewise.
2381 (vect_create_addr_base_for_vector_ref): Likewise.
2382 (vect_create_data_ref_ptr): Likewise.
2383 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2384 (vect_can_advance_ivs_p): Likewise.
2385 (vect_update_ivs_after_vectorizer): Likewise.
2386 (vect_gen_prolog_loop_niters): Likewise.
2387 (vect_prepare_for_masked_peels): Likewise.
2388 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2389 (vect_determine_vectorization_factor): Likewise.
2390 (vect_is_simple_iv_evolution): Likewise.
2391 (vect_analyze_scalar_cycles_1): Likewise.
2392 (vect_analyze_loop_operations): Likewise.
2393 (report_vect_op): Likewise.
2394 (vect_is_slp_reduction): Likewise.
2395 (check_reduction_path): Likewise.
2396 (vect_is_simple_reduction): Likewise.
2397 (vect_create_epilog_for_reduction): Likewise.
2398 (vect_finalize_reduction:): Likewise.
2399 (vectorizable_induction): Likewise.
2400 (vect_transform_loop_stmt): Likewise.
2401 (vect_transform_loop): Likewise.
2402 (optimize_mask_stores): Likewise.
2403 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2404 (vect_split_statement): Likewise.
2405 (vect_recog_over_widening_pattern): Likewise.
2406 (vect_recog_average_pattern): Likewise.
2407 (vect_determine_min_output_precision_1): Likewise.
2408 (vect_determine_precisions_from_range): Likewise.
2409 (vect_determine_precisions_from_users): Likewise.
2410 (vect_mark_pattern_stmts): Likewise.
2411 (vect_pattern_recog_1): Likewise.
2412 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2413 (vect_record_max_nunits): Likewise.
2414 (vect_build_slp_tree_1): Likewise.
2415 (vect_build_slp_tree_2): Likewise.
2416 (vect_print_slp_tree): Likewise.
2417 (vect_analyze_slp_instance): Likewise.
2418 (vect_detect_hybrid_slp_stmts): Likewise.
2419 (vect_detect_hybrid_slp_1): Likewise.
2420 (vect_slp_analyze_operations): Likewise.
2421 (vect_slp_analyze_bb_1): Likewise.
2422 (vect_transform_slp_perm_load): Likewise.
2423 (vect_schedule_slp_instance): Likewise.
2424 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2425 (vect_mark_stmts_to_be_vectorized): Likewise.
2426 (vect_init_vector_1): Likewise.
2427 (vect_get_vec_def_for_operand): Likewise.
2428 (vect_finish_stmt_generation_1): Likewise.
2429 (vect_check_load_store_mask): Likewise.
2430 (vectorizable_call): Likewise.
2431 (vectorizable_conversion): Likewise.
2432 (vectorizable_operation): Likewise.
2433 (vectorizable_load): Likewise.
2434 (vect_analyze_stmt): Likewise.
2435 (vect_is_simple_use): Likewise.
2436 (vect_get_vector_types_for_stmt): Likewise.
2437 (vect_get_mask_type_for_stmt): Likewise.
2438 * tree-vectorizer.c (increase_alignment): Likewise.
2440 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
2442 * doc/rtl.texi: Adjust vec_select description.
2443 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2444 non-constant selectors.
2446 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
2448 * config/aarch64/aarch64-protos.h
2449 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2450 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2451 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2452 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2453 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2454 (AARCH64_FL_PROFILE): Move index so flags are ordered.
2455 (AARCH64_ISA_RCPC8_4): New flag.
2456 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2457 to aarch64_offset_9bit_signed_unscaled_p.
2458 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2460 * config/aarch64/constraints.md (Ust): New constraint.
2461 * config/aarch64/predicates.md.
2462 (aarch64_9bit_offset_memory_operand): New predicate.
2463 (aarch64_rcpc_memory_operand): New predicate.
2465 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
2467 PR rtl-optimization/87361
2468 * rtlanal.c (nonzero_bits1): Revert accidental change.
2470 2018-09-19 Richard Biener <rguenther@suse.de>
2472 PR tree-optimization/87349
2473 PR tree-optimization/87342
2474 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2476 2018-09-18 Marek Polacek <polacek@redhat.com>
2478 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2479 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2481 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2483 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2485 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2487 PR rtl-optimization/86882
2488 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2490 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2492 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2493 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2495 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2498 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2500 2018-09-18 Richard Biener <rguenther@suse.de>
2503 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2504 (compute_samebase_partition_bases): Likewise.
2505 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2506 (gimple_can_coalesce_p): Simplify.
2508 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2510 Handle a library implementation of ffs calling __builtin_ffs.
2511 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2512 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2515 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2517 * diagnostic-show-locus.c (class layout_range): Add field
2519 (layout_range::layout_range): Add "original_idx" param and use it
2520 to initialize new field.
2521 (make_range): Use 0 for original_idx.
2522 (layout::layout): Pass in index to calls to
2523 maybe_add_location_range.
2524 (layout::maybe_add_location_range): Add param "original_idx" and
2525 pass it on to layout_range.
2526 (layout::print_any_labels): Pass on range->m_original_idx to
2528 (gcc_rich_location::add_location_if_nearby): Use 0 for
2530 * gcc-rich-location.h (text_range_label::get_text): Update for new
2532 (range_label_for_type_mismatch::get_text): Likewise.
2534 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2536 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2538 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2540 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2541 format_string_diagnostic_t.
2542 (fmtwarn_n): Likewise.
2543 * substring-locations.c
2544 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2545 (format_warning_n_va): Convert to...
2546 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2547 (format_warning_va): Convert to...
2548 (format_string_diagnostic_t::emit_warning_va): ...this.
2549 (format_warning_at_substring): Convert to...
2550 (format_string_diagnostic_t::emit_warning): ...this.
2551 (format_warning_at_substring_n): Convert to...
2552 (format_string_diagnostic_t::emit_warning_n): ...this.
2553 * substring-locations.h (class format_string_diagnostic_t): New
2555 (format_warning_va): Convert to
2556 format_string_diagnostic_t::emit_warning_va.
2557 (format_warning_n_va): Convert to
2558 format_string_diagnostic_t::emit_warning_n_va.
2559 (format_warning_at_substring): Convert to
2560 format_string_diagnostic_t::emit_warning.
2561 (format_warning_at_substring_n): Convert to
2562 format_string_diagnostic_t::emit_warning_n.
2564 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2565 Bernd Schmidt <bernds_cb1@t-online.de>
2567 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2570 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2572 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2573 operand 0 predicate to nonimmediate operand.
2574 (rint<mode>2_frndint): Remove insn pattern.
2575 (rint<mode>2): Change operand 1 predicate to general_operand.
2576 Extend operand 1 to XFmode and generate rintxf2 insn.
2577 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2578 Do not use X87MODEF mode macro.
2579 (frndintxf2_<rounding>_i387): Rename from
2580 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2581 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2582 to XFmode and generate significandxf3 insn.
2584 2018-09-17 Richard Biener <rguenther@suse.de>
2586 PR tree-optimization/87328
2587 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2588 visiting unexecutable backedges when not iterating.
2589 (do_rpo_vn): Mark all edges not executable even when not
2592 2018-09-17 Martin Jambor <mjambor@suse.cz>
2595 * doc/invoke.texi (Warning Options): Likewise.
2597 2018-09-17 Richard Biener <rguenther@suse.de>
2599 PR tree-optimization/87301
2600 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2601 clean EH info from leftover copy assignments.
2603 2018-09-17 Martin Liska <mliska@suse.cz>
2605 PR gcov-profile/85871
2606 * gcov.c (output_intermediate_file): Fix out of bounds
2609 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2611 * config/arc/arc.c: Object attributes for core4 not reflected
2613 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2616 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2618 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2620 2018-09-17 Martin Liska <mliska@suse.cz>
2622 * doc/gcov.texi: Document new option --use-hotness-colors.
2623 * gcov.c (struct source_info): Declare new field.
2624 (source_info::source_info): Set default for maximum_count.
2625 (print_usage): Add new -q option.
2626 (process_args): Process it.
2627 (accumulate_line_info): Save src->maximum_count.
2628 (output_line_beginning): Make color line number if
2629 flag_use_hotness_colors is set.
2630 (output_line_details): Pass default argument value.
2631 (output_lines): Pass src->maximum_count.
2633 2018-09-17 Martin Liska <mliska@suse.cz>
2635 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2636 Use processor_names table.
2637 * config/i386/i386.c (ix86_default_align): Use
2638 processor_cost_table for alignment values.
2639 (ix86_option_override_internal): Use processor_names.
2640 (ix86_function_specific_print): Likewise.
2641 * config/i386/i386.h (struct processor_costs):
2642 Add alignment values.
2643 (struct ptt): Remove and replace with const char *.
2644 * config/i386/x86-tune-costs.h (struct processor_costs):
2645 Declare default alignments for all costs.
2647 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2649 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2650 symbolics or VR_VARYING ranges for ABS_EXPR.
2651 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2652 when range will wrap.
2654 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2657 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2658 before and after a JUMP_TABLE_DATA.
2660 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2663 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2664 when one operand is a function pointer. Use POINTER_TYPE_P and
2665 FUNC_OR_METHOD_TYPE_P.
2666 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2667 * fold-const.c (build_range_check): Likewise.
2668 * match.pd (simple_comparison): Likewise.
2670 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2673 * spellcheck.c (get_edit_distance_cutoff): New function.
2674 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2675 (selftest::test_get_edit_distance_one_way): ...this.
2676 (selftest::test_get_edit_distance_unit): Rename to...
2677 (selftest::test_get_edit_distance_both_ways): ...this.
2678 (selftest::test_edit_distances): Move tests to this new function,
2679 and test some more pairs of strings. Update for above renaming.
2680 (selftest::get_old_cutoff): New function.
2681 (selftest::test_get_edit_distance_cutoff): New function.
2682 (selftest::assert_suggested_for): New function.
2683 (ASSERT_SUGGESTED_FOR): New macro.
2684 (selftest::assert_not_suggested_for): New function.
2685 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2686 (selftest::test_suggestions): New function.
2687 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2688 tests to selftest::test_edit_distances and call it. Add calls to
2689 selftest::test_get_edit_distance_cutoff and
2690 selftest::test_suggestions.
2691 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2692 (best_match::consider): Replace hard-coded cutoff calculation with
2694 (best_match::get_cutoff): New declaration.
2695 (best_match::get_best_meaningful_candidate): Likewise.
2697 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2699 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2701 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2704 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2706 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2707 terminated string literal.
2709 2018-09-14 Martin Sebor <msebor@redhat.com>
2711 * builtins.c (unterminated_array): Handle ARRAY_REF.
2712 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2713 * builtins.h (unterminated_array): Declare extern.
2714 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2716 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2719 2018-09-14 Martin Sebor <msebor@redhat.com>
2720 Jeff Law <law@redhat.com>
2722 * builtins.c (unterminated_array): New.
2723 (expand_builtin_strcpy): Adjust.
2724 (expand_builtin_strcpy_args): Detect unterminated arrays.
2725 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2726 unterminated arrays.
2727 * gimple-fold.h (get_maxval_strlen): Add argument.
2728 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2730 * gimple-fold.c (get_range_strlen): Add argument.
2731 (get_maxval_strlen): Adjust.
2732 * gimple-fold.h (get_range_strlen): Add argument.
2734 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2736 * config/i386/movdirintrin.h: Fix copyright year.
2738 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2740 * reg-stack.c: Include regs.h.
2741 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2742 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2743 FIRST_STACK_REG, not DFmode.
2744 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2745 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2746 (change stack): Default register mode to the reg_raw_mode of
2747 FIRST_STACK_REG, not DFmode.
2748 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2749 (*swapxf): Rename from swapxf.
2751 2018-09-14 Carl Love <cel@us.ibm.com>
2753 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2754 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2756 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2759 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2762 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2765 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2767 2018-09-14 Jason Merrill <jason@redhat.com>
2769 Fix --enable-gather-detailed-mem-stats.
2770 * hash-table.c (hash_table_usage): Change from variable to function.
2771 * hash-table.h: Adjust.
2772 * Makefile.in: Add missing dependencies on hash-table.h.
2774 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2776 PR tree-optimization/87259
2778 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2779 execute_cse_reciprocals_1 has tried transforming.
2781 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2783 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2784 VR_VARYING for PLUS/MINUS_EXPR.
2786 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2788 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2791 2018-09-14 Richard Biener <rguenther@suse.de>
2794 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2795 bits for the merged partition.
2797 2018-09-13 Martin Sebor <msebor@redhat.com>
2798 Bernd Edlinger <bernd.edlinger@hotmail.de>
2800 * builtins.h (c_srlen): Add argument.
2801 * builtins.c (warn_string_no_nul): New function.
2802 (c_strlen): Add argument and use it. Update recursive calls.
2803 Pass DECL argument to string_constant to get info on non
2804 terminated strings. Update *NONSTR as needed.
2805 (fold_builtin_strlen): Add argument to calls to c_strlen.
2806 Warn for unterminated arrays.
2807 (warn_string_no_null): Add prototype.
2808 * expr.c (string_constant): Update arguments. Update recursive
2809 calls appropriately. Detect missing NUL terminator and outermost
2810 declaration its missing in.
2811 Improve checks for arrays with nonzero lower bound or elements
2812 that are not a single byte. Simplify offset computation.
2813 Simplify checks for non-NUL terminated strings.
2814 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2815 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2817 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2819 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2821 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2822 argument. Fix range checks.
2823 * fold-const.h (c_getstr): Adjust protoype.
2824 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2825 string is constant but contains no NUL byte.
2827 * expr.c (string_constant): Adjust function comment.
2828 Remove bogus check for zero termination.
2830 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2832 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2833 (get_constant_size): Don't make STRING_CSTs larger than they are.
2834 (check_string_literal): New check function for STRING_CSTs.
2835 (output_constant): Use it.
2837 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2840 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2842 2018-09-13 Richard Biener <rguenther@suse.de>
2844 PR tree-optimization/87263
2845 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2846 (struct unwind_state): Add max_rpo field.
2847 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2848 Compute max_rpo, the max RPO number a block can be backwards reached
2849 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2850 separating it from the iterating mode.
2852 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2854 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2855 (rfs_decision): New scheduling decision.
2857 2018-09-13 Richard Biener <rguenther@suse.de>
2860 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2861 (vn_nary_op_insert_pieces_predicated): Do not write useless
2862 valid_dominated_by_p entry outside of the allocated storage.
2864 2018-09-13 Omar Sandoval <osandov@osandov.com>
2865 Tom de Vries <tdevries@suse.de>
2868 * dwarf2out.c (is_c): New function.
2869 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2871 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2874 * config/aarch64/aarch64.md (*aarch64_bfxil):
2876 * config/aarch64/constraints.md (Ulc): Define.
2877 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2879 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2882 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2884 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2885 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2886 aarch64_layout_frame call.
2887 (aarch64_expand_epilogue): Likewise.
2888 (aarch64_initial_elimination_offset): Likewise.
2889 (aarch64_get_separate_components): Likewise.
2890 (aarch64_use_return_insn_p): Likewise.
2891 (aarch64_layout_frame): Remove unneeded check.
2893 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2895 * configure.ac: Only append
2896 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2897 gcc_config_arguments if it was never reconfigured or last reconfigure
2898 was with different arguments.
2899 * configure: Regenerated.
2901 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2902 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2905 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2906 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2908 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2910 PR tree-optimization/87287
2911 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2912 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2913 * match.pd (X % C == 0): ... here. New optimization.
2915 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2918 * expr.h (maybe_optimize_mod_cmp): Declare.
2919 * expr.c (mod_inv): New function.
2920 (maybe_optimize_mod_cmp): New function.
2921 (do_store_flag): Use it.
2922 * cfgexpand.c (expand_gimple_cond): Likewise.
2924 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2925 Julian Brown <julian@codesourcery.com>
2928 * gimplify.c (gimplify_scan_omp_clauses): Set
2929 target_firstprivatize_array_bases in OpenACC parallel and kernels
2930 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2931 OpenACC data regions.
2933 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2935 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2936 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2938 2018-09-12 Richard Biener <rguenther@suse.de>
2940 PR tree-optimization/87280
2941 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2942 edge but unreachable target.
2943 (do_rpo_vn): For conservatively handling a PHI only mark
2944 the backedge executable but not the block reachable.
2946 2018-09-12 Richard Biener <rguenther@suse.de>
2948 PR tree-optimization/87266
2949 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2952 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2954 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2956 ("trunc<BFP:mode><DFP_ALL:mode>2")
2957 ("trunc<DFP_ALL:mode><BFP:mode>2")
2958 ("extend<BFP:mode><DFP_ALL:mode>2")
2959 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2960 according to the target operand type.
2962 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2963 Andreas Krebbel <krebbel@linux.ibm.com>
2965 PR tree-optimization/86844
2966 * gimple-ssa-store-merging.c
2967 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2968 there are any overlapping stores in between them, make sure they are
2969 also coalesced or we give up completely.
2971 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2974 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2975 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2977 2018-09-12 Tom de Vries <tdevries@suse.de>
2979 * common.opt (gdescribe-dies): Add option.
2980 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2981 attribute for artifical and nameless decls.
2982 (dwarf2out_register_external_die): Add description attribute to
2983 external reference die.
2984 (add_desc_attribute): New functions.
2985 (gen_subprogram_die): Add description attribute to
2986 DW_TAG_call_site_parameter.
2987 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2988 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2989 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2991 (@item -gdescribe-dies): Add.
2993 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2995 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2996 (extract_range_from_binary_expr_1: Call
2997 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2998 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3001 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
3003 * gimple-ssa-warn-alloca.c
3004 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3005 field for ALLOCA_BOUND_*_LARGE.
3007 2018-09-11 Nathan Sidwell <nathan@acm.org>
3009 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3011 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3013 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3014 for clobbers. Remove obsolete comment.
3016 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3018 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3019 mpxchk, mpxld and mpxst types.
3020 (define_attr length_immediate): Remove all processing of mpx types.
3021 (define_attr prefix_0f): Ditto.
3022 (define_attr memory): Ditto.
3024 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3026 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3027 (log<mode>2): Change operand 1 predicate to general_operand.
3028 Extend operand 1 to XFmode and generate logxf3 insn.
3029 (log10<mode>2): Change operand 1 predicate to general_operand.
3030 Extend operand 1 to XFmode and generate log10xf3 insn.
3031 (log2<mode>2): Change operand 1 predicate to general_operand.
3032 Extend operand 1 to XFmode and generate log2xf3 insn.
3033 (fyl2xp1_extend<mode>xf3_i387): Remove.
3034 (log1p<mode>2): Change operand 1 predicate to general_operand.
3035 Extend operand 1 to XFmode and generate log1pxf3 insn.
3036 (fxtract_extend<mode>xf3_i387): Remove.
3037 (logb<mode>2): Change operand 1 predicate to general_operand.
3038 Extend operand 1 to XFmode and generate logbxf3 insn.
3039 (ilogb<mode>2): Change operand 1 predicate to general_operand.
3040 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3041 (significand<mode>2): Change operand 1 predicate to general_operand.
3042 Extend operand 1 to XFmode and generate significandxf3 insn.
3044 2018-09-11 Nathan Sidwell <nathan@acm.org>
3046 * gcc.c (perror_with_name, pfatal_with_name): Delete.
3047 (load_specs): Use fatal_error.
3048 (DELETE_IF_ORDINARY, process_command): Use error.
3049 (execute, run_attempt): Use fatal_error.
3051 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
3053 * diagnostic-core.h (sorry_at): New prototype.
3054 * diagnostic.c (sorry_at): New function.
3056 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
3058 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3059 by zero as VR_UNDEFINED.
3061 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
3063 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3064 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3065 (<sincos>mode2): New expander.
3066 (sincos_extend<mode>xf3_i387): Remove insn pattern.
3067 (sincos -> sin, cos splitters): Remove splitter patterns.
3068 (sincos<mode>3): Change operand 2 predicate to general_operand.
3069 Extend operand 2 to XFmode and generate sincosxf3 insn.
3070 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3071 Change operand 3 predicate to const1_operand.
3072 (fptan_extend<mode>xf4_i387): Remove insn pattern.
3073 (tanxf2): Update operands in the call to fptanxf4_i387.
3074 (tan<mode>2): Change operand 1 predicate to general_operand.
3075 Extend operand 1 to XFmode and generate tanxf3 insn.
3076 (atan2xf3): Rename from *fpatanxf3_i387.
3077 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3078 (atan2xf3): Remove expander.
3079 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
3080 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3081 (atan<mode>2): Change operand 1 predicate to general_operand.
3082 Extend operand 1 to XFmode and generate atanxf3 insn.
3084 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
3086 * config/i386/i386.md (x87/SSE constant load splitter): Use
3087 memory_operand instead of nonimmediate_operand for input operand
3090 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
3092 * config/i386/i386.md (float partial SSE register stall splitter): Move
3093 splitter near its instruction pattern.
3094 (float_extend partial SSE register stall splitter): Ditto.
3095 (float_truncate partial SSE register stall splitter): Ditto.
3097 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
3100 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3101 to speculation_safe_value_not_needed.
3104 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3105 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3106 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3107 leaf_function_p, instead use has_hard_reg_initial_val.
3109 2018-09-09 Nathan Sidwell <nathan@acm.org>
3111 * gcc.h (pfatal_with_name): Don't declare here.
3112 * gcc.c (pfatal_with_name): Make static.
3114 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
3116 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3119 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
3121 PR rtl-optimization/85458
3122 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3123 priority hook to reduce the priority of EXPR.
3125 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
3127 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3128 DImode for x87 on 32bit targets. Conditionally disable x87 modes
3129 with X87_ENABLE_FLOAT. Remove preparation code.
3130 (*float<SWI48:mode><MODEF:mode>2): Rename from
3131 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
3132 math using "enabled" attribute.
3133 (*floatdi<MODEF:mode>2_i387): Rename from
3134 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
3135 enable for 32bit targets only.
3136 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3138 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3139 as operand 1 predicate. Rewrite as define_insn_and_split.
3140 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3142 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
3144 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3145 to fallthru to FLOAT case.
3147 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3150 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3151 around folding of vec_sl to handle out of range shift values.
3153 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
3155 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3156 Update callers to gen_fix_trunc<mode>_i387_fisttp
3157 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3158 nonimmediate_operand.
3159 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3160 and corresponding splitters.
3161 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3162 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3163 (fix_truncdi_i387_with_temp): Remove insn pattern
3164 and corresponding splitters.
3165 (fix_trunc<mode>_i387): Change operand 0 predicate to
3166 nonimmediate_operand.
3167 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3168 and corresponding splitters.
3169 (*fistdi2_1): Remove.
3171 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3172 (lrintxfdi2): Remove expander. Reimplement as define_insn.
3173 (*fist<mode>2_1): Remove.
3174 (fist<mode>2): Ditto.
3175 (fist<mode>2_with_temp): Remove insn pattern and corresponding
3177 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
3178 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3179 (fistdi2_<rounding>): Change operand 0 predicate to
3180 nonimmediate_operand.
3181 (fistdi2_<rounding>_with_temp): Remove insn pattern
3182 and corresponding splitters.
3183 (fist<mode>2_<rounding>): Change operand 0 predicate to
3184 nonimmediate_operand.
3185 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3186 and corresponding splitters.
3188 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3190 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3192 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3195 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3197 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3198 early gimple folding of vec_splat().
3199 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3200 * gimple-fold.h: Add an extern define for tree_vec_extract().
3202 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3204 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3205 wrappers around TREE_TYPE comparisons.
3207 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3210 * config/s390/predicates.md: Add nonsym_memory_operand.
3211 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3212 contains a SYMBOL_REF, load it into an intermediate pseudo.
3213 (s390_emit_compare_and_swap): Legitimize operand.
3214 * config/s390/s390.md: Use the new nonsym_memory_operand
3215 with UNSPECV_CAS patterns.
3217 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3220 * config/s390/s390-passes.def: New file.
3221 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3223 (make_pass_s390_early_mach): Add declaration.
3224 * config/s390/s390.c (make_pass_s390_early_mach):
3225 (s390_option_override): Remove dynamic registration.
3226 * config/s390/t-s390: Add s390-passes.def.
3228 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3230 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3231 Remove UNSPEC_LTREL_BASE check.
3232 (annotate_constant_pool_refs): Likewise.
3233 (find_constant_pool_ref): Likewise.
3234 (find_ltrel_base): Removed.
3235 (replace_ltrel_base): Removed.
3236 (s390_mainpool_finish): Remove replace_ltrel_base call.
3237 (s390_chunkify_start): Remove pending LTREL_BASE logic.
3238 (s390_chunkify_finish): Remove replace_ltrel_base call.
3239 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3241 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
3244 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3245 to speculation_safe_value_not_needed.
3247 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
3248 Bernd Schmidt <bernds_cb1@t-online.de>
3250 * config/nvptx/nvptx-opts.h: New file.
3251 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3252 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3254 (TARGET_SM35): New macro.
3255 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3257 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3259 (misa=): New option.
3260 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3262 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
3264 * config/i386/i386.md (truncdfsf2): Remove expander.
3265 (truncdfsf2_with_temp): Ditto.
3266 (truncxf<mode>2): Ditto.
3267 (*truncdfsf_fast_mixed): Remove insn pattern.
3268 (*truncdfsf_fast_i387): Ditto.
3269 (*truncdfsf_mixed): Ditto.
3270 (*truncdfsf_i387): Ditto.
3271 (*truncdfsf2_i387_1): Ditto.
3272 (*truncxfsf2_mixed): Ditto.
3273 (*truncxfdf2_mixed): Ditto.
3274 (*truncxf<mode>2_i387_noop): Ditto. Update callers
3275 to call gen_truncxf<mode>2 instead.
3276 (*truncxf<mode>2_i387): Remove.
3277 (reg->reg splitters): Remove splitter pattern.
3278 (reg->mem splitters): Ditto.
3280 (truncdfsf2): New insn pattern.
3281 (truncxf<mode>2): Ditto.
3283 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3285 * tree-ssa-math-opts.c (is_mult_by): New function.
3286 (is_square_of): Use the above.
3287 (optimize_recip_sqrt): New function.
3288 (pass_cse_reciprocals::execute): Use the above.
3290 2018-09-05 Richard Biener <rguenther@suse.de>
3293 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3294 to zero-init the emplaced vec.
3296 2018-09-05 Martin Liska <mliska@suse.cz>
3298 PR tree-optimization/87205
3299 * tree-switch-conversion.c (pass_lower_switch::execute):
3300 Group cases for switch statements.
3302 2018-09-05 Richard Biener <rguenther@suse.de>
3304 PR tree-optimization/87217
3305 * tree-ssa-sccvn.c (vuse_valueize): New.
3306 (vn_reference_lookup_pieces): Use it.
3307 (vn_reference_lookup): Likewise.
3309 2018-09-05 Nathan Sidwell <nathan@acm.org>
3312 * stor-layout.c (place_field): Scan forwards to check last
3313 bitfield when ms_bitfield_placement is in effect.
3315 2018-09-05 Richard Biener <rguenther@suse.de>
3318 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3321 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
3322 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3324 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3325 * config.gcc (extra_objs): Build it.
3326 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3328 * config/aarch64/aarch64-passes.def
3329 (pass_tag_collision_avoidance): New pass.
3330 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3331 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3332 (aarch64_classify_address): Remove static qualifier.
3333 (aarch64_address_info, aarch64_address_type): Move to...
3334 * config/aarch64/aarch64-protos.h: ... here.
3335 (make_pass_tag_collision_avoidance): New function.
3336 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3339 2018-09-05 Martin Liska <mliska@suse.cz>
3341 * doc/gcov.texi: Update documentation of humar
3343 * gcov.c (format_count): Print one decimal place, it provides
3344 more fine number of situations like '1G' vs. '1.4G'.
3346 2018-09-05 Martin Liska <mliska@suse.cz>
3349 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3350 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3351 to generate a MASK value.
3353 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3356 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3357 if frame pointer isn't used.
3358 (compute_frame_pointer_to_fb_displacement): Likewise.
3360 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3363 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3364 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3365 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3366 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3367 and OPTION_MASK_ISA_XSAVEC_UNSET.
3369 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3371 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3372 XOR operations in NAND case.
3374 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3376 * wide-int-range.cc (wide_int_range_convert): New.
3377 * wide-int-range.h (wide_int_range_convert): New.
3378 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3379 code into wide_int_range_convert.
3380 (extract_range_into_wide_ints): Do not munge anti range constants
3381 into the entire domain. Just return the range back.
3383 2018-09-04 Martin Liska <mliska@suse.cz>
3385 * genmatch.c (output_line_directive): Add new argument
3387 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3389 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3391 * doc/invoke.texi (Option Summary): Add whitespace.
3393 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3395 2018-09-04 Richard Biener <rguenther@suse.de>
3397 PR tree-optimization/87211
3398 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3399 backedge value we're supposed to treat as VARYING also number
3400 the PHI to VARYING in case it got a different value-number already.
3402 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3404 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3405 (extract_range_from_binary_expr_1): Do not call
3406 vrp_can_optimize_bit_op.
3407 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3409 (wide_int_range_get_mask_and_bounds): New.
3410 (wide_int_range_optimize_bit_op): New.
3411 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3412 (wide_int_range_bit_and): Same.
3413 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3414 (wide_int_range_optimize_bit_op): New.
3415 (wide_int_range_get_mask_and_bounds): New.
3417 2018-09-04 Richard Biener <rguenther@suse.de>
3419 PR tree-optimization/87176
3420 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3421 variable. When value-numbering a virtual PHI node make sure
3422 to not value-number to the backedge value.
3424 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3426 * doc/extend.texi (Long Long, Hex Floats): Document support for
3427 long long and hex floats in more recent versions of ISO C++.
3429 2018-09-03 Richard Biener <rguenther@suse.de>
3431 PR tree-optimization/87177
3432 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3435 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3437 * bb-reorder.c (edge_order): Convert to C-qsort-style
3438 tri-state comparator.
3439 (reorder_basic_blocks_simple): Change std::stable_sort to
3442 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3444 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3445 tri-state comparator.
3446 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3448 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3450 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
3451 (mergesort): ... here as maximum count for using netsort.
3452 (gcc_qsort): Set nlim to 3 if stable sort is requested.
3453 (gcc_stablesort): New.
3454 * system.h (gcc_stablesort): Declare.
3456 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3458 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3459 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
3460 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
3462 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
3464 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3465 lxsdx and stxsdx alternatives.
3466 (*mov<mode>_hardfloat64): Ditto.
3467 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3469 2018-09-03 Richard Biener <rguenther@suse.de>
3471 PR tree-optimization/87200
3472 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3475 2018-09-03 Martin Liska <mliska@suse.cz>
3477 PR tree-optimization/87201
3478 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3479 Fix parenthesis in an expression.
3481 2018-09-03 Richard Biener <rguenther@suse.de>
3483 PR tree-optimization/87197
3484 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3485 visited. CSE the VN_INFO hashtable lookup.
3487 PR tree-optimization/87169
3488 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3489 iterating make sure there's no extra backedges from irreducible
3490 regions feeding the header. Mark the destination block
3493 2018-09-03 Martin Liska <mliska@suse.cz>
3496 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3497 * common/common-targhooks.c (default_get_valid_option_values):
3499 * common/common-targhooks.h (default_get_valid_option_values):
3501 * common/config/i386/i386-common.c: Move processor_target_table
3503 (ix86_get_valid_option_values): New function.
3504 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3505 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3506 (PTA_*): Move all defined masks into i386-common.c.
3507 (ix86_function_specific_restore): Use new processor_cost_table.
3508 * config/i386/i386.h (struct ptt): Moved from i386.c.
3509 (struct pta): Likewise.
3510 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3511 * doc/tm.texi.in: Likewise.
3512 * opt-suggestions.c (option_proposer::suggest_option):
3513 Pass prefix to build_option_suggestions.
3514 (option_proposer::get_completions): Likewise.
3515 (option_proposer::build_option_suggestions): Use the new target
3517 * opts.c (struct option_help_tuple): New struct.
3518 (print_filtered_help): Use the new target hook.
3520 2018-09-03 Martin Liska <mliska@suse.cz>
3523 * predict.c (set_even_probabilities): Add likely_edges
3524 argument and handle cases where we have precisely one
3526 (combine_predictions_for_bb): Catch also likely_edges.
3527 (tree_predict_by_opcode): Handle gswitch statements.
3528 * tree-cfg.h (find_case_label_for_value): New declaration.
3529 (find_taken_edge_switch_expr): Likewise.
3530 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3531 Find pivot in decision tree based on probabily, not by number of
3534 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3536 * doc/standards.texi (Standards): Update Objective-C reference.
3538 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3540 * doc/install.texi (Prerequisites): Update link for MPC.
3542 2018-09-01 Michael Matz <matz@suse.de>
3544 PR tree-optimization/87074
3545 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3546 PHIs for outer-loop uses.
3548 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3550 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3551 * doc/invoke.texi (C Dialect Options): Ditto.
3553 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3555 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3557 2018-08-31 Richard Biener <rguenther@suse.de>
3559 PR tree-optimization/87168
3560 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3561 (rpo_elim::eliminate_avail): When OP was not visited it must
3564 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3566 * tree-vrp.c (copy_value_range): Convert param "from" from
3567 "value_range *" to "const value_range *".
3568 (range_is_null): Likewise for param "vr".
3569 (range_int_cst_p): Likewise.
3570 (range_int_cst_singleton_p): Likewise.
3571 (symbolic_range_p): Likewise.
3572 (value_ranges_intersect_p): Likewise for both params.
3573 (value_range_nonnegative_p): Likewise for param "vr".
3574 (value_range_constant_singleton): Likewise.
3575 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3576 (extract_range_into_wide_ints): Likewise for param "vr".
3577 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3579 (vrp_can_optimize_bit_op): Likewise.
3580 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3582 (extract_range_from_unary_expr): Likewise.
3583 (debug_value_range): Likewise for param "vr".
3584 (value_range::dump): Add "const" qualifier.
3585 (vrp_prop::check_array_ref): Convert local "vr" from
3586 "value_range *" to "const value_range *".
3587 (vrp_prop::check_mem_ref): Likewise.
3588 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3589 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3590 (vrp_intersect_ranges): Likewise.
3591 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3592 (vrp_prop::vrp_finalize): Likewise.
3593 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3594 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3595 (extract_range_from_unary_expr): Likewise.
3596 (value_range_constant_singleton): Likewise.
3597 (symbolic_range_p): Likewise.
3598 (copy_value_range): Likewise.
3599 (extract_range_from_binary_expr_1): Likewise.
3600 (range_int_cst_p): Likewise.
3601 (vrp_set_zero_nonzero_bits): Likewise.
3602 (range_int_cst_singleton_p): Likewise.
3604 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3606 * config/aarch64/arm_neon.h (vabsd_s64): New.
3607 (vnegd_s64): Likewise.
3609 2018-08-31 Martin Jambor <mjambor@suse.cz>
3611 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3613 2018-08-31 Martin Liska <mliska@suse.cz>
3615 * ipa-icf.c (sem_item::add_type): Use
3616 sem_item::m_type_hash_cache.
3617 * ipa-icf.h: Move the cache from sem_item_optimizer
3620 2018-08-31 Nathan Sidwell <nathan@acm.org>
3622 * doc/extend.texi (Backwards Compatibility): Remove implicit
3623 extern C leeway of () being (...).
3625 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3627 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3629 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3633 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3635 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3638 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3639 gen_int_mode. Formatting fixes.
3641 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3643 * target.def (custom_function_descriptors): Improve documentation.
3644 * doc/tm.texi.in (Trampolines): Expand discussion of function
3645 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3646 beginning of the section.
3647 * doc/tm.texi: Regenerated.
3649 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3651 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3652 base class in the initializer list. This is a workaround for
3653 building with older GCC.
3654 (class auto_bb_flag): Likewise.
3656 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3658 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3659 (altivec_vcmpequ<VI_char>_p): Remove star.
3660 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3662 (expand_strncmp_vec_sequence): New function.
3663 (emit_final_str_compare_vec): New function.
3664 (expand_strn_compare): Add support for vector strncmp.
3665 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3666 length specification to bytes.
3667 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3668 (vcmpnezb_p): New pattern.
3669 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3670 for option -mstring-compare-inline-limit.
3672 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3674 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3675 (PTA_SKYLAKE): Add PTA_AES.
3676 (PTA_GOLDMONT): Likewise.
3678 2018-08-29 Jan Hubicka <jh@suse.cz>
3681 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3682 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3684 2018-08-29 Jan Hubicka <jh@suse.cz>
3686 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3688 (hash_tree): Do not visit TYPE_STUB_DECL.
3689 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3690 stream TYPE_STUB_DECL.
3691 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3692 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3693 after free_lang_data.
3694 (type_in_anonymous_namespace_p): Likewise.
3696 2018-08-29 Jan Hubicka <jh@suse.cz>
3698 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3699 comment that it has to be even number.
3700 (class sreal): Change m_sig type to int32_t.
3701 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3702 int64_t for temporary calculations.
3703 (sreal_verify_basics): Drop one bit from minimum and maximum.
3705 2018-08-30 Richard Biener <rguenther@suse.de>
3707 PR tree-optimization/87147
3708 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3709 (visit_phi): When the degenerate result is from the backedge and
3710 we didn't visit its definition yet drop to VARYING.
3711 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3713 2018-08-29 Jan Hubicka <jh@suse.cz>
3715 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3717 (hash_tree): Likewise.
3719 2018-08-29 Jan Hubicka <jh@suse.cz>
3721 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3722 and TYPE_NEXT_REF_TO.
3724 2018-08-29 Jan Hubicka <jh@suse.cz>
3726 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3727 comment that it has to be even number.
3728 (class sreal): Change m_sig type to int32_t.
3729 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3730 int64_t for temporary calculations.
3731 (sreal_verify_basics): Drop one bit from minimum and maximum.
3733 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3735 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3737 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3740 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3741 if to_add is negative.
3743 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3746 * builtins.c (c_strlen): Improve range checks.
3748 2018-08-29 Martin Sebor <msebor@redhat.com>
3749 Jeff Law <law@redhat.com>
3751 PR tree-optimization/86714
3752 PR tree-optimization/86711
3753 * builtins.c (c_strlen): Add arguments to call to string_constant.
3754 * expr.c (string_constant): Add argument. Detect missing nul
3755 terminator and outermost declaration it's missing in.
3756 * expr.h (string_constant): Add argument.
3757 * fold-const.c (read_from_constant_string): Add arguments to call to
3759 (c_getstr): Likewise.
3760 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3762 * tree-ssa-strlen.c (get_stridx): Likewise.
3764 2018-08-29 Jan Hubicka <jh@suse.cz>
3766 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3767 Do not stream DECL_VINDEX.
3768 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3769 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3770 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3772 2018-08-29 Richard Biener <rguenther@suse.de>
3774 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3775 virtual operands that are not default defs to honor region
3777 (rpo_vn_valueize): Remove ineffective code here.
3779 2018-08-29 Richard Biener <rguenther@suse.de>
3781 PR tree-optimization/87132
3782 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3783 when skipping defs reachable over backedges.
3785 2018-08-29 Richard Biener <rguenther@suse.de>
3787 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3788 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3789 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3790 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3791 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3792 (vn_reference_lookup_3): Remove use of const_parms.
3793 (free_rpo_vn): Do not free const_parms.
3794 (do_rpo_vn): Do not call init_const_parms.
3795 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3796 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3797 (call_may_clobber_ref_p_1): Likewise.
3799 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3802 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3804 (-ftree-scev-cprop): Document.
3806 2018-08-29 Jan Hubicka <jh@suse.cz>
3808 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3810 (sreal constructor): Update.
3811 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3812 sreal:operator/): Update.
3814 2018-08-29 Martin Liska <mliska@suse.cz>
3816 * tree-switch-conversion.c (switch_conversion::expand):
3817 Strenghten assumption about gswitch statements.
3819 2018-08-29 Richard Biener <rguenther@suse.de>
3821 PR tree-optimization/87117
3822 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3823 re-value-number released SSA VDEFs.
3825 2018-08-29 Richard Biener <rguenther@suse.de>
3827 PR tree-optimization/87126
3828 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3830 2018-08-28 Jim Wilson <jimw@sifive.com>
3832 * config/riscv/pic.md: Rewrite.
3833 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3835 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3836 (SOFTF, default_load, softload, softstore): New.
3838 2018-08-28 Jeff Law <law@redhat.com>
3840 * fold-const.c (fold_binary_loc): Remove recently added assert.
3842 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3844 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3845 to OP parmeter of generated function.
3847 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3849 PR tree-optimization/87009
3850 * match.pd: Add boolean optimizations.
3852 2018-08-28 Martin Sebor <msebor@redhat.com>
3855 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3856 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3857 (pass_walloca::gate): Use it.
3858 (alloca_call_type): Same.
3859 (pass_walloca::execute): Same.
3860 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3862 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3864 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3865 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3868 2018-08-28 Richard Biener <rguenther@suse.de>
3870 PR tree-optimization/87124
3871 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3872 constants before looking up avail.
3874 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3877 * calls.c (maybe_warn_nonstring_arg): Punt early if
3878 warn_stringop_overflow is zero. Don't call get_range_strlen
3879 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3880 Swap comparison operands to have constants on rhs. Only use
3881 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3882 increment lenrng[0].
3884 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3886 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3887 use of tree_to_shwi. Remove duplicated test for the size being
3888 a whole number of bytes.
3890 2018-08-28 Richard Biener <rguenther@suse.de>
3892 PR tree-optimization/87117
3893 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3894 Handle removed stmt without LHS (GIMPLE_NOP).
3896 2018-08-28 Richard Biener <rguenther@suse.de>
3898 PR tree-optimization/87117
3899 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3900 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3902 2018-08-28 Richard Biener <rguenther@suse.de>
3904 PR tree-optimization/87117
3905 * tree-ssa-pre.c (compute_avail): Do not make expressions
3906 with predicated values available.
3907 (get_expr_value_id): Assert we do not run into predicated value
3910 2018-08-28 Richard Biener <rguenther@suse.de>
3912 PR tree-optimization/87117
3913 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3914 get virtual operands.
3915 (get_expr_operands): Handle STRING_CST like other decls.
3917 2018-08-28 Martin Liska <mliska@suse.cz>
3919 * tree.h: Update documentation of fndecl_built_in_p
3923 2018-08-27 Jeff Law <law@redhat.com>
3924 PR tree-optimization/87110
3925 * tree-ssa-dse.c (compute_trims): Handle non-constant
3928 2018-08-27 Martin Sebor <msebor@redhat.com>
3930 PR tree-optimization/86914
3931 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3933 2018-08-27 Martin Sebor <msebor@redhat.com>
3935 PR tree-optimization/87112
3936 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3937 the type of the bound argument.
3939 2018-08-27 Jeff Law <law@redhat.com>
3941 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3942 type does not have a TYPE_SIZE_UNIT.
3944 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3946 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3947 with include of backend.h.
3949 2018-08-27 Richard Biener <rguenther@suse.de>
3951 PR tree-optimization/86927
3952 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3953 use const cond reduction code.
3955 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3957 PR tree-optimization/85758
3958 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3960 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3963 * diagnostic-show-locus.c (class layout_range): Update for
3964 conversion of show_caret_p to a tri-state.
3965 (layout_range::layout_range): Likewise.
3966 (make_range): Likewise.
3967 (layout::maybe_add_location_range): Likewise.
3968 (layout::should_print_annotation_line_p): Don't show annotation
3969 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3970 (layout::get_state_at_point): Update for conversion of
3971 show_caret_p to a tri-state. Bail out early for
3972 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3973 underlining or source colorization.
3974 (gcc_rich_location::add_location_if_nearby): Update for conversion
3975 of show_caret_p to a tri-state.
3976 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3977 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3979 (selftest::test_one_liner_labels): Likewise.
3980 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3981 conversion of show_caret_p to a tri-state.
3982 * pretty-print.c (text_info::set_location): Likewise.
3983 * pretty-print.h (text_info::set_location): Likewise.
3984 * substring-locations.c (format_warning_n_va): Likewise.
3985 * tree-diagnostic.c (default_tree_printer): Likewise.
3986 * tree-pretty-print.c (newline_and_indent): Likewise.
3988 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3991 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3992 line above for line-insertion fix-it hints.
3993 (selftest::test_fixit_insert_containing_newline): Update the
3994 expected results, and add a test with line-numbering enabled.
3996 2018-08-27 Martin Liska <mliska@suse.cz>
3999 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4000 params with DECL_HAS_VALUE_EXPR_P.
4002 2018-08-27 Martin Liska <mliska@suse.cz>
4004 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4005 selected expansion strategy.
4007 2018-08-27 Martin Liska <mliska@suse.cz>
4009 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4010 * builtins.c (is_builtin_fn): Likewise.
4011 * attribs.c (diag_attr_exclusions): Use new function
4012 fndecl_built_in_p and remove check for FUNCTION_DECL if
4014 (builtin_mathfn_code): Likewise.
4015 (fold_builtin_expect): Likewise.
4016 (fold_call_expr): Likewise.
4017 (fold_builtin_call_array): Likewise.
4018 (fold_call_stmt): Likewise.
4019 (set_builtin_user_assembler_name): Likewise.
4020 (is_simple_builtin): Likewise.
4021 * calls.c (gimple_alloca_call_p): Likewise.
4022 (maybe_warn_nonstring_arg): Likewise.
4023 * cfgexpand.c (expand_call_stmt): Likewise.
4024 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4025 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4026 (cgraph_node::verify_node): Likewise.
4027 * cgraphclones.c (build_function_decl_skip_args): Likewise.
4028 (cgraph_node::create_clone): Likewise.
4029 * config/arm/arm.c (arm_insert_attributes): Likewise.
4030 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4031 * dse.c (scan_insn): Likewise.
4032 * expr.c (expand_expr_real_1): Likewise.
4033 * fold-const.c (operand_equal_p): Likewise.
4034 (fold_binary_loc): Likewise.
4035 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4036 * gimple-low.c (lower_stmt): Likewise.
4037 * gimple-pretty-print.c (dump_gimple_call): Likewise.
4038 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4040 * gimple.c (gimple_build_call_from_tree): Likewise.
4041 (gimple_call_builtin_p): Likewise.
4042 (gimple_call_combined_fn): Likewise.
4043 * gimplify.c (gimplify_call_expr): Likewise.
4044 (gimple_boolify): Likewise.
4045 (gimplify_modify_expr): Likewise.
4046 (gimplify_addr_expr): Likewise.
4047 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4048 * ipa-cp.c (determine_versionability): Likewise.
4049 * ipa-fnsummary.c (compute_fn_summary): Likewise.
4050 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4051 * ipa-split.c (visit_bb): Likewise.
4052 (split_function): Likewise.
4053 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4054 * lto-cgraph.c (input_node): Likewise.
4055 * lto-streamer-out.c (write_symbol): Likewise.
4056 * omp-low.c (setjmp_or_longjmp_p): Likewise.
4057 (lower_omp_1): Likewise.
4058 * predict.c (strip_predict_hints): Likewise.
4059 * print-tree.c (print_node): Likewise.
4060 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4061 * trans-mem.c (is_tm_irrevocable): Likewise.
4062 (is_tm_load): Likewise.
4063 (is_tm_simple_load): Likewise.
4064 (is_tm_store): Likewise.
4065 (is_tm_simple_store): Likewise.
4066 (is_tm_abort): Likewise.
4067 (tm_region_init_1): Likewise.
4068 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4069 * tree-cfg.c (verify_gimple_call): Likewise.
4070 (move_stmt_r): Likewise.
4071 (stmt_can_terminate_bb_p): Likewise.
4072 * tree-eh.c (lower_eh_constructs_2): Likewise.
4073 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4074 * tree-inline.c (remap_gimple_stmt): Likewise.
4075 (copy_bb): Likewise.
4076 (estimate_num_insns): Likewise.
4077 (fold_marked_statements): Likewise.
4078 * tree-sra.c (scan_function): Likewise.
4079 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4080 (optimize_stack_restore): Likewise.
4081 (pass_fold_builtins::execute): Likewise.
4082 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4083 (mark_all_reaching_defs_necessary_1): Likewise.
4084 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4085 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4086 (pass_forwprop::execute): Likewise.
4087 * tree-ssa-loop-im.c (stmt_cost): Likewise.
4088 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4089 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4090 * tree-ssa-strlen.c (get_string_length): Likewise.
4091 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4092 (find_func_aliases_for_call): Likewise.
4093 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4094 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4095 * tree-tailcall.c (find_tail_calls): Likewise.
4096 * tree.c (need_assembler_name_p): Likewise.
4097 (free_lang_data_in_decl): Likewise.
4098 (get_call_combined_fn): Likewise.
4099 * ubsan.c (is_ubsan_builtin_p): Likewise.
4100 * varasm.c (incorporeal_function_p): Likewise.
4101 * tree.h (DECL_BUILT_IN): Remove and replace with
4103 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4104 (fndecl_built_in_p): New.
4106 2018-08-27 Martin Liska <mliska@suse.cz>
4108 PR tree-optimization/86847
4109 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4110 Dump also subtree probability.
4111 (switch_decision_tree::do_jump_if_equal): New function.
4112 (switch_decision_tree::emit_case_nodes): Handle special
4113 situations in balanced tree that can be emitted much simpler.
4114 Fix calculation of probabilities that happen in tree expansion.
4115 * tree-switch-conversion.h (struct cluster): Add
4117 (struct simple_cluster): Likewise.
4118 (struct case_tree_node): Add new function has_child.
4119 (do_jump_if_equal): New.
4121 2018-08-27 Martin Liska <mliska@suse.cz>
4123 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4124 Add new argument to bit_test_cluster constructor.
4125 (bit_test_cluster::emit): Set bits really number of values
4127 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4128 probability argument.
4129 * tree-switch-conversion.h (struct bit_test_cluster):
4130 Add m_handles_entire_switch.
4132 2018-08-27 Martin Liska <mliska@suse.cz>
4134 PR tree-optimization/86702
4135 * tree-switch-conversion.c (jump_table_cluster::emit):
4136 Make probabilities even for values in jump table
4137 according to number of cases handled.
4138 (switch_decision_tree::compute_cases_per_edge): Pass
4139 argument to reset_out_edges_aux function.
4140 (switch_decision_tree::analyze_switch_statement): Likewise.
4141 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4144 2018-08-27 Martin Liska <mliska@suse.cz>
4146 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4147 cfun argument explicitly.
4148 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4149 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4150 function gimple_switch_default_bb.
4151 (convert_switch_statements):
4153 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4154 * stmt.c (label_to_block_fn): Use label_to_block and pass
4155 cfun argument explicitly and use gimple_switch_label_bb.
4156 (expand_case): Likewise.
4157 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4158 cfun argument explicitly. Likewise.
4159 (make_edges_bb): Likewise.
4160 (make_cond_expr_edges): Likewise.
4161 (get_cases_for_edge): Likewise.
4162 (make_gimple_switch_edges): Likewise.
4163 (label_to_block_fn): Likewise.
4164 (label_to_block): Likewise.
4165 (make_goto_expr_edges): Likewise.
4166 (make_gimple_asm_edges): Likewise.
4167 (main_block_label): Likewise.
4168 (group_case_labels_stmt): Likewise.
4169 (find_taken_edge_computed_goto): Likewise.
4170 (find_taken_edge_switch_expr): Likewise.
4171 (gimple_verify_flow_info): Likewise.
4172 (gimple_redirect_edge_and_branch): Likewise.
4173 (gimple_switch_label_bb): New function.
4174 (gimple_switch_default_bb): Likewise.
4175 (gimple_switch_edge): Likewise.
4176 (gimple_switch_default_edge): Likewise.
4177 * tree-cfg.h (label_to_block_fn): Remove and replace ...
4178 (label_to_block): ... with this.
4179 (gimple_switch_label_bb): New.
4180 (gimple_switch_default_bb): Likewise.
4181 (gimple_switch_edge): Likewise.
4182 (gimple_switch_default_edge): Likewise.
4183 * tree-cfgcleanup.c (convert_single_case_switch): Use
4184 new gimple functions and pass new argument to label_to_block.
4185 (cleanup_control_flow_bb):
4186 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4187 cfun argument explicitly.
4188 (make_eh_edges): Likewise.
4189 (redirect_eh_dispatch_edge): Likewise.
4190 (lower_resx): Likewise.
4191 (lower_eh_dispatch): Likewise.
4192 (maybe_remove_unreachable_handlers): Likewise.
4193 (unsplit_eh): Likewise.
4194 (cleanup_empty_eh): Likewise.
4195 (verify_eh_edges): Likewise.
4196 (verify_eh_dispatch_edge): Likewise.
4197 * tree-ssa-dom.c (record_edge_info): Likewise.
4198 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4199 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4200 (thread_through_normal_block): Likewise.
4201 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4202 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4203 * tree-switch-conversion.c (switch_conversion::collect): Use new
4205 (switch_conversion::check_final_bb): Likewise.
4206 (switch_conversion::gather_default_values): Pass new argument
4208 (switch_conversion::build_constructors): Likewise.
4209 (switch_decision_tree::compute_cases_per_edge): Use new
4210 gimple_switch_edge function.
4211 (switch_decision_tree::analyze_switch_statement): Pass new argument
4213 (switch_decision_tree::try_switch_expansion): Use
4214 gimple_switch_default_edge.
4215 * tree-vrp.c (find_switch_asserts): Pass new argument
4217 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4218 (vr_values::simplify_switch_using_ranges): Likewise.
4220 2018-08-27 Richard Biener <rguenther@suse.de>
4222 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4223 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4225 * tree-ssa-sccvn.h (struct vn_pval): New structure.
4226 (struct vn_nary_op_s): Add unwind_to member. Add
4227 predicated_values flag and put result into a union together
4228 with a linked list of vn_pval.
4229 (struct vn_ssa_aux): Add name member to make maintaining
4230 a map of SSA name to vn_ssa_aux possible. Remove no longer
4231 needed info, dfsnum, low, visited, on_sccstack, use_processed
4232 and range_info_anti_range_p members.
4233 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4234 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4236 (vn_valueize): New global.
4237 (vn_context_bb): Likewise.
4238 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4239 VN_INFO_PTR_INFO): Remove.
4240 * tree-ssa-sccvn.c: ... (rewrite)
4241 (pass_fre::execute): For -O2+ initialize loops and run
4242 RPO VN in optimistic mode (iterating). For -O1 and -Og
4243 run RPO VN in non-optimistic mode.
4244 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4245 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4246 * doc/invoke.texi (sccvn-max-scc-size): Remove.
4247 (rpo-vn-max-loop-depth): Document.
4248 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4249 when valuezing the VUSE signals we walked out of the region.
4250 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4251 (phi_translate): Set VN context block to use for availability
4253 (compute_avail): Likewise.
4254 (pre_valueize): New function.
4255 (pass_pre::execute): Adjust to the RPO VN API.
4257 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4258 (propagate_constants_for_unrolling): Remove.
4259 (tree_unroll_loops_completely): Perform value-numbering
4260 on the unrolled bodies loop parent.
4262 2018-08-27 Richard Biener <rguenther@suse.de>
4264 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4265 for partial antic compute.
4267 2018-08-27 Jakub Jelinek <jakub@redhat.com>
4269 PR rtl-optimization/87065
4270 * combine.c (simplify_if_then_else): Formatting fix.
4271 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4273 (known_cond): Don't return const_true_rtx for vector modes. Use
4274 CONST0_RTX instead of const0_rtx. Formatting fixes.
4276 2018-08-27 Martin Liska <mliska@suse.cz>
4278 PR gcov-profile/87069
4279 * gcov.c (process_file): Record files already processed
4280 and warn about a file being processed multiple times.
4282 2018-08-27 Martin Liska <mliska@suse.cz>
4285 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4286 Set default values for x_aarch64_*_string strings.
4287 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4288 prefix. For -mabi do not print '=ABI' in help and use
4289 <option_value> format for -msve-vector-bits and -moverride
4292 2018-08-26 Jeff Law <law@redhat.com>
4294 * config/mips/frame-header-opt.c: Include "backend.h" rather than
4297 2018-08-26 Marek Polacek <polacek@redhat.com>
4299 PR c++/87029, Implement -Wredundant-move.
4300 * doc/invoke.texi: Document -Wredundant-move.
4302 2018-08-25 Martin Sebor <msebor@redhat.com>
4304 PR tree-optimization/87059
4305 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4306 to the same type as the other.
4307 * fold-const.c (fold_binary_loc): Assert expectation.
4309 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
4311 * config/darwin.c (machopic_legitimize_pic_address): Clean up
4312 extraneous parentheses, dead code section and formatting.
4314 2018-08-24 David Malcolm <dmalcolm@redhat.com>
4317 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4318 wide enough for jumps in the line-numbering to be visible.
4319 (layout::print_gap_in_line_numbering): New member function.
4320 (layout::calculate_line_spans): When using line numbering, merge
4321 line spans that are only 1 line apart.
4322 (diagnostic_show_locus): When printing line numbers, show gaps in
4323 line numbering directly, rather than printing headers.
4324 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4325 line-numbering with multiple line spans.
4326 (selftest::test_fixit_insert_containing_newline_2): Add test of
4327 line-numbering, in which the spans are close enough to be merged.
4329 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4331 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4332 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
4333 * tree-vrp.c (range_is_nonnull): Remove.
4334 (range_includes_zero_p): Accept value_range instead of min/max.
4335 (extract_range_from_binary_expr_1): Do not early bail on
4337 Use range_includes_zero_p instead of range_is_nonnull.
4338 (extract_range_from_unary_expr): Use range_includes_zero_p instead
4339 of range_is_nonnull.
4340 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
4341 special case VR_ANTI_RANGE.
4342 (vrp_finalize): Same.
4343 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4345 (range_is_nonnull): Remove.
4346 * vr-values.c (vrp_stmt_computes_nonzero): Use
4347 range_includes_zero_p instead of range_is_nonnull.
4348 (extract_range_basic): Pass value_range to range_includes_zero_p
4349 instead of range_is_nonnull.
4351 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4353 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4354 * emit-rtl.h (rtl_data): Remove return_bnd.
4355 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4356 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4357 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4358 (POINTER_BOUNDS_MODE): Remove definition.
4359 (make_pointer_bounds_mode): Remove.
4360 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4361 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4362 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4363 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4364 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4365 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4366 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4368 * config/i386/i386-modes.def (BND32, BND64): Remove.
4369 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4370 (dbx64_register_map): Ditto.
4371 (svr4_dbx_register_map): Ditto.
4372 (indirect_thunk_bnd_needed): Remove.
4373 (indirect_thunks_bnd_used): Ditto.
4374 (indirect_return_bnd_needed): Ditto.
4375 (indirect_return_via_cx_bnd): Ditto.
4376 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4377 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4378 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4379 (output_indirect_thunk_function): Remove handling of
4380 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4381 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4382 (ix86_save_reg): Remove handling of crtl->return_bnd.
4383 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4384 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4385 and UNSPEC_BNDLX_ADDR.
4386 (ix86_output_indirect_branch_via_reg): Remove handling of
4387 indirect_thunk_prefix_bnd.
4388 (ix86_output_indirect_branch_via_push): Ditto.
4389 (ix86_output_function_return): Ditto.
4390 (ix86_output_indirect_function_return): Ditto.
4391 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4392 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4393 (CALL_USED_REGISTERS): Ditto.
4394 (REG_ALLOC_ORDER): Update for removal of bound registers.
4395 (HI_REGISTER_NAMES): Ditto.
4396 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4397 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4398 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4399 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4400 (FIRST_PSEUDO_REG): Update.
4401 (BND): Remove mode iterator.
4402 * config/i386/predicates.md (bnd_mem_operator): Remove.
4404 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4406 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4409 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4411 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4412 the case in which the permute needs only a single element and
4413 repeats for every vector of the result. Extend that case to
4414 handle variable-length vectors.
4415 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4417 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
4420 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4421 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4423 2018-08-24 Richard Biener <rguenther@suse.de>
4425 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4426 bb_flags_allocated members.
4427 (auto_flag): New RAII class for allocating flags.
4428 (auto_edge_flag): New RAII class for allocating edge flags.
4429 (auto_bb_flag): New RAII class for allocating bb flags.
4430 * cfgloop.c (verify_loop_structure): Allocate temporary edge
4432 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4433 in favor of temporarily allocated BB flag.
4434 * hsa-brig.c: Re-order includes.
4435 * hsa-dump.c: Likewise.
4436 * hsa-regalloc.c: Likewise.
4437 * print-rtl.c: Likewise.
4438 * profile-count.c: Likewise.
4440 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
4443 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4446 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4449 * wide-int-range.cc (wide_int_range_div): Do not ignore result
4450 from wide_int_range_multiplicative_op.
4452 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4454 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4457 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
4459 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4462 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
4464 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4465 full GENERIC expression used for replacement.
4467 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
4469 * tree-vrp.c (abs_extent_range): Remove.
4470 (extract_range_into_wide_ints): Pass wide ints by reference.
4471 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4472 Pass wide ints by reference in all calls to
4473 extract_range_into_wide_ints.
4474 * wide-int-range.cc (wide_int_range_div): New.
4475 * wide-int-range.h (wide_int_range_div): New.
4476 (wide_int_range_includes_zero_p): New.
4477 (wide_int_range_zero_p): New.
4479 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4481 * config/aarch64/aarch64.md (arches): New enum.
4482 (arch): New enum attr.
4483 (arch_enabled): New attr.
4484 (enabled): Now uses arch_enabled only.
4485 (simd, sve, fp16): Removed attribute.
4486 (fp): Attr now defined in terms of 'arch'.
4487 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4488 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4489 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4490 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4491 attributes into 'arch'.
4492 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4493 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4494 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4495 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4496 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4497 'simd' attribute into 'arch'.
4498 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4499 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4500 Convert use of 'fp' attribute to 'arch'.
4501 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4502 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4504 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4505 (different modes) Merge 'fp' and 'simd' into 'arch'.
4506 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4509 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4511 PR rtl-optimization/87026
4512 * expmed.c (canonicalize_comparison): If we can no longer create
4513 pseudoregisters, don't.
4515 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4518 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4520 * config/arm/arm.c (speculation_barrier_libfunc): New static
4522 (arm_init_libfuncs): Initialize it.
4523 (arm_emit_speculation_barrier): New function.
4524 * config/arm/arm.md (speculation_barrier): Call
4525 arm_emit_speculation_barrier for architectures that do not have
4527 (speculation_barrier_insn): Only match on Armv7 or later.
4529 2018-08-23 Richard Biener <rguenther@suse.de>
4532 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4535 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4537 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4538 of single-vector TBLs.
4539 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4542 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4545 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4546 aarch64_evpc_tbl guard.
4548 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4550 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4553 2018-08-22 Martin Sebor <msebor@redhat.com>
4556 * tree-pretty-print.c (pretty_print_string): Add argument.
4557 (dump_generic_node): Call to pretty_print_string with string size.
4559 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4561 PR rtl-optimization/86771
4562 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4563 of two SETs into those two SETs, one to be placed at i2, if that SETs
4564 destination is modified between i2 and i3.
4566 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4568 PR tree-optimization/86725
4569 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4571 (vect_analyze_scalar_cycles_1): Check it.
4573 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4575 PR tree-optimization/86725
4576 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4577 an outer loop phi as a double reduction, make sure that the
4578 single user of the phi result is an inner loop phi.
4580 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4582 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4583 grouped stores with gaps to a strided group.
4585 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4587 * tree-vect-stmts.c (get_group_load_store_type)
4588 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4589 first statement in a group.
4591 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4593 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4594 the sequence used in gcc/gcc.c.
4596 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4599 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4602 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4604 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4605 Darwin10-specific unwinder-shim.
4606 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4607 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4608 New to cater for Darwin10 Rosetta.
4610 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4612 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4613 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4615 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4620 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4621 (dwarf2out_switch_text_section): Generate a local label for the
4622 second function sub-section and apply it as the second FDE start
4624 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4625 second sub-section start.
4627 2018-08-22 Richard Biener <rguenther@suse.de>
4629 PR tree-optimization/86988
4630 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4632 2018-08-22 Richard Biener <rguenther@suse.de>
4634 PR tree-optimization/86945
4635 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4637 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4639 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4640 a comment about how uses of r2 for .sdata2 come about.
4642 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4644 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4646 2018-08-21 Marek Polacek <polacek@redhat.com>
4648 PR c++/86981, Implement -Wpessimizing-move.
4649 * doc/invoke.texi: Document -Wpessimizing-move.
4651 2018-08-21 Jan Hubicka <jh@suse.cz>
4653 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4654 * tree.h (is_redundant_typedef): Remove.
4655 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4657 2018-08-21 Jan Hubicka <jh@suse.cz>
4659 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4662 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4664 * expmed.c (extract_low_bits): Reject invalid subregs early.
4666 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4669 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4672 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4674 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4675 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4676 * config/vxworks.c: Likewise.
4678 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4680 * config/vxworks.c: Set targetm.have_ctors_dtors
4681 if HAVE_INITFINI_ARRAY_SUPPORT.
4682 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4683 if HAVE_INITFINI_ARRAY_SUPPORT.
4685 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4687 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4688 default search path for VxWorks < 7.
4690 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4692 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4693 (get_format_string): Refer to c_getstr.
4695 2018-08-21 Tom de Vries <tdevries@suse.de>
4697 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4698 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4699 (debuginfo_early_stop): Declare.
4700 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4701 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4702 (debuginfo_early_stop): New function.
4703 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4704 and debuginfo_early_stop.
4705 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4706 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4707 (general_init): Call debuginfo_early_init.
4708 (finalize): Call debuginfo_fini.
4709 (do_compile): Call debuginfo_init.
4710 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4712 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4714 2018-08-21 Tom de Vries <tdevries@suse.de>
4716 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4717 flag_dump_noaddr and flag_dump_unnumbered.
4719 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4721 * wide-int-range.cc (wide_int_range_abs): New.
4722 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4723 * wide-int-range.h (wide_int_range_abs): New.
4724 (wide_int_range_min_max): New.
4725 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4726 case to call wide_int_range_abs.
4727 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4728 (extract_range_from_abs_expr): Delete.
4730 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4733 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4734 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4737 2018-08-20 Nathan Sidwell <nathan@acm.org>
4738 Jeff Law <law@redhat.com>
4740 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4741 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4743 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4746 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4747 (decl_attributes): Likewise.
4748 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4750 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4751 * diagnostic-core.h (class auto_diagnostic_group): New class.
4752 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4753 (diagnostic_report_diagnostic): Handle the first diagnostics within
4755 (emit_diagnostic): Add auto_diagnostic_group instance.
4757 (inform_n): Likewise.
4758 (warning): Likewise.
4759 (warning_at): Likewise.
4760 (warning_n): Likewise.
4761 (pedwarn): Likewise.
4762 (permerror): Likewise.
4764 (error_n): Likewise.
4765 (error_at): Likewise.
4767 (fatal_error): Likewise.
4768 (internal_error): Likewise.
4769 (internal_error_no_backtrace): Likewise.
4770 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4771 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4772 * diagnostic.h (struct diagnostic_context): Add fields
4773 "diagnostic_group_nesting_depth",
4774 "diagnostic_group_emission_count", "begin_group_cb",
4776 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4777 Add auto_diagnostic_group instance(s).
4778 (find_explicit_erroneous_behavior): Likewise.
4779 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4780 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4781 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4782 (gimplify_va_arg_expr): Likewise.
4783 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4784 (HSA_SORRY_AT): Likewise.
4785 * ipa-devirt.c (compare_virtual_tables): Likewise.
4786 (warn_odr): Likewise.
4787 * multiple_target.c (expand_target_clones): Likewise.
4788 * opts-common.c (cmdline_handle_error): Likewise.
4789 * reginfo.c (globalize_reg): Likewise.
4790 * substring-locations.c (format_warning_n_va): Likewise.
4791 * tree-inline.c (expand_call_inline): Likewise.
4792 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4793 * tree-ssa-loop-niter.c
4794 (do_warn_aggressive_loop_optimizations): Likewise.
4795 * tree-ssa-uninit.c (warn_uninit): Likewise.
4796 * tree.c (warn_deprecated_use): Likewise.
4798 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4801 * config/i386/i386.md (eh_return): Always update EH return
4802 address in word_mode.
4804 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4806 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4807 TARGET_SPLIT_COMPLEX_ARG is defined.
4809 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4811 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4813 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4816 * expr.c (expand_assignment): Assert that bitpos is positive.
4817 (store_field): Likewise
4818 (expand_expr_real_1): Make sure that bitpos is positive.
4819 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4822 2018-08-20 Nathan Sidwell <nathan@acm.org>
4824 * Makefile.in (CPP_ID_DATA_H): Delete.
4825 (CPP_INTERNAL_H): Don't add it.
4826 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4827 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4829 2018-08-20 Richard Biener <rguenther@suse.de>
4831 PR tree-optimization/78655
4832 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4833 pointer + offset nonnull if either operand is nonnull work.
4835 2018-08-20 Tom de Vries <tdevries@suse.de>
4837 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4838 unless the referenced die describes the added property using
4839 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4840 Otherwise, add a DW_AT_location to the referenced die.
4842 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4845 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4846 register_operand when calling ix86_set_reg_reg_cost.
4847 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4848 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4849 predicate and to 1 otherwise.
4851 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4853 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4854 emit a diagnostic that it is not supported and reset the option.
4855 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4856 supported and consume the option. (ASM_FINAL_SPEC): New.
4858 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4860 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4863 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4865 C-SKY port: Documentation
4867 * doc/extend.texi (C-SKY Function Attributes): New section.
4868 * doc/invoke.texi (Option Summary): Add C-SKY options.
4869 (C-SKY Options): New section.
4870 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4872 2018-08-17 Jojo <jijie_rong@c-sky.com>
4873 Huibin Wang <huibin_wang@c-sky.com>
4874 Sandra Loosemore <sandra@codesourcery.com>
4875 Chung-Lin Tang <cltang@codesourcery.com>
4877 C-SKY port: Backend implementation
4879 * config/csky/*: New.
4880 * common/config/csky/*: New.
4882 2018-08-17 Jojo <jijie_rong@c-sky.com>
4883 Huibin Wang <huibin_wang@c-sky.com>
4884 Sandra Loosemore <sandra@codesourcery.com>
4885 Chung-Lin Tang <cltang@codesourcery.com>
4886 Andrew Jenner <andrew@codesourcery.com>
4888 C-SKY port: Configury
4890 * config.gcc (csky-*-*): New.
4891 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4892 * configure: Regenerated.
4894 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4896 * dump-context.h: Include "dumpfile.h".
4897 (dump_context::dump_printf_va): Convert final param from va_list
4898 to va_list *. Convert from ATTRIBUTE_PRINTF to
4899 ATTRIBUTE_GCC_DUMP_PRINTF.
4900 (dump_context::dump_printf_loc_va): Likewise.
4901 * dumpfile.c: Include "stringpool.h".
4902 (make_item_for_dump_printf_va): Delete.
4903 (make_item_for_dump_printf): Delete.
4904 (class dump_pretty_printer): New class.
4905 (dump_pretty_printer::dump_pretty_printer): New ctor.
4906 (dump_pretty_printer::emit_items): New member function.
4907 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4909 (dump_pretty_printer::emit_item): New member function.
4910 (dump_pretty_printer::stash_item): New member function.
4911 (dump_pretty_printer::format_decoder_cb): New member function.
4912 (dump_pretty_printer::decode_format): New member function.
4913 (dump_context::dump_printf_va): Reimplement in terms of
4914 dump_pretty_printer.
4915 (dump_context::dump_printf_loc_va): Convert final param from va_list
4917 (dump_context::begin_scope): Reimplement call to
4918 make_item_for_dump_printf.
4919 (dump_printf): Update for change to dump_printf_va.
4920 (dump_printf_loc): Likewise.
4921 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4922 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4923 with %T, %E, and %G.
4924 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4925 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4926 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4927 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4928 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4929 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4930 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4931 within a dump_printf_loc call to "%wu".
4932 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4933 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4934 missing space after "=".
4935 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4936 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4937 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4938 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4939 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4940 duplicate "vectorized" from message.
4942 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4944 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4945 polyNxK_t element's TYPE_STRING_FLAG.
4947 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4949 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4950 (they were unnamed before). Fix comments.
4952 2018-08-17 Nathan Sidwell <nathan@acm.org>
4954 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4956 2018-08-17 Richard Biener <rguenther@suse.de>
4958 PR tree-optimization/86841
4959 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4961 2018-08-17 Martin Liska <mliska@suse.cz>
4963 * common.opt: Remove Warn, Init and Report for options with
4964 Ignore/Deprecated flag. Warning is done automatically for
4966 * config/i386/i386.opt: Likewise.
4967 * config/ia64/ia64.opt: Likewise.
4968 * config/rs6000/rs6000.opt: Likewise.
4969 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4970 Remove usage of flag_check_pointer_bounds.
4971 * lto-wrapper.c (merge_and_complain): Do not handle
4972 OPT_fcheck_pointer_bounds.
4973 (append_compiler_options): Likewise.
4974 * opt-functions.awk: Do not handle Deprecated.
4975 * optc-gen.awk: Check that Var, Report and Init are not
4976 used for an option with Ignore/Deprecated flag.
4977 * opts-common.c (decode_cmdline_option): Do not report
4979 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4981 * opts.h (struct cl_option): Remove cl_deprecated flag.
4982 (CL_ERR_DEPRECATED): Remove error enum value.
4984 2018-08-17 Richard Biener <rguenther@suse.de>
4987 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4988 across a va-arg-pack using call adjust its return value accordingly.
4990 2018-08-16 Martin Sebor <msebor@redhat.com>
4992 PR tree-optimization/86853
4993 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4994 (struct fmtresult): Add member and initialize it in ctors.
4995 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4996 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4997 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4998 (parse_directive): Handle %C same as %c.
4999 (sprintf_dom_walker::compute_format_length): Adjust.
5000 (is_call_safe): Adjust.
5002 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5004 * builtins.c (c_strlen): Add new parameter eltsize. Use it
5005 for determining how to count the elements.
5006 * builtins.h (c_strlen): Adjust prototype.
5007 * expr.c (string_constant): Add new parameter mem_size.
5008 Set *mem_size appropriately.
5009 * expr.h (string_constant): Adjust protoype.
5010 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5011 * gimple-fold.h (get_range_strlen): Adjust prototype.
5012 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5013 (format_string): Call get_string_length with eltsize.
5015 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5017 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5018 to emit the span, rather than setting it as the prefix.
5020 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5022 * diagnostic-show-locus.c (layout::start_annotation_line): Add
5023 "margin_char" parameter, defaulting to space. Use it in place
5024 of pp_space for the initial part of the margin.
5025 (layout::print_leading_fixits): Use '+' when filling the margin
5026 of line-insertion fix-it hints.
5028 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5030 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5033 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5035 * config/rs6000/altivec.md: Don't set length attribute to the default
5037 * config/rs6000/darwin.md: Ditto.
5038 * config/rs6000/dfp.md: Ditto.
5039 * config/rs6000/htm.md: Ditto.
5040 * config/rs6000/rs6000.md: Ditto.
5041 * config/rs6000/sync.md: Ditto.
5042 * config/rs6000/vsx.md: Ditto.
5044 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5046 * config/rs6000/altivec.md: Don't set length attribute to the default
5047 value, for branch instructions.
5048 * config/rs6000/darwin.md: Ditto.
5049 * config/rs6000/rs6000.md: Ditto.
5051 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5053 * config/rs6000/rs6000.md (length): Always define as const_int 4.
5054 (unnamed conditional branch define_insn): Set length to 4 or 8
5055 depending on offset.
5056 (<bd>_<mode>): Similar, for alternative 0.
5057 (<bd>tf_<mode>): Ditto.
5059 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5061 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5063 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
5065 * doc/rtl.texi: Replace old RTX class names with new names.
5068 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
5070 * expmed.h (canonicalize_comparison): New declaration.
5071 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5072 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5073 * optabs.c (prepare_cmp_insn): Likewise.
5074 * rtl.h (unsigned_condition_p): New function which checks if a
5075 comparison operator is unsigned.
5077 2018-08-16 Nathan Sidwell <nathan@acm.org>
5079 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5080 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5082 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5085 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5086 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5087 (mov<mov>): ..this and enable unconditionally.
5089 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5091 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5093 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
5095 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5096 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5097 "Common" with "Target".
5099 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
5101 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5102 * doc/invoke.texi (mmitigate-rop): Remove.
5103 * config/i386/i386.c: Do not include "regrename.h".
5104 (ix86_rop_should_change_byte_p, reg_encoded_number)
5105 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5107 (ix86_reorg): Remove call to ix86_mitigate_rop.
5108 * config/i386/i386.md (attr "modrm_class"): Remove.
5109 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5110 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5111 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5113 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
5115 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5116 allow folding of mergeh() and mergel() for the float and double types.
5117 (fold_mergehl_helper): Rework to handle building a permute tree
5120 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
5122 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5125 2018-08-15 David Malcolm <dmalcolm@redhat.com>
5127 * common.opt (fdiagnostics-show-labels): New option.
5128 * diagnostic-show-locus.c (class layout_range): Add field
5130 (class layout): Add field "m_show_labels_p".
5131 (layout_range::layout_range): Add param "label" and use it to
5133 (make_range): Pass in NULL for new "label" param of layout_range's
5135 (layout::layout): Initialize m_show_labels_p.
5136 (layout::maybe_add_location_range): Pass in loc_range->m_label
5137 when constructing layout_range instances.
5138 (struct line_label): New struct.
5139 (layout::print_any_labels): New member function.
5140 (layout::print_line): Call it if label-printing is enabled.
5141 (selftest::test_one_liner_labels): New test.
5142 (selftest::test_diagnostic_show_locus_one_liner): Call it.
5143 * diagnostic.c (diagnostic_initialize): Initialize
5144 context->show_labels_p.
5145 * diagnostic.h (struct diagnostic_context): Add field
5147 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5148 -fno-diagnostics-show-labels.
5149 * dwarf2out.c (gen_producer_string): Add
5150 OPT_fdiagnostics_show_labels to the ignored options.
5151 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5153 (gcc_rich_location::maybe_add_expr): Likewise.
5154 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5155 label" param, defaulting to NULL.
5156 (gcc_rich_location::add_expr): Add "label" param.
5157 (gcc_rich_location::maybe_add_expr): Likewise.
5158 (class text_range_label): New class.
5159 (class range_label_for_type_mismatch): New class.
5160 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5161 of format_warning_va.
5162 (fmtwarn_n): Likewise for new params of format_warning_n_va.
5163 * lto-wrapper.c (merge_and_complain): Add
5164 OPT_fdiagnostics_show_labels to the "pick one setting" options.
5165 (append_compiler_options): Likewise to the dropped options.
5166 (append_diag_options): Likewise to the passed-on options.
5167 * opts.c (common_handle_option): Handle the new option.
5168 * selftest-diagnostic.c
5169 (test_diagnostic_context::test_diagnostic_context): Enable
5171 * substring-locations.c: Include "gcc-rich-location.h".
5172 (format_warning_n_va): Add "fmt_label" and "param_label" params
5173 and use them as appropriate.
5174 (format_warning_va): Add "fmt_label" and "param_label" params,
5175 passing them on to format_warning_n_va.
5176 (format_warning_at_substring): Likewise.
5177 (format_warning_at_substring_n): Likewise.
5178 * substring-locations.h (format_warning_va): Add "fmt_label" and
5179 "param_label" params.
5180 (format_warning_n_va): Likewise.
5181 (format_warning_at_substring): Likewise.
5182 (format_warning_at_substring_n): Likewise.
5183 * toplev.c (general_init): Initialize global_dc->show_labels_p.
5185 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
5188 * builtins.c (expand_builtin_memcmp): Do not expand the call
5189 when overflow is detected.
5191 2018-08-15 Martin Sebor <msebor@redhat.com>
5193 PR tree-optimization/71625
5194 * config/aarch64/aarch64-builtins.c
5195 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5197 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
5199 * config/s390/s390.c (s390_reorg): Remove loop.
5201 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5204 (darwin_function_switched_text_sections): Delete.
5205 * gcc/config/darwin.h
5206 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5208 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5211 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5212 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
5213 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5215 2018-08-15 Martin Liska <mliska@suse.cz>
5217 PR tree-optimization/86925
5218 * predict.c (expr_expected_value_1): When taking
5219 later predictor, assign also probability.
5220 Use fold_build2_initializer_loc in order to fold
5221 the expression in -frounding-math.
5223 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
5225 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5227 (expand_vec_perm_1): Try the new method.
5229 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
5232 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5233 Check whether lra_live_max_point is 0 before dividing.
5235 2018-08-14 Martin Sebor <msebor@redhat.com>
5237 PR tree-optimization/86650
5238 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5239 (vrp_prop::check_mem_ref): Same.
5241 2018-08-13 Liu Hao <lh_mouse@126.com>
5243 * pretty-print.c (eat_esc_sequence): Swap the foreground and
5244 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5245 and clear it thereafter, as it only works for DBCS.
5247 2018-08-13 Liu Hao <lh_mouse@126.com>
5249 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5250 handle returned by _get_osf_handle().
5252 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5254 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5255 for folding vec_perm.
5257 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5259 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5260 Add support for gimple-folding of vec_pack() and vec_unpack()
5263 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5265 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5266 vec_xst variants to the list.
5267 (rs6000_gimple_fold_builtin): Add support for folding unaligned
5268 vector loads and stores.
5270 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
5272 * config.gcc (rs6000-ibm-aix4.x): Delete.
5273 (rs6000-ibm-aix5.1): Delete.
5274 (rs6000-ibm-aix5.2): Delete.
5275 (rs6000-ibm-aix5.3): Delete.
5276 * config/rs6000/aix43.h: Delete.
5277 * config/rs6000/aix51.h: Delete.
5278 * config/rs6000/aix52.h: Delete.
5279 * config/rs6000/t-aix43: Delete.
5281 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
5283 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5285 (s390_decompose_address): Factor out constant pool ref
5288 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5290 * config/nds32/nds32-predicates.c
5291 (nds32_can_use_bclr_p): Change return type as bool.
5292 (nds32_can_use_bset_p): Ditto.
5293 (nds32_can_use_btgl_p): Ditto.
5294 (nds32_can_use_bitci_p): Ditto.
5295 * config/nds32/nds32-protos.h
5296 (nds32_can_use_bclr_p): Change declaration.
5297 (nds32_can_use_bset_p): Ditto.
5298 (nds32_can_use_btgl_p): Ditto.
5299 (nds32_can_use_bitci_p): Ditto.
5301 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5303 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5304 Support -msched-prolog-epilog option.
5305 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5307 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5309 * common/config/nds32/nds32-common.c
5310 (nds32_option_optimization_table): Enalbe -malways-align.
5312 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5314 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5316 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5317 OPT_misr_secure_ case.
5318 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5319 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5320 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5322 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5323 (nds32_isr_info): New field security_level.
5324 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5325 * config/nds32/nds32.md (return_internal): Consider critical attribute.
5326 * config/nds32/nds32.opt (misr-secure): New option.
5327 * config/nds32/nds32_init.inc: New file.
5328 * config/nds32/nds32_isr.h: New file.
5330 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
5332 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5333 Update comment for atomic instructions.
5334 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5335 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5337 (atomic_loaddi): Revise fence expansion to only emit fence prior to
5338 load for __ATOMIC_SEQ_CST model.
5339 (atomic_loaddi_1): Remove float register target.
5340 (atomic_storedi): Handle CONST_INT values.
5341 (atomic_storedi_1): Remove float register source. Add special case
5343 (memory_barrier): New expander and insn.
5345 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5347 PR tree-optimization/86835
5348 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5349 new_stmt after def_gsi, make sure to insert new_square_stmt after
5350 that stmt, not 2 stmts before it.
5352 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5355 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5358 2018-08-10 Martin Liska <mliska@suse.cz>
5361 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5363 * builtins.c (expand_builtin_expect_with_probability):
5365 (expand_builtin_expect_with_probability): New function.
5366 (build_builtin_expect_predicate): Add new argumnet probability
5367 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5368 (fold_builtin_expect):
5371 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5372 * builtins.h (fold_builtin_expect): Set new argument.
5373 * doc/extend.texi: Document __builtin_expect_with_probability.
5374 * doc/invoke.texi: Likewise.
5375 * gimple-fold.c (gimple_fold_call): Pass new argument.
5376 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5377 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5378 * predict.c (get_predictor_value): New function.
5379 (expr_expected_value): Add new argument probability. Assume
5380 that predictor and probability are always non-null.
5381 (expr_expected_value_1): Likewise. For __builtin_expect and
5382 __builtin_expect_with_probability set probability. Handle
5383 combination in binary expressions.
5384 (tree_predict_by_opcode): Simplify code by simply calling
5385 get_predictor_value.
5386 (pass_strip_predict_hints::execute): Add handling of
5387 BUILT_IN_EXPECT_WITH_PROBABILITY.
5388 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5390 * tree.h (DECL_BUILT_IN_P): New function.
5392 2018-08-10 Martin Liska <mliska@suse.cz>
5394 PR tree-optimization/85799
5395 * passes.def: Add argument for pass_strip_predict_hints.
5396 * predict.c (class pass_strip_predict_hints): Add new argument
5398 (strip_predictor_early): New function.
5399 (pass_strip_predict_hints::execute): Call the function to
5401 (strip_predict_hints): New function.
5402 * predict.def: Fix comment.
5404 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5406 * Makefile.in: Clarify which tm.texi to copy over to assert the
5407 right to grant a GFDL license for all.
5409 2018-08-09 Jeff Law <law@redhat.com>
5411 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5414 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
5416 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5419 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5421 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5422 reductions for variable-length vectors.
5424 2018-08-09 David Malcolm <dmalcolm@redhat.com>
5427 * common.opt (fdiagnostics-show-line-numbers): New option.
5428 * diagnostic-show-locus.c (class layout): Add fields
5429 "m_show_line_numbers_p" and "m_linenum_width";
5430 (num_digits): New function.
5431 (test_num_digits): New function.
5432 (layout::layout): Initialize new fields. Update m_x_offset
5433 logic to handle any left margin.
5434 (layout::print_source_line): Print line number when requested.
5435 (layout::start_annotation_line): New member function.
5436 (layout::print_annotation_line): Call it.
5437 (layout::print_leading_fixits): Likewise.
5438 (layout::print_trailing_fixits): Likewise. Update calls to
5439 move_to_column for new parameter.
5440 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5441 it to potentially call start_annotation_line.
5442 (layout::show_ruler): Call start_annotation_line.
5443 (selftest::test_line_numbers_multiline_range): New selftest.
5444 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5445 and selftest::test_line_numbers_multiline_range.
5446 * diagnostic.c (diagnostic_initialize): Initialize
5447 show_line_numbers_p.
5448 * diagnostic.h (struct diagnostic_context): Add field
5449 "show_line_numbers_p".
5450 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5451 -fno-diagnostics-show-line-numbers.
5452 * dwarf2out.c (gen_producer_string): Add
5453 OPT_fdiagnostics_show_line_numbers to the ignored options.
5454 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5455 one setting" options.
5456 (append_compiler_options): Likewise to the dropped options.
5457 (append_diag_options): Likewise to the passed-on options.
5458 * opts.c (common_handle_option): Handle the new option.
5459 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5461 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
5463 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5464 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
5465 third argument of type "const signed char" to descriptions of
5466 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5467 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5468 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5469 __builtin_bcdsub_ov functions.
5471 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5473 PR tree-optimization/86858
5474 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5475 flow_bb_inside_loop_p calls.
5477 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5479 PR tree-optimization/86871
5480 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5481 instead of gimple_assign_lhs.
5483 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5486 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5487 register constraint to operand 0.
5488 (add<mode>3_carryinC): Likewise.
5489 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5491 2018-08-09 Martin Liska <mliska@suse.cz>
5494 * common.opt: Remove extra line.
5496 2018-08-09 Martin Liska <mliska@suse.cz>
5498 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5499 at the end of a line, make first letter capital and end up
5500 a sentence with a dot.
5501 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5502 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5503 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5504 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5505 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5506 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5507 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5508 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5509 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5510 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5511 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5512 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5513 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5514 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5515 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5516 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5517 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5518 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5520 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5523 * config/s390/s390.c (s390_option_override_internal): Reduce the
5524 stack-clash-protection-probe-interval param if it would be too big
5527 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5530 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5531 * config/m68k/m68k.c (handle_move_double): Don't call
5532 m68k_final_prescan_insn.
5533 (m68k_adjust_decorated_operand): Renamed from
5534 m68k_final_prescan_insn, remove first and third operand and
5536 (print_operand): Call it.
5537 (print_operand_address): Call it.
5539 2018-08-08 Nathan Sidwell <nathan@acm.org>
5541 * diagnostic.c (diagnostic_report_current_module): Use
5542 linemap_included_from & linemap_included_from_linemap.
5544 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5546 * config/aarch64/aarch64-cores.def: Add phecda core.
5547 * config/aarch64/aarch64-tune.md: Regenerate.
5548 * doc/invoke.texi: Add phecda core.
5550 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5553 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5555 * config/s390/s390.md ("movti"): Add more alternatives for
5556 constant to GPR copies.
5558 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5560 * config/s390/s390.c: Fix whitespace damage throughout the file.
5561 * config/s390/s390.h: Likewise.
5562 * config/s390/tpf.h: Likewise.
5564 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5566 * config/s390/s390.c (s390_loadrelative_operand_p):
5567 Remove TARGET_CPU_ZARCH usages.
5568 (s390_rtx_costs): Likewise.
5569 (s390_legitimate_constant_p): Likewise.
5570 (s390_cannot_force_const_mem): Likewise.
5571 (legitimate_reload_constant_p): Likewise.
5572 (s390_preferred_reload_class): Likewise.
5573 (legitimize_pic_address): Likewise.
5574 (legitimize_tls_address): Likewise.
5575 (s390_split_branches): Removed.
5576 (s390_add_execute): Removed.
5577 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5578 (s390_mainpool_start): Likewise.
5579 (s390_mainpool_finish): Likewise.
5580 (s390_mainpool_cancel): Removed.
5581 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5582 (s390_chunkify_cancel): Likewise.
5583 (s390_return_addr_rtx): Likewise.
5584 (s390_register_info): Remove split_branches_pending_p uages.
5585 (s390_optimize_register_info): Likewise.
5586 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5587 split_branches_pending_p usages.
5588 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5589 (s390_load_got): Likewise.
5590 (s390_expand_split_stack_prologue): Likewise.
5591 (output_asm_nops): Likewise.
5592 (s390_function_profiler): Likewise.
5593 (s390_emit_call): Likewise.
5594 (s390_conditional_register_usage): Likewise.
5595 (s390_optimize_prologue): Likewise.
5596 (s390_reorg): Remove TARGET_CPU_ZARCH and
5597 split_branches_pending_p usages.
5598 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5600 (s390_output_indirect_thunk_function): Likewise.
5601 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5602 (TARGET_CPU_ZARCH_P): Removed.
5603 (struct machine_function): Remove split_branches_pending_p.
5604 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5606 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5608 * common/config/s390/s390-common.c (processor_flags_table):
5610 * config.gcc: Remove with_arch/with_tune support.
5611 * config/s390/2064.md: Remove cpu attribute comparisons.
5612 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5614 * config/s390/linux.h (ASM_SPEC):
5615 Remove -march support.
5616 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5617 Use a table to get an arch level.
5618 * config/s390/s390-opts.h (enum processor_type):
5620 * config/s390/s390.c
5621 (processor_table): Remove entries, add arch_level values.
5622 (s390_issue_rate): Remove cases.
5623 (s390_option_override): Adjust
5624 s390_option_override_internal() call.
5625 (s390_option_override_internal): Remove deprecation warning.
5626 (s390_valid_target_attribute_tree): Adjust
5627 s390_option_override_internal() call.
5628 * config/s390/s390.h (struct s390_processor):
5629 Share with s390-c.c, add arch_level field.
5630 * config/s390/s390.md:
5631 Remove occurrences in cpu attribute.
5632 * config/s390/s390.opt: Remove -march/-mtune support.
5633 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5634 * doc/invoke.texi: Remove deprecation warning.
5636 2018-08-08 Luis Machado <luis.machado@linaro.org>
5638 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5640 (qdf24xx_tunings): Set vector cost structure to
5641 qdf24xx_vector_cost.
5643 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5644 <register_sextend>: Set to 3.
5646 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5649 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5650 * config/aarch64/aarch64-simd.md
5651 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5652 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5653 (aarch64_frecpx<mode>): ...this new pattern.
5654 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5655 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5657 2018-08-07 Martin Liska <mliska@suse.cz>
5660 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5661 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5662 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5663 * doc/extend.texi: Document that malloc attribute adds
5666 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5669 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5670 Define to speculation_safe_value_not_needed.
5672 2018-08-06 Jeff Law <law@redhat.com>
5674 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5675 the vr_values instance to cprop_into_stmt.
5676 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5677 (cprop_operand): Also query EVRP to determine if OP is a constant.
5679 2018-08-06 Nathan Sidwell <nathan@acm.org>
5681 * diagnostic.c (diagnostic_report_current_module): Reroll
5682 included-at loop. Translate text.
5684 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5686 * function-tests.c (selftest::test_expansion_to_rtl): Call
5687 free_after_compilation.
5689 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5691 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5693 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5695 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5696 loops with memory block operations from getting unrolled.
5698 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5701 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5702 Define to speculation_safe_value_not_needed.
5704 2018-08-06 Jeff Law <law@redhat.com>
5706 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5709 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5712 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5713 with all enabled __intN types.
5715 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5717 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5719 * alias.c (record_set): Check for clobber high.
5720 * cfgexpand.c (expand_gimple_stmt): Likewise.
5721 * combine-stack-adj.c (single_set_for_csa): Likewise.
5722 * combine.c (find_single_use_1): Likewise.
5723 (set_nonzero_bits_and_sign_copies): Likewise.
5724 (get_combine_src_dest): Likewise.
5725 (is_parallel_of_n_reg_sets): Likewise.
5726 (try_combine): Likewise.
5727 (record_dead_and_set_regs_1): Likewise.
5728 (reg_dead_at_p_1): Likewise.
5729 (reg_dead_at_p): Likewise.
5730 * dce.c (deletable_insn_p): Likewise.
5731 (mark_nonreg_stores_1): Likewise.
5732 (mark_nonreg_stores_2): Likewise.
5733 * df-scan.c (df_find_hard_reg_defs): Likewise.
5734 (df_uses_record): Likewise.
5735 (df_get_call_refs): Likewise.
5736 * dwarf2out.c (mem_loc_descriptor): Likewise.
5737 * haifa-sched.c (haifa_classify_rtx): Likewise.
5738 * ira-build.c (create_insn_allocnos): Likewise.
5739 * ira-costs.c (scan_one_insn): Likewise.
5740 * ira.c (equiv_init_movable_p): Likewise.
5741 (rtx_moveable_p): Likewise.
5742 (interesting_dest_for_shprep): Likewise.
5743 * jump.c (mark_jump_label_1): Likewise.
5744 * postreload-gcse.c (record_opr_changes): Likewise.
5745 * postreload.c (reload_cse_simplify): Likewise.
5746 (struct reg_use): Add source expr.
5747 (reload_combine): Check for clobber high.
5748 (reload_combine_note_use): Likewise.
5749 (reload_cse_move2add): Likewise.
5750 (move2add_note_store): Likewise.
5751 * print-rtl.c (print_pattern): Likewise.
5752 * recog.c (decode_asm_operands): Likewise.
5753 (store_data_bypass_p): Likewise.
5754 (if_test_bypass_p): Likewise.
5755 * regcprop.c (kill_clobbered_value): Likewise.
5756 (kill_set_value): Likewise.
5757 * reginfo.c (reg_scan_mark_refs): Likewise.
5758 * reload1.c (maybe_fix_stack_asms): Likewise.
5759 (eliminate_regs_1): Likewise.
5760 (elimination_effects): Likewise.
5761 (mark_not_eliminable): Likewise.
5762 (scan_paradoxical_subregs): Likewise.
5763 (forget_old_reloads_1): Likewise.
5764 * reorg.c (find_end_label): Likewise.
5765 (try_merge_delay_insns): Likewise.
5766 (redundant_insn): Likewise.
5767 (own_thread_p): Likewise.
5768 (fill_simple_delay_slots): Likewise.
5769 (fill_slots_from_thread): Likewise.
5770 (dbr_schedule): Likewise.
5771 * resource.c (update_live_status): Likewise.
5772 (mark_referenced_resources): Likewise.
5773 (mark_set_resources): Likewise.
5774 * rtl.c (copy_rtx): Likewise.
5775 * rtlanal.c (reg_referenced_p): Likewise.
5776 (single_set_2): Likewise.
5777 (noop_move_p): Likewise.
5778 (note_stores): Likewise.
5779 * sched-deps.c (sched_analyze_reg): Likewise.
5780 (sched_analyze_insn): Likewise.
5782 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5784 * cse.c (invalidate_reg): New function extracted from...
5785 (invalidate): ...here.
5786 (canonicalize_insn): Check for clobber high.
5787 (invalidate_from_clobbers): invalidate clobber highs.
5788 (invalidate_from_sets_and_clobbers): Likewise.
5789 (count_reg_usage): Check for clobber high.
5790 (insn_live_p): Likewise.
5791 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5792 (cselib_invalidate_regno): Check for clobber in setter.
5793 (cselib_invalidate_rtx): Pass through setter.
5794 (cselib_invalidate_rtx_note_stores):
5795 (cselib_process_insn): Check for clobber high.
5796 * cselib.h (cselib_invalidate_rtx): Add operand.
5798 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5800 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5801 (mark_not_eliminable): Likewise.
5802 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5803 * lra-lives.c (process_bb_lives): Check for clobber high.
5804 * lra.c (new_insn_reg): Remember clobber highs.
5805 (collect_non_operand_hard_regs): Check for clobber high.
5806 (lra_set_insn_recog_data): Likewise.
5807 (add_regs_to_insn_regno_info): Likewise.
5808 (lra_update_insn_regno_info): Likewise.
5810 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5812 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5813 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5815 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5817 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5818 (copy_insn_1): Likewise.
5819 (gen_hard_reg_clobber_high): New gen function.
5820 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5821 * genemit.c (gen_exp): Likewise.
5822 (gen_emit_seq): Pass through info.
5823 (gen_insn): Check for CLOBBER_HIGH.
5824 (gen_expand): Pass through info.
5825 (gen_split): Likewise.
5826 (output_add_clobbers): Likewise.
5827 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5828 (remove_clobbers): Likewise.
5829 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5831 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5833 * doc/rtl.texi (clobber_high): Add.
5834 (parallel): Add in clobber high
5835 * rtl.c (rtl_check_failed_code3): Add function.
5836 * rtl.def (CLOBBER_HIGH): Add expression.
5837 * rtl.h (RTL_CHECKC3): Add macro.
5838 (rtl_check_failed_code3): Add declaration.
5839 (XC3EXP): Add macro.
5841 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5844 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5845 cfun->machine->max_used_stack_alignment if needed.
5847 2018-08-04 Martin Sebor <msebor@redhat.com>
5849 PR tree-optimization/86571
5850 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5853 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5856 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5859 2018-08-03 Jeff Law <law@redhat.com>
5862 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5863 Define to speculation_safe_value_not_needed.
5865 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5867 * doc/gcov.texi (-x): Remove duplicate "to".
5868 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5869 (-Wif-not-aligned): Remove duplicate "is".
5870 (-flto): Remove duplicate "the".
5871 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5872 duplicate "v5.00.b".
5873 (MSP430 Options): Remove duplicate "and" from the description
5874 of "-mgprel-sec=regexp".
5875 (x86 Options): Remove duplicate copies of "vmldLog102" and
5876 vmlsLog104 from description of "-mveclibabi=type".
5878 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5880 * internal-fn.h (first_commutative_argument): Declare.
5881 * internal-fn.c (first_commutative_argument): New function.
5882 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5883 restrictions for pattern statements. Use first_commutative_argument
5884 to look for commutative operands in calls to internal functions.
5886 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5888 * Makefile.in (wide-int-range.o): New.
5889 * tree-vrp.c: Move all the wide_int_* functions to...
5890 * wide-int-range.cc: ...here.
5891 * tree-vrp.h: Move all the wide_int_* prototypes to...
5892 * wide-int-range.h: ...here.
5894 2018-08-03 Tom de Vries <tdevries@suse.de>
5896 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5898 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5899 * except.c (output_function_exception_table): Do early exit if
5900 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5902 2018-08-03 Martin Liska <mliska@suse.cz>
5904 * predict.c (dump_prediction): Change to 2 digits
5907 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5909 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5911 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5913 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5915 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5916 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5917 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5918 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5919 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5921 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5923 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5924 pp_take_prefix when saving the existing prefix.
5925 * diagnostic.c (diagnostic_append_note): Likewise.
5926 * langhooks.c (lhd_print_error_function): Likewise.
5927 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5928 param's type. Free the existing prefix.
5929 (pp_take_prefix): New function.
5930 (pretty_printer::pretty_printer): Drop the prefix parameter.
5931 Rename the length parameter to match the comment.
5932 (pretty_printer::~pretty_printer): Free the prefix.
5933 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5935 (struct pretty_printer): Drop the "const" from "prefix" field's
5936 type and clarify memory management.
5937 (pp_set_prefix): Drop the "const" from the 2nd param.
5938 (pp_take_prefix): New decl.
5940 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5942 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5943 for word_mode_ok here instead of passing as argument.
5944 (expand_block_compare): Change select_block_compare_mode() call.
5945 (expand_strncmp_gpr_sequence): New function.
5946 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5948 2018-08-02 Jeff Law <law@redhat.com>
5951 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5952 Define to speculation_safe_value_not_needed.
5955 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5956 Define to speculation_safe_value_not_needed.
5958 2018-08-02 Tom de Vries <tdevries@suse.de>
5961 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5962 function. Return UI_TARGET unconditionally.
5963 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5964 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5966 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5968 * genemit.c (print_overload_test): Fix typo.
5970 2018-08-02 Richard Biener <rguenther@suse.de>
5972 PR tree-optimization/86816
5973 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5974 which checks for value availability before querying it.
5975 (gvn_uses_equal): Use it.
5976 (same_succ_hash): Likewise.
5977 (gimple_equal_p): Likewise.
5979 2018-08-02 Nick Clifton <nickc@redhat.com>
5982 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5983 Define to speculation_safe_value_not_needed.
5986 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5987 Define to speculation_safe_value_not_needed.
5990 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5991 Define to speculation_safe_value_not_needed.
5994 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5995 Define to speculation_safe_value_not_needed.
5998 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5999 Define to speculation_safe_value_not_needed.
6002 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6003 Define to speculation_safe_value_not_needed.
6006 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6007 Define to speculation_safe_value_not_needed.
6010 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6011 Define to speculation_safe_value_not_needed.
6014 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6015 speculation_safe_value_not_needed.
6018 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6019 to speculation_safe_value_not_needed.
6021 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6023 * doc/md.texi: Expand the documentation of instruction names
6024 to mention port-local uses. Document '@' in pattern names.
6025 * read-md.h (overloaded_instance, overloaded_name): New structs.
6027 (md_reader::handle_overloaded_name): New member function.
6028 (md_reader::get_overloads): Likewise.
6029 (md_reader::m_first_overload): New member variable.
6030 (md_reader::m_next_overload_ptr): Likewise.
6031 (md_reader::m_overloads_htab): Likewise.
6032 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6033 m_next_overload_ptr and m_overloads_htab.
6034 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6035 (get_mode_token, get_code_token, get_int_token): New functions.
6036 (map_attr_string): Add an optional argument that passes back
6037 the associated iterator.
6038 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6039 (md_reader::handle_overloaded_name, add_overload_instance): New
6041 (apply_iterators): Handle '@' names. Report an error if '@'
6042 is used without iterators.
6043 (initialize_iterators): Initialize the new iterator_group fields.
6044 * genopinit.c (handle_overloaded_code_for)
6045 (handle_overloaded_gen): New functions.
6046 (main): Use them to print declarations of maybe_code_for_* and
6047 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6048 * genemit.c (print_overload_arguments, print_overload_test)
6049 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6050 (main): Use it to print definitions of maybe_code_for_* and
6051 maybe_gen_* functions.
6052 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6053 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6054 instead of explicit mode checks.
6055 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6056 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6057 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6058 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6059 (aarch64_expand_compare_and_swap): Likewise
6060 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6061 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6062 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6063 (aarch64_constant_pool_reload_icode): Delete.
6064 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6065 instead of aarch64_constant_pool_reload_icode. Use
6066 code_for_aarch64_reload_mov instead of explicit mode checks.
6067 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6068 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6069 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6070 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6071 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6072 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6073 (aarch64_atomic_load_op_code): Delete.
6074 (aarch64_emit_atomic_load_op): Likewise.
6075 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6076 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
6077 instead of aarch64_emit_atomic_load_op.
6078 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6079 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6080 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6081 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6082 character before the pattern name.
6083 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6084 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6085 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6086 (aarch64_frecps<mode>): Likewise.
6087 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6088 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6089 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6090 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6091 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6093 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6095 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6096 Allow HFmode constants if TARGET_FP_F16INST.
6098 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
6101 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6102 No longer check last store for clobber of address register.
6104 2018-08-02 Martin Liska <mliska@suse.cz>
6106 PR gcov-profile/86817
6107 * gcov.c (process_all_functions): New function.
6109 (process_file): Move functions processing to
6110 process_all_functions.
6112 2018-08-02 David Malcolm <dmalcolm@redhat.com>
6114 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6115 "const" to the "gimple *" and "rtx_insn *" parameters.
6116 * dumpfile.h (dump_user_location_t::dump_user_location_t):
6118 (dump_location_t::dump_location_t): Likewise.
6120 2018-08-01 Martin Sebor <msebor@redhat.com>
6122 PR tree-optimization/86650
6123 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6124 rather than a "gcall *". Directly pass the data of interest
6125 to percent_K_format, rather than building a temporary CALL_EXPR
6127 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6128 (gimple_fold_builtin_strncat): Adjust.
6129 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6130 gcall* argument with gimple*.
6131 * gimple-ssa-warn-restrict.c (check_call): Same.
6132 (wrestrict_dom_walker::before_dom_children): Same.
6133 (builtin_access::builtin_access): Same.
6134 (check_bounds_or_overlap): Same
6135 (maybe_diag_overlap): Same.
6136 (maybe_diag_offset_bounds): Same.
6137 * tree-diagnostic.c (default_tree_printer): Move usage of
6138 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6140 * tree-pretty-print.c (percent_K_format): Add argument.
6141 * tree-pretty-print.h: Add argument.
6142 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6143 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6144 (maybe_diag_stxncpy_trunc): Same.
6145 (handle_builtin_stxncpy): Same.
6146 (handle_builtin_strcat): Same.
6148 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6150 * match.pd: Optimise pointer range checks.
6152 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6154 PR tree-optimization/86758
6155 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6156 to remove pattern statements.
6158 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6160 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6161 result of dfs_enumerate_from when constructing stmt_vec_infos,
6162 instead of additionally calling get_loop_body.
6164 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6166 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6168 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6169 When creating an iv, assert that the step is not known to be zero.
6170 (vect_setup_realignment): Update call accordingly.
6171 * tree-vect-stmts.c (vectorizable_store): Likewise.
6172 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
6174 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6176 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6177 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6178 (vectorizable_reduction): Likewise.
6179 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6180 (vect_detect_hybrid_slp_stmts): Likewise.
6181 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6183 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
6185 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6186 (wide_int_set_zero_nonzero_bits): ...this.
6187 (zero_nonzero_bits_from_vr): Rename to...
6188 (vrp_set_zero_nonzero_bits): ...this.
6189 (extract_range_from_multiplicative_op_1): Abstract wide int
6191 (wide_int_range_multiplicative_op): ...here.
6192 (extract_range_from_binary_expr_1): Extract wide int binary
6193 operations into their own functions.
6194 (wide_int_range_lshift): New.
6195 (wide_int_range_can_optimize_bit_op): New.
6196 (wide_int_range_shift_undefined_p): New.
6197 (wide_int_range_bit_xor): New.
6198 (wide_int_range_bit_ior): New.
6199 (wide_int_range_bit_and): New.
6200 (wide_int_range_trunc_mod): New.
6201 (extract_range_into_wide_ints): New.
6202 (vrp_shift_undefined_p): New.
6203 (extract_range_from_multiplicative_op): New.
6204 (vrp_can_optimize_bit_op): New.
6205 * tree-vrp.h (value_range::dump): New.
6206 (wide_int_range_multiplicative_op): New.
6207 (wide_int_range_lshift):New.
6208 (wide_int_range_shift_undefined_p): New.
6209 (wide_int_range_bit_xor): New.
6210 (wide_int_range_bit_ior): New.
6211 (wide_int_range_bit_and): New.
6212 (wide_int_range_trunc_mod): New.
6213 (zero_nonzero_bits_from_bounds): Rename to...
6214 (wide_int_set_zero_nonzero_bits): ...this.
6215 (zero_nonzero_bits_from_vr): Rename to...
6216 (vrp_set_zero_nonzero_bits): ...this.
6217 (range_easy_mask_min_max): Rename to...
6218 (wide_int_range_can_optimize_bit_op): this.
6219 * vr-values.c (simplify_bit_ops_using_ranges): Rename
6220 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6222 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6224 * tree-vectorizer.h (vect_orig_stmt): New function.
6225 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6226 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6227 (vect_create_epilog_for_reduction): Likewise.
6228 (vectorizable_live_operation): Likewise.
6229 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6230 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6231 * tree-vect-stmts.c (vectorizable_call): Likewise.
6232 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6234 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6236 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6238 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6239 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6240 (vect_transform_loop): Likewise.
6241 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6243 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6245 * tree-vectorizer.h (vect_schedule_slp): Return void.
6246 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6247 (vect_schedule_slp): Likewise.
6249 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6251 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6253 (vect_transform_loop): Update calls accordingly. Schedule SLP
6254 instances before the main loop, if any exist.
6256 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6258 PR tree-optimization/86749
6259 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6260 If the lhs is used in a COND_EXPR, check that it is being used
6261 as the "then" or "else" value.
6263 2018-08-01 Tom de Vries <tdevries@suse.de>
6266 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6267 speculation_safe_value_not_needed.
6269 2018-08-01 Richard Biener <rguenther@suse.de>
6271 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6274 2018-08-01 Martin Liska <mliska@suse.cz>
6276 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6277 format how successful transformation is dumped.
6278 (gimple_mod_pow2_value_transform): Likewise.
6279 (gimple_mod_subtract_transform): Likewise.
6280 (gimple_stringops_transform): Likewise.
6282 2018-08-01 Martin Liska <mliska@suse.cz>
6285 * value-prof.c (interesting_stringop_to_profile_p):
6286 Simplify the code and add BUILT_IN_MEMMOVE.
6287 (gimple_stringops_transform): Likewise.
6289 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
6291 * config/aarch64/aarch64-simd.md
6292 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6293 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6294 use GPI iterator instead of SI mode.
6296 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6298 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6299 rs6000_speculation_barrier.
6300 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6301 new barrier pattern name.
6303 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6305 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6306 (speculation_barrier): New insn.
6308 2018-08-01 Richard Biener <rguenther@suse.de>
6311 * graphite.h: Include isl/id.h and isl/space.h to allow build
6314 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
6317 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6318 mode for COFF targets.
6319 * defaults.h (TARGET_COFF): Define.
6320 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6321 TARGET_COFF): Define.
6322 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6323 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6324 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6326 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6328 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6329 * gimple-streamer-out.c (output_bb): Save it.
6330 * lto-streamer-in.c (input_struct_function_base): Restore
6331 instance discriminator if available. Create map on demand.
6332 * lto-streamer-out.c (output_struct_function_base): Save it if
6334 * final.c (decl_to_instance_map): Document LTO strategy.
6336 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6337 Olivier Hainque <hainque@adacore.com>
6339 * debug.h (decl_to_instance_map_t): New type.
6340 (decl_to_instance_map): Declare.
6341 (maybe_create_decl_to_instance_map): New inline function.
6342 * final.c (bb_discriminator, last_bb_discriminator): New statics,
6343 to track basic block discriminators.
6344 (final_start_function_1): Initialize them.
6345 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6347 (decl_to_instance_map): New variable.
6348 (map_decl_to_instance, maybe_set_discriminator): New functions.
6349 (notice_source_line): Set discriminator.
6351 2018-07-31 Ian Lance Taylor <iant@golang.org>
6353 * targhooks.c (default_have_speculation_safe_value): Add
6356 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6358 * dump-context.h: Include "pretty-print.h".
6359 (dump_context::refresh_dumps_are_enabled): New decl.
6360 (dump_context::emit_item): New decl.
6361 (class dump_context): Add fields "m_test_pp" and
6363 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6364 (temp_dump_context::get_dumped_text): New decl.
6365 (class temp_dump_context): Add field "m_pp".
6366 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6367 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6369 (set_dump_file): Update for above change.
6370 (set_alt_dump_file): Likewise.
6371 (dump_loc): New overload, taking a pretty_printer *.
6372 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6373 to any test pretty-printer.
6374 (make_item_for_dump_gimple_stmt): New function, adapted from
6375 optinfo::add_gimple_stmt.
6376 (dump_context::dump_gimple_stmt): Call it, and use the result,
6377 eliminating the direct usage of dump_file and alt_dump_file in
6378 favor of indirectly using them via emit_item.
6379 (make_item_for_dump_gimple_expr): New function, adapted from
6380 optinfo::add_gimple_expr.
6381 (dump_context::dump_gimple_expr): Call it, and use the result,
6382 eliminating the direct usage of dump_file and alt_dump_file in
6383 favor of indirectly using them via emit_item.
6384 (make_item_for_dump_generic_expr): New function, adapted from
6386 (dump_context::dump_generic_expr): Call it, and use the result,
6387 eliminating the direct usage of dump_file and alt_dump_file in
6388 favor of indirectly using them via emit_item.
6389 (make_item_for_dump_printf_va): New function, adapted from
6390 optinfo::add_printf_va.
6391 (make_item_for_dump_printf): New function.
6392 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6393 and use the result, eliminating the direct usage of dump_file and
6394 alt_dump_file in favor of indirectly using them via emit_item.
6395 (make_item_for_dump_dec): New function.
6396 (dump_context::dump_dec): Call it, and use the result,
6397 eliminating the direct usage of dump_file and alt_dump_file in
6398 favor of indirectly using them via emit_item.
6399 (make_item_for_dump_symtab_node): New function, adapted from
6400 optinfo::add_symtab_node.
6401 (dump_context::dump_symtab_node): Call it, and use the result,
6402 eliminating the direct usage of dump_file and alt_dump_file in
6403 favor of indirectly using them via emit_item.
6404 (dump_context::begin_scope): Reimplement, avoiding direct usage
6405 of dump_file and alt_dump_file in favor of indirectly using them
6407 (dump_context::emit_item): New member function.
6408 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6409 Set up test pretty-printer on the underlying context. Call
6410 refresh_dumps_are_enabled.
6411 (temp_dump_context::~temp_dump_context): Call
6412 refresh_dumps_are_enabled.
6413 (temp_dump_context::get_dumped_text): New member function.
6414 (selftest::verify_dumped_text): New function.
6415 (ASSERT_DUMPED_TEXT_EQ): New macro.
6416 (selftest::test_capture_of_dump_calls): Run all tests twice, with
6417 and then without optinfo enabled. Add uses of
6418 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
6419 * dumpfile.h: Update comment for the dump_* API.
6420 * optinfo-emit-json.cc
6421 (selftest::test_building_json_from_dump_calls): Update for new
6422 param for temp_dump_context ctor.
6423 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6424 and "m_owned" field.
6425 (optinfo_item::~optinfo_item): Likewise.
6426 (optinfo::add_item): New member function.
6427 (optinfo::emit): Update comment.
6428 (optinfo::add_string): Delete.
6429 (optinfo::add_printf): Delete.
6430 (optinfo::add_printf_va): Delete.
6431 (optinfo::add_gimple_stmt): Delete.
6432 (optinfo::add_gimple_expr): Delete.
6433 (optinfo::add_tree): Delete.
6434 (optinfo::add_symtab_node): Delete.
6435 (optinfo::add_dec): Delete.
6436 * optinfo.h (class dump_context): New forward decl.
6437 (optinfo::add_item): New decl.
6438 (optinfo::add_string): Delete.
6439 (optinfo::add_printf): Delete.
6440 (optinfo::add_printf_va): Delete.
6441 (optinfo::add_gimple_stmt): Delete.
6442 (optinfo::add_gimple_expr): Delete.
6443 (optinfo::add_tree): Delete.
6444 (optinfo::add_symtab_node): Delete.
6445 (optinfo::add_dec): Delete.
6446 (optinfo::add_poly_int): Delete.
6447 (optinfo_item::optinfo_item): Remove "owned" param.
6448 (class optinfo_item): Remove field "m_owned".
6450 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6453 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6454 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6455 requested variable alignment.
6456 (expand_one_ssa_partition): Likewise.
6457 (expand_one_var): Likewise.
6459 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6461 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6462 to speculation_safe_value_not_needed.
6464 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6466 * targhooks.h (speculation_safe_value_not_needed): New prototype.
6467 * targhooks.c (speculation_safe_value_not_needed): New function.
6468 * target.def (have_speculation_safe_value): Update documentation.
6469 * doc/tm.texi: Regenerated.
6471 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6473 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6474 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6476 (despeculate_copy<ALLI:mode>_insn): New insn.
6477 (despeculate_copyti_insn): New insn.
6478 (despeculate_simple<ALLI:mode>): New insn
6479 (despeculate_simpleti): New insn.
6480 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6482 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6483 aarch64_speculation_safe_value.
6484 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6486 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6488 * config/aarch64/aarch64-speculation.cc: New file.
6489 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6490 before pass_reorder_blocks.
6491 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6493 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6494 X14 and X15 when tracking speculation.
6495 * config/aarch64/aarch64.md (register name constants): Add
6496 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6497 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6498 (speculation_barrier): New insn attribute.
6499 (cmp<mode>): Allow SP in comparisons.
6500 (speculation_tracker): New insn.
6501 (speculation_barrier): Add speculation_barrier attribute.
6502 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6503 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6504 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6506 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6508 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6509 aarch64_track_speculation is true.
6510 (tb<optab><mode>1): Likewise.
6511 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6512 generate CB[N]Z when tracking speculation.
6513 (aarch64_split_compare_and_swap): Likewise.
6514 (aarch64_split_atomic_op): Likewise.
6516 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6518 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6520 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6522 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6523 (speculation_barrier): New insn.
6525 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6527 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6528 * config/arm/arm.md (speculation_barrier): New expand.
6529 (speculation_barrier_insn): New pattern.
6531 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6533 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6534 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6535 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6536 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6538 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6539 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6540 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6541 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6542 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6543 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6544 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6545 * builtins.c (expand_speculation_safe_value): New function.
6546 (expand_builtin): Call it.
6547 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6548 * doc/extend.texi: Document __builtin_speculation_safe_value.
6549 * doc/md.texi: Document "speculation_barrier" pattern.
6550 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6551 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6552 * doc/tm.texi: Regenerated.
6553 * target.def (have_speculation_safe_value, speculation_safe_value): New
6555 * targhooks.c (default_have_speculation_safe_value): New function.
6556 (default_speculation_safe_value): New function.
6557 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6558 (default_speculation_safe_value): Add prototype.
6560 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6562 * dump-context.h (dump_context::dump_loc): New decl.
6563 * dumpfile.c (dump_context::dump_loc): New member function.
6564 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6565 and dump_gimple_stmt.
6566 (dump_context::dump_gimple_expr_loc): Likewise, using
6568 (dump_context::dump_generic_expr_loc): Likewise, using
6570 (dump_context::dump_printf_loc_va): Likewise, using
6572 (dump_context::begin_scope): Explicitly using the global function
6573 "dump_loc", rather than the member function.
6575 2018-07-31 Martin Sebor <msebor@redhat.com>
6577 PR tree-optimization/86741
6578 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6580 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6582 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6583 depend on whether prefetch instructions will be emitted or not.
6584 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6585 will be emitted or not.
6586 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6587 (TARGET_SETMEM_PFD): New macros.
6589 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6591 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6592 (NULL_STMT_VEC_INFO): Delete.
6593 (stmt_vec_info::operator*): Likewise.
6594 (stmt_vec_info::operator gimple *): Likewise.
6595 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6596 of NULL_STMT_VEC_INFO.
6597 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6598 (vect_reassociating_reduction_p): Likewise.
6599 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6600 (vectorizable_store): Likewise.
6601 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6602 (vec_info::free_stmt_vec_infos): Likewise.
6604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6606 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6607 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6609 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6611 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6612 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6613 (vec_info::free_stmt_vec_info): New private member functions.
6614 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6615 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6616 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6617 set_stmt_vec_info_vec and free_stmt_vec_infos.
6618 * tree-vect-loop.c (_loop_vec_info): Remove call to
6619 set_stmt_vec_info_vec.
6620 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6621 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6622 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6623 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6624 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6625 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6626 with the clearing in the xcalloc.
6627 (stmt_vec_info_vec): Delete.
6628 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6629 (vectorize_loops): Likewise.
6630 (vec_info::~vec_info): Remove argument from call to
6631 free_stmt_vec_infos.
6632 (vec_info::add_stmt): Remove vinfo argument from call to
6635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6637 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6638 rather than a gimple stmt.
6639 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6640 information for pattern statements when passed the original
6641 statement; instead wait to be passed the pattern statement itself.
6642 Don't call set_vinfo_for_stmt here.
6643 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6644 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6645 stmt_vec_infos here.
6646 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6647 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6648 stmt_vec_infos entry.
6650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6652 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6653 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6654 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6655 * tree-vect-stmts.c (vectorizable_call): Likewise.
6656 (vectorizable_simd_clone_call): Likewise.
6658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6660 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6661 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6662 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6663 * tree-vect-loop.c (vect_transform_loop): Likewise.
6664 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6665 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6667 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6669 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6670 (vect_dr_stmt): Delete.
6671 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6672 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6674 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6675 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6676 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6677 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6678 (vect_analyze_data_refs): Likewise.
6679 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6681 (vect_find_same_alignment_drs): Likewise.
6682 (vect_slp_analyze_node_dependences): Update calls accordingly.
6683 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6684 instead of DR_VECT_AUX.
6685 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6686 of a vector data references. Use vec_info::lookup_dr instead of
6688 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6689 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6690 instead of DR_VECT_AUX.
6692 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6694 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6696 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6698 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6699 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6700 (vect_gen_prolog_loop_niters): Likewise.
6702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6704 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6705 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6706 (vect_known_alignment_in_bytes, vect_dr_behavior)
6707 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6708 instead of data_references. Update calls to other routines for
6709 which the same change has been made.
6710 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6711 dr_vec_infos instead of stmt_vec_infos.
6712 (vect_analyze_data_ref_dependence): Update call accordingly.
6713 (vect_slp_analyze_data_ref_dependence)
6714 (vect_record_base_alignments): Use DR_VECT_AUX.
6715 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6716 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6717 (vector_alignment_reachable_p, vect_get_data_access_cost)
6718 (vect_peeling_supportable, vect_analyze_group_access_1)
6719 (vect_analyze_group_access, vect_analyze_data_ref_access)
6720 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6721 (vect_compile_time_alias, vect_small_gap_p)
6722 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6723 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6724 instead of data_references. Update calls to other routines for
6725 which the same change has been made.
6726 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6727 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6728 (vect_slp_analyze_and_verify_node_alignment)
6729 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6730 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6731 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6733 (_vect_peel_info::dr): Replace with...
6734 (_vect_peel_info::dr_info): ...this new field.
6735 (vect_peeling_hash_get_most_frequent)
6736 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6737 (vect_peeling_hash_get_lowest_cost):
6738 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6739 routines for which the same change has been made.
6740 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6742 * tree-vect-loop-manip.c (get_misalign_in_elems)
6743 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6745 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6746 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6747 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6748 (get_group_load_store_type, get_negative_load_store_type)
6749 (vect_get_data_ptr_increment, vectorizable_store)
6750 (vectorizable_load): Likewise.
6751 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6752 Update calls to other routines for which the same change has been made.
6754 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6756 * tree-vectorizer.h (vec_info::move_dr): New member function.
6757 (dataref_aux): Rename to...
6758 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6759 (_stmt_vec_info::dr_aux): Update accordingly.
6760 (_stmt_vec_info::data_ref_info): Delete.
6761 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6762 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6763 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6764 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6766 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6767 (STMT_VINFO_DR_INFO): New macro.
6768 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6769 (set_dr_misalignment): Update after rename of dataref_aux.
6770 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6771 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6772 initialization of STMT_VINFO_DATA_REF.
6773 * tree-vectorizer.c (vec_info::move_dr): New function.
6774 * tree-vect-patterns.c (vect_recog_bool_pattern)
6775 (vect_recog_mask_conversion_pattern)
6776 (vect_recog_gather_scatter_pattern): Use it.
6777 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6778 the "dr" and "stmt" fields of dr_vec_info instead of
6779 STMT_VINFO_DATA_REF.
6781 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6783 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6784 (is_pattern_stmt_p): Use it.
6785 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6786 on pattern statements.
6788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6790 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6791 original stmt as a stmt_vec_info rather than a gimple stmt.
6792 (vect_pattern_recog_1): Take the statement directly as a
6793 stmt_vec_info, rather than via a gimple_stmt_iterator.
6794 Update call to vect_mark_pattern_stmts.
6795 (vect_pattern_recog): Update calls accordingly.
6797 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6799 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6800 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6801 a vect_def_type for the first argument.
6802 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6803 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6804 operand if it isn't defined by a vectorized statement.
6805 (vect_build_gather_load_calls): Remove the mask_dt argument and
6806 update calls to vect_get_vec_def_for_stmt_copy.
6807 (vectorizable_bswap): Likewise the dt argument.
6808 (vectorizable_call): Update calls to vectorizable_bswap and
6809 vect_get_vec_def_for_stmt_copy.
6810 (vectorizable_simd_clone_call, vectorizable_assignment)
6811 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6812 (vectorizable_comparison): Update calls to
6813 vect_get_vec_def_for_stmt_copy.
6814 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6816 (vect_get_loop_based_defs): Remove dt argument and update call
6817 to vect_get_vec_def_for_stmt_copy.
6818 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6819 and vect_get_vec_def_for_stmt_copy.
6820 (vectorizable_load): Update calls to vect_build_gather_load_calls
6821 and vect_get_vec_def_for_stmt_copy.
6822 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6823 (vectorizable_reduction, vectorizable_live_operation): Update calls
6824 to vect_get_vec_def_for_stmt_copy.
6826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6828 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6829 and gimple stmt arguments with a stmt_vec_info.
6830 (vect_record_base_alignments): Update calls accordingly.
6831 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6832 and gimple stmt arguments with a stmt_vec_info.
6833 (vect_build_slp_tree_1): Remove vinfo argument and update call
6834 to vect_record_max_nunits.
6835 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6836 and vect_record_max_nunits.
6838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6840 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6841 file and take a stmt_vec_info instead of a gimple stmt.
6842 (supportable_widening_operation, vect_finish_replace_stmt)
6843 (vect_finish_stmt_generation, vect_get_store_rhs)
6844 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6845 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6846 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6847 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6848 (vect_create_data_ref_ptr, bump_vector_ptr)
6849 (vect_permute_store_chain, vect_setup_realignment)
6850 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6851 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6852 (vectorizable_reduction, vectorizable_induction)
6853 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6854 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6855 than gimple stmts as arguments.
6856 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6857 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6858 (can_group_stmts_p, vect_check_gather_scatter)
6859 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6860 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6861 (vect_permute_load_chain, vect_shift_permute_load_chain)
6862 (vect_transform_grouped_load)
6863 (vect_record_grouped_load_vectors): Likewise.
6864 * tree-vect-loop.c (vect_fixup_reduc_chain)
6865 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6866 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6867 (vectorizable_reduction, vectorizable_induction)
6868 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6869 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6870 (vect_get_load_store_mask): Likewise.
6871 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6872 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6873 * tree-vect-stmts.c (vect_mark_relevant)
6874 (is_simple_and_all_uses_invariant)
6875 (exist_non_indexing_operands_for_use_p, process_use)
6876 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6877 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6878 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6879 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6880 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6881 (get_negative_load_store_type, get_load_store_type)
6882 (vect_check_load_store_mask, vect_check_store_rhs)
6883 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6884 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6885 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6886 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6887 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6888 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6889 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6890 (supportable_widening_operation): Likewise.
6892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6894 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6895 a stmt_vec_info instead of a gcall.
6896 (vect_check_gather_scatter): Update call accordingly.
6897 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6899 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6900 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6901 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6902 instead of a gimple stmt.
6903 (vect_transform_loop): Update calls accordingly.
6904 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6905 stmt_vec_infos instead of gimple stmts.
6906 (vect_analyze_slp_instance): Update use accordingly.
6907 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6908 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6909 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6910 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6911 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6912 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6913 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6914 down to subroutines.
6916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6918 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6919 of the worklist from a vector of gimple stmts to a vector of
6921 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6922 (vect_mark_stmts_to_be_vectorized): Likewise
6924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6926 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6927 statement before passing it to vect_analyze_stmt.
6928 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6929 the chain of phi vector definitions. Track the exit phi via its
6931 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6932 STMT_VINFO_REDUC_DEF.
6933 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6934 stmt_vec_infos to handle the statement chains.
6935 (vect_get_slp_defs): Record the first statement in the node
6936 using a stmt_vec_info.
6937 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6938 statements here and pass their stmt_vec_info down to subroutines.
6939 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6940 down to vect_finish_stmt_generation.
6941 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6942 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6943 stmt_vec_infos to subroutines.
6944 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6947 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6949 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6950 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6951 (vect_permute_store_chain, vect_setup_realignment)
6952 (vect_permute_load_chain, vect_shift_permute_load_chain)
6953 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6954 stmts internally, and when passing values to other vectorizer routines.
6955 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6956 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6957 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6958 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6959 (vectorizable_reduction, vectorizable_induction)
6960 (vectorizable_live_operation, vect_transform_loop_stmt)
6961 (vect_transform_loop): Likewise.
6962 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6963 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6964 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6965 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6966 (vect_slp_analyze_node_operations_1): Likewise.
6967 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6968 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6969 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6970 (vect_finish_stmt_generation_1, get_group_load_store_type)
6971 (get_load_store_type, vect_build_gather_load_calls)
6972 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6973 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6974 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6975 (vectorizable_store, vectorizable_load, vectorizable_condition)
6976 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6977 (supportable_widening_operation): Likewise.
6978 (vect_get_vector_types_for_stmt): Likewise.
6979 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6981 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6983 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6984 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6985 (vect_permute_store_chain, vect_permute_load_chain)
6986 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6987 repeated stmt_vec_info lookups.
6988 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6989 (vect_update_ivs_after_vectorizer): Likewise.
6990 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6991 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6992 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6993 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6994 (vect_bb_slp_scalar_cost): Likewise.
6995 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6999 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7000 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7001 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7002 to get gassigns and gcalls, rather than operating on generc gimple
7004 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7005 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7006 (vectorizable_load, vect_analyze_stmt): Likewise.
7007 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7009 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7011 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7012 return stmt_vec_infos rather than gimple stmts. Do not accept
7014 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7016 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7017 Update use of get_later_stmt.
7018 (vect_get_constant_vectors): Update call accordingly.
7019 (vect_schedule_slp_instance): Likewise
7020 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7021 (vect_slp_analyze_instance_dependence): Likewise.
7022 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7024 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7026 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7027 (stmt_info_for_cost::stmt_info): ...this new field.
7028 (add_stmt_costs): Update accordingly.
7029 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7030 (vect_get_known_peeling_cost): Likewise.
7031 (vect_estimate_min_profitable_iters): Likewise.
7032 * tree-vect-stmts.c (record_stmt_cost): Likewise.
7034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7036 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7037 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7038 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7040 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7044 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7045 a gimple stmt to a stmt_vec_info.
7046 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7048 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7050 * tree-vectorizer.h (vec_info::grouped_stores): Change from
7051 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7052 (_loop_vec_info::reduction_chains): Likewise.
7053 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7055 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7057 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7059 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7060 a gimple stmt to a stmt_vec_info.
7061 (_stmt_vec_info::next_element): Likewise.
7062 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7063 (vect_slp_analyze_and_verify_node_alignment)
7064 (vect_analyze_group_access_1, vect_analyze_group_access)
7065 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7066 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7067 (vect_supportable_dr_alignment): Update accordingly.
7068 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7069 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7070 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7071 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7072 * tree-vect-slp.c (vect_build_slp_tree_1)
7073 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7074 (vect_split_slp_store_group, vect_analyze_slp_instance)
7075 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7076 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7077 (get_group_load_store_type, get_load_store_type)
7078 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7079 (vect_transform_stmt, vect_remove_stores): Likewise.
7081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7083 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7085 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7086 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7087 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7088 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7089 (vector_alignment_reachable_p, vect_get_data_access_cost)
7090 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7091 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7092 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7093 (vect_analyze_group_access_1, vect_analyze_group_access)
7094 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7095 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7096 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7097 result of vect_dr_stmt and use the stmt_vec_info instead of
7098 the associated gimple stmt.
7099 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7100 (vect_gen_prolog_loop_niters): Likewise.
7101 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7105 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7106 to a vec<stmt_vec_info>.
7107 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7108 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7110 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7111 to a vec<stmt_vec_info>.
7112 (bst_traits::value_type, bst_traits::value_type): Likewise.
7113 (bst_traits::hash): Update accordingly.
7114 (vect_get_and_check_slp_defs): Change the stmts parameter from
7115 a vec<gimple *> to a vec<stmt_vec_info>.
7116 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7117 (vect_build_slp_tree): Likewise.
7118 (vect_build_slp_tree_2): Likewise. Update uses of
7119 SLP_TREE_SCALAR_STMTS.
7120 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7121 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7122 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7123 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7124 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7125 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7126 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7127 (vect_get_constant_vectors, vect_get_slp_defs)
7128 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7129 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7130 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7131 instead of gimple stmts.
7132 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7133 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7134 (vect_slp_analyze_instance_dependence): Update uses of
7135 SLP_TREE_SCALAR_STMTS.
7136 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7137 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7138 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7139 (get_initial_defs_for_reduction): Likewise.
7140 (vect_create_epilog_for_reduction): Likewise.
7141 (vectorize_fold_left_reduction): Likewise.
7142 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7143 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7144 (can_vectorize_live_stmts): Likewise.
7146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7148 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7149 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7150 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7152 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7154 (gather_scalar_reductions): Update after above interface changes.
7155 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7156 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7158 (vect_force_simple_reduction): Likewise.
7159 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7160 LOOP_VINFO_REDUCTIONS.
7161 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7163 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7165 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7166 a gimple stmt to a stmt_vec_info.
7167 * tree-vect-loop.c (vect_active_double_reduction_p)
7168 (vect_force_simple_reduction, vectorizable_reduction): Update
7171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7173 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7174 vec<gimple *> to a vec<stmt_vec_info>.
7175 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7176 the reduction_phis argument from a vec<gimple *> to a
7178 (vectorizable_reduction): Likewise the phis local variable that
7179 is passed to vect_create_epilog_for_reduction. Update for new type
7180 of SLP_TREE_VEC_STMTS.
7181 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7182 (vectorizable_live_operation): Likewise.
7183 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7184 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7188 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7189 a gimple stmt to a stmt_vec_info.
7190 (vectorizable_condition, vectorizable_live_operation)
7191 (vectorizable_reduction, vectorizable_induction): Pass back the
7192 vectorized statement as a stmt_vec_info.
7193 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7194 use of STMT_VINFO_VEC_STMT.
7195 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7196 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7197 as stmt_vec_infos rather than gimple stmts.
7198 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7200 (vectorizable_live_operation): Likewise.
7201 (vectorizable_reduction, vectorizable_induction): Likewise,
7202 updating use of STMT_VINFO_VEC_STMT.
7203 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7204 of STMT_VINFO_VEC_STMT.
7205 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7206 (vectorizable_simd_clone_call, vectorizable_conversion)
7207 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7208 (vectorizable_store, vectorizable_load, vectorizable_condition)
7209 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7210 from a gimple stmt to a stmt_vec_info.
7211 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
7212 pointer to a stmt_vec_info to the vectorizable_* routines.
7214 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7216 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7217 a gimple stmt to a stmt_vec_info.
7218 (is_pattern_stmt_p): Update accordingly.
7219 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7220 (vect_record_grouped_load_vectors): Likewise.
7221 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7222 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7223 (vect_model_reduction_cost): Likewise.
7224 (vect_create_epilog_for_reduction): Likewise.
7225 (vectorizable_reduction, vectorizable_induction): Likewise.
7226 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7227 Return the stmt_vec_info for the pattern statement.
7228 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7229 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7230 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7231 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7232 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7233 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7234 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7235 (free_stmt_vec_info, vect_is_simple_use): Likewise.
7237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7239 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7240 (vect_finish_stmt_generation): Likewise.
7241 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7242 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7243 (vect_build_gather_load_calls): Use the return value of the above
7244 functions instead of a separate call to vinfo_for_stmt. Use narrow
7245 scopes for the input gimple stmt and wider scopes for the associated
7246 stmt_vec_info. Use vec_info::lookup_def when setting these
7247 stmt_vec_infos from an SSA_NAME definition.
7248 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7249 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7250 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7251 (vectorizable_store, vectorizable_load, vectorizable_condition)
7252 (vectorizable_comparison): Likewise.
7253 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7254 (vectorizable_reduction): Likewise.
7256 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7258 * tree-vectorizer.h (vect_is_simple_use): Add an optional
7259 stmt_vec_info * parameter before the optional gimple **.
7260 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7261 (process_use, vect_get_vec_def_for_operand_1): Update callers.
7262 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7263 * tree-vect-loop.c (vectorizable_reduction): Likewise.
7264 (vectorizable_live_operation): Likewise.
7265 * tree-vect-patterns.c (type_conversion_p): Likewise.
7266 (vect_look_through_possible_promotion): Likewise.
7267 (vect_recog_rotate_pattern): Likewise.
7268 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7272 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7273 a typedef to a wrapper class.
7274 (NULL_STMT_VEC_INFO): New macro.
7275 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7276 (stmt_vec_info::operator*): New function.
7277 (stmt_vec_info::operator gimple *): Likewise.
7278 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7279 (add_stmt_costs): Likewise.
7280 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7281 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7282 (vect_get_known_peeling_cost): Likewise.
7283 (vect_estimate_min_profitable_iters): Likewise.
7284 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7285 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7286 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7287 (vectorizable_store, free_stmt_vec_infos): Likewise.
7288 (new_stmt_vec_info): Change return type of xcalloc to
7291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7293 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7294 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7295 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7296 a single_imm_use-based sequence.
7297 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7301 * tree-vectorizer.h (vec_info::lookup_def): Declare.
7302 * tree-vectorizer.c (vec_info::lookup_def): New function.
7303 * tree-vect-patterns.c (vect_get_internal_def): Use it.
7304 (vect_widened_op_tree): Likewise.
7305 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7306 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7307 (vectorizable_reduction): Likewise.
7308 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7310 (vect_is_slp_reduction): Update calls accordingly. Use
7311 vec_info::lookup_def.
7312 (vect_is_simple_reduction): Likewise
7313 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7315 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7317 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7318 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7319 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7321 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7322 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7323 (vect_update_vf_for_slp, vect_analyze_loop_operations)
7324 (vect_is_slp_reduction, vectorizable_induction)
7325 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7326 * tree-vect-patterns.c (vect_init_pattern_stmt):
7327 (vect_determine_min_output_precision_1, vect_determine_precisions)
7328 (vect_pattern_recog): Likewise.
7329 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7330 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7331 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7332 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7333 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7334 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
7335 info field from a loop to a loop_vec_info.
7337 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7339 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7340 (vec_info::add_stmt): Declare.
7341 * tree-vectorizer.c (vec_info::add_stmt): New function.
7342 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7343 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7344 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7345 (vectorizable_induction): Likewise.
7346 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7347 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7348 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7349 (vectorizable_load): Likewise.
7350 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7351 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7352 (vect_recog_gather_scatter_pattern): Likewise.
7353 (append_pattern_def_seq): Likewise. Remove a check that is
7354 performed by add_stmt itself.
7356 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7358 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7359 which make_ssa_name was called with new_stmt before new_stmt
7362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7364 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7366 (vect_is_slp_reduction): ...here...
7367 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7368 that are already known to be false.
7370 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7372 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7373 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7374 STMT_VINFO_NUM_SLP_USES when it's true.
7375 (vect_free_slp_instance): Add a final_p parameter and pass it to
7377 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7378 (vect_analyze_slp_instance): Likewise.
7379 (vect_slp_analyze_operations): Likewise.
7380 (vect_slp_analyze_bb_1): Likewise.
7381 * tree-vectorizer.c (vec_info): Likewise.
7382 * tree-vect-loop.c (vect_transform_loop): Likewise.
7384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7386 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7387 function is not called for second and subsequent members of
7390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7392 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7393 cases for nested loops from here to ...
7394 (vect_create_epilog_for_reduction): ...here. Only call
7395 vect_is_simple_use for inner-loop reductions.
7397 2018-07-31 Martin Liska <mliska@suse.cz>
7399 PR gcov-profile/85338
7400 PR gcov-profile/85350
7401 PR gcov-profile/85372
7402 * profile.c (struct location_triplet): New.
7403 (struct location_triplet_hash): Likewise.
7404 (output_location): Do not output a BB that
7405 is already recorded for a line.
7406 (branch_prob): Use streamed_locations.
7408 2018-07-31 Martin Liska <mliska@suse.cz>
7410 PR gcov-profile/85370
7411 * coverage.c (coverage_begin_function): Do not mark target
7412 clones as artificial functions.
7414 2018-07-31 Martin Liska <mliska@suse.cz>
7416 PR gcov-profile/83813
7417 PR gcov-profile/84758
7418 PR gcov-profile/85217
7419 PR gcov-profile/85332
7420 * profile.c (branch_prob): Do not record GOTO expressions
7421 for GIMPLE statements which locations are already streamed.
7423 2018-07-31 Olivier Hainque <hainque@adacore.com>
7425 * gcc.c (handle_spec_function): Accept a soft_matched_part
7426 argument, as do_spec_1. Pass it down to ...
7427 (eval_spec_function): Accept a soft_matched_part argument,
7428 and pass it down to ...
7429 (do_spec_2): Accept a soft_matched_part argument, and pass
7430 it down to do_spec_1.
7431 (do_spec_1): Pass soft_matched_part to handle_spec_function.
7432 (handle_braces): Update call to handle_spec_function.
7433 (driver::set_up_specs): Update calls to do_spec_2.
7434 (compare_debug_dump_opt_spec_function): Likewise.
7435 (compare_debug_self_opt_spec_function): Likewise.
7437 2018-07-31 Olivier Hainque <hainque@adacore.com>
7439 * common.opt (nolibc): New option.
7440 * doc/invoke.texi (Link Options): Document it.
7441 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7442 * config/alpha/linux.h: Likewise.
7443 * config/arc/elf.h: Likewise.
7444 * config/arm/uclinux-elf.h: Likewise.
7445 * config/arm/unknown-elf.h: Likewise.
7446 * config/avr/avrlibc.h: Likewise.
7447 * config/bfin/bfin.h: Likewise.
7448 * config/bfin/linux.h: Likewise.
7449 * config/bfin/uclinux.h: Likewise.
7450 * config/darwin.h: Likewise.
7451 * config/darwin10.h: Likewise.
7452 * config/darwin12.h: Likewise.
7453 * config/gnu-user.h: Likewise.
7454 * config/lm32/uclinux-elf.h: Likewise.
7455 * config/pa/pa-hpux11.h: Likewise.
7456 * config/pa/pa64-hpux.h: Likewise.
7457 * config/sparc/sparc.h: Likewise.
7459 2018-07-31 Olivier Hainque <hainque@adacore.com>
7461 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7462 undefined variables.
7464 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7467 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7470 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7472 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7473 terminated string literal.
7475 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7477 PR rtl-optimization/85160
7478 * combine.c (is_just_move): New function.
7479 (try_combine): Allow combining two instructions into two if neither of
7480 the original instructions was a move.
7482 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7485 * doc/extend.texi (Global Register Variables): Discourage use of type
7487 (Local Register Variables): Likewise.
7489 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7491 PR tree-optimization/86506
7492 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7494 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7497 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7498 hard_regno, make sure no insn between `from` and `to` clobbers it.
7500 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7501 Tom de Vries <tdevries@suse.de>
7503 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7504 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7505 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7506 PTX_DEFAULT_RUNTIME_DIM.
7507 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7509 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7511 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7512 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7513 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7515 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7517 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7519 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7520 predicate to reflect toc fusion has been deleted.
7521 (toc_fusion_mem_raw): Delete, no longer used.
7522 (toc_fusion_mem_wrapped): Likewise.
7523 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7525 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7526 Delete, no longer used.
7527 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7528 meant to be used for toc fusion.
7529 (rs6000_debug_print_mode): Delete toc fusion debugging.
7530 (rs6000_debug_reg_global): Likewise.
7531 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7532 fusion and secondary reload support that were never used.
7533 (rs6000_option_override_internal): Delete TOC fusion, that was only
7534 partially defined, and it did not work unless you also used the
7536 (rs6000_legitimate_address_p): Delete TOC fusion support.
7537 (rs6000_opt_masks): Likewise.
7538 (fusion_wrap_memory_address): Delete function, no longer used.
7539 (fusion_split_address); Delete TOC fusion support.
7540 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7541 longer used with toc fusion being deleted.
7542 (TARGET_TOC_FUSION_FP): Likewise.
7543 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7545 (toc fusion spliter): Delete TOC fusion support.
7546 (toc_fusionload_<mode>): Likewise.
7547 (toc_fusionload_di): Likewise.
7548 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7549 longer needs to be named. Rename predicate to delete TOC fusion.
7550 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7551 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7552 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7553 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7554 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7556 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7558 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7559 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7560 __int128 in built-in function prototypes.
7561 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7562 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7564 2018-07-27 Martin Sebor <msebor@redhat.com>
7566 PR tree-optimization/86696
7567 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7568 types, including enums.
7569 (handle_char_store): Be prepared for the above function to fail.
7571 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7573 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7574 when optimization level is lower than 2 or optimize for size.
7576 2018-07-26 Martin Sebor <msebor@redhat.com>
7578 PR tree-optimization/86043
7579 PR tree-optimization/86042
7580 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7581 (get_string_cst_length): Rename...
7582 (get_min_string_length): ...to this. Add argument.
7583 (handle_char_store): Extend to handle multi-character stores by
7585 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7586 * tree.h (initializer_zerop): Add argument.
7588 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7591 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7592 declare target to variables if they have always,{to,from,tofrom} map
7595 2018-07-26 Martin Liska <mliska@suse.cz>
7598 * lto-wrapper.c: Add linker_output as prefix
7599 for ltrans_output_file.
7601 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7603 PR rtl-optimization/85805
7604 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7605 value for hard registers if that was written in the same mode.
7607 2018-07-26 Martin Liska <mliska@suse.cz>
7609 PR gcov-profile/86536
7610 * gcov.c (format_gcov): Use printf format %.*f directly
7611 and do not handle special values.
7613 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7615 * common/config/arc/arc-common.c (arc_option_optimization_table):
7616 Update default optimizations for size.
7618 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7620 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7621 * config/arc/constraints.md (CfZ): New constraint.
7622 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7623 (subsf3_fpu): Likewise.
7624 (cmpsf_fpu): Likewise.
7625 (cmpsf_fpu_uneq): Likewise.
7627 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7629 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7631 (arc_is_uncached_mem_p): uncached applies to both the variable and
7634 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7636 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7639 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7641 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7642 field "m_scopes" from vec to auto_vec.
7644 2018-07-25 Martin Liska <mliska@suse.cz>
7646 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7649 2018-07-25 Richard Biener <rguenther@suse.de>
7652 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7653 special wrt context_die late.
7654 (gen_subprogram_die): Re-use DIEs in local scope.
7656 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7658 PR tree-optimization/86644
7659 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7661 2018-07-25 Martin Liska <mliska@suse.cz>
7664 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7665 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7667 2018-07-25 Martin Liska <mliska@suse.cz>
7670 * params.def: Explain ASan abbreviation and provide
7671 a documentation link.
7673 2018-07-24 Martin Sebor <msebor@redhat.com>
7675 PR tree-optimization/86622
7676 PR tree-optimization/86532
7677 * builtins.h (string_length): Declare.
7678 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7679 (check_access): Be prepared for non-constant length ranges.
7680 (string_length): Make extern.
7681 * expr.c (string_constant): Only handle the minor non-constant
7682 array index. Use string_constant to compute the length of
7683 a generic string constant.
7685 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7687 PR tree-optimization/86618
7688 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7689 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7691 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7693 PR tree-optimization/86636
7694 * json.cc (json::object::set): Fix comment. Add assertions.
7695 (json::array::append): Move here from json.h. Add comment and an
7697 (json::string::string): Likewise.
7698 * json.h (json::array::append): Move to json.cc.
7699 (json::string::string): Likewise.
7700 * optinfo-emit-json.cc
7701 (optrecord_json_writer::impl_location_to_json): Assert that we
7702 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7703 wrapper around it. Expand the location once, rather than three
7705 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7706 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7708 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7709 places. Fix some overlong lines.
7711 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7713 * config/aarch64/aarch64-simd.md
7714 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7715 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7716 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7717 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7718 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7719 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7720 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7721 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7722 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7724 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7727 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7728 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7729 and abs_d == d, do the power of two handling if profitable.
7731 2018-07-24 Richard Biener <rguenther@suse.de>
7733 * match.pd: Add BIT_FIELD_REF canonicalizations.
7735 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7738 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7740 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7742 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7743 terminated STRING_CST object.
7745 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7747 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7749 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7751 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7752 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7753 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7754 the elements into a register.
7755 (rs6000_split_v4si_init_di_reg): Delete.
7756 (rs6000_split_v4si_init): Delete.
7757 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7758 (vsx_init_v4si): Rewrite as a define_expand.
7760 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7762 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7763 zero_extend argument from memory): New.
7765 2018-07-22 Martin Sebor <msebor@redhat.com>
7768 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7769 diagnosing calls with unknown arguments unless -Walloca-larger-than
7770 is restricted to less than PTRDIFF_MAX bytes.
7772 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7774 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7776 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7778 * pretty-print.c (text_info::set_location): Remove redundant
7779 "line_table" parameter from call to rich_location::set_range.
7781 2018-07-20 Martin Sebor <msebor@redhat.com>
7784 * builtins.c (expand_builtin_alloca): Adjust.
7785 * calls.c (alloc_max_size): Simplify.
7786 * cgraphunit.c (cgraph_node::expand): Adjust.
7787 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7789 (frame_larger_than_size): Same.
7790 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7791 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7793 * doc/invoke.texi (GCC Command Options): Document option arguments.
7794 Explain byte-size arguments and suffixes.
7795 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7796 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7797 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7798 * doc/options.texi (UInteger): Expand.
7799 (Host_Wide_Int, ByteSize): Document new properties.
7800 * final.c (final_start_function_1): Include sizes in an error message.
7801 * function.c (frame_offset_overflow): Same.
7802 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7803 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7804 Diagnose unbounded alloca calls only for limits of less than
7806 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7807 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7809 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7810 only for limits of less than PTRDIFF_MAX.
7811 * langhooks-def.h (lhd_handle_option): Change function argument
7813 * langhooks.c (lhd_handle_option): Same.
7814 * langhooks.h (handle_option): Same.
7815 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7817 (var_type, var_type_struct): Same.
7818 (var_set): Handle ByteSize flag.
7819 * optc-gen.awk: Add comments to output to ease debugging. Make
7820 use of HOST_WIDE_INT where appropriate.
7821 * opts-gen-save.awk: Use %lx to format unsigned long.
7822 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7823 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7824 arguments. Parse bytes-size suffixes.
7825 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7826 (enum_value_to_arg): Same.
7827 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7828 (handle_option): Adjust.
7829 (generate_option): Change function argument to HOST_WIDE_INT.
7830 (cmdline_handle_error): Adjust.
7831 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7832 (set_option): Change function argument to HOST_WIDE_INT.
7833 (option_enabled): Handle cl_host_wide_int.
7834 (get_option_state): Handle CLVC_SIZE.
7835 (control_warning_option): Same.
7836 * opts.c (common_handle_option): Change function argument to
7837 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7838 OPT_Wvla_larger_than_.
7839 * opts.h (enum cl_var_type): Add an enumerator.
7840 * stor-layout.c (layout_decl): Print a more meaningful warning.
7841 * toplev.c (output_stack_usage): Adjust.
7843 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7845 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7846 call to inline_expand_builtin_string_cmp.
7847 (expand_builtin_strcmp): Likewise.
7848 (expand_builtin_strncmp): Likewise.
7849 (inline_string_cmp): Delete the last parameter, change char_type_node
7850 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7852 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7853 the inlining expansion on target where the type of the call has same or
7854 narrower precision than unsigned char.
7856 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7858 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7859 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7860 * common.opt (fsave-optimization-record): New option.
7861 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7862 * doc/invoke.texi (-fsave-optimization-record): New option.
7863 * dumpfile.c: Include "optinfo-emit-json.h".
7864 (struct kv_pair): Move to coretypes.h.
7865 (optgroup_options): Make non-static.
7866 (dump_context::end_scope): Call
7867 optimization_records_maybe_pop_dump_scope.
7868 * dumpfile.h (optgroup_options): New decl.
7869 * json.cc: New file.
7871 * optinfo-emit-json.cc: New file.
7872 * optinfo-emit-json.h: New file.
7873 * optinfo.cc: Include "optinfo-emit-json.h".
7874 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7875 (optinfo_enabled_p): Check optimization_records_enabled_p.
7876 (optinfo_wants_inlining_info_p): Likewise.
7877 * optinfo.h: Update comment.
7878 * profile-count.c (profile_quality_as_string): New function.
7879 * profile-count.h (profile_quality_as_string): New decl.
7880 (profile_count::quality): New accessor.
7881 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7882 and optinfo_emit_json_cc_tests.
7883 * selftest.h (selftest::json_cc_tests): New decl.
7884 (selftest::optinfo_emit_json_cc_tests): New decl.
7885 * toplev.c: Include "optinfo-emit-json.h".
7886 (compile_file): Call optimization_records_finish.
7887 (do_compile): Call optimization_records_start.
7888 * tree-ssa-live.c: Include optinfo.h.
7889 (remove_unused_scope_block_p): Retain inlining information if
7890 optinfo_wants_inlining_info_p returns true.
7892 2018-07-20 Richard Biener <rguenther@suse.de>
7895 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7896 to cover -flto-partition=none.
7898 2018-07-20 Martin Liska <mliska@suse.cz>
7900 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7901 (get_decl_source_range): Remove unused function.
7903 2018-07-20 Richard Biener <rguenther@suse.de>
7905 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7906 (struct vn_phi_s): Likewise.
7907 (struct vn_reference_s): Likewise.
7908 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7909 for searching the slot of an entry known to be in the hash itself.
7910 (vn_phi_hasher::equal): Likewise.
7911 (vn_reference_hasher::equal): Likewise.
7912 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7914 (optimistic_info, current_info): Remove, keeping only valid_info.
7915 (vn_reference_lookup_1): Remove fallback lookup.
7916 (vn_reference_lookup_2): Likewise.
7917 (vn_nary_op_lookup_1): Likewise.
7918 (vn_phi_lookup): Likewise.
7919 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7921 (vn_reference_insert): Adjust, chain the inserted hash element
7922 at last_inserted_ref.
7923 (vn_reference_insert_pieces): Likewise.
7924 (visit_reference_op_call): Likewise.
7925 (vn_nary_op_insert_into): Chain the inserted hash element at
7927 (vn_nary_op_insert_pieces): Adjust.
7928 (vn_nary_op_insert): Likewise.
7929 (vn_nary_op_insert_stmt): Likewise.
7930 (vn_phi_insert): Adjust, chain the inserted hash element at
7932 (process_scc): Remove clearing and copying the optimistic
7933 table. Instead remove elements inserted during an optimistic
7934 iteration from the single table we maintain.
7935 (init_scc_vn): Adjust.
7936 (free_scc_vn): Likewise.
7937 (sccvn_dom_walker::record_cond): Likewise.
7938 (sccvn_dom_walker::after_dom_children): Likewise.
7940 2018-07-19 Martin Sebor <msebor@redhat.com>
7942 PR tree-optimization/84047
7943 PR tree-optimization/83776
7944 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7945 (check_array_bounds): Call it.
7947 2018-07-19 Martin Sebor <msebor@redhat.com>
7949 * align.h (align_flags): Use member initialization.
7951 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7953 * Makefile.in (OBJS): Add optinfo.o.
7954 * coretypes.h (class symtab_node): New forward decl.
7955 (struct cgraph_node): New forward decl.
7956 (class varpool_node): New forward decl.
7957 * dump-context.h: New file.
7958 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7960 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7961 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7962 (set_alt_dump_file): Likewise.
7963 (dump_context::~dump_context): New dtor.
7964 (dump_gimple_stmt): Move implementation to...
7965 (dump_context::dump_gimple_stmt): ...this new member function.
7966 Add the stmt to any pending optinfo, creating one if need be.
7967 (dump_gimple_stmt_loc): Move implementation to...
7968 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7969 Start a new optinfo and add the stmt to it.
7970 (dump_gimple_expr): Move implementation to...
7971 (dump_context::dump_gimple_expr): ...this new member function.
7972 Add the stmt to any pending optinfo, creating one if need be.
7973 (dump_gimple_expr_loc): Move implementation to...
7974 (dump_context::dump_gimple_expr_loc): ...this new member function.
7975 Start a new optinfo and add the stmt to it.
7976 (dump_generic_expr): Move implementation to...
7977 (dump_context::dump_generic_expr): ...this new member function.
7978 Add the tree to any pending optinfo, creating one if need be.
7979 (dump_generic_expr_loc): Move implementation to...
7980 (dump_context::dump_generic_expr_loc): ...this new member
7981 function. Add the tree to any pending optinfo, creating one if
7983 (dump_printf): Move implementation to...
7984 (dump_context::dump_printf_va): ...this new member function. Add
7985 the text to any pending optinfo, creating one if need be.
7986 (dump_printf_loc): Move implementation to...
7987 (dump_context::dump_printf_loc_va): ...this new member function.
7988 Start a new optinfo and add the stmt to it.
7989 (dump_dec): Move implementation to...
7990 (dump_context::dump_dec): ...this new member function. Add the
7991 value to any pending optinfo, creating one if need be.
7992 (dump_context::dump_symtab_node): New member function.
7993 (dump_context::get_scope_depth): New member function.
7994 (dump_context::begin_scope): New member function.
7995 (dump_context::end_scope): New member function.
7996 (dump_context::ensure_pending_optinfo): New member function.
7997 (dump_context::begin_next_optinfo): New member function.
7998 (dump_context::end_any_optinfo): New member function.
7999 (dump_context::s_current): New global.
8000 (dump_context::s_default): New global.
8001 (dump_scope_depth): Delete global.
8002 (dumpfile_ensure_any_optinfo_are_flushed): New function.
8003 (dump_symtab_node): New function.
8004 (get_dump_scope_depth): Reimplement in terms of dump_context.
8005 (dump_begin_scope): Likewise.
8006 (dump_end_scope): Likewise.
8007 (selftest::temp_dump_context::temp_dump_context): New ctor.
8008 (selftest::temp_dump_context::~temp_dump_context): New dtor.
8009 (selftest::verify_item): New function.
8010 (ASSERT_IS_TEXT): New macro.
8011 (ASSERT_IS_TREE): New macro.
8012 (ASSERT_IS_GIMPLE): New macro.
8013 (selftest::test_capture_of_dump_calls): New test.
8014 (selftest::dumpfile_c_tests): Call it.
8015 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8016 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8017 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8018 descriptive comment.
8019 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8020 (dump_node, dump_bb): Move these unrelated decls.
8021 (class dump_manager): Add leading comment.
8022 * optinfo.cc: New file.
8023 * optinfo.h: New file.
8025 2018-07-19 Michael Collison <michael.collison@arm.com>
8026 Richard Henderson <rth@redhat.com>
8028 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8029 (subti): Handle op1 zero.
8030 (subvti4, usub4ti4): New.
8031 (*sub<GPI>3_compare1_imm): New.
8032 (sub<GPI>3_carryinCV): New.
8033 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8034 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8036 2018-07-19 Michael Collison <michael.collison@arm.com>
8037 Richard Henderson <rth@redhat.com>
8039 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8040 (addti3): Create simpler code if low part is already known to be 0.
8041 (addvti4, uaddvti4): New.
8042 (*add<GPI>3_compareC_cconly_imm): New.
8043 (*add<GPI>3_compareC_cconly): New.
8044 (*add<GPI>3_compareC_imm): New.
8045 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8046 handle constants within this pattern..
8047 (*add<GPI>3_compareV_cconly_imm): New.
8048 (*add<GPI>3_compareV_cconly): New.
8049 (*add<GPI>3_compareV_imm): New.
8050 (add<GPI>3_compareV): New.
8051 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8052 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8053 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8054 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8055 with 'comparison' operator.
8056 (*add<GPI>3_compareV_cconly_imm): Ditto.
8057 (*add<GPI>3_compareV_cconly): Ditto.
8058 (*add<GPI>3_compareV_imm): Ditto.
8059 (add<GPI>3_compareV): Ditto.
8060 (add<mode>3_carryinC): Ditto.
8061 (*add<mode>3_carryinC_zero): Ditto.
8062 (*add<mode>3_carryinC): Ditto.
8063 (add<mode>3_carryinV): Ditto.
8064 (*add<mode>3_carryinV_zero): Ditto.
8065 (*add<mode>3_carryinV): Ditto.
8067 2018-07-19 Michael Collison <michael.collison@arm.com>
8068 Richard Henderson <rth@redhat.com>
8070 * config/aarch64/aarch64-modes.def (CC_V): New.
8071 * config/aarch64/aarch64-protos.h
8072 (aarch64_addti_scratch_regs): Declare
8073 (aarch64_subvti_scratch_regs): Declare.
8074 (aarch64_expand_subvti): Declare.
8075 (aarch64_gen_unlikely_cbranch): Declare
8076 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8077 for signed overflow using CC_Vmode.
8078 (aarch64_get_condition_code_1): Handle CC_Vmode.
8079 (aarch64_gen_unlikely_cbranch): New function.
8080 (aarch64_addti_scratch_regs): New function.
8081 (aarch64_subvti_scratch_regs): New function.
8082 (aarch64_expand_subvti): New function.
8084 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8086 * config/aarch64/aarch64-option-extensions.def: New entry for profile
8088 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8089 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8092 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8095 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8096 address check not strict.
8098 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8100 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8102 (store_pair_lanes<mode>): Likewise.
8103 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8104 enum value 'ADDR_QUERY_LDP_STP_N'.
8105 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8106 (aarch64_print_address_internal): Add declaration.
8107 (aarch64_print_ldpstp_address): Remove.
8108 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8109 (aarch64_print_operand): Change printing of 'y'.
8110 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8111 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8112 'true' rather than '1'.
8113 * config/aarch64/constraints.md (Uml): Likewise.
8114 (Uml): Rename to Umn.
8117 2018-07-19 Richard Biener <rguenther@suse.de>
8119 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8121 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8122 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8123 (vn_reference_hasher): Likewise.
8124 (struct vn_tables_s): Remove obstack and alloc-pool members.
8125 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8126 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8127 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8128 (vn_reference_insert_pieces): Likewise.
8129 (alloc_vn_nary_op_noinit): Adjust.
8130 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8131 (vn_phi_eq): Adjust.
8132 (shared_lookup_phiargs): Remove.
8133 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8134 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8135 (visit_reference_op_call): Likewise.
8136 (copy_nary, copy_phi, copy_reference): Remove.
8137 (process_scc): Rewind the obstack when iterating. Do not
8138 copy the elements to valid_info but just move them from one
8139 hashtable to the other.
8140 (allocate_vn_table): Adjust.
8141 (free_vn_table): Likewise.
8142 (init_scc_vn): Likewise.
8143 (free_scc_vn): Likewise.
8145 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
8148 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8149 indirect_return as function type attribute.
8150 (ix86_attribute_table): Change indirect_return to function
8152 * doc/extend.texi: Update indirect_return attribute.
8154 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
8156 * wide-int.h (widest2_int): New.
8157 * gimple-fold.c (arith_overflowed_p): Use it.
8158 * tree.h (widest2_int_cst): New.
8159 * tree-vrp.c (wide_int_binop_overflow): Rename from
8160 vrp_int_const_binop.
8161 Rewrite to work on trees.
8162 (extract_range_from_multiplicative_op_1): Abstract code to...
8163 (wide_int_range_min_max): ...here.
8164 (wide_int_range_cross_product): ...and here.
8165 (extract_range_from_binary_expr_1): Abstract overflow code to...
8166 (wide_int_range_mult_wrapping): ...here.
8167 * tree-vrp.h (wide_int_range_cross_product): New.
8168 (wide_int_range_mult_wrapping): New.
8170 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
8171 Julia Koval <julia.koval@intel.com>
8173 * config/i386/x86-tune-costs.h (skylake_memcpy,
8174 skylake_memset): Replace rep_prefix with unrolling for size 512.
8176 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
8179 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8180 comparision with EQ_EXPR in last stmt.
8182 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
8184 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8185 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8186 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8187 previously known as "PowerPC AltiVec Built-in Functions". Move
8188 some material to new subsubsections "PowerPC AltiVec Built-in
8189 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8191 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8192 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8193 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8194 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8196 2018-07-18 Richard Biener <rguenther@suse.de>
8198 PR tree-optimization/86557
8199 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8202 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
8204 * config/s390/s390.c (s390_function_profiler): Generate CFI.
8206 2018-07-17 Jeff Law <law@redhat.com>
8208 * config/arm/arm.c (get_label_padding): Update for recent
8209 changes to label_to_alignment.
8211 PR tree-optimization/86010
8212 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8214 * config/mips/mips.c (vr4130_align_insns): Update for recent
8215 changes to label_to_alignment.
8217 * config/frv/frv.c (frv_label_align): Update for recent changes
8218 to label_to_alignment.
8220 * config/nios2/nios2.c (nios2_label_align): Update for recent
8221 changes which dropped ALIGN_LABELS_LOG.
8223 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
8225 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8226 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8228 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
8230 * config/arc/arc.c (arc_label_align): Use align_labels instead of
8231 deprecated align_labels_log.
8233 2018-07-17 Richard Biener <rguenther@suse.de>
8236 * dwarf2out.c (init_sections_and_labels): Always generate
8237 a debug_line_str_section for early LTO debug.
8238 (dwarf2out_finish): Reset debug_line_str_hash output early.
8239 Bump counter for extra dwarf5 .debug_loc labels to not conflict
8241 (dwarf2out_early_finish): Output debug_line_str.
8243 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8245 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8246 index register on z196 or later.
8248 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8250 * config/s390/s390.c (s390_default_align): Set default function
8252 (s390_override_options_after_change): Call s390_default align.
8253 (s390_option_override_internal): Call s390_default_align.
8254 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8256 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8259 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8260 to _looptemp_ clauses, other than the first two.
8262 2018-07-17 Martin Liska <mliska@suse.cz>
8264 * opts.c: Do not enable OPT_falign_* for -Os.
8266 2018-07-17 Martin Liska <mliska@suse.cz>
8268 * align.h (MAX_CODE_ALIGN): New.
8269 (MAX_CODE_ALIGN_VALUE): New.
8270 * common/config/i386/i386-common.c (ix86_handle_option):
8271 (MAX_CODE_ALIGN): Moved to align.h.
8272 * final.c (MAX_CODE_ALIGN): Likewise.
8273 * opts.c (parse_and_check_align_values):
8274 (MAX_CODE_ALIGN): Likewise.
8275 (MAX_CODE_ALIGN_VALUE): Likewise.
8277 2018-07-17 Martin Liska <mliska@suse.cz>
8279 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8280 in order to fulfil coding style.
8281 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8282 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8283 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8284 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8285 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8286 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8287 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8288 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8289 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8291 2018-07-17 Martin Liska <mliska@suse.cz>
8293 * align.h: New file.
8294 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8296 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8297 align_flags of label_to_alignment.
8298 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8300 * config/m68k/m68k.c: Do not use removed align_labels_value and
8302 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8303 (LOOP_ALIGN): Likewise.
8304 (LABEL_ALIGN): Likewise.
8305 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8306 Remove not used macro.
8307 (rs6000_loop_align): Change return type to align_flags.
8308 (rs6000_loop_align_max_skip): Remove.
8309 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8310 Change return type to align_flags.
8311 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8312 Remove not used macro.
8313 (rs6000_loop_align): Change return type to align_flags.
8314 (rs6000_loop_align_max_skip): Remove.
8315 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8316 * config/rx/rx-protos.h (rx_align_for_label): Make it
8318 * config/rx/rx.c (rx_align_for_label): Change return type
8320 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8322 into align_flags class.
8323 (LABEL_ALIGN): Likewise.
8324 (LOOP_ALIGN): Likewise.
8325 * config/s390/s390.c (s390_label_align): Use align_flags
8327 (s390_asm_output_function_label): Likewise.
8328 * config/sh/sh.c (sh_override_options_after_change):
8329 Use align_flags class directly without macros.
8330 (find_barrier): Likewise.
8331 (barrier_align): Likewise.
8332 (sh_loop_align): Likewise.
8333 * config/spu/spu.c (spu_option_override):
8334 Use align_flags_tuple::get_value instead of removed macros.
8335 (spu_sched_init): Likewise.
8336 * config/spu/spu.h (GTY): Likewise.
8337 * config/visium/visium.c (visium_option_override):
8338 Set "8" as default secondary alignment.
8339 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8340 in order to guarantee secondary alignment of 8.
8341 * coretypes.h: Include align.h header file.
8342 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8343 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8344 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8345 * doc/tm.texi.in: Likewise.
8346 * final.c (struct label_alignment): Remove not used structure.
8347 (LABEL_ALIGN): Change type to align_flags.
8348 (LOOP_ALIGN): Likewise.
8349 (JUMP_ALIGN): Likewise.
8350 (default_loop_align_max_skip): Remove.
8351 (default_label_align_max_skip): Likewise.
8352 (default_jump_align_max_skip): Likewise.
8353 (default_label_align_after_barrier_max_skip):
8354 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8355 (LABEL_TO_MAX_SKIP): Remove.
8356 (label_to_alignment): Return align_flags type instead of integer.
8357 (label_to_max_skip): Remove.
8358 (align_fuzz): Use align_flags type.
8359 (compute_alignments): Use align_flags type and use align_flags::max
8360 to combine multiple alignments.
8361 (grow_label_align): Grow vec instead of C array.
8362 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8363 (shorten_branches): Use align_flags type and use align_flags::max
8364 to combine multiple alignments.
8365 (final_scan_insn_1): Remove usage of secondary alignment that comes
8366 from label alignment, but instead use proper secondary alignment
8367 which is computed in grow_label_align.
8368 * flags.h (struct align_flags_tuple): Move to align.h.
8369 (struct align_flags): Likewise.
8370 (state_align_loops): Rename to align_loops.
8371 (state_align_jumps): Rename to align_jumps.
8372 (state_align_labels): Rename to align_labels.
8373 (state_align_functions): Rename to align_functions.
8374 (align_loops_log): Remove.
8375 (align_jumps_log): Remove.
8376 (align_labels_log): Remove.
8377 (align_functions_log): Remove.
8378 (align_loops_max_skip): Remove.
8379 (align_jumps_max_skip): Remove.
8380 (align_labels_max_skip): Remove.
8381 (align_functions_max_skip): Remove.
8382 (align_loops_value): Remove.
8383 (align_jumps_value): Remove.
8384 (align_labels_value): Remove.
8385 (align_functions_value): Remove.
8386 * output.h (label_to_alignment): Change return type to align_flags.
8387 (label_to_max_skip): Remove.
8388 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8389 jump_align_max_skip macros.
8390 * targhooks.h (default_loop_align_max_skip): Remove.
8391 (default_label_align_max_skip): Likewise.
8392 (default_jump_align_max_skip): Likewise.
8393 (default_label_align_after_barrier_max_skip): Remove.
8394 * toplev.c (read_log_maxskip): Use ::normalize function.
8395 (parse_N_M): Remove not used argument and also call ::normalize.
8396 (parse_alignment_opts): Do not pass unused arguments.
8397 * varasm.c (assemble_start_function): Use directly align_functions
8398 instead of removed macros.
8399 * system.h: Do not poison removed macros.
8401 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8404 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8405 and cond temporaries don't have reference type if iterator has
8406 pointer type. For init use &for_pre_body instead of pre_p if
8407 for_pre_body is non-empty.
8409 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8411 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8412 double-double modes to SFmode directly directly.
8413 (trunc<mode>sf2_fprs): Delete.
8415 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8417 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8418 for conversions between IFmode and the decimal floating point modes.
8419 (init_float128_ieee): Use the correct names for conversions between
8420 KFmode and the decimal floating point modes.
8422 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8424 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8425 for the conversions between TDmode and IFmode.
8426 (init_float128_ieee): Use more correct names for the conversions
8427 between TDmode and KFmode.
8429 2018-07-16 Jakub Jelinek <jakub@redhat.com>
8431 PR tree-optimization/86526
8432 * builtins.c (expand_builtin_memcmp): Formatting fixes.
8433 (inline_expand_builtin_string_cmp): Likewise.
8434 (inline_string_cmp): Likewise. Use c_readstr instead of
8435 builtin_memcpy_read_str. Add unit_mode temporary.
8437 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8440 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8441 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8443 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8445 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8446 Alphabetize prototypes of built-in functions, separating out
8447 built-in functions that are listed in this section but should be
8448 described elsewhere.
8450 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
8453 * expmed.c (emit_store_flag): Do not emit setcc followed by a
8454 conditional move when trapping comparison was split to a
8455 non-trapping one (and vice versa).
8457 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8459 * config/s390/s390.c (s390_function_profiler): Generate nops
8460 instead of profiler call sequences.
8461 * config/s390/s390.opt: Add the new option.
8463 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8465 * config/s390/s390.c (s390_function_profiler): Generate
8466 __mcount_loc section.
8467 * config/s390/s390.opt: Add the new option.
8469 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8471 * common.opt: Add the new warning.
8472 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8473 %r0,__fentry__" when -mfentry is specified.
8474 (s390_option_override_internal): Disallow -mfentry for 31-bit
8476 * config/s390/s390.opt: Add the new option.
8478 2018-07-16 Richard Biener <rguenther@suse.de>
8481 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8482 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8484 2018-07-16 Martin Liska <mliska@suse.cz>
8487 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8490 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8492 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8494 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8496 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8498 * config/arc/arc-cpus.def (hs4x): New cpu.
8500 * config/arc/arc-tables.opt: Regenerate.
8501 * config/arc/arc.c (arc_sched_issue_rate): New function.
8502 (TARGET_SCHED_ISSUE_RATE): Define.
8503 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8504 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8506 (attr tune): Add ARCHS4x tune values.
8507 (attr tune_dspmpy): Define.
8508 (*tst): Correct instruction type.
8509 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8510 * config/arc/arcHS4x.md: New file.
8511 * config/arc/fpu.md: Update instruction type attributes.
8512 * config/arc/t-multilib: Regenerate.
8514 2018-07-16 Tom de Vries <tdevries@suse.de>
8517 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8519 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8521 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8524 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8526 PR tree-optimization/86514
8527 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8528 conversion to a boolean type from a type with greater precision.
8530 2018-07-16 Tom de Vries <tdevries@suse.de>
8532 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8533 dump_flags request TDF_SLIM.
8535 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8537 * fold-const.c (int_const_binop_1): Abstract...
8538 (wide_int_binop): ...wide int code here.
8539 (poly_int_binop): ...poly int code here.
8540 Abstract the rest of int_const_binop_1 into int_const_binop.
8541 * fold-const.h (wide_int_binop): New.
8542 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8543 Remove useless PLUS/MINUS_EXPR case.
8544 (zero_nonzero_bits_from_vr): Move wide int code...
8545 (zero_nonzero_bits_from_bounds): ...here.
8546 (extract_range_from_binary_expr_1): Move mask optimization code...
8547 (range_easy_mask_min_max): ...here.
8548 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8549 (range_easy_mask_min_max): New.
8551 2018-07-15 Jeff Law <law@redhat.com>
8554 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8557 2018-07-14 Jim Wilson <jimw@sifive.com>
8559 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8561 2018-07-14 Paul Koning <ni1d@arrl.net>
8563 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8565 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8567 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8570 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8571 Steve Munroe <munroesj52@gmail.com>
8573 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8574 (_mm_andnot_si128): Likewise.
8575 (_mm_or_si128): Likewise.
8576 (_mm_xor_si128): Likewise.
8578 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8581 * builtins.c (expand_builtin_memcmp): Inline the calls first
8582 when result_eq is false.
8583 (expand_builtin_strcmp): Inline the calls first.
8584 (expand_builtin_strncmp): Likewise.
8585 (inline_string_cmp): New routine. Expand a string compare
8586 call by using a sequence of char comparison.
8587 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8588 a call to str(n)cmp/memcmp.
8589 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8591 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8593 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8595 * config/arm/driver-arm.c: Include arm-native.h.
8596 (host_detect_local_cpu): Use auto-generated data tables.
8597 (vendors, arm_cpu_table): Delete. Move part information to ...
8598 * config/arm/arm-cpus.in: ... here.
8599 * config/arm/parsecpu.awk (gen_native): New function.
8600 (vendor, part): New CPU fields.
8601 (END): Add support for building the native CPU detection tables.
8602 * config/arm/t-arm (arm-native.h): Add build rule.
8603 (driver-arm.o): Add dependency on arm-native.h.
8605 2018-07-13 Richard Biener <rguenther@suse.de>
8608 * match.pd (addr1 - addr2): Allow either of the operand to
8611 2018-07-13 Tom de Vries <tdevries@suse.de>
8613 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8616 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8618 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8619 arrays instead of numbered variables.
8621 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8623 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8624 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8626 2018-07-13 Richard Biener <rguenther@suse.de>
8629 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8630 instead of get_context_die.
8632 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8633 Richard Biener <rguenther@suse.de>
8636 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8637 that the loop latch destination where phi is defined.
8639 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8641 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8642 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8643 (riscv_set_current_function): Extract getting interrupt type to new
8645 (riscv_get_interrupt_type): New function.
8646 (riscv_merge_decl_attributes): New function, checking interrupt type is
8648 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8650 2018-07-12 Paul Koning <ni1d@arrl.net>
8652 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8655 2018-07-12 Paul Koning <ni1d@arrl.net>
8657 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8658 zero reference, add doloop_end instead.
8659 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8660 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8661 detail for doloop_end.
8663 2018-07-12 Martin Sebor <msebor@redhat.com>
8666 * attribs.c (decl_attributes): Reject conflicting attributes before
8667 calling attribute handlers.
8669 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8671 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8673 (gcc::dump_manager::get_dump_file_name): likewise.
8674 (dump_begin): Likewise.
8675 * dumpfile.h (dump_begin): Update prototype.
8676 (gcc::dump_manager::get_dump_file_name,
8677 gcc::dump_manager::get_dump_file_name): Update prototype.
8679 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8681 * internal-fn.h (vectorizable_internal_fn_p): New function.
8682 * tree-vect-slp.c (compatible_calls_p): Likewise.
8683 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8684 to internal functions.
8685 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8687 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8689 * fold-const.h (inverse_conditions_p): Declare.
8690 * fold-const.c (inverse_conditions_p): New function.
8691 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8692 that test the inverse condition of a conditional internal function.
8693 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8694 * internal-fn.c (internal_fn_mask_index): Handle conditional
8696 (vectorized_internal_fn_supported_p): New function.
8697 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8698 (any_pred_load_store): Replace with...
8699 (need_to_predicate): ...this new variable.
8700 (redundant_ssa_names): New variable.
8701 (ifcvt_can_use_mask_load_store): Move initial checks to...
8702 (ifcvt_can_predicate): ...this new function. Handle tree codes
8703 for which a conditional internal function exists.
8704 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8705 instead of ifcvt_can_use_mask_load_store. Update after variable
8707 (predicate_load_or_store): New function, split out from
8708 predicate_mem_writes.
8709 (check_redundant_cond_expr): New function.
8710 (value_available_p): Likewise.
8711 (predicate_rhs_code): Likewise.
8712 (predicate_mem_writes): Rename to...
8713 (predicate_statements): ...this. Use predicate_load_or_store
8714 and predicate_rhs_code.
8715 (combine_blocks, tree_if_conversion): Update after above name changes.
8716 (ifcvt_local_dce): Handle redundant_ssa_names.
8717 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8718 general conditional functions.
8719 * tree-vect-stmts.c (vectorizable_call): Likewise.
8721 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8722 Alan Hayward <alan.hayward@arm.com>
8723 David Sherwood <david.sherwood@arm.com>
8725 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8726 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8727 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8728 plus and minus and convert them into IFN_COND_FMA-based sequences.
8729 (convert_mult_to_fma): Handle conditional plus and minus.
8731 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8733 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8734 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8735 (cond_fnms_optab): New optabs.
8736 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8738 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8739 * internal-fn.h (get_conditional_internal_fn): Declare.
8740 (get_unconditional_internal_fn): Likewise.
8741 * internal-fn.c (cond_ternary_direct): New macro.
8742 (expand_cond_ternary_optab_fn): Likewise.
8743 (direct_cond_ternary_optab_supported_p): Likewise.
8744 (FOR_EACH_COND_FN_PAIR): Likewise.
8745 (get_conditional_internal_fn): New function.
8746 (get_unconditional_internal_fn): Likewise.
8747 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8748 (gimple_match_op::gimple_match_op): Add a new overload for 5
8750 (gimple_match_op::set_op): Likewise.
8751 (gimple_resimplify5): Declare.
8752 * genmatch.c (decision_tree::gen): Generate simplifications for
8754 * gimple-match-head.c (gimple_simplify): Define an overload for
8755 5 operands. Handle calls with 5 arguments in the top-level overload.
8756 (convert_conditional_op): Handle conversions from unconditional
8757 internal functions to conditional ones.
8758 (gimple_resimplify5): New function.
8759 (build_call_internal): Pass a fifth operand.
8760 (maybe_push_res_to_seq): Likewise.
8761 (try_conditional_simplification): Try converting conditional
8762 internal functions to unconditional internal functions.
8763 Handle 3-operand unconditional forms.
8764 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8765 Define ternary equivalents of the current rules for binary conditional
8767 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8769 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8770 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8771 (optab): Handle them.
8772 (SVE_COND_FP_TERNARY): New int iterator.
8773 (sve_fmla_op, sve_fmad_op): New int attributes.
8774 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8775 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8776 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8778 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8780 * target.def (preferred_else_value): New target hook.
8781 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8782 * doc/tm.texi: Regenerate.
8783 * targhooks.h (default_preferred_else_value): Declare.
8784 * targhooks.c (default_preferred_else_value): New function.
8785 * internal-fn.h (conditional_internal_fn_code): Declare.
8786 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8787 (get_conditional_internal_fn): Use it.
8788 (conditional_internal_fn_code): New function.
8789 * gimple-match.h (gimple_match_cond): New struct.
8790 (gimple_match_op): Add a cond member function.
8791 (gimple_match_op::gimple_match_op): Update all forms to take a
8793 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8794 for the suboperation, but don't specify a particular else_value.
8795 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8796 (visit_nary_op, visit_reference_op_load): Pass
8797 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8798 * gimple-match-head.c: Include tree-eh.h
8799 (convert_conditional_op): New function.
8800 (maybe_resimplify_conditional_op): Likewise.
8801 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8802 (gimple_resimplify2): Likewise.
8803 (gimple_resimplify3): Likewise.
8804 (gimple_resimplify4): Likewise.
8805 (maybe_push_res_to_seq): Return null for conditional operations.
8806 (try_conditional_simplification): New function.
8807 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8809 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8811 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8813 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8815 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8817 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8819 (hash_tree): Do not hash DECL_FCONTEXT
8820 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8821 Do not stream DECL_FCONTEXT.
8822 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8823 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8825 2018-07-12 Richard Biener <rguenther@suse.de>
8828 * dwarf2out.c (gen_block_die): Only output blocks when they have
8829 at least one !DECL_IGNORED_P variable.
8831 2018-07-12 Richard Biener <rguenther@suse.de>
8834 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8835 Remove -mieee-fp handling.
8837 2018-07-12 Richard Biener <rguenther@suse.de>
8839 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8840 left-over from last patch.
8842 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8844 PR tree-optimization/86492
8845 * gimple-ssa-store-merging.c
8846 (imm_store_chain_info::coalesce_immediate_stores): Call
8847 check_no_overlap even for the merge_overlapping case. Formatting fix.
8849 2018-07-12 Richard Biener <rguenther@suse.de>
8852 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8853 move possibly trapping operations into the conditional.
8855 2018-07-12 Richard Biener <rguenther@suse.de>
8857 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8858 (vn_lookup_simplify_result): Remove recursion limit applied
8860 (vn_nary_build_or_lookup_1): Adjust.
8861 (try_to_simplify): Likewise.
8862 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8864 (gimple_resimplify2): Likewise.
8865 (gimple_resimplify3): Likewise.
8866 (gimple_resimplify4): Likewise.
8868 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8870 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8871 Use __mmask64 type instead of __mmask8 for __M argument.
8872 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8873 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8875 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8876 __mmask16 for __M argument.
8877 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8878 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8879 to __mmask16 instead of __mmask8.
8880 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8881 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8882 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8883 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8884 instead of __mmask16 for __U argument.
8885 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8886 __mmask16 instead of __mmask8 for __U argument.
8887 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8889 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8891 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8893 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8895 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8897 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8899 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8901 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8903 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8905 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8907 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8908 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8909 return type as well as __M argument type and all casts from __mmask8
8911 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8912 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8913 return type as well as __M argument type and all casts from __mmask8
8915 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8916 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8917 return type as well as __M argument type and all casts from __mmask8
8919 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8920 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8921 return type as well as __M argument type and all casts from __mmask8
8923 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8924 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8927 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8929 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8930 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8933 2018-07-11 Paul Koning <ni1d@arrl.net>
8935 * doc/md.texi (define_subst): Document how multiple occurrences of
8936 the same argument in the replacement pattern are handled.
8938 2018-07-11 Paul Koning <ni1d@arrl.net>
8940 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8942 (Common Type Attributes): Add "mode" attribute.
8944 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8946 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8947 stream DECL_ORIGINAL_TYPE.
8948 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8949 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8950 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8951 Do not walk original type.
8952 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8954 (write_ts_decl_non_common_tree_pointers): Do not stream
8956 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8957 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8959 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8961 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8962 thread twice from the same starting edge.
8964 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8966 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8967 * gimple.c (gimple_call_nonnull_result_p): ...here...
8968 (gimple_call_nonnull_arg): ...and here.
8969 * gimple.h (gimple_call_nonnull_result_p): New.
8970 (gimple_call_nonnull_arg): New.
8972 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8974 * config/arm/arm-cpus.in: Move information from fpu field of each
8975 cpu definition to the isa field.
8976 * config/arm/parsecpu.awk (fpu): Delete match rule.
8977 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8979 2018-07-11 Richard Biener <rguenther@suse.de>
8982 * dwarf2out.c (init_sections_and_labels): Use
8983 output_asm_line_debug_info consistently.
8984 (dwarf2out_early_finish): Likewise.
8985 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8988 2018-07-11 Richard Biener <rguenther@suse.de>
8990 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8991 Rework father_bb setting in a way to avoid propagating constants
8992 multiple times on a loop body.
8994 2018-07-10 Mark Wielaard <mark@klomp.org>
8997 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8999 2018-07-10 Richard Biener <rguenther@suse.de>
9001 * hash-map.h (hash_map::iterator::operator*): Return
9002 references to key and value.
9004 2018-07-10 Jakub Jelinek <jakub@redhat.com>
9007 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9008 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9009 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9010 (gimplify_omp_for): For composite loops, move outer
9011 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9012 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
9013 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
9014 TREE_LIST for both the original class iterator and the "last" helper
9015 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
9016 loop, remember has_decl_expr from outer composite loops for the
9017 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9019 2018-07-09 Martin Sebor <msebor@redhat.com>
9023 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9024 accessing implicitly initialized array elements.
9025 * expr.c (string_constant): Handle string initializers of
9026 character arrays within aggregates.
9027 * gimple-fold.c (fold_array_ctor_reference): Add argument.
9028 Store element offset. As a special case, handle zero size.
9029 (fold_nonarray_ctor_reference): Same.
9030 (fold_ctor_reference): Add argument. Store subobject offset.
9031 * gimple-fold.h (fold_ctor_reference): Add argument.
9033 2018-07-09 Paul Koning <ni1d@arrl.net>
9035 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9036 (pdp11_insn_cost): New function.
9037 (pdp11_md_asm_adjust): New function.
9038 (TARGET_INVALID_WITHIN_DOLOOP): Define.
9039 (pdp11_rtx_costs): Update to match machine better.
9040 (output_addr_const_pdp11): Correct format mismatch warnings.
9041 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9042 * config/pdp11/pdp11.md: General change to add base_cost and/or
9043 length attributes for use by new pdp11_insn_cost function.
9044 (MIN_BRANCH): Correct definition.
9046 (doloop_end): Use standard pattern name for looping pattern.
9047 (doloop_end_nocc): New.
9048 (movsf): Add another constraint alternative.
9049 (zero_extendqihi2): Add constraint alternatives for not in place
9051 (zero_extendhisi2): Remove.
9052 (shift patterns): Add CC handling variants.
9056 (define_peephole2): New peephole to recognize mov that sets CC for
9059 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9061 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9062 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9065 2018-07-09 Jakub Jelinek <jakub@redhat.com>
9068 * real.c (real_nextafter): Return true if result is denormal.
9070 2018-07-09 Martin Liska <mliska@suse.cz>
9072 * common.opt: Add back wrongly removed attribute.
9074 2018-07-09 Richard Biener <rguenther@suse.de>
9077 * dwarf2out.c (gen_block_die): For an early generated DIE
9078 always output high/low PC attributes.
9080 2018-07-09 Tom de Vries <tdevries@suse.de>
9082 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9083 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9084 onto VAR_DECL with abstract origin.
9086 2018-07-07 Jim Wilson <jimw@sifive.com>
9088 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9090 2018-07-07 Tom de Vries <tdevries@suse.de>
9092 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9094 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
9096 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9098 (combine_bound): Use wide-int overflow calculation instead of
9100 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9102 * fold-const.c (int_const_binop_2): Same.
9103 (extract_muldiv_1): Same.
9104 (fold_div_compare): Same.
9105 (fold_abs_const): Same.
9107 * poly-int.h (add): Same.
9111 * predict.c (predict_iv_comparison): Same.
9112 * profile-count.c (slow_safe_scale_64bit): Same.
9113 * simplify-rtx.c (simplify_const_binary_operation): Same.
9114 * tree-chrec.c (tree_fold_binomial): Same.
9115 * tree-data-ref.c (split_constant_offset_1): Same.
9116 * tree-if-conv.c (idx_within_array_bound): Same.
9117 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9118 * tree-ssa-phiopt.c (minmax_replacement): Same.
9119 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9120 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9121 * vr-values.c (vr_values::adjust_range_with_scev): Same.
9122 * wide-int.cc (wi::add_large): Same.
9123 (wi::mul_internal): Same.
9124 (wi::sub_large): Same.
9125 (wi::divmod_internal): Same.
9126 * wide-int.h: Change overflow type to overflow_type for neg, add,
9127 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9128 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9129 mul_internal, divmod_internal.
9130 (overflow_type): New enum.
9131 (accumulate_overflow): New.
9133 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
9135 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9136 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9138 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
9140 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9141 argument is checked for zero before entering loop, avoid checking again.
9143 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
9145 * gimplify.h (generic_expr_could_trap_p): Set as global function.
9146 * gimplify.h (generic_expr_could_trap_p): Likwise.
9147 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9149 2018-07-06 Jakub Jelinek <jakub@redhat.com>
9151 PR tree-optimization/86401
9152 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9153 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9154 (fold_bit_and_mask): ... here. New helper function for match.pd.
9155 * fold-const.h (fold_bit_and_mask): Declare.
9156 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9158 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
9161 * target.def (translate_mode_attribute): New hook.
9162 * targhooks.h (default_translate_mode_attribute): Declare.
9163 * targhooks.c (default_translate_mode_attribute): New function.
9164 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9165 * doc/tm.texi: Regenerate.
9166 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9167 (rs6000_translate_mode_attribute): New function.
9169 2018-07-06 Paul Koning <ni1d@arrl.net>
9171 * doc/md.texi (define_split): Document DONE and FAIL.
9172 (define_peephole2): Ditto.
9174 2018-07-05 Jeff Law <law@redhat.com>
9176 PR tree-optimization/86010
9177 * tree-ssa-dse.c (compute_trims): More aggressively trim at
9178 both the head and tail of mem* and str* calls.
9180 2018-07-05 Jim Wilson <jimw@sifive.com>
9182 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9184 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
9186 * config/aarch64/aarch64-simd.md: correct flags text for
9187 MIN_EXPR replacement.
9189 2018-07-05 James Clarke <jrtc27@jrtc27.com>
9191 * configure: Regenerated.
9193 2018-07-05 Carl Love <cel@us.ibm.com>
9195 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9196 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9197 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9198 VSX_BUILTIN_DOUBLEL_V4SF.
9200 2018-07-05 Martin Sebor <msebor@redhat.com>
9203 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9204 than its domain to compute its the upper bound of a char array.
9206 2018-07-05 Nathan Sidwell <nathan@acm.org>
9208 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9209 * doc/cpp.texi: Update comment.
9210 * doc/tm.texi: Rebuilt.
9211 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9212 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9213 * doc/extend.texi (Backwards Compatibility): Clarify it is system
9214 headers affected by extern "C".
9215 * system.h: Poison NO_IMPLICIT_EXTERN_C.
9216 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9217 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9218 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9219 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9220 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9221 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9222 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9223 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9224 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9225 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9226 config/sparc/sp64-elf.h, config/spu/spu.h,
9227 config/stormy16/stormy16.h, config/v850/v850.h,
9228 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9229 define NO_IMPLICIT_EXTERN_C.
9230 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9232 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9235 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9236 instead of GET_MODE_SIZE when comparing Units.
9238 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9241 * rtlanal.c (set_noop_p): Constrain on mode change,
9242 include hard-reg-set.h
9244 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9246 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9248 2018-07-05 Jakub Jelinek <jakub@redhat.com>
9251 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9254 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9256 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9258 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9261 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9263 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9265 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
9268 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9270 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
9272 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9273 neg_*_op* variables.
9275 2018-07-04 Martin Liska <mliska@suse.cz>
9277 * tree-switch-conversion.c: Define
9278 max_ratio_for_speed and max_ratio_for_size constants.
9280 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9281 Martin Liska <mliska@suse.cz>
9286 * common.opt: Rename align options with 'str_' prefix.
9287 * common/config/i386/i386-common.c (set_malign_value): New
9289 (ix86_handle_option): Use it to set -falign-* options/
9290 * config/aarch64/aarch64-protos.h (struct tune_params): Change
9291 type from int to string.
9292 * config/aarch64/aarch64.c: Update default values from int
9294 * config/alpha/alpha.c (alpha_override_options_after_change):
9296 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9297 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9298 max skip conditionally.
9299 * config/i386/freebsd.h (SUBALIGN_LOG): New.
9300 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9301 max skip conditionally.
9302 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9303 max skip conditionally.
9304 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9305 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9306 max skip conditionally.
9307 * config/i386/i386.c (struct ptt): Change type from int to
9309 (ix86_default_align): Set default values.
9310 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9311 max skip conditionally.
9312 * config/i386/iamcu.h (SUBALIGN_LOG): New.
9313 (ASM_OUTPUT_MAX_SKIP_ALIGN):
9314 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9315 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9316 max skip conditionally.
9317 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9318 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9319 * config/i386/x86-64.h (SUBALIGN_LOG): New.
9320 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9321 max skip conditionally.
9322 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9323 * config/ia64/ia64.c (ia64_option_override): Set default values
9324 for alignment options.
9325 * config/m68k/m68k.c: Handle new str_align_* options.
9326 * config/mips/mips.c (mips_set_compression_mode): Change
9328 (mips_option_override): Set default values for options.
9329 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9331 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9333 * config/rx/rx.c (rx_option_override): Likewise.
9334 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9335 (LABEL_ALIGN): Use align_labels_log.
9336 (LOOP_ALIGN): Use align_loops_align.
9337 * config/s390/s390.c (s390_asm_output_function_label): Use new
9339 * config/sh/sh.c (sh_override_options_after_change):
9340 Change type of constants.
9341 * config/spu/spu.c (spu_sched_init): Likewise.
9342 * config/sparc/sparc.c (sparc_option_override): Set default
9344 * config/visium/visium.c (visium_option_override): Likewise.
9345 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9346 emit p2align format with last argument if it's not needed.
9347 * doc/invoke.texi: Document extended format of -falign-*.
9348 * final.c: Use align_labels alignment.
9349 * flags.h (struct target_flag_state): Change type to use
9351 (struct align_flags_tuple): New.
9352 (struct align_flags): Likewise.
9353 (align_loops_log): Redefine macro to use new types.
9354 (align_loops_max_skip): Redefine macro to use new types.
9355 (align_jumps_log): Redefine macro to use new types.
9356 (align_jumps_max_skip): Redefine macro to use new types.
9357 (align_labels_log): Redefine macro to use new types.
9358 (align_labels_max_skip): Redefine macro to use new types.
9359 (align_functions_log): Redefine macro to use new types.
9360 (align_loops): Redefine macro to use new types.
9361 (align_jumps): Redefine macro to use new types.
9362 (align_labels): Redefine macro to use new types.
9363 (align_functions): Redefine macro to use new types.
9364 (align_functions_max_skip): Redefine macro to use new types.
9365 (align_loops_value): New macro.
9366 (align_jumps_value): New macro.
9367 (align_labels_value): New macro.
9368 (align_functions_value): New macro.
9369 * function.c (invoke_set_current_function_hook): Propagate
9370 alignment values from flags to global variables default in
9372 * ipa-icf.c (sem_function::equals_wpa): Use
9373 cl_optimization_option_eq instead of memcmp.
9374 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9376 (cl_optimization_stream_in): Likewise.
9377 * optc-save-gen.awk: Support strings in cl_optimization.
9378 * opth-gen.awk: Likewise.
9379 * opts.c (finish_options): Remove error checking of invalid
9381 (MAX_CODE_ALIGN): Remove.
9382 (MAX_CODE_ALIGN_VALUE): Likewise.
9383 (parse_and_check_align_values): New function.
9384 (check_alignment_argument): Likewise.
9385 (common_handle_option): Use check_alignment_argument.
9386 * opts.h (parse_and_check_align_values): Declare.
9387 * toplev.c (init_alignments): Remove.
9388 (read_log_maxskip): New.
9389 (parse_N_M): Likewise.
9390 (parse_alignment_opts): Likewise.
9391 (backend_init_target): Remove usage of init_alignments.
9392 * toplev.h (parse_alignment_opts): Declare.
9393 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9395 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9396 * tree.c (cl_option_hasher::equal): New.
9397 * varasm.c: Use new global macros.
9399 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9401 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9402 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9403 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9404 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9405 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9406 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9407 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9408 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9409 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9410 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9411 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9412 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9413 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9415 2018-07-04 Martin Liska <mliska@suse.cz>
9416 Jonathan Wakely <jwakely@redhat.com>
9418 * coverage.c: Use correct type.
9419 * doc/invoke.texi: Language correction.
9421 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
9424 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9425 ENDBRANCH for non-tail call which may return via indirect branch.
9426 * doc/extend.texi: Document indirect_return attribute.
9428 2018-07-03 Martin Sebor <msebor@redhat.com>
9430 PR tree-optimization/86274
9431 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9433 (format_floating): Correct handling of infinities and NaNs.
9435 2018-07-03 Martin Sebor <msebor@redhat.com>
9437 * print-tree.c (print_real_cst): New function.
9438 (print_node_brief): Call it.
9439 (print_node): Ditto.
9441 2018-07-03 Jeff Law <law@redhat.com>
9443 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9444 into a single pattern.
9446 * config/h8300/h8300.md (ors code_iterator): New.
9447 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9448 a single pattern and single splitter.
9449 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9450 (iorqi3_1, xorqi3_1): Likewise.
9451 (iorqi3, xorqi3 expanders): Similarly.
9453 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9454 (movmd_internal) into a single pattern using the P mode iterator.
9455 (movmd splitters): Similarly.
9456 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9457 (movsd splitters): Similarly.
9459 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9460 ADDB, ADDW and ADDL into a single ADD attribute which selects the
9461 right table based on the size of the operand.
9462 * config/h8300/h8300.md (length_table): Corresponding changes. All
9463 references to "addb", "addw" and "addl" changed to "add".
9464 (btst patterns): Merge two variants into a single pattern.
9465 (tstqi, tsthi): Likewise.
9466 (addhi3_incdec, addsi3_incdec): Likewise.
9467 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9468 (mulhi3, mulsi3): Likewise.
9469 (udivhi3, udivsi3): Likewise.
9470 (divhi3, divsi3): Likewise.
9471 (andorqi3, andorhi3, andorsi3): Likewise.
9473 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9476 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9477 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9479 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9481 PR tree-optimization/85694
9482 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9483 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9485 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9486 (<u>avg<mode>3_ceil): New patterns.
9488 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9490 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9491 scan-tree-dump directive.
9492 * gcc.dg/vect/slp-perm-2.c: Likewise.
9493 * gcc.dg/vect/slp-perm-3.c: Likewise.
9494 * gcc.dg/vect/slp-perm-5.c: Likewise.
9495 * gcc.dg/vect/slp-perm-6.c: Likewise.
9496 * gcc.dg/vect/slp-perm-7.c: Likewise.
9497 * gcc.dg/vect/slp-perm-8.c: Likewise.
9499 2018-07-03 Marek Polacek <polacek@redhat.com>
9502 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9504 2018-07-03 Richard Biener <rguenther@suse.de>
9507 * tree-ssa-structalias.c (find_func_clobbers): Properly
9508 handle indirect calls.
9510 2018-07-03 Jeff Law <law@redhat.com>
9512 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9513 (shifts): New code iterator.
9514 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9515 expander. Fix HImode handling on H8/SX.
9516 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9517 (subqi3, subhi3, subsi3 expanders): Likewise.
9518 (andqi3, andhi3, andsi3 expanders): Likewise.
9519 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9520 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9521 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9522 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9523 (zero_extendqihi2, zero_extendqisi2): Likewise.
9524 (extendqihi2, extendqisi2): Likewise.
9525 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9526 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9527 (rotlqi3_1, rotlhi3_1): Likewise.
9528 (logicalhi3_sn, logicalsi3_sn): Likewise.
9529 (logicalhi3, logicalsi3): Likewise.
9531 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9533 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9534 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9535 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9536 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9537 type to append_pattern_def_seq instead of creating a stmt_vec_info
9539 (build_mask_conversion): Likewise. Remove vinfo argument.
9540 (vect_add_conversion_to_patterm): Likewise, renaming to...
9541 (vect_add_conversion_to_pattern): ...this.
9542 (vect_recog_mask_conversion_pattern): Update call to
9543 build_mask_conversion. Pass the vector type to
9544 append_pattern_def_seq here too.
9545 (vect_recog_gather_scatter_pattern): Update call to
9546 vect_add_conversion_to_pattern.
9548 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9550 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9551 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9552 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9553 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9554 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9555 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9556 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9557 append_pattern_def_seq instead of new_pattern_def_seq.
9558 (vect_recog_divmod_pattern): Do both of the above.
9559 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9562 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9564 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9565 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9566 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9567 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9568 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9569 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9570 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9571 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9572 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9573 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9574 parameter with a single stmt_vec_info.
9575 (vect_recog_func_ptr): Likewise.
9576 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9577 (vect_try_gather_scatter_pattern): ...this.
9578 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9579 the stmt_vec_info of the statement to be matched. Don't clear
9580 STMT_VINFO_RELATED_STMT.
9581 (vect_pattern_recog): Update call accordingly.
9583 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9585 PR tree-optimization/85694
9586 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9587 (uavgM3_ceil): Document new optabs.
9588 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9589 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9591 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9592 (savg_ceil_optab): New optabs.
9593 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9594 (vect_vect_recog_func_ptrs): Add it.
9595 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9596 constant directly from the associated lhs.
9598 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9600 * tree-vect-patterns.c (vect_split_statement): New function.
9601 (vect_convert_input): Use it to try to split an existing cast.
9603 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9605 * poly-int.h (print_hex): New function.
9606 * dumpfile.h (dump_dec, dump_hex): Declare.
9607 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9608 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9609 min_input_precision, operation_precision and operation_sign.
9610 * tree-vect-patterns.c (vect_get_range_info): New function.
9611 (vect_same_loop_or_bb_p, vect_single_imm_use)
9612 (vect_operation_fits_smaller_type): Delete.
9613 (vect_look_through_possible_promotion): Add an optional
9614 single_use_p parameter.
9615 (vect_recog_over_widening_pattern): Rewrite to use new
9616 stmt_vec_info infomration. Handle one operation at a time.
9617 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9618 (vect_truncatable_operation_p, vect_set_operation_type)
9619 (vect_set_min_input_precision): New functions.
9620 (vect_determine_min_output_precision_1): Likewise.
9621 (vect_determine_min_output_precision): Likewise.
9622 (vect_determine_precisions_from_range): Likewise.
9623 (vect_determine_precisions_from_users): Likewise.
9624 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9625 (vect_vect_recog_func_ptrs): Put over_widening first.
9627 (vect_pattern_recog): Call vect_determine_precisions.
9629 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9631 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9632 statements that have been replaced by further pattern statements.
9633 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9635 2018-07-03 Richard Biener <rguenther@suse.de>
9637 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9638 always set *dt. Dump vectype in vectype overload.
9639 * dumpfile.h (dump_gimple_expr): New function.
9640 (dump_gimple_expr_loc): Likewise.
9641 * dumpfile.c (dump_gimple_expr): New function.
9642 (dump_gimple_expr_loc): Likewise.
9644 2018-07-02 Jeff Law <law@redhat.com>
9646 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9647 the H8/300, H8/300H and H8/S variants into a single pattern.
9648 (movhi_h8300, movqi_h8300hs): Similarly.
9649 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9650 (QHI mode iterator): New.
9652 * config/h8300/h8300.md: Remove trailing whitespace.
9654 2018-07-02 Jim Wilson <jimw@sifive.com>
9656 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9657 instead of emit_insn for interrupt returns.
9658 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9659 (riscv_sret, riscv_uret): Likewise.
9661 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9663 * pretty-print.c (selftest::test_pp_format): Move save and restore
9664 of quotes to class auto_fix_quotes, and add an instance.
9665 * selftest.c: Include "intl.h".
9666 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9667 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9668 * selftest.h (selftest::auto_fix_quotes): New class.
9670 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9672 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9673 (aarch64_sve_prepare_conditional_op): Remove.
9674 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9675 Allow aarch64_simd_reg_or_zero as select operand; remove
9676 the aarch64_sve_prepare_conditional_op call.
9677 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9678 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9679 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9680 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9681 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9682 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9683 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9684 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9685 and a splitters to match all of the *_any patterns.
9686 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9688 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9689 (SVE_COND_FP_BINARY_REV): Remove.
9690 (sve_int_op_rev, sve_fp_op_rev): New.
9691 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9692 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9693 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9694 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9695 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9696 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9697 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9698 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9699 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9701 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9702 Remove match_dup 1 from the inner unspec.
9703 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9705 * config/aarch64/aarch64.md (movprfx): New attr.
9706 (length): Default movprfx to 8.
9707 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9708 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9709 (*<su>mul<SVE_I>3_highpart): Likewise.
9710 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9711 (*v<ASHIFT><SVE_I>3): Likewise.
9712 (*<su><MAXMIN><SVE_I>3): Likewise.
9713 (*<su><MAXMIN><SVE_F>3): Likewise.
9714 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9715 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9716 (*div<SVE_F>4): Likewise.
9718 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9720 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9723 2018-07-02 Richard Biener <rguenther@suse.de>
9725 PR tree-optimization/86363
9726 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9727 memset argument refers to a non-variable address.
9729 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9731 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9732 {PLUS,MINUS}_EXPR code to...
9733 (adjust_symbolic_bound): ...here,
9734 (combine_bound): ...here,
9735 (set_value_range_with_overflow): ...and here.
9737 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9739 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9741 (extract_range_from_abs_expr): ...here.
9743 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9745 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9746 -fno-omit-frame-pointer when not optimizing.
9748 2018-07-02 Martin Liska <mliska@suse.cz>
9751 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9752 (propagate_nothrow): Likewise.
9754 2018-07-02 Martin Liska <mliska@suse.cz>
9757 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9759 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9761 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9762 function in r262149, changing "loc" param from source_location to
9763 const dump_location_t &.
9764 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9765 declaration, as above.
9767 2018-07-01 Paul Koning <ni1d@arrl.net>
9769 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9770 -munit-asm, -mgnu-asm, -mdec-asm.
9771 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9772 (pdp11_output_labelref): New.
9773 (pdp11_output_def): New.
9774 (pdp11_output_addr_vec_elt): New.
9775 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9776 %# and %@ format codes.
9777 (pdp11_option_override): New.
9778 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9779 (pdp11_output_ident): New.
9780 (pdp11_asm_named_section): New.
9781 (pdp11_asm_init_sections): New.
9782 (pdp11_file_start): New.
9783 (pdp11_file_end): New.
9784 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9785 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9786 %o, like %c but octal.
9787 (pdp11_option_override): New.
9788 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9790 (DATA_SECTION_ASM_OP): Ditto.
9791 (READONLY_DATA_SECTION_ASM_OP): New.
9792 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9793 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9794 (ASM_OUTPUT_LABELREF): Ditto.
9795 (ASM_OUTPUT_DEF): Ditto.
9796 (ASM_OUTPUT_EXTERNAL): New.
9797 (ASM_OUTPUT_SOURCE_FILENAME): New.
9798 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9799 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9800 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9801 %# and %@ format codes.
9802 * config/pdp11/pdp11.opt (mgnu-asm): New.
9803 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9804 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9805 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9807 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9809 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9810 dereferencing path[] beyond its length.
9812 (debug_all_paths): New.
9813 (rewire_first_differing_edge): New.
9814 (adjust_paths_after_duplication): New.
9815 (duplicate_thread_path): Call adjust_paths_after_duplication.
9817 (thread_through_all_blocks): Add new argument to
9818 duplicate_thread_path.
9820 2018-06-30 Jim Wilson <jimw@sifive.com>
9822 * config/riscv/predicates.md (p2m1_shift_operand): New.
9823 (high_mask_shift_operand): New.
9824 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9825 pattern using p2m1_shift_operand.
9826 (lshsi3_zero_extend_3+2): New combiner pattern using
9827 high_mask_shift_operand.
9829 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9831 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9833 (vect_recog_rotate_pattern): ...here.
9834 (vect_convert_input): Try to insert casts of invariants in the
9836 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9837 preheader to be empty.
9839 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9841 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9842 vector type. If given, install it in the new statement's
9844 (vect_element_precision): New function.
9845 (vect_unpromoted_value): New struct.
9846 (vect_unpromoted_value::vect_unpromoted_value): New function.
9847 (vect_unpromoted_value::set_op): Likewise.
9848 (vect_look_through_possible_promotion): Likewise.
9849 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9850 (vect_widened_op_tree, vect_convert_input): Likewise.
9851 (vect_convert_inputs, vect_convert_output): Likewise.
9852 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9853 to handle the optional cast of the multiplication result and
9854 vect_widened_op_tree to detect the widened multiplication itself.
9855 Do not require the input and output of promotion casts to have
9856 the same sign, but base the signedness of the operation on the
9857 input rather than the result. If the pattern includes two
9858 promotions, check that those promotions have the same sign.
9859 Do not restrict the MULT_EXPR handling to a double-width result;
9860 handle quadruple-width results and wider. Use vect_convert_inputs
9861 to convert the inputs to the common type.
9862 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9863 to handle the optional cast of the ABS result. Also allow a sign
9864 change or a sign extension between the ABS and MINUS.
9865 Use vect_widened_op_tree to detect the widened subtraction and use
9866 vect_convert_inputs to convert the inputs to the common type.
9867 (vect_handle_widen_op_by_const): Delete.
9868 (vect_recog_widen_op_pattern): New function.
9869 (vect_recog_widen_mult_pattern): Use it.
9870 (vect_recog_widen_shift_pattern): Likewise.
9871 (vect_recog_widen_sum_pattern): Use
9872 vect_look_through_possible_promotion to handle the promoted
9875 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9877 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9878 the containing gimple_seq *.
9879 * gimple-iterator.h (gsi_for_stmt): Declare it.
9880 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9881 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9882 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9883 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9884 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9886 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9888 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9889 statement being replaced is part of an existing pattern
9890 definition sequence, inserting the new pattern statements before
9892 (vect_pattern_recog_1): Don't return a bool. If the statement
9893 is already part of a pattern, instead apply pattern matching
9894 to the pattern definition statements. Don't clear the
9895 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9896 (vect_pattern_recog): Don't break after the first match;
9897 continue processing the pattern definition statements instead.
9898 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9900 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9902 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9903 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9904 (vect_recog_widen_sum_pattern): Use it.
9906 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9908 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9909 phi is not a pattern statement and has not been replaced by
9910 a pattern statement.
9911 * tree-vect-patterns.c (type_conversion_p): Don't check
9912 STMT_VINFO_IN_PATTERN_P.
9913 (vect_recog_vector_vector_shift_pattern): Likewise.
9914 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9915 the pattern statement rather than the original statement; check
9916 directly for a WIDEN_MULT_EXPR here.
9917 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9918 vect_is_simple_use to return the pattern statement rather
9919 than the original statement; use is_pattern_stmt_p to check
9920 for such a pattern statement.
9921 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9922 to return the pattern statement rather than the original statement;
9923 don't do the same transformation here.
9924 (vect_is_simple_use): If the defining statement has been replaced
9925 by a pattern statement, return the pattern statement instead.
9926 Remove the corresponding (local) transformation from the vectype
9929 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9931 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9932 end and default to null.
9933 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9934 (vectorizable_reduction): Update calls accordingly, dropping the
9935 gimple ** argument if the passed-back statement isn't needed.
9936 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9937 (vect_recog_rotate_pattern): Likewise.
9938 (vect_recog_mask_conversion_pattern): Likewise.
9939 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9940 (vect_mask_constant_operand_p): Likewise.
9941 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9942 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9943 (get_group_load_store_type, get_load_store_type): Likewise.
9944 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9945 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9946 (vectorizable_conversion, vectorizable_assignment): Likewise.
9947 (vectorizable_shift, vectorizable_operation): Likewise.
9948 (vectorizable_store, vect_is_simple_cond): Likewise.
9949 (vectorizable_condition, vectorizable_comparison): Likewise.
9950 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9951 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9952 and move it to the end. Cope with null def_stmt_outs.
9954 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9956 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9958 2018-06-29 Jeff Law <law@redhat.com>
9960 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9961 displacements for TARGET_V850E2V3 and newer.
9962 (TARGET_LRA_P): Remove. Defaults to LRA now.
9963 * config/v850/v850.md (sign23byte_load): Remove.
9964 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9965 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9967 2018-06-29 Martin Liska <mliska@suse.cz>
9970 * coverage.c (coverage_init): Mangle full path name.
9971 * doc/invoke.texi: Document the change.
9972 * gcov-io.c (mangle_path): New.
9973 * gcov-io.h (mangle_path): Likewise.
9974 * gcov.c (mangle_name): Use mangle_path for path mangling.
9976 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9978 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9979 if starting source register is not even.
9981 2018-06-29 Martin Liska <mliska@suse.cz>
9983 PR tree-optimization/86263
9984 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9985 Make edge redirection.
9987 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9989 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9990 (dump_scope_depth): New variable.
9991 (get_dump_scope_depth): New function.
9992 (dump_begin_scope): New function.
9993 (dump_end_scope): New function.
9994 * dumpfile.h (get_dump_scope_depth): New declaration.
9995 (dump_begin_scope): New declaration.
9996 (dump_end_scope): New declaration.
9997 (class auto_dump_scope): New class.
9998 (AUTO_DUMP_SCOPE): New macro.
9999 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10002 2018-06-29 Richard Biener <rguenther@suse.de>
10004 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10005 compute_all_dependences succeeds.
10006 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10007 exceed --param loop-max-datarefs-for-datadeps.
10009 2018-06-29 Jakub Jelinek <jakub@redhat.com>
10011 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10013 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
10016 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10017 alternative 0 in preferred_for_speed attribute.
10019 2018-06-28 Paul Koning <ni1d@arrl.net>
10021 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10022 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10023 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10024 * config/pdp11/pdp11.md: Correct "length" attribute calculation
10025 for shift insn patterns.
10027 2018-06-28 David Malcolm <dmalcolm@redhat.com>
10029 * cgraph.c (cgraph_node::get_body): Replace assignments to
10030 "dump_file" with calls to set_dump_file.
10031 * dumpfile.c (alt_dump_file): Make static, and group with...
10032 (alt_flags): ...this definition.
10033 (dumps_are_enabled): New variable.
10034 (refresh_dumps_are_enabled): New function.
10035 (set_dump_file): New function.
10036 (set_alt_dump_file): New function.
10037 (gcc::dump_manager::dump_start): Replace assignments to
10038 "dump_file" and "alt_dump_file" with calls to set_dump_file and
10040 (gcc::dump_manager::dump_finish): Likewise.
10041 * dumpfile.h (alt_dump_file): Delete decl.
10042 (dumps_are_enabled): New variable decl.
10043 (set_dump_file): New function decl.
10044 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10046 * tree-nested.c (lower_nested_functions): Replace assignments to
10047 "dump_file" with calls to set_dump_file.
10049 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
10051 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10052 goto_locus of each outgoing edge of each basic block.
10054 2018-06-28 Richard Biener <rguenther@suse.de>
10056 * dwarf2out.c (decl_scope_table): Remove.
10057 (push_decl_scope): Likewise.
10058 (pop_decl_scope): Likewise.
10059 (gen_type_die_for_member): Do not call push/pop_decl_scope.
10060 (gen_struct_or_union_type_die): Likewise.
10061 (gen_tagged_type_die): Likewise.
10062 (dwarf2out_init): Do not initialize decl_scope_table.
10063 (dwarf2out_c_finalize): Do not free it.
10065 2018-06-28 Richard Biener <rguenther@suse.de>
10067 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10068 deciding whether to not re-use a DIE.
10070 2018-06-28 Richard Biener <rguenther@suse.de>
10072 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10073 DW_AT_abstract_origin attribute.
10075 2018-06-28 Martin Liska <mliska@suse.cz>
10077 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10078 Use newly introduced constants.
10079 * tree-switch-conversion.h (struct jump_table_cluster):
10080 Define max_ratio_for_size and max_ratio_for_speed.
10082 2018-06-28 Martin Liska <mliska@suse.cz>
10084 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10085 Add new checking assert to catch invalid state.
10086 (jump_table_cluster::can_be_handled): Handle single case
10088 (jump_table_cluster::is_beneficial): Bail out for such case.
10089 (bit_test_cluster::find_bit_tests):
10090 Add new checking assert to catch invalid state.
10091 (bit_test_cluster::can_be_handled): Handle single case
10093 (bit_test_cluster::is_beneficial): Bail out for such case.
10094 (switch_decision_tree::analyze_switch_statement):
10097 2018-06-28 Martin Liska <mliska@suse.cz>
10099 * common.opt: Introduce -completion option.
10100 * gcc.c (driver_handle_option): Handle it.
10101 (driver::main): Print completions if completion
10103 * opt-suggestions.c (option_proposer::get_completions):
10105 (option_proposer::suggest_completion): Likewise.
10106 (option_proposer::find_param_completions): Likewise.
10107 (verify_autocompletions): Likewise.
10108 (test_completion_valid_options): Likewise.
10109 (test_completion_valid_params): Likewise.
10110 (in_completion_p): Likewise.
10111 (empty_completion_p): Likewise.
10112 (test_completion_partial_match): Likewise.
10113 (test_completion_garbage): Likewise.
10114 (opt_proposer_c_tests): Likewise.
10115 * opt-suggestions.h: Declare new functions.
10116 * opts.c (common_handle_option): Handle OPT__completion_.
10117 * selftest-run-tests.c (selftest::run_tests): Add
10118 opt_proposer_c_tests.
10119 * selftest.c (assert_str_startswith): New.
10120 * selftest.h (assert_str_startswith): Likewise.
10121 (opt_proposer_c_tests): New.
10122 (ASSERT_STR_STARTSWITH): Likewise.
10124 2018-06-28 Martin Liska <mliska@suse.cz>
10126 * Makefile.in: Add opt-suggestions.o.
10127 * gcc-main.c: Include opt-suggestions.h.
10128 * gcc.c (driver::driver): Likewise.
10129 (driver::~driver): Remove m_option_suggestions.
10130 (driver::build_option_suggestions): Moved to option_proposer.
10131 (driver::suggest_option): Likewise.
10132 (driver::handle_unrecognized_options): Use option_proposer.
10133 * gcc.h (class driver): Add new memver m_option_proposer.
10134 * opt-suggestions.c: New file.
10135 * opt-suggestions.h: New file.
10137 2018-06-28 Martin Liska <mliska@suse.cz>
10139 * vec.h (class auto_string_vec): New (moved from auto_argvec).
10140 (auto_string_vec::~auto_string_vec): Likewise.
10142 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
10144 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10145 prevent_decl_creation_for_types fields up and add reset_location field.
10146 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10147 statement if id->reset_location is true.
10148 (copy_edges_for_bb): Do not set goto_locus on the new edges if
10149 id->reset_location is true.
10150 (copy_phis_for_bb): Force input_location on the arguments if
10151 id->reset_location is true.
10152 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10153 is set on the function to be inlined.
10155 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
10157 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10159 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
10161 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10162 registers for Pmode.
10163 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10164 hard registers for the clobbered pseudo.
10166 2018-06-27 Paul Koning <ni1d@arrl.net>
10168 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10169 mutually exclusive options.
10170 * config/pdp11/constraints.md (h): New constraint.
10171 (O): Update definition to match shift code generation.
10172 (D): New constraint.
10173 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10175 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10177 (output_jump): Change arguments.
10178 (pdp11_fixed_cc_regs): New function.
10179 (pdp11_cc_mode): Ditto.
10180 (pdp11_expand_shift): Ditto.
10181 (pdp11_assemble_shift): Ditto.
10182 (pdp11_small_shift): Ditto.
10183 (pdp11_branch_cost): Remove.
10184 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10186 (pdp11_register_move_cost): Update for CC registers.
10187 (pdp11_rtx_costs): Add case for LSHIFTRT.
10188 (pdp11_output_jump): Add CCNZ mode conditional branches.
10189 (notice_update_cc_on_set): Remove.
10190 (pdp11_cc_mode): New function.
10191 (simple_memory_operand): Correct pre/post decrement case.
10192 (no_side_effect_operand): New function.
10193 (pdp11_regno_reg_class): Add CC_REGS class.
10194 (pdp11_fixed_cc_regs): New function.
10195 (pdp11_small_shift): New function.
10196 (pdp11_expand_shift): New function to expand shift insns.
10197 (pdp11_assemble_shift): New function to output shifts.
10198 (pdp11_branch_cost): Remove.
10199 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10200 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10201 (WCHAR_TYPE): Ditto.
10202 (PTRDIFF_TYPE): Ditto.
10203 (ADJUST_INSN_LENGTH): New macro.
10204 (FIXED_REGISTERS): Add CC registers.
10205 (CALL_USED_REGISTERS): Ditto.
10206 (reg_class): Ditto.
10207 (REG_CLASS_NAMES): Ditto.
10208 (REG_CLASS_CONTENTS): Ditto.
10209 (SELECT_CC_MODE): Use new function.
10210 (TARGET_FLAGS_REGNUM): New macro.
10211 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10212 (cc0_reg_rtx): Remove.
10213 (CC_STATUS_MDEP): Remove.
10214 (CC_STATUS_MDEFP_INIT): Remove.
10215 (CC_IN_FPU): Remove.
10216 (NOTICE_UPDATE_CC): Remove.
10217 (REGISTER_NAMES): Add CC registers.
10218 (BRANCH_COST): Change to constant 1.
10219 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10221 * config/pdp11/pdp11.opt (mbcopy): Remove.
10222 (mbcopy-builtin): Remove.
10223 (mbranch-cheap): Remove.
10224 (mbranch-expensive): Remove.
10225 * config/pdp11/predicates.md (expand_shift_operand): Update to
10226 match shift code generation.
10227 (ccnz_operator): New predicate.
10228 * doc/invoke.texi (PDP-11 Options): Remove deleted options
10229 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10230 Remove non-existent option -mabshi, -mno-abshi. Document mutually
10232 * doc/md.texi (PDP-11): Document new D and h constraints. Update
10233 description of O constraint.
10235 2018-06-27 Jeff Law <law@redhat.com>
10236 Austin Law <austinklaw@gmail.com>
10238 * config/v850/v850.md (addsi3_set_flags): New pattern.
10239 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10240 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10241 (zero_extendhisi2_v850_set_flags): Likewise.
10242 (zero_extendqisi2_v850_set_flags): Likewise.
10243 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10244 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10245 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10247 * config/v850/v850-protos.h (notice_update_cc): Remove.
10248 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10249 (v850_print_operand): Handle 'D' and "d".
10250 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10251 Add handling of arithmetic/logical operations compared against zero.
10252 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10253 Do not look at v850_compare_op, instead get mode from last argument.
10254 (v850_gen_compare): Remove
10255 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10256 after reload for prologue insns.
10257 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10259 (construct_save_jarl): Likewise.
10260 (TARGET_FLAGS_REGNUM): Define.
10261 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10262 (NOTICE_UPDATE_CC): Remove.
10263 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10264 than cc0. Conditionalize on reload_completed.
10265 (cmpsi_insn, setfcc_insn): Likewise.
10266 (tst1 splitter): Turn into define_and_split which sets the flags
10268 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10269 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10270 (cstoresf4, cstoredf4): Clobber the flags.
10271 (cmpsi, cmpsf, cmpdf): Remove expanders.
10272 (setf_insn): Remove pattern.
10273 (addsi3): Turn into define_and_split which clobbers the flags after
10274 reload and a suitable pattern (addsi3_clobber_flags) for use after
10276 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10277 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10278 (ashrsi3, ashrsi3_v850e2): Likewise.
10279 (bins): Clobber the flags.
10280 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10281 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10282 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10283 (call_value_internal_short, call_value_internal_long): Likewise.
10284 (callt_save_interrupt, callt_return_interrupt): Likewise.
10285 (save_interrupt, return_interrupt): Likewise.
10286 (callt_save_all_interrupt, save_all_interrupt): Likewise.
10287 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10288 (restore_all_interrupt, _restore_all_interrupt): Likewise.
10289 (All FP comparisons): Only allow after reload has completed.
10291 (divh, divhu): Tweak output template.
10292 (branch_z_normal, branch_z_invert): Remove
10293 (branch_nz_normal, branch_nz_invert): Likewise.
10294 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10296 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10297 * config/v850/v850.c (notice_update_cc): Remove.
10298 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
10299 (CC_NO_CARRY): Likewise.
10300 (NOTICE_UPDATE_CC): Define to nothing.
10301 * config/v850/v850.md: Remove block comment on cc0 handling
10302 Remove "cc" attribute from all patterns. Remove cc_status handling
10303 from all patterns. Minor formatting fixes.
10305 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10307 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10308 (cortex-a76.cortex-a55): Likewise.
10309 * config/aarch64/aarch64-tune.md: Regenerate.
10310 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10311 cortex-a76.cortex-a55.
10313 2018-06-27 Jeff Law <law@redhat.com>
10315 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10316 (MULTILIB_DIRNAMES): Similarly.
10318 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
10320 * gimple.h (gimple_return_retbnd): Delete.
10321 (gimple_return_set_retbnd): Likewise.
10322 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10323 gimple_return_set_retbnd.
10324 * gimple-pretty-print.c (dump_gimple_return): Remove call to
10325 gimple_return_retbnd and adjust.
10326 * tree-inline.h (struct copy_body_data): Remove retbnd field.
10327 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10328 Explicitly return NULL in a couple more cases. Move assertion
10329 on debug statements and remove unreachable code.
10330 (reset_debug_binding): Do not test id->retbnd.
10331 (expand_call_inline): Do not set it.
10333 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10335 * configure.ac: Add --disable-gcov option.
10336 * configure: Regenerate.
10337 * Makefile.in: Honour @enable_gcov@.
10338 * doc/install.texi: Document --disable-gcov.
10340 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10342 * config/arm/arm-cpus.in (cortex-a76): New entry.
10343 (cortex-a76.cortex-a55): Likewise.
10344 * config/arm/arm-tables.opt: Regenerate.
10345 * config/arm/arm-tune.md: Likewise.
10346 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10347 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10348 cortex-a76.cortex-a55.
10350 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10353 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10355 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10357 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10359 (EPILOGUE_USES): Likewise.
10361 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10363 * tree-inline.c (remap_location): New function extracted from...
10364 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10365 (copy_phis_for_bb): ...here. Call remap_location.
10366 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10368 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10370 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10371 unaligned vsx for 16B memset.
10373 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10376 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10377 ieee128_float_type_node to long_double_type_node unless
10378 TARGET_LONG_DOUBLE_128 is set.
10380 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10382 * cfgloop.c (get_loop_location): Convert return type from
10383 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10384 by implicit construction from rtx_insn *, and using
10385 dump_user_location_t::from_function_decl for the fallback case.
10386 * cfgloop.h (get_loop_location): Convert return type from
10387 location_t to dump_user_location_t.
10388 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10389 dump_printf_loc to pass in a dump_location_t rather than a
10390 location_t, via the gimple stmt.
10391 * coverage.c (get_coverage_counts): Update calls to
10392 dump_printf_loc to pass in dump_location_t rather than a
10394 * doc/optinfo.texi (Dump types): Convert example of
10395 dump_printf_loc from taking "locus" to taking "insn". Update
10396 description of the "_loc" calls to cover dump_location_t.
10397 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10399 (dump_user_location_t::dump_user_location_t): New constructors,
10400 from gimple *stmt and rtx_insn *.
10401 (dump_user_location_t::from_function_decl): New function.
10402 (dump_loc): Make static.
10403 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10404 const dump_location_t &.
10405 (dump_generic_expr_loc): Delete.
10406 (dump_printf_loc): Convert param "loc" from location_t to
10407 const dump_location_t &.
10408 (selftest::test_impl_location): New function.
10409 (selftest::dumpfile_c_tests): New function.
10410 * dumpfile.h: Include "profile-count.h".
10411 (class dump_user_location_t): New class.
10412 (struct dump_impl_location_t): New struct.
10413 (class dump_location_t): New class.
10414 (dump_printf_loc): Convert 2nd param from source_location to
10415 const dump_location_t &.
10416 (dump_generic_expr_loc): Delete.
10417 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10418 const dump_location_t &.
10419 * gimple-fold.c (fold_gimple_assign): Update call to
10420 dump_printf_loc to pass in a dump_location_t rather than a
10421 location_t, via the gimple stmt.
10422 (gimple_fold_call): Likewise.
10423 * gimple-loop-interchange.cc
10424 (loop_cand::analyze_iloop_reduction_var): Update for change to
10425 check_reduction_path.
10426 (tree_loop_interchange::interchange): Update for change to
10427 find_loop_location.
10428 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10429 change in return-type of find_loop_location.
10430 (graphite_regenerate_ast_isl): Likewise.
10431 * graphite-optimize-isl.c (optimize_isl): Likewise.
10432 * graphite.c (graphite_transform_loops): Likewise.
10433 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10434 pass in a dump_location_t rather than a location_t, via the
10436 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10437 * ipa.c (walk_polymorphic_call_targets): Likewise.
10438 * loop-unroll.c (report_unroll): Convert "locus" param from
10439 location_t to dump_location_t.
10440 (decide_unrolling): Update for change to get_loop_location's
10442 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10443 location_t to dump_user_location_t.
10444 (grid_find_single_omp_among_assignments_1): Updates calls to
10445 dump_printf_loc to pass in a dump_location_t rather than a
10446 location_t, via the gimple stmt.
10447 (grid_parallel_clauses_gridifiable): Convert "tloc" from
10448 location_t to dump_location_t. Updates calls to dump_printf_loc
10449 to pass in a dump_location_t rather than a location_t, via the
10451 (grid_inner_loop_gridifiable_p): Likewise.
10452 (grid_dist_follows_simple_pattern): Likewise.
10453 (grid_gfor_follows_tiling_pattern): Likewise.
10454 (grid_target_follows_gridifiable_pattern): Likewise.
10455 (grid_attempt_target_gridification): Convert initialization
10456 of local "grid" from memset to zero-initialization; FIXME: does
10457 this require C++11? Update call to dump_printf_loc to pass in a
10458 optinfo_location rather than a location_t, via the gimple stmt.
10459 * profile.c (read_profile_edge_counts): Updates call to
10460 dump_printf_loc to pass in a dump_location_t rather than a
10462 (compute_branch_probabilities): Likewise.
10463 * selftest-run-tests.c (selftest::run_tests): Call
10465 * selftest.h (dumpfile_c_tests): New decl.
10466 * tree-loop-distribution.c (pass_loop_distribution::execute):
10467 Update for change in return type of find_loop_location.
10468 * tree-parloops.c (parallelize_loops): Likewise.
10469 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10470 "locus" from location_t to dump_user_location_t.
10471 (canonicalize_loop_induction_variables): Likewise.
10472 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10473 for change in return type of find_loop_location.
10474 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10475 to dump_printf_loc to pass in a dump_location_t rather than a
10476 location_t, via the stmt.
10477 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10479 * tree-vect-loop-manip.c (find_loop_location): Convert return
10480 type from source_location to dump_user_location_t.
10481 (vect_do_peeling): Update for above change.
10482 (vect_loop_versioning): Update for change in type of
10484 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10485 from location_t to dump_user_location_t.
10486 (vect_estimate_min_profitable_iters): Update for change in type
10488 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10489 location_t to dump_location_t.
10490 (vect_slp_bb): Update for change in type of vect_location.
10491 * tree-vectorizer.c (vect_location): Convert from source_location
10492 to dump_user_location_t.
10493 (try_vectorize_loop_1): Update for change in vect_location's type.
10494 (vectorize_loops): Likewise.
10495 (increase_alignment): Likewise.
10496 * tree-vectorizer.h (vect_location): Convert from source_location
10497 to dump_user_location_t.
10498 (find_loop_location): Convert return type from source_location to
10499 dump_user_location_t.
10500 (check_reduction_path): Convert 1st param from location_t to
10501 dump_user_location_t.
10502 * value-prof.c (check_counter): Update call to dump_printf_loc to
10503 pass in a dump_user_location_t rather than a location_t; update
10504 call to error_at for change in type of "locus".
10505 (check_ic_target): Update call to dump_printf_loc to
10506 pass in a dump_user_location_t rather than a location_t, via the
10509 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10511 * config/s390/s390.h (enum processor_flags): Do not use
10512 default tune parameter when -march was specified.
10514 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10517 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10518 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10521 2018-06-26 Richard Biener <rguenther@suse.de>
10523 PR tree-optimization/86287
10525 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10526 (vect_analyze_loop): Initialize n_stmts.
10528 2018-06-26 Richard Biener <rguenther@suse.de>
10530 PR middle-end/86271
10531 * fold-const.c (fold_convertible_p): Pointer extension
10534 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10537 * dwarf2out.c (loc_list_has_views): Adjust comments.
10538 (dw_loc_list): Split single cross-partition range with
10541 2018-06-25 Jeff Law <law@redhat.com>
10543 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10544 on -mbig-switch by default.
10546 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10548 (const_float_0_operand): Remove unused predicate.
10549 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10550 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10551 (recipsf2): New expander. Original pattern now called
10553 (recipdf2, recipdf2_insn): Similarly.
10554 (rsqrtsf2, rsqrtsf2_insn): Similarly
10555 (rsqrtdf2, rsqrtdf2_insn): Similarly
10557 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10559 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10560 Simplify logic for FreeBSD (twice).
10562 2018-06-25 Martin Sebor <msebor@redhat.com>
10564 PR tree-optimization/86204
10565 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10566 a strnlen result if it's less than the length of the string.
10568 2018-06-25 Martin Sebor <msebor@redhat.com>
10570 PR tree-optimization/85700
10571 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10572 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10573 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10575 2018-06-25 Martin Sebor <msebor@redhat.com>
10577 * doc/extend.texi (Zero-length arrays): Update and clarify.
10579 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10581 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10582 added IEEE/IBM long double multilib support on PowerPC little
10583 endian Linux systems.
10584 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10585 (MULTILIB_DEFAULTS): Likewise.
10586 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10588 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10589 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10590 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10592 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10594 PR middle-end/86311
10595 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10596 (REORDER_45): Likewise.
10598 2018-06-25 Jeff Law <law@redhat.com>
10600 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10601 dividend to 32 bits. Adjust length.
10602 (udivmodhi4): Cleanup output template. Fix length.
10604 2018-06-25 Carl Love <cel@us.ibm.com>
10606 * config/rs6000/vsx.md: Change word selector to prefered location.
10608 2018-06-25 Richard Biener <rguenther@suse.de>
10610 PR tree-optimization/86304
10611 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10612 epilogue-if-converted loops as well.
10614 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10616 * lto-section-out.c (lto_begin_section): Do not print section
10617 name for noaddr and unnumbered dumps.
10619 2018-06-25 Richard Biener <rguenther@suse.de>
10621 * tree-vectorizer.h (struct vec_info_shared): New structure
10622 with parts split out from struct vec_info and loop_nest from
10623 struct _loop_vec_info.
10624 (struct vec_info): Adjust accordingly.
10625 (struct _loop_vec_info): Likewise.
10626 (LOOP_VINFO_LOOP_NEST): Adjust.
10627 (LOOP_VINFO_DATAREFS): Likewise.
10628 (LOOP_VINFO_DDRS): Likewise.
10629 (struct _bb_vec_info): Likewise.
10630 (BB_VINFO_DATAREFS): Likewise.
10631 (BB_VINFO_DDRS): Likewise.
10632 (struct _stmt_vec_info): Add dr_aux member.
10633 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10634 (DR_MISALIGNMENT_UNINITIALIZED): New.
10635 (set_dr_misalignment): Adjust.
10636 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10637 (vect_analyze_loop): Adjust prototype.
10638 (vect_analyze_loop_form): Likewise.
10639 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10640 Compute dependences lazily.
10641 (vect_record_base_alignments): Use shared datarefs/ddrs.
10642 (vect_verify_datarefs_alignment): Likewise.
10643 (vect_analyze_data_refs_alignment): Likewise.
10644 (vect_analyze_data_ref_accesses): Likewise.
10645 (vect_analyze_data_refs): Likewise.
10646 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10647 constructor parameter for shared part.
10648 (vect_analyze_loop_form): Pass in shared part and adjust.
10649 (vect_analyze_loop_2): Pass in storage for the number of
10650 stmts. Move loop nest finding to the caller. Compute
10652 (vect_analyze_loop): Pass in shared part.
10653 (vect_transform_loop): Verify shared datarefs are unchanged.
10654 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10655 constructor parameter for shared part.
10656 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10657 (vect_slp_bb): Verify shared datarefs are unchanged before
10659 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10661 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10662 DR_MISALIGNMENT_UNINITIALIZED.
10663 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10664 parameter for shared part.
10665 (vec_info::~vec_info): Adjust.
10666 (vec_info_shared::vec_info_shared): New.
10667 (vec_info_shared::~vec_info_shared): Likewise.
10668 (vec_info_shared::save_datarefs): Likewise.
10669 (vec_info_shared::check_datarefs): Likewise.
10670 (try_vectorize_loop_1): Construct shared part live for analyses
10671 of a single loop for multiple vector sizes.
10672 * tree-parloops.c (gather_scalar_reductions): Adjust.
10674 2018-06-25 Richard Biener <rguenther@suse.de>
10676 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10677 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10678 (vect_analyze_data_refs): Remove similar code from here and
10679 simplify accordingly.
10681 2018-06-25 Richard Biener <rguenther@suse.de>
10683 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10684 for reverse storage order accesses rather than asserting
10685 they cannot happen here.
10687 2018-06-25 Tom de Vries <tdevries@suse.de>
10690 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10691 Use data16 instead of .byte for insn prefix.
10693 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10696 * parser.c (make_char_string_pack): Pass this literal chars
10697 through cpp_interpret_string.
10698 (cp_parser_userdef_numeric_literal): Check the result of
10699 make_char_string_pack.
10701 2018-06-24 Maya Rashish <coypu@sdf.org>
10703 * ginclude/stddef.h: Simplify conditions around avoiding
10704 re-definition of __size_t.
10706 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10708 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10709 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10711 2018-06-22 Maya Rashish <coypu@sdf.org>
10713 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10714 made to OpenBSD and NetBSD through the years.
10716 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10718 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10719 behavior of vec_pack (vector double, vector double) to match
10720 behavior of vec_float2 (vector double, vector double).
10722 2018-06-22 Olivier Hainque <hainque@adacore.com>
10724 * gimplify.c (gimplify_function_tree): Prevent creation
10725 of a trampoline for the address of the current function
10726 passed to entry/exit instrumentation hooks.
10728 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10731 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10734 2018-06-22 Martin Liska <mliska@suse.cz>
10736 PR tree-optimization/86263
10737 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10738 Bail out if is_enabled is false.
10739 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10741 (jump_table_cluster::is_enabled): New function.
10743 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10745 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10746 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10747 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10748 (lto_input_ts_binfo_tree_pointers): Likewise.
10749 * tree-streamer-out.c (streamer_write_tree_bitfields,
10750 write_ts_binfo_tree_pointers): Likewise.
10751 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10753 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10755 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10757 2018-06-22 Martin Liska <mliska@suse.cz>
10759 * symbol-summary.h (get): Make it pure and inline move
10760 functionality from ::get function.
10761 (get): Remove and inline into ::get and ::get_create.
10762 (get_create): Move code from ::get function.
10764 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10767 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10768 -x assembler-with-cpp.
10770 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10772 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10773 _FILE_OFFSET_BITS=64 for C++.
10775 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10777 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10778 conversion insn that shows up when pr85657-3.c is compiled using
10779 IEEE 128-bit long double.
10780 (neg<mode>2_internal): Use the correct mode to check whether the
10781 mode is IBM extended.
10782 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10783 multiply and divide external functions from being created more
10786 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10788 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10790 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10791 the edge can be forwarded.
10792 (cfg_layout_merge_blocks): Likewise.
10794 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10796 * except.c (finish_eh_generation): Commit edge insertions only after
10797 the EH edges have been redirected from post-landing to landing pads.
10799 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10801 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10802 create_tmp_var_for to create the FRAME decl.
10803 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10805 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10807 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10808 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10809 debug statement when resetting its value.
10810 (expand_call_inline): Copy the locus of the call onto the assignment
10811 of the return value, if any. Use local variable in more cases.
10813 2018-06-21 Martin Liska <mliska@suse.cz>
10815 * ipa-pure-const.c (propagate_nothrow): Use
10816 funct_state_summaries->get.
10817 (dump_malloc_lattice): Likewise.
10818 (propagate_malloc): Likewise.
10820 2018-06-21 Richard Biener <rguenther@suse.de>
10822 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10823 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10824 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10826 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10827 BLOCK_ABSTRACT_ORIGIN unconditionally.
10829 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10831 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10833 * ipa-reference.c (ipa_reference_c_finalize): Delete
10834 ipa_ref_opt_sum_summaries and set it to NULL.
10836 2018-06-21 Tom de Vries <tdevries@suse.de>
10838 PR tree-optimization/85859
10839 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10840 test with comment from bb_no_side_effects_p.
10842 2018-06-21 Richard Biener <rguenther@suse.de>
10844 PR tree-optimization/86232
10845 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10846 max for constant niter.
10848 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10850 * config/aarch64/aarch64-simd.md
10851 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10853 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10855 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10856 Make opernads of the unspec commutative.
10858 2018-06-21 Richard Biener <rguenther@suse.de>
10860 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10861 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10862 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10863 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10865 (vect_record_base_alignments): Do not record base alignment
10866 for gathers or scatters.
10867 (vect_compute_data_ref_alignment): Drop return value that is always
10868 true. Bail out early for gathers or scatters.
10869 (vect_enhance_data_refs_alignment): Bail out early for gathers
10871 (vect_find_same_alignment_drs): Likewise.
10872 (vect_analyze_data_refs_alignment): Remove dead code.
10873 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10874 (vect_analyze_data_refs): For possible gathers or scatters do
10875 not create an alternate DR, just check their possible validity
10876 and mark them. Adjust DECL_NONALIASED handling to not rely
10877 on DR_BASE_ADDRESS.
10878 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10879 update inits of gathers or scatters.
10880 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10881 Also copy gather/scatter flag to pattern vinfo.
10883 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10885 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10886 behavior of vec_packsu (vector unsigned long long, vector unsigned
10887 long long) to match behavior of vec_packs with same signature.
10889 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10890 Thomas Schwinge <thomas@codesourcery.com>
10891 Cesar Philippidis <cesar@codesourcery.com>
10893 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10894 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10895 (gimplify_adjust_omp_clauses): Likewise.
10896 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10897 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10898 (gimplify_omp_target_update): Update handling of acc update and
10900 * omp-low.c (install_var_field): Remove unused parameter
10901 base_pointers_restrict.
10902 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10903 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10905 (omp_target_base_pointers_restrict_p): Delete.
10906 (scan_omp_target): Update call to scan_sharing_clauses.
10907 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10909 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10910 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10911 (convert_local_omp_clauses): Likewise.
10912 * tree-pretty-print.c (dump_omp_clause): Likewise.
10913 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10915 (omp_clause_code_name): Likewise.
10917 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10920 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10923 PR tree-optimization/86231
10924 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10925 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10927 2018-06-20 Tom de Vries <tdevries@suse.de>
10929 PR tree-optimization/86097
10930 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10931 iv type if signedness of iv type is not the same as that of *nit.
10933 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10935 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10936 EDGE_EH edges, verify they are all EDGE_EH.
10938 2018-06-20 Maya Rashish <coypu@sdf.org>
10940 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10942 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10944 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10945 * config/aarch64/aarch64.c (xgene1_tunings): Add
10946 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10947 (aarch64_mode_valid_for_sched_fusion_p):
10948 Allow 16-byte modes.
10949 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10950 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10952 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10954 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10955 * config/aarch64/iterators.md (VQ2): New mode iterator.
10957 2018-06-20 Martin Liska <mliska@suse.cz>
10959 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10960 Change default ratio from 10 to 8.
10962 2018-06-20 Martin Liska <mliska@suse.cz>
10964 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10966 (bit_test_cluster::find_bit_tests): Likewise.
10967 (switch_decision_tree::analyze_switch_statement): Find clusters.
10968 * tree-switch-conversion.h (struct jump_table_cluster): Document
10971 2018-06-20 Martin Liska <mliska@suse.cz>
10973 * tree-switch-conversion.c (switch_conversion::collect):
10974 Record m_uniq property.
10975 (switch_conversion::expand): Bail out for special conditions.
10976 (group_cluster::~group_cluster): New.
10977 (group_cluster::group_cluster): Likewise.
10978 (group_cluster::dump): Likewise.
10979 (jump_table_cluster::emit): New.
10980 (switch_decision_tree::fix_phi_operands_for_edges): New.
10981 (struct case_node): Remove struct.
10982 (jump_table_cluster::can_be_handled): New.
10983 (case_values_threshold): Moved to header.
10984 (reset_out_edges_aux): Likewise.
10985 (jump_table_cluster::is_beneficial): New.
10986 (bit_test_cluster::can_be_handled): Likewise.
10987 (add_case_node): Remove.
10988 (bit_test_cluster::is_beneficial): New.
10989 (case_bit_test::cmp): New.
10990 (bit_test_cluster::emit): New.
10991 (expand_switch_as_decision_tree_p): Remove.
10992 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10993 (fix_phi_operands_for_edge): Likewise.
10994 (switch_decision_tree::analyze_switch_statement): New.
10995 (compute_cases_per_edge): Move ...
10996 (switch_decision_tree::compute_cases_per_edge): ... here.
10997 (try_switch_expansion): Likewise.
10998 (switch_decision_tree::try_switch_expansion): Likewise.
10999 (record_phi_operand_mapping): Likewise.
11000 (switch_decision_tree::record_phi_operand_mapping): Likewise.
11001 (emit_case_decision_tree): Likewise.
11002 (switch_decision_tree::emit): Likewise.
11003 (balance_case_nodes): Likewise.
11004 (switch_decision_tree::balance_case_nodes): Likewise.
11005 (dump_case_nodes): Likewise.
11006 (switch_decision_tree::dump_case_nodes): Likewise.
11007 (emit_jump): Likewise.
11008 (switch_decision_tree::emit_jump): Likewise.
11009 (emit_cmp_and_jump_insns): Likewise.
11010 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11011 (emit_case_nodes): Likewise.
11012 (switch_decision_tree::emit_case_nodes): Likewise.
11013 (conditional_probability): Remove.
11014 * tree-switch-conversion.h (enum cluster_type): New.
11016 (struct cluster): Likewise.
11017 (cluster::cluster): Likewise.
11018 (struct simple_cluster): Likewise.
11019 (simple_cluster::simple_cluster): Likewise.
11020 (struct group_cluster): Likewise.
11021 (struct jump_table_cluster): Likewise.
11022 (struct bit_test_cluster): Likewise.
11023 (struct min_cluster_item): Likewise.
11024 (struct case_tree_node): Likewise.
11025 (case_tree_node::case_tree_node): Likewise.
11026 (jump_table_cluster::case_values_threshold): Likewise.
11027 (struct case_bit_test): Likewise.
11028 (struct switch_decision_tree): Likewise.
11029 (struct switch_conversion): Likewise.
11030 (switch_decision_tree::reset_out_edges_aux): Likewise.
11032 2018-06-20 Martin Liska <mliska@suse.cz>
11034 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11035 (hoist_edge_and_branch_if_true): Likewise.
11036 (expand_switch_using_bit_tests_p): Likewise.
11037 (struct case_bit_test): Likewise.
11038 (case_bit_test_cmp): Likewise.
11039 (emit_case_bit_tests): Likewise.
11040 (switch_conversion::switch_conversion): New class.
11041 (struct switch_conv_info): Remove old struct.
11042 (collect_switch_conv_info): More to ...
11043 (switch_conversion::collect): ... this.
11044 (check_range): Likewise.
11045 (switch_conversion::check_range): Likewise.
11046 (check_all_empty_except_final): Likewise.
11047 (switch_conversion::check_all_empty_except_final): Likewise.
11048 (check_final_bb): Likewise.
11049 (switch_conversion::check_final_bb): Likewise.
11050 (create_temp_arrays): Likewise.
11051 (switch_conversion::create_temp_arrays): Likewise.
11052 (free_temp_arrays): Likewise.
11053 (gather_default_values): Likewise.
11054 (switch_conversion::gather_default_values): Likewise.
11055 (build_constructors): Likewise.
11056 (switch_conversion::build_constructors): Likewise.
11057 (constructor_contains_same_values_p): Likewise.
11058 (switch_conversion::contains_same_values_p): Likewise.
11059 (array_value_type): Likewise.
11060 (switch_conversion::array_value_type): Likewise.
11061 (build_one_array): Likewise.
11062 (switch_conversion::build_one_array): Likewise.
11063 (build_arrays): Likewise.
11064 (switch_conversion::build_arrays): Likewise.
11065 (gen_def_assigns): Likewise.
11066 (switch_conversion::gen_def_assigns): Likewise.
11067 (prune_bbs): Likewise.
11068 (switch_conversion::prune_bbs): Likewise.
11069 (fix_phi_nodes): Likewise.
11070 (switch_conversion::fix_phi_nodes): Likewise.
11071 (gen_inbound_check): Likewise.
11072 (switch_conversion::gen_inbound_check): Likewise.
11073 (process_switch): Use the newly created class.
11074 (switch_conversion::expand): New.
11075 (switch_conversion::~switch_conversion): New.
11076 * tree-switch-conversion.h: New file.
11078 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11080 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11081 tree-vect-patterns.c.
11082 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11083 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
11084 (vect_recog_sad_pattern): Likewise.
11085 (vect_recog_widen_sum_pattern): Likewise.
11086 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
11087 (vect_recog_widen_shift_pattern): Remove the type_in argument.
11088 (vect_recog_rotate_pattern): Likewise.
11089 (vect_recog_mult_pattern): Likewise.
11090 (vect_recog_vector_vector_shift_pattern): Likewise.
11091 (vect_recog_divmod_pattern): Likewise.
11092 (vect_recog_mixed_size_cond_pattern): Likewise.
11093 (vect_recog_bool_pattern): Likewise.
11094 (vect_recog_mask_conversion_pattern): Likewise.
11095 (vect_try_gather_scatter_pattern): Likewise.
11096 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
11097 (vect_recog_over_widening_pattern): Likewise.
11098 (vect_recog_gather_scatter_pattern): Likewise.
11099 (vect_recog_func_ptr): Move from tree-vectorizer.h
11100 (vect_vect_recog_func_ptrs): Move further down the file.
11101 (vect_recog_func): Likewise. Remove the third argument.
11102 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11103 (vect_pattern_recog_1): Expect the pattern function to do any
11104 necessary target tests. Also expect it to provide a vector type.
11105 Remove the type_in handling.
11107 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11109 * tree-vect-patterns.c (vect_pattern_detected): New function.
11110 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11111 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11112 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11113 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11114 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11115 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11116 (vect_recog_mask_conversion_pattern)
11117 (vect_try_gather_scatter_pattern): Likewise.
11119 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11121 * tree-vect-patterns.c (vect_get_internal_def): New function.
11122 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11123 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11124 (search_type_for_mask_1): Use it.
11126 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11128 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11129 redundant WIDEN_SUM_EXPR handling.
11130 (vect_recog_sad_pattern): Likewise.
11132 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11134 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11135 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11136 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11137 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11138 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11140 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11142 * tree-vect-stmts.c (vectorizable_call): Make sure that we
11143 use the stmt_vec_info of the original bb statement for the
11144 new zero assignment, even if the call is part of a pattern.
11146 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11148 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11149 that the sequence is attached to the original statement rather
11150 than the pattern statement.
11151 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11152 PATTERN_DEF_SEQ from the original statement rather than
11153 the main pattern statement.
11154 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11155 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11156 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11158 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11160 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11161 definition statements before the early exit for statements that aren't
11163 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11165 (vect_transform_loop): ...here. Process pattern definition
11166 statements without first checking whether the main pattern
11167 statement is live or relevant.
11169 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11171 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11172 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11174 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
11176 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11177 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11178 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11179 (expand_block_compare): Change select_block_compare_mode call.
11180 (expand_strncmp_align_check): Use new functions, fix comment.
11181 (emit_final_str_compare_gpr): New function.
11182 (expand_strn_compare): Refactor and clean up code.
11183 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11185 2018-06-19 Tony Reix <tony.reix@atos.com>
11186 Damien Bergamini <damien.bergamini@atos.com>
11187 David Edelsohn <dje.gcc@gmail.com>
11189 * collect2.c (static_obj): New variable.
11190 (static_libs): New variable.
11191 (is_in_list): Uncomment declaration.
11192 (main): Track AIX libraries linked statically.
11193 (is_in_list): Uncomment definition.
11194 (scan_prog_file): Don't add AIX shared libraries initializer
11195 to constructor list if linking statically.
11197 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
11199 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11201 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11203 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
11205 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11208 2018-06-19 Martin Liska <mliska@suse.cz>
11210 * config/i386/i386.c (ix86_can_inline_p): Do not use
11211 ipa_fn_summaries::get_create.
11212 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11214 (devirtualization_time_bonus): Likewise.
11215 (ipcp_propagate_stage): Likewise.
11216 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11217 (edge_set_predicate): Likewise.
11218 (evaluate_conditions_for_known_args): Likewise.
11219 (evaluate_properties_for_edge): Likewise.
11220 (ipa_call_summary::reset): Tranform to ...
11221 (ipa_call_summary::~ipa_call_summary): ... this.
11222 (ipa_fn_summary::reset): Transform to ...
11223 (ipa_fn_summary::~ipa_fn_summary): ... this.
11224 (ipa_fn_summary_t::remove): Rename to ...
11225 (ipa_fn_summary_t::remove_callees): ... this.
11226 (ipa_fn_summary_t::duplicate): Use placement new
11227 instead of memory copy.
11228 (ipa_call_summary_t::duplicate): Likewise.
11229 (ipa_call_summary_t::remove): Remove.
11230 (dump_ipa_call_summary): Change get_create to get.
11231 (ipa_dump_fn_summary): Dump only when summary exists.
11232 (analyze_function_body): Use symbol_summary::get instead
11234 (compute_fn_summary): Likewise.
11235 (estimate_edge_devirt_benefit): Likewise.
11236 (estimate_edge_size_and_time): Likewise.
11237 (inline_update_callee_summaries): Likewise.
11238 (remap_edge_change_prob): Likewise.
11239 (remap_edge_summaries): Likewise.
11240 (ipa_merge_fn_summary_after_inlining): Likewise.
11241 (write_ipa_call_summary): Likewise.
11242 (ipa_fn_summary_write): Likewise.
11243 (ipa_free_fn_summary): Likewise.
11244 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11245 (struct ipa_call_summary): Likewise.
11246 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11248 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11249 (estimate_size_after_inlining): Likewise.
11250 (estimate_growth): Likewise.
11251 (growth_likely_positive): Likewise.
11252 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11253 (inline_call): Likewise.
11254 * ipa-inline.c (caller_growth_limits): Likewise.
11255 (can_inline_edge_p): Likewise.
11256 (can_inline_edge_by_limits_p): Likewise.
11257 (compute_uninlined_call_time): Likewise.
11258 (compute_inlined_call_time): Likewise.
11259 (want_inline_small_function_p): Likewise.
11260 (edge_badness): Likewise.
11261 (update_caller_keys): Likewise.
11262 (update_callee_keys): Likewise.
11263 (inline_small_functions): Likewise.
11264 (inline_to_all_callers_1): Likewise.
11265 (dump_overall_stats): Likewise.
11266 (early_inline_small_functions): Likewise.
11267 (early_inliner): Likewise.
11268 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11269 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11270 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11271 * ipa-split.c (execute_split_functions): Likewise.
11272 * symbol-summary.h: Likewise.
11273 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11275 2018-06-19 Richard Biener <rguenther@suse.de>
11277 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11278 (vectorize_loops): ... here. Fix dbgcnt handling.
11279 (try_vectorize_loop): Wrap try_vectorize_loop_1.
11281 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
11284 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11285 ieee128 argument takes up only one (vector) register, not two (floating
11288 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11290 * gimplify.c (gimplify_init_constructor): Really never clear for an
11291 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11293 2018-06-19 Richard Biener <rguenther@suse.de>
11295 PR tree-optimization/86179
11296 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11297 after failed recognition.
11299 2018-06-18 Martin Sebor <msebor@redhat.com>
11301 PR middle-end/85602
11302 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11303 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11304 Handle integer subtraction.
11305 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11306 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11308 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11310 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11311 param from rtx to rtx_insn *.
11312 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11314 (frv_ifcvt_modify_insn): Likwise.
11315 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11316 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
11317 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11318 as_a <rtx_insn *> cast to local "unprotected_region" once
11319 it's been established that it's not NULL or pc_rtx.
11320 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11321 param "sethi" from rtx to rtx_insn *.
11322 (nds32_group_float_insns): Likewise for param "insn".
11323 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11325 (vax_output_int_subtract): Likewise.
11326 * config/vax/vax.c (vax_output_int_add): Likewise for param
11328 (vax_output_int_subtract): Likewise.
11329 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11330 (emit_pattern_after): Likewise for param "after".
11331 (emit_insn_after): Likewise.
11332 (emit_jump_insn_after): Likewise.
11333 (emit_call_insn_after): Likewise.
11334 (emit_debug_insn_after): Likewise.
11335 (emit_pattern_before): Likewise for param "before".
11336 (emit_insn_before): Likewise.
11337 (emit_jump_insn_before): Likewise.
11338 * final.c (get_insn_template): Likewise for param "insn", removing
11340 * output.h (get_insn_template): Likewise for 2nd param.
11341 * rtl.h (emit_insn_before): Likewise.
11342 (emit_jump_insn_before): Likewise.
11343 (emit_debug_insn_before_noloc): Likewise.
11344 (emit_insn_after): Likewise.
11345 (emit_jump_insn_after): Likewise.
11346 (emit_call_insn_after): Likewise.
11347 (emit_debug_insn_after): Likewise.
11348 (set_insn_deleted): Likewise for param.
11350 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11353 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11354 floating point modes, so that IFmode is numerically greater than
11355 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11356 to declare the ordering. This prevents IFmode from being
11357 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11358 machine. Include rs6000-modes.h to share the fractional values
11359 between genmodes* and the rest of the compiler.
11360 (IFmode): Likewise.
11361 (KFmode): Likewise.
11362 (TFmode): Likewise.
11363 * config/rs6000/rs6000-modes.h: New file.
11364 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11365 meaning of rs6000_long_double_size so that 126..128 selects an
11366 appropriate 128-bit floating point type.
11367 (rs6000_option_override_internal): Likewise.
11368 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11369 (TARGET_LONG_DOUBLE_128): Change the meaning of
11370 rs6000_long_double_size so that 126..128 selects an appropriate
11371 128-bit floating point type.
11372 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11373 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11374 source and destination to match the standard usage.
11375 (truncifkf2): Likewise.
11376 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11377 ISA 2.07 to use an explicit clobber, instead of passing in a
11379 (copysign<mode>3_soft): Likewise.
11381 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11383 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11384 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11385 (vect_slp_analyze_instance_dependence): Likewise.
11386 (vect_enhance_data_refs_alignment): Likewise.
11387 (vect_analyze_data_refs_alignment): Likewise.
11388 (vect_slp_analyze_and_verify_instance_alignment
11389 (vect_analyze_data_ref_accesses): Likewise.
11390 (vect_prune_runtime_alias_test_list): Likewise.
11391 (vect_analyze_data_refs): Likewise.
11392 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11393 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11394 (vect_analyze_scalar_cycles_1): Likewise.
11395 (vect_get_loop_niters): Likewise.
11396 (vect_analyze_loop_form_1): Likewise.
11397 (vect_update_vf_for_slp): Likewise.
11398 (vect_analyze_loop_operations): Likewise.
11399 (vect_analyze_loop): Likewise.
11400 (vectorizable_induction): Likewise.
11401 (vect_transform_loop): Likewise.
11402 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11403 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11404 (vect_make_slp_decision): Likewise.
11405 (vect_detect_hybrid_slp): Likewise.
11406 (vect_slp_analyze_operations): Likewise.
11407 (vect_slp_bb): Likewise.
11408 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11409 (vectorizable_bswap): Likewise.
11410 (vectorizable_call): Likewise.
11411 (vectorizable_simd_clone_call): Likewise.
11412 (vectorizable_conversion): Likewise.
11413 (vectorizable_assignment): Likewise.
11414 (vectorizable_shift): Likewise.
11415 (vectorizable_operation): Likewise.
11416 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11418 2018-06-18 Martin Sebor <msebor@redhat.com>
11420 PR tree-optimization/81384
11421 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11422 * builtins.c (expand_builtin_strnlen): New function.
11423 (expand_builtin): Call it.
11424 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11425 * builtins.def (BUILT_IN_STRNLEN): New.
11426 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11427 Warn for bounds in excess of maximum object size.
11428 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11429 single-value ranges. Handle strnlen.
11430 (handle_builtin_strlen): Handle strnlen.
11431 (strlen_check_and_optimize_stmt): Same.
11432 * doc/extend.texi (Other Builtins): Document strnlen.
11434 2018-06-18 Maya Rashish <coypu@sdf.org>
11436 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11437 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11438 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11440 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11442 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11444 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11446 * tree.c (escaped_string::escape): Replace cast to char * by
11447 const_cast<char *> (unescaped).
11449 2018-06-18 Nick Clifton <nickc@redhat.com>
11452 * tree.c (escaped_string): New class. Converts an unescaped
11453 string into its escaped equivalent.
11454 (warn_deprecated_use): Use the new class to convert the
11455 deprecation message, if present.
11456 (test_escaped_strings): New self test.
11457 (test_c_tests): Add test_escaped_strings.
11458 * doc/extend.texi (deprecated): Add a note that the
11459 deprecation message is affected by the -fmessage-length
11460 option, and that control characters will be escaped.
11461 (#pragma GCC error): Document this pragma.
11462 (#pragma GCC warning): Likewise.
11463 * doc/invoke.texi (-fmessage-length): Document this option's
11464 effect on the #warning and #error preprocessor directives and
11465 the deprecated attribute.
11467 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
11469 * tree.c (decl_value_expr_lookup): Revert latest change.
11470 (decl_value_expr_insert): Likewise.
11472 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11474 * gimplify.c (nonlocal_vlas): Delete.
11475 (nonlocal_vla_vars): Likewise.
11476 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11478 (gimplify_body): Do not create and destroy nonlocal_vlas.
11479 * tree-nested.c: Include diagnostic.h.
11480 (use_pointer_in_frame): Tweak.
11481 (lookup_field_for_decl): Add assertion and declare the transformation.
11482 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11483 internal error when the reference is in a wrong context. Do not
11484 create a debug decl by default.
11485 (note_nonlocal_block_vlas): Delete.
11486 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11487 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11488 create a debug decl by default.
11489 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11490 call is in a wrong context.
11491 (fixup_vla_decls): New function.
11492 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11493 debug variables were created.
11494 * tree.c (decl_value_expr_lookup): Add checking assertion.
11495 (decl_value_expr_insert): Likewise.
11497 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11499 PR middle-end/82479
11500 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11501 * tree-scalar-evolution.c (interpret_expr): Likewise.
11502 (expression_expensive_p): Likewise.
11503 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11504 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11505 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11506 (ssa_defined_by_minus_one_stmt_p): New.
11508 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11510 PR middle-end/64946
11511 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11512 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11513 * dojump.c (do_jump): Likewise.
11514 * expr.c (expand_expr_real_2): Check operand type's sign.
11515 * fold-const.c (const_unop): Handle ABSU_EXPR.
11516 (fold_abs_const): Likewise.
11517 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11518 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11519 (strip_sign_op_1): Likesise.
11520 * match.pd: Add new pattern to generate ABSU_EXPR.
11521 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11522 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11523 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11524 * tree-inline.c (estimate_operator_cost): Likewise.
11525 * tree-pretty-print.c (dump_generic_node): Likewise.
11526 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11527 * tree.def (ABSU_EXPR): New.
11529 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11531 PR middle-end/86095
11532 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11533 documented as preserved for backward compatibility only.
11534 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11536 PR rtl-optimization/86108
11537 * bb-reorder.c (create_forwarder_block): Renamed to ...
11538 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11539 jump from new landing pad to the second part.
11540 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11543 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11545 PR middle-end/85878
11546 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11547 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11548 Only call store_expr for halves if the mode is the same.
11550 PR middle-end/86123
11551 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11552 Fix up comment formatting.
11554 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11556 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11557 (typed_splay_tree::closure,
11558 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11559 (typed_splay_tree::typed_splay_tree,
11560 typed_splay_tree::operator =): Declared private.
11561 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11562 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11563 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11564 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11565 typed_splay_tree::splay_tree_splay,
11566 typed_splay_tree::splay_tree_foreach_helper,
11567 typed_splay_tree::splay_tree_insert,
11568 typed_splay_tree::splay_tree_remove,
11569 typed_splay_tree::splay_tree_lookup,
11570 typed_splay_tree::splay_tree_predecessor,
11571 typed_splay_tree::splay_tree_successor,
11572 typed_splay_tree::splay_tree_min,
11573 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11574 (typed_splay_tree::root, typed_splay_tree::comp,
11575 typed_splay_tree::delete_key,
11576 typed_splay_tree::delete_value): New data members.
11577 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11578 typed_splay_tree::remove.
11580 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11582 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11583 -mginv and -mno-ginv to the assembler.
11584 * config/mips/mips.opt (-mcrc): New option.
11585 (-mginv): Likewise.
11586 * doc/invoke.text (-mcrc): Document.
11587 (-mginv): Likewise.
11589 2018-06-15 Nick Clifton <nickc@redhat.com>
11592 * tree.c (escaped_string): New class. Converts an unescaped
11593 string into its escaped equivalent.
11594 (warn_deprecated_use): Use the new class to convert the
11595 deprecation message, if present.
11596 (test_escaped_strings): New self test.
11597 (test_c_tests): Add test_escaped_strings.
11598 * doc/extend.texi (deprecated): Add a note that the
11599 deprecation message is affected by the -fmessage-length
11600 option, and that control characters will be escaped.
11601 (#pragma GCC error): Document this pragma.
11602 (#pragma GCC warning): Likewise.
11603 * doc/invoke.texi (-fmessage-length): Document this option's
11604 effect on the #warning and #error preprocessor directives and
11605 the deprecated attribute.
11607 2018-06-15 Richard Biener <rguenther@suse.de>
11609 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11610 here, also noting vector size used.
11611 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11612 size used in MSG_OPTIMIZED_LOCATIONS dump.
11613 (pass_slp_vectorize::execute): Adjust.
11615 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11618 * config/arc/arc.c (arc_return_address_register): Fix
11621 2018-06-15 Richard Biener <rguenther@suse.de>
11623 PR middle-end/86159
11624 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11625 leave useless conversion stripping to force_gimple_operand_gsi.
11626 (gimplify_build2): Likewise.
11627 (gimplify_build1): Likewise.
11629 2018-06-15 Richard Biener <rguenther@suse.de>
11631 PR middle-end/86076
11632 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11633 before adjusting their block.
11635 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11637 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11638 multilibs for *-*-rtems*.
11639 * config/riscv/t-rtems: New file.
11641 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11643 PR middle-end/86122
11644 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11645 unsigned_type_for returns NULL.
11648 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11649 subregs of multi-word pseudos unless the float mode has word size.
11651 2018-06-14 Richard Biener <rguenther@suse.de>
11653 PR middle-end/86139
11654 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11655 duplicate and harmful type_hash_canon.
11656 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11658 2018-06-14 Richard Biener <rguenther@suse.de>
11661 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11664 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11666 * config/rtems.h (STDINT_LONG32): Define.
11668 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11669 Prachi Godbole <prachi.godbole@imgtec.com>
11671 * config/mips/mips-cpus.def: Define P6600.
11672 * config/mips/mips-tables.opt: Regenerate.
11673 * config/mips/mips.c (mips_ucbranch_type): New enum.
11674 (mips_rtx_cost_data): Add support for P6600.
11675 (mips_issue_rate): Likewise.
11676 (mips_multipass_dfa_lookahead): Likewise.
11677 (mips_avoid_hazard): Likewise.
11678 (mips_reorg_process_insns): Likewise.
11679 (mips_classify_branch_p6600): New function.
11680 * config/mips/mips.h (TUNE_P6600): New define.
11681 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11682 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11683 * config/mips/mips.md: Include p6600.md.
11684 (processor): Add p6600.
11685 * config/mips/p6600.md: New file.
11686 * doc/invoke.texi: Add p6600 to supported architectures.
11688 2018-06-13 Martin Sebor <msebor@redhat.com>
11690 PR tree-optimization/86114
11691 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11693 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11695 2018-06-13 Richard Biener <rguenther@suse.de>
11697 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11698 Properly set vector type of the intermediate stmt.
11699 * tree-vect-stmts.c (vectorizable_operation): The destination
11700 var always has vectype_out type.
11702 2018-06-13 Jeff Law <law@redhat.com>
11704 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11705 integer 0 for argument to print_rtl_with_bb.
11706 (rl78_reorg): Likewise.
11708 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11710 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11711 from rtx to rtx_insn *.
11712 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11714 (add_sched_insns_for_speculation): Likewise for local "target",
11715 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11716 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11717 from rtx_insn ** to rtx_code_label **.
11718 (reorg_emit_nops): Likewise.
11719 (c6x_reorg): Likewise for local "call_labels".
11720 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11722 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11723 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11724 the loops over LABEL_REFS.
11725 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11727 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11728 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11729 (split_branches): Strengthen local "olabel" from rtx to
11730 rtx_insn *, adding a safe_as_a cast.
11731 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11733 (add_insn_after): Likewise for first two params.
11734 (add_insn_before): Likewise.
11735 (remove_insn): Likewise for param.
11736 (emit_pattern_before_noloc): Likewise for second and third params.
11737 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11738 (emit_call_insn_before_noloc): Likewise.
11739 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11741 (emit_barrier_before): Likewise.
11742 (emit_label_before): Strengthen "label" param from "rtx" to
11743 "rtx_code_label *". Strengthen "before" param from "rtx" to
11745 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11747 (emit_pattern_after_noloc): Likewise.
11748 (emit_insn_after_noloc): Likewise.
11749 (emit_jump_insn_after_noloc): Likewise.
11750 (emit_call_insn_after_noloc): Likewise.
11751 (emit_debug_insn_after_noloc): Likewise.
11752 (emit_barrier_after): Likewise.
11753 (emit_label_after): Likewise for both params.
11754 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11755 "loc" param from "int" to "location_t".
11756 (emit_insn_after_setloc): Likewise.
11757 (emit_jump_insn_after_setloc): Likewise.
11758 (emit_call_insn_after_setloc): Likewise.
11759 (emit_debug_insn_after_setloc): Likewise.
11760 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11761 "loc" param from "int" to "location_t".
11762 (emit_pattern_before): Convert NULL_RTX to NULL.
11763 (emit_insn_before_setloc): Convert "loc" param from "int" to
11765 (emit_jump_insn_before_setloc): Likewise.
11766 (emit_call_insn_before_setloc): Likewise.
11767 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11768 rtx_insn *. Convert "loc" param from "int" to "location_t".
11769 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11770 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11771 Convert 3rd param from "int" to "location_t".
11772 (emit_barrier_before, emit_barrier_after, next_real_insn):
11773 Strengthen param from rtx to rtx_insn *.
11774 (emit_label_before): Strengthen 1st param from "rtx" to
11775 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11777 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11778 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11779 Strengthen 2nd param from "rtx" to "rtx_insn *".
11780 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11781 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11782 Likewise. Convert 3rd param from "int" to "location_t".
11783 (emit_label_after): Strengthen 1st param from "rtx" to
11784 "rtx_code_label *".
11785 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11787 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11788 from "rtx" to "rtx_insn *".
11790 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11792 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11793 bodies streamed in with -Q.
11794 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11795 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11796 * gimple-streamer-out.c: Include gimple-pretty-print.h
11797 (output_bb): Dump stmts streamed.
11798 * lto-section-out.c: Include print-tree.h
11799 (lto_begin_section): Dump sections created.
11800 (lto_output_decl_index): Dump decl encoded.
11801 * lto-streamer-out.c: Include print-tree.h
11802 (create_output_block): Dump output block created.
11803 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11804 (output_function): Dump function output.
11805 (output_constructor): Dump constructor streamed.
11806 (write_global_stream): Output indexes encoded.
11807 (produce_asm_for_decls): Dump streams encoded.
11808 * lto-streamer.c (streamer_dump_file): New global var.
11809 * lto-streamer.h (streamer_dump_file): Declare.
11810 * passes.c (ipa_write_summaries): Initialize streamer dump.
11811 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11814 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11817 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11818 offsets for register save directives. Emit a second batch of save
11819 directives, if need be, when the function accesses prior frames.
11821 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11823 * config/arc/fpu.md (fmasf4): Force operand to register.
11824 (fnmasf4): Likewise.
11826 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11828 * config/arc/arc-protos.h (arc_pad_return): Remove.
11829 * config/arc/arc.c (machine_function): Remove force_short_suffix
11831 (arc_print_operand): Adjust printing of '&'.
11832 (arc_verify_short): Remove conditional printing of short suffix.
11833 (arc_final_prescan_insn): Remove reference to size_reason.
11834 (pad_return): New function.
11835 (arc_reorg): Call pad_return.
11836 (arc_pad_return): Remove.
11837 (arc_init_machine_status): Remove reference to force_short_suffix.
11838 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11839 (attr length): When attribute iscompact is true force to 2
11840 regardless; in the case of maybe check if we want to force the
11841 instruction to have 4 bytes length.
11842 (nopv): Change it to generate 4 byte long nop as well.
11843 (blockage): New pattern.
11844 (simple_return): Remove call to arc_pad_return.
11845 (p_return_i): Likewise.
11847 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11849 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11851 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11853 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11856 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11858 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11859 for ARC700 and ARCv2.
11861 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11864 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11865 operands[2] instead of operands[1].
11868 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11870 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11871 case, check whether the outer register overlaps an unallocatable
11872 register, not just whether it fits the required class.
11874 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11876 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11878 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11879 (memrefs_conflict_p): Likewise.
11880 (init_alias_analysis): Likewise.
11881 * cfgexpand.c (expand_debug_expr): Likewise.
11882 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11883 * cse.c (fold_rtx): Likewise.
11884 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11885 * expr.c (emit_block_move_hints): Likewise.
11886 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11887 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11888 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11889 (emit_group_store): Likewise.
11890 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11891 to read the PRE/POST_MODIFY increment.
11892 * calls.c (store_one_arg): Use strip_offset.
11893 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11895 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11897 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11898 (simplify_binary_operation_1): Extend CONST_INT handling to
11900 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11901 than a HOST_WIDE_INT.
11902 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11904 (adjust_mems, add_stores): Update accodingly.
11905 (vt_canonicalize_addr): Track polynomial offsets.
11906 (emit_note_insn_var_location): Likewise.
11907 (vt_add_function_parameter): Likewise.
11908 (vt_initialize): Likewise.
11910 2018-06-12 Jeff Law <law@redhat.com>
11912 * config.gcc (alpha*-*-freebsd*): Remove.
11913 * config/alpha/freebsd.h: Remove.
11915 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11918 * spellcheck-tree.c (levenshtein_distance): Rename to...
11919 (get_edit_distance): ...this, and update for underlying renaming.
11920 * spellcheck-tree.h (levenshtein_distance): Rename to...
11921 (get_edit_distance): ...this.
11922 * spellcheck.c (levenshtein_distance): Rename to...
11923 (get_edit_distance): ...this. Convert from Levenshtein distance
11924 to Damerau-Levenshtein distance by supporting transpositions of
11925 adjacent characters. Rename "v1" to "v_next" and "v0" to
11927 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11928 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11929 update for underlying renaming.
11930 (selftest::levenshtein_distance_unit_test): Rename to...
11931 (selftest::test_get_edit_distance_unit): ...this, and update for
11932 underlying renaming.
11933 (selftest::test_find_closest_string): Add example from PR 69968
11934 where transposition helps
11935 (selftest::test_metric_conditions): Update for renaming.
11936 (selftest::test_metric_conditions): Likewise.
11937 (selftest::spellcheck_c_tests): Likewise.
11938 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11939 (get_edit_distance): ...this.
11940 (best_match::consider): Update for renaming.
11942 2018-06-12 Martin Sebor <msebor@redhat.com>
11944 PR tree-optimization/85259
11945 * builtins.c (compute_objsize): Handle constant offsets.
11946 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11947 true iff a warning has been issued.
11948 * gimple.h (gimple_nonartificial_location): New function.
11949 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11950 gimple_nonartificial_location and handle -Wno-system-headers.
11951 (handle_builtin_stxncpy): Same.
11953 2018-06-12 Martin Sebor <msebor@redhat.com>
11956 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11958 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11960 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11961 BUILTIN_VEC_XST entries for pointer to double and long long.
11963 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11966 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11968 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11971 2018-06-12 Martin Liska <mliska@suse.cz>
11973 * doc/options.texi: Document IntegerRange.
11975 2018-06-12 Martin Liska <mliska@suse.cz>
11977 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11978 * opt-functions.awk: Handle Deprecated flag.
11979 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11981 (read_cmdline_option): Report warning for a deprecated option.
11982 * opts.h (struct cl_option): Add new field cl_deprecated.
11983 (CL_ERR_DEPRECATED): New.
11985 2018-06-12 Martin Liska <mliska@suse.cz>
11987 * doc/options.texi: Document Deprecated option flag.
11989 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11991 * config/arc/arc-arch.h (arc_extras): New enum.
11992 (arc_cpu_t):Add field extra.
11993 (arc_cpu_types): Consider the extras.
11994 * config/arc/arc-cpus.def: Add extras info.
11995 * config/arc/arc-opts.h (processor_type): Consider extra field.
11996 * config/arc/arc.c (arc_override_options): Handle extra field.
11998 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12000 * config/arc/arc-arch.h: Update ARC_OPTX macro.
12001 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12003 * config/arc/arc.c (arc_init): Update pic warning.
12004 (irq_range): Update irq range parsing warnings.
12005 (arc_override_options): Update various warning messages.
12006 (arc_handle_aux_attribute): Likewise.
12008 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
12010 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12012 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12014 * doc/sourcebuild.texi: Document usage of line number 0 in verify
12015 compiler messages directives.
12017 2018-06-12 Matthew Fortune <mfortune@gmail.com>
12019 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12020 * config/mips/mips-tables.opt: Regenerate.
12021 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12023 * doc/invoke.texi: Document -march=i6500.
12025 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
12027 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12028 (i6400_gpmul): Add cpu_unit.
12029 (i6400_gpdiv): Likewise.
12030 (i6400_msa_add_d): Update reservations.
12031 (i6400_msa_int_add) Likewise.
12032 (i6400_msa_short_logic3) Likewise.
12033 (i6400_msa_short_logic2) Likewise.
12034 (i6400_msa_short_logic) Likewise.
12035 (i6400_msa_move) Likewise.
12036 (i6400_msa_cmp) Likewise.
12037 (i6400_msa_short_float2) Likewise.
12038 (i6400_msa_div_d) Likewise.
12039 (i6400_msa_long_logic1) Likewise.
12040 (i6400_msa_long_logic2) Likewise.
12041 (i6400_msa_mult) Likewise.
12042 (i6400_msa_long_float2) Likewise.
12043 (i6400_msa_long_float4) Likewise.
12044 (i6400_msa_long_float5) Likewise.
12045 (i6400_msa_long_float8) Likewise.
12046 (i6400_fpu_fadd): Include frint type.
12047 (i6400_fpu_store): New define_insn_reservation.
12048 (i6400_fpu_load): Likewise.
12049 (i6400_fpu_move): Likewise.
12050 (i6400_fpu_fcmp): Likewise.
12051 (i6400_fpu_fmadd): Likewise.
12052 (i6400_int_mult): Include imul3nc type and update reservation.
12053 (i6400_int_div): Include idiv3 type and update reservation.
12054 (i6400_int_load): Update to check type not move_type.
12055 (i6400_int_store): Likewise.
12056 (i6400_int_prefetch): Set zero latency.
12058 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
12060 * gcc.c: Document new %@{...} sequence.
12061 (LINK_COMMAND_SPEC): Use it for the -L switches.
12062 (cpp_unique_options): Use it for the -I switches.
12063 (at_file_argbuf): New global variable.
12064 (in_at_file): Likewise.
12065 (alloc_args): Create at_file_argbuf.
12066 (clear_args): Truncate at_file_argbuf.
12067 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12068 (open_at_file): New function.
12069 (close_at_file): Likewise.
12070 (create_at_file): Delete.
12071 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12074 (validate_switches_from_spec): Deal with %@{...} sequence.
12075 (validate_switches): Likewise.
12076 (driver::finalize): Call clear_args.
12078 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
12080 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12082 2018-06-11 Martin Sebor <msebor@redhat.com>
12084 * doc/invoke.texi (-Wall): List -Wc++17-compat.
12085 (Wno-class-memaccess): Add @opindex.
12086 (Wno-templates, Wno-multiple-inheritance): Same.
12087 (Wno-virtual-inheritance, Wno-namespaces): Same.
12088 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12089 (Wno-format-overflow, Wno-format-truncation): Same.
12090 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12091 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12092 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12093 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12094 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12095 (Wno-misspelled-isr): Same.
12097 2018-06-11 Martin Sebor <msebor@redhat.com>
12099 * PR tree-optimization/86083
12100 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12102 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
12104 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12106 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
12109 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12110 on the correct operand.
12111 (*movdi_internal64): Ditto.
12113 2018-06-11 Martin Liska <mliska@suse.cz>
12115 PR tree-optimization/86089
12116 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12118 2018-06-11 Julia Koval <julia.koval@intel.com>
12120 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12121 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12122 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12124 2018-06-11 Olivier Hainque <hainque@adacore.com>
12126 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12127 for Ada with strict dwarf2.
12129 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
12132 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12135 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
12137 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12139 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
12141 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12144 2018-06-08 Martin Liska <mliska@suse.cz>
12146 * tree-cfg.h (debug_function): Fix argument type to match
12149 2018-06-08 Martin Liska <mliska@suse.cz>
12151 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12152 Remove usage of MPX-related (and removed) fields.
12153 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12155 2018-06-08 David Malcolm <dmalcolm@redhat.com>
12157 * cfg.c (debug): Use TDF_NONE rather than 0.
12158 * cfghooks.c (debug): Likewise.
12159 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12160 (struct dump_option_value_info): Convert to...
12161 (struct kv_pair): ...this template type.
12162 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12164 (optinfo_verbosity_options): Likewise.
12165 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12167 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12168 than int for "optgroup_flags" param.
12169 (dump_generic_expr_loc): Use dump_flags_t rather than int for
12171 (dump_dec): Likewise.
12172 (dump_finish): Use TDF_NONE rather than 0.
12173 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12174 rather than int for "optgroup_flags" param. Use TDF_NONE rather
12175 than 0. Update for change to option_ptr.
12176 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12177 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
12178 0. Update for changes to optinfo_verbosity_options and
12180 (opt_info_switch_p): Convert optgroup_flags from int to
12182 (dump_basic_block): Use dump_flags_t rather than int
12183 for "dump_kind" param.
12184 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12185 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12186 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12187 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12188 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12189 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12190 TDF_NONE): Convert from macros to...
12191 (enum dump_flag): ...this new enum.
12192 (dump_flags_t): Update to use enum.
12193 (operator|, operator&, operator~, operator|=, operator&=):
12194 Implement for dump_flags_t.
12195 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12196 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12197 Convert from macros to...
12198 (enum optgroup_flag): ...this new enum.
12199 (optgroup_flags_t): New typedef.
12200 (operator|, operator|=): Implement for optgroup_flags_t.
12201 (struct dump_file_info): Convert field "alt_flags" to
12202 dump_flags_t. Convert field "optgroup_flags" to
12204 (dump_basic_block): Use dump_flags_t rather than int for param.
12205 (dump_generic_expr_loc): Likewise.
12206 (dump_dec): Likewise.
12207 (dump_register): Convert param "optgroup_flags" to
12209 (opt_info_enable_passes): Likewise.
12210 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12212 * gimple-pretty-print.c (debug): Likewise.
12213 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12214 (merged_store_group::apply_stores): Likewise.
12215 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12216 * gimple.c (verify_gimple_pp): Likewise.
12217 * graphite-poly.c (print_pbb_body): Likewise.
12218 * passes.c (pass_manager::register_one_dump_file): Convert
12219 local "optgroup_flags" to optgroup_flags_t.
12220 * print-tree.c (print_node): Use TDF_NONE rather than 0.
12222 (debug_body): Likewise.
12223 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12224 to optgroup_flags_t.
12225 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12227 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12228 (convert_mult_to_fma): Likewise.
12229 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12230 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12231 * tree-vect-data-refs.c (dump_lower_bound): Convert param
12232 "dump_kind" to dump_flags_t.
12234 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12236 * config/rs6000/rs6000.c (min, max): Delete.
12238 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12240 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12241 -mabi=spe and -mabi=no-spe.
12243 2018-06-08 Martin Liska <mliska@suse.cz>
12245 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12246 where we expect an existing summary.
12248 2018-06-08 Martin Liska <mliska@suse.cz>
12250 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12251 * ipa-inline.h (estimate_edge_growth): Likewise.
12253 2018-06-08 Martin Liska <mliska@suse.cz>
12255 * cgraph.c (function_version_hasher::hash): Use
12256 cgraph_node::get_uid ().
12257 (function_version_hasher::equal):
12258 * cgraph.h (cgraph_node::get_uid): New method.
12259 * ipa-inline.c (update_caller_keys): Use
12260 cgraph_node::get_uid ().
12261 (update_callee_keys): Likewise.
12262 * ipa-utils.c (searchc): Likewise.
12263 (ipa_reduced_postorder): Likewise.
12264 * lto-cgraph.c (input_node): Likewise.
12265 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12266 * symbol-summary.h (symtab_insertion): Likewise.
12267 (symtab_removal): Likewise.
12268 (symtab_duplication): Likewise.
12269 * tree-pretty-print.c (dump_function_header): Likewise.
12270 * tree-sra.c (convert_callers_for_node): Likewise.
12272 2018-06-08 Martin Liska <mliska@suse.cz>
12274 * cgraph.c (symbol_table::create_edge): Always assign a new
12276 (symbol_table::free_edge): Do not recycle numbers.
12277 * cgraph.h (cgraph_edge::get): New method.
12278 * symbol-summary.h (symtab_removal): Use it.
12279 (symtab_duplication): Likewise.
12280 (call_summary::hashable_uid): Remove.
12282 2018-06-08 Martin Liska <mliska@suse.cz>
12284 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12285 (initialize_growth_caches): Remove.
12286 (free_growth_caches): Likewise.
12287 (do_estimate_edge_time): Use edge_growth_cache.
12288 (do_estimate_edge_size): Likewise.
12289 (do_estimate_edge_hints): Likewise.
12290 * ipa-inline.c (reset_edge_caches): Likewise.
12291 (recursive_inlining): Likewise.
12292 (inline_small_functions): Likewise.
12293 * ipa-inline.h (initialize_growth_caches): Remove.
12294 (estimate_edge_size): Likewise.
12295 (estimate_edge_time): Likewise.
12296 (estimate_edge_hints): Likewise.
12297 (reset_edge_growth_cache): Likewise.
12298 * symbol-summary.h (call_summary::remove): New method.
12300 2018-06-08 Martin Liska <mliska@suse.cz>
12302 * ipa-cp.c (class edge_clone_summary): New summary.
12303 (grow_edge_clone_vectors): Remove.
12304 (ipcp_edge_duplication_hook): Remove.
12305 (class edge_clone_summary_t): New call_summary class.
12306 (ipcp_edge_removal_hook): Remove.
12307 (edge_clone_summary_t::duplicate): New function.
12308 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12309 (create_specialized_node): Likewise.
12310 (ipcp_driver): Initialize edge_clone_summaries and do not
12313 2018-06-08 Martin Liska <mliska@suse.cz>
12315 * symbol-summary.h (get): New function.
12316 (call_summary::m_initialize_when_cloning): New class member.
12318 2018-06-08 Martin Liska <mliska@suse.cz>
12320 * cgraph.c (cgraph_node::remove): Do not recycle uid.
12321 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12322 (symbol_table::allocate_cgraph_symbol): Do not set uid.
12323 * passes.c (uid_hash_t): Record removed_nodes by their uids.
12324 (remove_cgraph_node_from_order): Use the removed_nodes set.
12325 (do_per_function_toporder): Likwise.
12326 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12327 instead of summary_uid.
12328 (symtab_removal): Likewise.
12329 (symtab_duplication): Likewise.
12331 2018-06-08 Martin Liska <mliska@suse.cz>
12333 * ipa-cp.c (ipcp_store_bits_results): Use
12334 ipcp_transformation_sum.
12335 (ipcp_store_vr_results): Likewise.
12336 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12338 (ipcp_transformation_initialize): ... this.
12339 (ipa_set_node_agg_value_chain):
12340 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12341 (write_ipcp_transformation_info): Likewise.
12342 (read_ipcp_transformation_info): Likewise.
12343 (ipcp_update_bits): Likewise.
12344 (ipcp_update_vr): Likewise.
12345 (ipcp_transform_function): Likewise.
12346 * ipa-prop.h: Rename ipcp_transformation_summary to
12347 ipcp_transformation.
12348 (class ipcp_transformation_t): New function summary.
12349 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12350 (ipa_get_agg_replacements_for_node): Likewise.
12352 2018-06-08 Martin Liska <mliska@suse.cz>
12354 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12356 (class funct_state_summary_t): New function_summary class.
12357 (has_function_state): Remove.
12358 (get_function_state): Likewise.
12359 (set_function_state): Likewise.
12360 (add_new_function): Likewise.
12361 (funct_state_summary_t::insert): New function.
12362 (duplicate_node_data): Remove.
12363 (remove_node_data): Remove.
12364 (funct_state_summary_t::duplicate): New function.
12365 (register_hooks): Create new funct_state_summaries.
12366 (pure_const_generate_summary): Use it.
12367 (pure_const_write_summary): Likewise.
12368 (pure_const_read_summary): Likewise.
12369 (propagate_pure_const): Likewise.
12370 (propagate_nothrow): Likewise.
12371 (dump_malloc_lattice): Likewise.
12372 (propagate_malloc): Likewise.
12373 (execute): Do not register hooks, just remove summary
12375 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12378 2018-06-08 Martin Liska <mliska@suse.cz>
12380 * ipa-reference.c (remove_node_data): Remove.
12381 (duplicate_node_data): Likewise.
12382 (class ipa_ref_var_info_summary_t): New class.
12383 (class ipa_ref_opt_summary_t): Likewise.
12384 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12385 (get_reference_optimization_summary): Use
12386 ipa_ref_opt_sum_summaries.
12387 (set_reference_vars_info): Remove.
12388 (set_reference_optimization_summary): Likewise.
12389 (ipa_init): Create summaries.
12390 (init_function_info): Use function summary.
12391 (ipa_ref_opt_summary_t::duplicate): New function.
12392 (ipa_ref_opt_summary_t::remove): New function.
12393 (get_read_write_all_from_node): Fix GNU coding style.
12394 (propagate): Use function summary.
12395 (write_node_summary_p): Fix GNU coding style.
12396 (stream_out_bitmap): Likewise.
12397 (ipa_reference_read_optimization_summary): Use function summary.
12398 (ipa_reference_c_finalize): Do not release hooks.
12400 2018-06-08 Martin Liska <mliska@suse.cz>
12402 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12403 (analyze_function_body): Extract multiple calls of get_create.
12404 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12405 * ipa-inline.c (recursive_inlining): Use ::get method.
12406 * ipa-inline.h (estimate_edge_growth): Likewise.
12408 2018-06-08 Martin Liska <mliska@suse.cz>
12410 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12412 (hsa_function_summary::hsa_function_summary): Use the new enum
12414 (hsa_gpu_implementation_p): Use hsa_summaries::get.
12415 * hsa-gen.c (hsa_get_host_function): Likewise.
12416 (get_brig_function_name): Likewise.
12417 * ipa-hsa.c (process_hsa_functions): Likewise.
12418 (ipa_hsa_write_summary): Likewise.
12419 * symbol-summary.h (symtab_duplication): Use ::get function/
12420 (get): New function.
12422 2018-06-08 Martin Liska <mliska@suse.cz>
12424 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12426 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12427 (hsa_register_kernel): Likewise.
12428 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12429 * hsa-gen.c (hsa_get_host_function): Likewise.
12430 (get_brig_function_name): Likewise.
12431 (generate_hsa): Likewise.
12432 (pass_gen_hsail::execute): Likewise.
12433 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12434 (devirtualization_time_bonus): Likewise.
12435 (ipcp_propagate_stage): Likewise.
12436 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12437 (edge_set_predicate): Likewise.
12438 (evaluate_conditions_for_known_args): Likewise.
12439 (evaluate_properties_for_edge): Likewise.
12440 (ipa_fn_summary::reset): Likewise.
12441 (ipa_fn_summary_t::duplicate): Likewise.
12442 (dump_ipa_call_summary): Likewise.
12443 (ipa_dump_fn_summary): Likewise.
12444 (analyze_function_body): Likewise.
12445 (compute_fn_summary): Likewise.
12446 (estimate_edge_devirt_benefit): Likewise.
12447 (estimate_edge_size_and_time): Likewise.
12448 (estimate_calls_size_and_time): Likewise.
12449 (estimate_node_size_and_time): Likewise.
12450 (inline_update_callee_summaries): Likewise.
12451 (remap_edge_change_prob): Likewise.
12452 (remap_edge_summaries): Likewise.
12453 (ipa_merge_fn_summary_after_inlining): Likewise.
12454 (ipa_update_overall_fn_summary): Likewise.
12455 (read_ipa_call_summary): Likewise.
12456 (inline_read_section): Likewise.
12457 (write_ipa_call_summary): Likewise.
12458 (ipa_fn_summary_write): Likewise.
12459 (ipa_free_fn_summary): Likewise.
12460 * ipa-hsa.c (process_hsa_functions): Likewise.
12461 (ipa_hsa_write_summary): Likewise.
12462 (ipa_hsa_read_section): Likewise.
12463 * ipa-icf.c (sem_function::merge): Likewise.
12464 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12465 (do_estimate_edge_time): Likewise.
12466 (estimate_size_after_inlining): Likewise.
12467 (estimate_growth): Likewise.
12468 (growth_likely_positive): Likewise.
12469 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12470 (inline_call): Likewise.
12471 * ipa-inline.c (caller_growth_limits): Likewise.
12472 (can_inline_edge_p): Likewise.
12473 (can_inline_edge_by_limits_p): Likewise.
12474 (compute_uninlined_call_time): Likewise.
12475 (compute_inlined_call_time): Likewise.
12476 (want_inline_small_function_p): Likewise.
12477 (edge_badness): Likewise.
12478 (update_caller_keys): Likewise.
12479 (update_callee_keys): Likewise.
12480 (recursive_inlining): Likewise.
12481 (inline_small_functions): Likewise.
12482 (inline_to_all_callers_1): Likewise.
12483 (dump_overall_stats): Likewise.
12484 (early_inline_small_functions): Likewise.
12485 (early_inliner): Likewise.
12486 * ipa-inline.h (estimate_edge_growth): Likewise.
12487 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12488 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12489 * ipa-prop.h (IPA_NODE_REF): Likewise.
12490 (IPA_EDGE_REF): Likewise.
12491 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12492 (propagate_malloc): Likewise.
12493 * ipa-split.c (execute_split_functions): Likewise.
12494 * symbol-summary.h: Rename get to get_create.
12496 (get_create): Likewise.
12497 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12499 2018-06-08 Martin Liska <mliska@suse.cz>
12501 * symbol-summary.h (release): Move definition out of class
12503 (symtab_removal): Likewise.
12504 (symtab_duplication): Likewise.
12506 2018-06-08 Martin Liska <mliska@suse.cz>
12508 * symbol-summary.h (function_summary): Move constructor
12509 implementation out of class declaration.
12510 (release): Likewise.
12511 (symtab_insertion): Likewise.
12512 (symtab_removal): Likewise.
12513 (symtab_duplication): Likewise.
12516 2018-06-08 Martin Liska <mliska@suse.cz>
12518 * Makefile.in: Remove support for MPX (macros, related functions,
12519 fields in cgraph_node, ...).
12520 * builtin-types.def (BT_BND): Likewise.
12521 (BT_FN_BND_CONST_PTR): Likewise.
12522 (BT_FN_CONST_PTR_BND): Likewise.
12523 (BT_FN_VOID_PTR_BND): Likewise.
12524 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12525 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12526 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12527 (expand_builtin_mempcpy_with_bounds): Likewise.
12528 (expand_builtin_memset_with_bounds): Likewise.
12529 (expand_builtin_memset_args): Likewise.
12530 (std_expand_builtin_va_start): Likewise.
12531 (expand_builtin): Likewise.
12532 (expand_builtin_with_bounds): Likewise.
12533 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12534 (DEF_LIB_BUILTIN_CHKP): Likewise.
12535 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12536 (DEF_CHKP_BUILTIN): Likewise.
12537 (BUILT_IN_MEMCPY): Likewise.
12538 (BUILT_IN_MEMMOVE): Likewise.
12539 (BUILT_IN_MEMPCPY): Likewise.
12540 (BUILT_IN_MEMSET): Likewise.
12541 (BUILT_IN_STPCPY): Likewise.
12542 (BUILT_IN_STRCAT): Likewise.
12543 (BUILT_IN_STRCHR): Likewise.
12544 (BUILT_IN_STRCPY): Likewise.
12545 (BUILT_IN_STRLEN): Likewise.
12546 (BUILT_IN_MEMCPY_CHK): Likewise.
12547 (BUILT_IN_MEMMOVE_CHK): Likewise.
12548 (BUILT_IN_MEMPCPY_CHK): Likewise.
12549 (BUILT_IN_MEMSET_CHK): Likewise.
12550 (BUILT_IN_STPCPY_CHK): Likewise.
12551 (BUILT_IN_STRCAT_CHK): Likewise.
12552 (BUILT_IN_STRCPY_CHK): Likewise.
12553 * calls.c (store_bounds): Likewise.
12554 (emit_call_1): Likewise.
12555 (special_function_p): Likewise.
12556 (maybe_warn_nonstring_arg): Likewise.
12557 (initialize_argument_information): Likewise.
12558 (finalize_must_preallocate): Likewise.
12559 (compute_argument_addresses): Likewise.
12560 (expand_call): Likewise.
12561 * cfgexpand.c (expand_call_stmt): Likewise.
12562 (expand_return): Likewise.
12563 (expand_gimple_stmt_1): Likewise.
12564 (pass_expand::execute): Likewise.
12565 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12566 (cgraph_node::remove): Likewise.
12567 (cgraph_node::dump): Likewise.
12568 (cgraph_node::verify_node): Likewise.
12569 * cgraph.h (chkp_function_instrumented_p): Likewise.
12570 (symtab_node::get_alias_target): Likewise.
12571 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12572 (cgraph_local_p): Likewise.
12573 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12574 (cgraph_edge::rebuild_references): Likewise.
12575 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12576 (walk_polymorphic_call_targets): Likewise.
12577 (cgraph_node::expand_thunk): Likewise.
12578 (symbol_table::output_weakrefs): Likewise.
12579 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12580 (ix86_handle_option): Likewise.
12581 * config/i386/constraints.md: Likewise.
12582 * config/i386/i386-builtin-types.def (BND): Likewise.
12586 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12587 (BDESC_FIRST): Likewise.
12589 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12590 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12591 * config/i386/i386.c (enum reg_class): Likewise.
12592 (ix86_target_string): Likewise.
12593 (ix86_option_override_internal): Likewise.
12594 (ix86_conditional_register_usage): Likewise.
12595 (ix86_valid_target_attribute_inner_p): Likewise.
12596 (ix86_set_indirect_branch_type): Likewise.
12597 (ix86_set_current_function): Likewise.
12598 (ix86_function_arg_regno_p): Likewise.
12599 (init_cumulative_args): Likewise.
12600 (ix86_function_arg_advance): Likewise.
12601 (ix86_function_arg): Likewise.
12602 (ix86_pass_by_reference): Likewise.
12603 (ix86_function_value_regno_p): Likewise.
12604 (ix86_function_value_1): Likewise.
12605 (ix86_function_value_bounds): Likewise.
12606 (ix86_return_in_memory): Likewise.
12607 (ix86_setup_incoming_vararg_bounds): Likewise.
12608 (ix86_va_start): Likewise.
12609 (indirect_thunk_need_prefix): Likewise.
12610 (print_reg): Likewise.
12611 (ix86_print_operand): Likewise.
12612 (ix86_expand_call): Likewise.
12613 (ix86_output_function_return): Likewise.
12614 (reg_encoded_number): Likewise.
12615 (BDESC_VERIFYS): Likewise.
12616 (ix86_init_mpx_builtins): Likewise.
12617 (ix86_init_builtins): Likewise.
12618 (ix86_emit_cmove): Likewise.
12619 (ix86_emit_move_max): Likewise.
12620 (ix86_expand_builtin): Likewise.
12621 (ix86_builtin_mpx_function): Likewise.
12622 (ix86_get_arg_address_for_bt): Likewise.
12623 (ix86_load_bounds): Likewise.
12624 (ix86_store_bounds): Likewise.
12625 (ix86_load_returned_bounds): Likewise.
12626 (ix86_store_returned_bounds): Likewise.
12627 (ix86_class_likely_spilled_p): Likewise.
12628 (ix86_hard_regno_mode_ok): Likewise.
12629 (x86_order_regs_for_local_alloc): Likewise.
12630 (ix86_mitigate_rop): Likewise.
12631 (ix86_bnd_prefixed_insn_p): Likewise.
12632 (ix86_mpx_bound_mode): Likewise.
12633 (ix86_make_bounds_constant): Likewise.
12634 (ix86_initialize_bounds): Likewise.
12635 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12636 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12637 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12638 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12639 (TARGET_CHKP_BOUND_MODE): Likewise.
12640 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12641 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12642 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12643 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12644 * config/i386/i386.h (TARGET_MPX): Likewise.
12645 (TARGET_MPX_P): Likewise.
12646 (VALID_BND_REG_MODE): Likewise.
12647 (FIRST_BND_REG): Likewise.
12648 (LAST_BND_REG): Likewise.
12649 (enum reg_class): Likewise.
12650 (BND_REG_P): Likewise.
12651 (BND_REGNO_P): Likewise.
12652 (BNDmode): Likewise.
12653 (ADJUST_INSN_LENGTH): Likewise.
12654 * config/i386/i386.md: Likewise.
12655 * config/i386/i386.opt: Likewise.
12656 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12657 (defined): Likewise.
12658 (LINK_MPX): Likewise.
12659 (MPX_SPEC): Likewise.
12660 (LIBMPX_SPEC): Likewise.
12661 (LIBMPXWRAPPERS_SPEC): Likewise.
12662 (CHKP_SPEC): Likewise.
12663 * config/i386/predicates.md: Likewise.
12664 * dbxout.c (dbxout_type): Likewise.
12665 * doc/extend.texi: Likewise.
12666 * doc/invoke.texi: Likewise.
12667 * doc/md.texi: Likewise.
12668 * doc/tm.texi: Likewise.
12669 * doc/tm.texi.in: Likewise.
12670 * dwarf2out.c (is_base_type): Likewise.
12671 (gen_formal_types_die): Likewise.
12672 (gen_subprogram_die): Likewise.
12673 (gen_type_die_with_usage): Likewise.
12674 (gen_decl_die): Likewise.
12675 (dwarf2out_late_global_decl): Likewise.
12676 * expr.c (expand_assignment): Likewise.
12677 (emit_storent_insn): Likewise.
12678 (store_expr_with_bounds): Likewise.
12679 (store_expr): Likewise.
12680 (expand_expr_real_1): Likewise.
12681 * expr.h (store_expr_with_bounds): Likewise.
12682 * function.c (use_register_for_decl): Likewise.
12683 (struct bounds_parm_data): Likewise.
12684 (assign_parms_augmented_arg_list): Likewise.
12685 (assign_parm_find_entry_rtl): Likewise.
12686 (assign_parm_is_stack_parm): Likewise.
12687 (assign_parm_load_bounds): Likewise.
12688 (assign_bounds): Likewise.
12689 (assign_parms): Likewise.
12690 (expand_function_start): Likewise.
12691 * gcc.c (CHKP_SPEC): Likewise.
12692 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12693 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12694 (wrestrict_dom_walker::check_call): Likewise.
12695 * gimple.c (gimple_build_call_from_tree): Likewise.
12696 * gimple.h (enum gf_mask): Likewise.
12697 (gimple_call_with_bounds_p): Likewise.
12698 (gimple_call_set_with_bounds): Likewise.
12699 * gimplify.c (gimplify_init_constructor): Likewise.
12700 * ipa-cp.c (initialize_node_lattices): Likewise.
12701 (propagate_constants_across_call): Likewise.
12702 (find_more_scalar_values_for_callers_subset): Likewise.
12703 * ipa-hsa.c (process_hsa_functions): Likewise.
12704 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12705 * ipa-icf.c (sem_function::merge): Likewise.
12706 * ipa-inline.c (early_inliner): Likewise.
12707 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12708 (warn_function_cold): Likewise.
12709 (propagate_pure_const): Likewise.
12710 * ipa-ref.h (enum GTY): Likewise.
12711 * ipa-split.c (find_retbnd): Likewise.
12712 (consider_split): Likewise.
12713 (split_function): Likewise.
12714 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12715 * ipa.c (walk_polymorphic_call_targets): Likewise.
12716 (symbol_table::remove_unreachable_nodes): Likewise.
12717 (process_references): Likewise.
12718 (cgraph_build_static_cdtor_1): Likewise.
12719 * lto-cgraph.c (lto_output_node): Likewise.
12720 (output_refs): Likewise.
12721 (compute_ltrans_boundary): Likewise.
12722 (input_overwrite_node): Likewise.
12723 (input_node): Likewise.
12724 (input_cgraph_1): Likewise.
12725 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12726 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12727 (class pass_chkp_instrumentation_passes): Likewise.
12728 (make_pass_chkp_instrumentation_passes): Likewise.
12729 * passes.def: Likewise.
12730 * rtl.h (struct GTY): Likewise.
12731 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12732 * stor-layout.c (layout_type): Likewise.
12733 * symtab.c: Likewise.
12734 * target.def: Likewise.
12735 * targhooks.c (default_chkp_bound_type): Likewise.
12736 (default_chkp_bound_mode): Likewise.
12737 (default_builtin_chkp_function): Likewise.
12738 (default_chkp_function_value_bounds): Likewise.
12739 (default_chkp_make_bounds_constant): Likewise.
12740 (default_chkp_initialize_bounds): Likewise.
12741 * targhooks.h (default_chkp_bound_type): Likewise.
12742 (default_chkp_bound_mode): Likewise.
12743 (default_builtin_chkp_function): Likewise.
12744 (default_chkp_function_value_bounds): Likewise.
12745 (default_chkp_make_bounds_constant): Likewise.
12746 (default_chkp_initialize_bounds): Likewise.
12747 * toplev.c (compile_file): Likewise.
12748 (process_options): Likewise.
12749 * tree-core.h (DEF_BUILTIN): Likewise.
12750 (DEF_BUILTIN_CHKP): Likewise.
12751 * tree-inline.c (declare_return_variable): Likewise.
12752 (remap_gimple_stmt): Likewise.
12753 (copy_bb): Likewise.
12754 (initialize_inlined_parameters): Likewise.
12755 (expand_call_inline): Likewise.
12756 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12757 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12758 (make_pass_ipa_chkp_produce_thunks): Likewise.
12759 (make_pass_chkp): Likewise.
12760 (make_pass_chkp_opt): Likewise.
12761 (make_pass_chkp_instrumentation_passes): Likewise.
12762 * tree-pretty-print.c (dump_generic_node): Likewise.
12763 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12764 * tree-ssa-dce.c (propagate_necessity): Likewise.
12765 (eliminate_unnecessary_stmts): Likewise.
12766 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12767 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12768 * tree-ssa-sccvn.h: Likewise.
12769 * tree-ssa-strlen.c (get_string_length): Likewise.
12770 (valid_builtin_call): Likewise.
12771 (adjust_last_stmt): Likewise.
12772 (handle_builtin_strchr): Likewise.
12773 (handle_builtin_strcpy): Likewise.
12774 (handle_builtin_stxncpy): Likewise.
12775 (handle_builtin_memcpy): Likewise.
12776 (handle_builtin_strcat): Likewise.
12777 (strlen_check_and_optimize_stmt): Likewise.
12778 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12779 * tree-streamer-in.c: Likewise.
12780 * tree-streamer.c (record_common_node): Likewise.
12781 * tree.c (tree_code_size): Likewise.
12782 (wide_int_to_tree_1): Likewise.
12783 (type_contains_placeholder_1): Likewise.
12784 (build_common_tree_nodes): Likewise.
12785 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12786 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12787 (POINTER_BOUNDS_P): Likewise.
12788 (BOUNDED_TYPE_P): Likewise.
12789 (BOUNDED_P): Likewise.
12790 (CALL_WITH_BOUNDS_P): Likewise.
12791 (pointer_bounds_type_node): Likewise.
12792 * value-prof.c (gimple_ic): Likewise.
12793 * var-tracking.c (vt_add_function_parameters): Likewise.
12794 * varasm.c (make_decl_rtl): Likewise.
12795 (assemble_start_function): Likewise.
12796 (output_constant): Likewise.
12797 (maybe_assemble_visibility): Likewise.
12798 * varpool.c (ctor_for_folding): Likewise.
12799 * chkp-builtins.def: Remove.
12800 * ipa-chkp.c: Remove.
12801 * ipa-chkp.h: Remove.
12802 * rtl-chkp.c: Remove.
12803 * rtl-chkp.h: Remove.
12804 * tree-chkp-opt.c: Remove.
12805 * tree-chkp.c: Remove.
12806 * tree-chkp.h: Remove.
12808 2018-06-07 Carl Love <cel@us.ibm.com>
12810 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12811 vextract_fp_from_shortl): Add BE support.
12813 2018-06-07 Paul Koning <ni1d@arrl.net>
12815 * compare-elim.c (try_merge_compare): Don't merge compare if
12816 address contains a side effect.
12817 (try_eliminate_compare): Likewise.
12819 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12821 * config.gcc: Support "tremont".
12822 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12823 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12825 * config/i386/i386.c (m_TREMONT): Define.
12826 (processor_target_table): Add "tremont".
12827 (PTA_TREMONT): Define.
12828 (ix86_lea_outperforms): Add TARGET_TREMONT.
12829 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12830 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12831 and M_INTEL_GOLDMONT_PLUS.
12832 (fold_builtin_cpu): Add "tremont".
12833 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12834 (ix86_option_override_internal): Add "tremont".
12835 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12836 (processor_type): Add PROCESSOR_TREMONT.
12837 * config/i386/x86-tune.def: Add m_TREMONT.
12838 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12840 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12842 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12843 symbol defined for msp430i* devices to be lower case.
12845 2018-06-07 Richard Biener <rguenther@suse.de>
12847 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12848 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12849 Properly wrap signed arithmetic if overflow wraps.
12851 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12853 PR tree-optimization/69615
12854 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12855 of a cast from a same precision integral SSA_NAME in a bb dominated
12856 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12857 cast to utype if rhs2 has already a compatible type.
12859 2018-06-07 Richard Biener <rguenther@suse.de>
12861 PR tree-optimization/85935
12862 * graphite-scop-detection.c (find_params_in_bb): Analyze
12863 condition operands with respect to the correct loop. Assert
12864 the analysis doesn't fail.
12866 2018-06-04 Carl Love <cel@us.ibm.com>
12868 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12869 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12870 as it is slightly cheaper.
12871 (first_match_or_eos_index_<mode>):
12872 Calculate index using natural element order.
12873 (first_match_index_<mode>):
12874 Calculate index using natural element order.
12875 (first_match_or_eos_index_<mode>):
12876 Calculate index using natural order.
12877 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12878 for BE and LE modes.
12879 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12880 P9V_BUILTIN_VCLZLSBB_V16QI.
12881 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12884 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12886 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12887 indentation and line wrap for many prototypes. Add missing
12888 @smallexample directives around block of prototypes for vec_xl and
12891 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12893 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12894 track if we pass or return IEEE 128-bit floating point.
12895 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12896 C++ mangling that is compatible with GCC 8.1.
12897 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12898 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12899 floating point types.
12900 (rs6000_function_arg_advance_1): Likewise.
12901 (rs6000_mangle_type): Optionally generate mangled names that match
12902 what GCC 8.1 generated for IEEE 128-bit floating point types.
12903 (rs6000_globalize_decl_name): If we have an external function that
12904 passes or returns IEEE 128-bit types, generate a weak reference
12905 from the mangled name used in GCC 8.1 to the current mangled
12907 (rs6000_init_builtins): Make __ibm128 use the long double type if
12908 long double is IBM extended double. Make __float128 use the long
12909 double type if long double is IEEE 128-bit.
12912 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12913 macro for __ibm128 built-in functions.
12914 (PACK_IF): Add __ibm128 pack/unpack functions.
12915 (UNPACK_IF): Likewise.
12916 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12917 enable long double built-in functions if long double is IEEE
12918 128-bit floating point.
12919 (rs6000_invalid_builtin): Update long double built-in function
12921 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12922 functions, adjust the built-in function to use the long double
12923 built-in function if __ibm128 and long double are the same type.
12924 * doc/extend.texi (PowerPC builtins): Update documention for
12925 __builtin_{,un}pack_longdouble. Add documentation for
12926 __builtin_{,un}pack_ibm128.
12928 2018-06-06 Jim Wilson <jimw@sifive.com>
12930 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12931 (struct machine_function): New field interrupt_mode.
12932 (riscv_handle_type_attribute): New function. Add forward declaration.
12933 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12934 (riscv_expand_epilogue): Check interrupt_mode field.
12935 (riscv_set_current_function): Check interrupt attribute args and
12936 set interrupt_mode field.
12937 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12938 (riscv_sret, riscv_uret): New.
12939 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12940 new arguments to interrupt attribute.
12942 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12945 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12946 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12948 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12950 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12951 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12952 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12953 several redundant entries.
12955 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12957 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12958 type from "rtx" to "rtx_insn *".
12959 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12960 for local "call_insn", removing cast.
12961 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12963 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12965 PR tree-optimization/86066
12966 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12967 for BIT_INSERT_EXPR stores.
12969 2018-06-06 Richard Biener <rguenther@suse.de>
12971 PR tree-optimization/86062
12972 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12973 component refs ontop
12974 of to be offsetted base.
12976 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12978 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12979 to be static and remove check on interrupt attribute name.
12981 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12983 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12984 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12986 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12989 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12991 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12992 Remove second argument, change how error is called.
12993 (aarch64_layout_arg): Remove second argument from
12994 aarch64_err_no_fpadvsimd call.
12995 (aarch64_init_cumulative_args): Ditto.
12996 (aarch64_gimplify_va_arg_expr): Ditto.
12997 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12999 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
13001 * config/i386/i386.md (simple_return_indirect_internal): New expander.
13002 (*simple_return_indirect_internal<mode>): Rename from
13003 simple_return_indirect_internal. Use W mode iterator.
13004 (rstorssp): New expander.
13005 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
13006 (clrssbsy): New expander.
13007 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
13009 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
13011 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13013 (cmse_check_pointed_object): Likewise.
13015 2018-06-05 Martin Liska <mliska@suse.cz>
13017 PR gcov-profile/47618
13018 * doc/invoke.texi: Document how -fprofile-dir format
13021 2018-06-05 Richard Biener <rguenther@suse.de>
13023 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13024 removal pretend DOM info isn't available so we do not update
13025 it and only remove edges, not dominated blocks. Actually free
13026 DOM info in case we removed something. Remove unreachable blocks.
13027 (mfb_keep_latches): Work with either DOM info or marked backedges.
13028 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13029 first. Mark backedges if DOM info isn't available.
13030 (Re-)compute DOM info after cleanup_control_flow_pre.
13032 2018-06-05 Richard Biener <rguenther@suse.de>
13034 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13035 (locus_discrim_hasher::hash): Adjust.
13036 (locus_discrim_hasher::equal): Likewise.
13037 (next_discriminator_for_locus): Work on line directly.
13038 (same_line_p): Pass in expanded locus1 as well.
13039 (assign_discriminators): Avoid redundant location expansions.
13041 2018-06-05 Richard Biener <rguenther@suse.de>
13043 PR tree-optimization/86046
13044 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13045 if required after clearing TREE_ADDRESSABLE.
13047 2018-06-05 Richard Biener <rguenther@suse.de>
13049 PR tree-optimization/86047
13050 * tree-ssa-loop.c (for_each_index): Glob handling of all
13051 decls and constants and really handle all of them.
13053 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13056 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13057 qualifier_void_pointer and qualifier_const_void_pointer.
13058 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13059 (arm_init_builtins): Handle the above.
13060 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13061 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13062 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13065 2018-06-05 Martin Liska <mliska@suse.cz>
13067 * auto-profile.c (read_autofdo_file): Do not use
13068 gcov_ctr_summary struct.
13069 (afdo_callsite_hot_enough_for_early_inline): Likewise.
13070 * coverage.c (struct counts_entry): Likewise.
13071 (read_counts_file): Read just single summary entry.
13072 (get_coverage_counts): Use gcov_summary struct.
13073 * coverage.h (get_coverage_counts): Likewise.
13074 * gcov-dump.c (dump_working_sets): Likewise.
13075 (tag_summary): Dump just single summary.
13076 * gcov-io.c (gcov_write_summary): Write just histogram
13078 (gcov_read_summary): Read just single summary.
13079 (compute_working_sets): Use gcov_summary struct.
13080 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13081 of GCOV_COUNTERS_SUMMABLE.
13082 (GCOV_COUNTERS_SUMMABLE): Remove.
13083 (GCOV_FIRST_VALUE_COUNTER): Replace with
13084 GCOV_COUNTER_V_INTERVAL.
13085 (struct gcov_ctr_summary): Remove.
13086 (struct gcov_summary): Directly use fields of former
13088 (compute_working_sets): Use gcov_summary struct.
13089 * gcov.c (read_count_file): Do not use ctrs fields.
13090 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13092 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13094 * profile.c: Likewise.
13095 * profile.h: Likewise.
13097 2018-06-05 Martin Liska <mliska@suse.cz>
13099 PR gcov-profile/84846
13100 * gcov.c (output_lines): Print working directory only
13101 in intermediate format.
13103 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
13105 * config/s390/s390-builtin-types.def: Add void function type.
13106 * config/s390/s390-builtins.def: Use the function type for the
13109 2018-06-04 Jim Wilson <jimw@sifive.com>
13111 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13113 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13114 and maybe_eh_return. Change regno to unsigned int. Use new args to
13115 handle EH_RETURN_DATA_REGNO registers properly.
13116 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13117 (riscv_expand_epilogue): Update comment. Change argument name and
13118 type. Update code to use new name and type. Pass new args to
13119 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
13121 * config/riscv/riscv.md (NORMAL_RETURN): New.
13122 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13123 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13124 (eh_return): Call gen_eh_return_internal and emit barrier.
13125 (eh_return_internal): Call riscv_expand_epilogue.
13127 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
13129 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13130 bit_insertion field and declare can_be_merged_into method.
13131 (merged_store_group::can_be_merged_into): New method.
13132 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13133 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
13134 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13136 2018-06-04 Richard Biener <rguenther@suse.de>
13138 PR tree-optimization/85955
13139 * builtins.c (fold_builtin_sincos): Convert pointers to
13140 destination to appropriate type before dereferencing.
13142 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
13144 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13146 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
13148 * expr.c (expand_expr_real_1): Force the operand into memory if
13149 its TYPE_MODE is BLKmode and if there is no integer mode for
13150 the number of bits being extracted.
13152 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13156 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13157 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13159 2018-06-04 Richard Biener <rguenther@suse.de>
13161 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13162 (cleanup_tree_cfg_noloop): ... single caller. Do
13163 start_recording_case_labels later.
13165 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
13167 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13168 to _IMMINTRIN_H_INCLUDED.
13169 * config/i386/pconfigintrin.h: Ditto.
13170 * config/i386/waitpkgintrin.h: Ditto.
13171 * config/i386/immintrin.h: Add includes for sgxintrin.h,
13172 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13173 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13174 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13175 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13176 waitpkgintrin.h and cldemoteintrin.h.
13178 2018-06-04 Richard Biener <rguenther@suse.de>
13180 PR tree-optimization/86038
13181 * tracer.c (find_best_successor): Check probability for
13182 being initialized, bail out if not.
13184 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
13187 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13188 of bits to ignore when comparing architectures.
13190 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13192 PR tree-optimization/69615
13193 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13194 maximum or minimum of the type, try to merge it also as if
13195 range1 is + [-, x - 1] or + [x + 1, -].
13198 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13200 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
13202 PR tree-optimization/86034
13203 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13204 the unsigned bitfield type in a bit insertion sequence if it does not
13205 have a larger precision than the bitfield size.
13206 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13208 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
13210 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13212 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13214 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13215 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13216 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13217 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13219 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13221 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13222 Disable -fdelete-null-pointer-checks for ELF toolchain.
13224 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13225 Kito Cheng <kito.cheng@gmail.com>
13227 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13228 (nds32le-*-*, nds32be-*-*): Integrate checking process.
13229 (nds32*-*-*): Add glibc and uclibc conditions.
13230 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13231 (TARGET_EXCEPT_UNWIND_INFO): Define.
13232 * config/nds32/elf.h: New file.
13233 * config/nds32/linux.h: New file.
13234 * config/nds32/nds32-elf.opt: New file.
13235 * config/nds32/nds32-linux.opt: New file.
13236 * config/nds32/nds32-fp-as-gp.c
13237 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13238 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13240 (nds32_asm_file_end): Ditto.
13241 (nds32_print_operand): Ditto.
13242 (nds32_insert_attributes): Ditto.
13243 (nds32_init_libfuncs): New function.
13244 (TARGET_HAVE_TLS): Define.
13245 (TARGET_INIT_LIBFUNCS): Define.
13246 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13248 (TARGET_ELF): Apply different mcmodel setting.
13249 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13250 been migrated into elf.h and linux.h files.
13251 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13252 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13253 (mcmodel): The content has been migrated into nds32-elf.opt and
13254 nds32-linux.opt files.
13255 * config/nds32/t-elf: New file.
13256 * config/nds32/t-linux: New file.
13258 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13259 Shiva Chen <shiva0217@gmail.com>
13261 * config/nds32/constants.md (unspec_volatile_element): Add
13262 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13263 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13265 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13266 (make_pass_nds32_fp_as_gp): Declare.
13267 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13269 (nds32_asm_function_end_prologue): Remove unused asm output.
13270 (nds32_asm_function_begin_epilogue): Remove unused asm output.
13271 (nds32_asm_file_start): Output necessary fp_as_gp information.
13272 (nds32_option_override): Adjust register usage.
13273 (nds32_expand_prologue): Consider fp_as_gp situation.
13274 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13275 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13278 (simple_return): Ditto.
13279 (omit_fp_begin): Output special directive for fp_as_gp.
13280 (omit_fp_end): Output special directive for fp_as_gp.
13281 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13282 mforbid-fp-as-gp): New options.
13284 2018-06-01 Mark Wielaard <mark@klomp.org>
13286 * dwarf2out.c (dwarf2out_finish): Remove generation of
13287 DW_AT_loclists_base.
13289 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
13291 * gimple-ssa-store-merging.c: Include gimple-fold.h.
13292 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13293 (struct merged_store_group): Add bit_insertion field.
13294 (dump_char_array): Use standard hexadecimal format.
13295 (merged_store_group::merged_store_group): Set bit_insertion to false.
13296 (merged_store_group::apply_stores): Use optimal buffer size. Deal
13297 with BIT_INSERT_EXPR stores. Move up code updating the mask and
13298 also print the mask in the dump file.
13299 (pass_store_merging::gate): Minor tweak.
13300 (imm_store_chain_info::coalesce_immediate): Fix wrong association
13301 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
13302 stores with INTEGER_CST stores.
13303 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13304 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13305 and use it throughout. Generate bit insertion sequences if need be.
13306 (pass_store_merging::process_store): Remove redundant condition.
13307 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13309 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
13311 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13312 the 128-bit floating point types. Fix function comment.
13314 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13316 * config/aarch64/aarch64-simd.md
13317 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13319 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13322 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13324 PR tree-optimization/85989
13325 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13327 (backprop::intersect_uses): Check it when deciding whether this
13328 is a backedge reference.
13329 (backprop::process_block): Add each phi to m_visited_phis
13330 after visiting it, then clear it at the end.
13332 2018-06-01 Richard Biener <rguenther@suse.de>
13334 * tree-vectorizer.h (vect_dr_stmt): New function.
13335 (vect_get_load_cost): Adjust.
13336 (vect_get_store_cost): Likewise.
13337 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13338 Use vect_dr_stmt instead of DR_SMTT.
13339 (vect_record_base_alignments): Likewise.
13340 (vect_calculate_target_alignment): Likewise.
13341 (vect_compute_data_ref_alignment): Likewise and make static.
13342 (vect_update_misalignment_for_peel): Likewise.
13343 (vect_verify_datarefs_alignment): Likewise.
13344 (vector_alignment_reachable_p): Likewise.
13345 (vect_get_data_access_cost): Likewise. Pass down
13346 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13347 (vect_get_peeling_costs_all_drs): Likewise.
13348 (vect_peeling_hash_get_lowest_cost): Likewise.
13349 (vect_enhance_data_refs_alignment): Likewise.
13350 (vect_find_same_alignment_drs): Likewise.
13351 (vect_analyze_data_refs_alignment): Likewise.
13352 (vect_analyze_group_access_1): Likewise.
13353 (vect_analyze_group_access): Likewise.
13354 (vect_analyze_data_ref_access): Likewise.
13355 (vect_analyze_data_ref_accesses): Likewise.
13356 (vect_vfa_segment_size): Likewise.
13357 (vect_small_gap_p): Likewise.
13358 (vectorizable_with_step_bound_p): Likewise.
13359 (vect_prune_runtime_alias_test_list): Likewise.
13360 (vect_analyze_data_refs): Likewise.
13361 (vect_supportable_dr_alignment): Likewise.
13362 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13363 (vect_gen_prolog_loop_niters): Likewise.
13364 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13365 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13367 (vect_recog_mask_conversion_pattern): Likewise.
13368 (vect_try_gather_scatter_pattern): Likewise.
13369 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13370 to vect_get_store_cost.
13371 (vect_get_store_cost): Get stmt_info instead of DR.
13372 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13373 (vect_get_load_cost): Get stmt_info instead of DR.
13375 2018-06-01 Richard Biener <rguenther@suse.de>
13377 PR middle-end/86017
13378 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13379 vars wrapped in MEM_REFs.
13381 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13383 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13384 Fix subreg tests so that we only return a choice between
13385 GENERAL_REGS and FP_REGS if the original classes included both.
13387 2018-06-01 Richard Biener <rguenther@suse.de>
13390 * tree-ssa-structalias.c (get_function_part_constraint):
13391 Handle NULL fi->decl.
13392 (find_func_aliases_for_call): Properly handle indirect
13393 fi from direct call.
13394 (find_func_clobbers): Likewise.
13395 (ipa_pta_execute): Likewise.
13396 (create_variable_info_for): For functions that are ifunc_resolver
13397 resolve to a varinfo that contains the result of the resolver call.
13398 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13401 2018-05-31 Michael Collison <michael.collison@arm.com>
13403 * config/aarch64/aarch64.md:
13404 (*fix_to_zero_extenddfdi2): New pattern.
13405 * gcc.target/aarch64/fix_extend1.c: New testcase.
13407 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13409 PR middle-end/78809
13410 PR middle-end/83026
13411 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13412 and BUILT_IN_STRNCMP_EQ.
13413 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13414 BUILT_IN_STRNCMP_EQ.
13415 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13416 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13417 (gimple_fold_builtin): Likewise.
13418 * tree-ssa-strlen.c (compute_string_length): New function.
13419 (determine_min_obsize): New function.
13420 (handle_builtin_string_cmp): New function to handle calls to
13421 string compare functions.
13422 (strlen_optimize_stmt): Add handling to builtin string compare
13424 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13425 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13426 * tree.c (build_common_builtin_nodes): Add new defines of
13427 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13429 2018-05-31 Jakub Jelinek <jakub@redhat.com>
13432 * bb-reorder.c (pass_partition_blocks::gate): Return false for
13433 functions with naked attribute.
13435 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
13437 * config/i386/sse.md (avx_vec_concat<mode>):
13438 Substitute concat_tg_mode mode attribute with xtg_mode.
13439 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13440 (concat_tg_mode): Remove mode attribute.
13442 2018-05-31 Martin Sebor <msebor@redhat.com>
13445 * calls.c (alloc_max_size): Correct a logic error/typo.
13446 Treat excessive arguments as infinite. Warn for invalid arguments.
13447 * doc/invoke.texi (-Walloc-size-larger-than): Update.
13449 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
13452 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13453 and movx for Haswell.
13455 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
13456 Cesar Philippidis <cesar@codesourcery.com>
13458 PR middle-end/85879
13459 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13460 when emitting error on private/firstprivate reductions.
13461 * omp-low.c (lower_omp_target): Avoid reference-type processing
13462 on pointers for firstprivate clause.
13464 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13466 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13469 * config/aarch64/aarch64-simd.md
13470 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13471 (aarch64_ld1_x3_<mode>): Likewise
13472 (aarch64_st1x2<VALLDIF:mode>): Likewise
13473 (aarch64_st1_x2_<mode>): Likewise
13474 (aarch64_st1x3<VALLDIF:mode>): Likewise
13475 (aarch64_st1_x3_<mode>): Likewise
13476 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13477 (vld1_s8_x3): Likewise.
13478 (vld1_u16_x3): Likewise.
13479 (vld1_s16_x3): Likewise.
13480 (vld1_u32_x3): Likewise.
13481 (vld1_s32_x3): Likewise.
13482 (vld1_u64_x3): Likewise.
13483 (vld1_s64_x3): Likewise.
13484 (vld1_f16_x3): Likewise.
13485 (vld1_f32_x3): Likewise.
13486 (vld1_f64_x3): Likewise.
13487 (vld1_p8_x3): Likewise.
13488 (vld1_p16_x3): Likewise.
13489 (vld1_p64_x3): Likewise.
13490 (vld1q_u8_x3): Likewise.
13491 (vld1q_s8_x3): Likewise.
13492 (vld1q_u16_x3): Likewise.
13493 (vld1q_s16_x3): Likewise.
13494 (vld1q_u32_x3): Likewise.
13495 (vld1q_s32_x3): Likewise.
13496 (vld1q_u64_x3): Likewise.
13497 (vld1q_s64_x3): Likewise.
13498 (vld1q_f16_x3): Likewise.
13499 (vld1q_f32_x3): Likewise.
13500 (vld1q_f64_x3): Likewise.
13501 (vld1q_p8_x3): Likewise.
13502 (vld1q_p16_x3): Likewise.
13503 (vld1q_p64_x3): Likewise.
13504 (vst1_s64_x2): Likewise.
13505 (vst1_u64_x2): Likewise.
13506 (vst1_f64_x2): Likewise.
13507 (vst1_s8_x2): Likewise.
13508 (vst1_p8_x2): Likewise.
13509 (vst1_s16_x2): Likewise.
13510 (vst1_p16_x2): Likewise.
13511 (vst1_s32_x2): Likewise.
13512 (vst1_u8_x2): Likewise.
13513 (vst1_u16_x2): Likewise.
13514 (vst1_u32_x2): Likewise.
13515 (vst1_f16_x2): Likewise.
13516 (vst1_f32_x2): Likewise.
13517 (vst1_p64_x2): Likewise.
13518 (vst1q_s8_x2): Likewise.
13519 (vst1q_p8_x2): Likewise.
13520 (vst1q_s16_x2): Likewise.
13521 (vst1q_p16_x2): Likewise.
13522 (vst1q_s32_x2): Likewise.
13523 (vst1q_s64_x2): Likewise.
13524 (vst1q_u8_x2): Likewise.
13525 (vst1q_u16_x2): Likewise.
13526 (vst1q_u32_x2): Likewise.
13527 (vst1q_u64_x2): Likewise.
13528 (vst1q_f16_x2): Likewise.
13529 (vst1q_f32_x2): Likewise.
13530 (vst1q_f64_x2): Likewise.
13531 (vst1q_p64_x2): Likewise.
13532 (vst1_s64_x3): Likewise.
13533 (vst1_u64_x3): Likewise.
13534 (vst1_f64_x3): Likewise.
13535 (vst1_s8_x3): Likewise.
13536 (vst1_p8_x3): Likewise.
13537 (vst1_s16_x3): Likewise.
13538 (vst1_p16_x3): Likewise.
13539 (vst1_s32_x3): Likewise.
13540 (vst1_u8_x3): Likewise.
13541 (vst1_u16_x3): Likewise.
13542 (vst1_u32_x3): Likewise.
13543 (vst1_f16_x3): Likewise.
13544 (vst1_f32_x3): Likewise.
13545 (vst1_p64_x3): Likewise.
13546 (vst1q_s8_x3): Likewise.
13547 (vst1q_p8_x3): Likewise.
13548 (vst1q_s16_x3): Likewise.
13549 (vst1q_p16_x3): Likewise.
13550 (vst1q_s32_x3): Likewise.
13551 (vst1q_s64_x3): Likewise.
13552 (vst1q_u8_x3): Likewise.
13553 (vst1q_u16_x3): Likewise.
13554 (vst1q_u32_x3): Likewise.
13555 (vst1q_u64_x3): Likewise.
13556 (vst1q_f16_x3): Likewise.
13557 (vst1q_f32_x3): Likewise.
13558 (vst1q_f64_x3): Likewise.
13559 (vst1q_p64_x3): Likewise.
13561 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13563 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13564 user_label_prefix to name.
13566 * tree-core.h: Update comment about the format of NAME string
13567 passed to handler in attribute_spec.
13569 * config/msp430/msp430.md: Remove erroneous subreg expression from
13570 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13571 zero_extend{q,h}isi2.
13573 2018-05-30 Borislav Petkov <bp@suse.de>
13575 * doc/extend.texi: Document some architecture specific
13576 constraints and sort entries.
13578 2018-05-30 Martin Sebor <msebor@redhat.com>
13580 PR middle-end/85369
13581 * builtins.c (expand_builtin_stpcpy_1): New function.
13582 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13583 only if the former succeeds.
13585 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13587 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13590 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13592 * doc/invoke.texi (-flinker-output): Document
13594 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13596 * passes.c (ipa_write_summaries): Only modify statements if body
13598 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13599 incrementally linking.
13600 (ipa_passes): Likewise.
13601 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13602 pass down resolution info.
13603 * common.opt (flag_incremental_link): Update info.
13604 * gcc.c (plugin specs): Turn flinker-output=* to
13605 -plugin-opt=-linker-output-known
13606 * toplev.c (compile_file): Also cut compilation when doing incremental
13608 * flag-types. (enum lto_partition_model): Add
13609 LTO_LINKER_OUTPUT_NOLTOREL.
13610 (invoke.texi): Add -flinker-output docs.
13611 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13612 link same way as WPA; do not stream in dead initializers.
13614 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13615 darf2out_register_external_decl): Support incremental link.
13617 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13619 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13621 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13623 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13624 it down to simple_object_copy_lto_debug_sections.
13625 (run_gcc): Determine incremental LTO link time and configure
13626 lto1 into non-wpa mode, disable renaming of debug sections.
13628 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13630 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13631 descriptions of various incorrectly documented functions.
13633 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13636 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13637 address check not strict.
13639 2018-05-30 Richard Biener <rguenther@suse.de>
13641 PR tree-optimization/85964
13642 * tracer.c (better_p): Drop initialized count check, we only
13643 call the function with initialized counts now.
13644 (find_best_successor): Do find a best edge if one
13645 has uninitialized count.
13646 (find_best_predecessor): Likewise. Do BB frequency check only
13647 if count is initialized.
13649 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13651 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13652 (aarch64_ldrstr_offset_compare): New.
13653 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13654 load/store orderings.
13655 (aarch64_gen_adjusted_ldpstp): Likewise.
13657 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13659 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13660 Check for subset of GENERAL_REGS and FP_REGS.
13661 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13664 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13666 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13667 and wi::to_poly_offset. Add the current offset and then check
13668 whether the sum fits, rather than using an unchecked addition of
13669 a checked term. Check for a shwi rather than a uhwi.
13670 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13671 (store_constructor): Use poly_int_tree_p.
13672 (expand_expr_real_1): Likewise.
13673 * function.c (assign_temp): Likewise.
13674 * fold-const.c (const_binop): Use poly_int_tree_p and
13675 wi::to_poly_offset.
13676 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13678 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13679 to_poly_offset for MEM offsets.
13680 * ipa-icf.c (sem_variable::equals): Likewise.
13681 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13682 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13683 wi::to_poly_offset for BIT_FIELD_REF offsets.
13684 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13685 wi::to_poly_offset.
13686 * var-tracking.c (emit_note_insn_var_location): Use
13687 tree_to_poly_uint64.
13689 2018-05-29 Jim Wilson <jimw@sifive.com>
13691 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13693 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13696 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13697 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13699 (sse4_1_round<mode>2): Use nonimmediate_operand
13700 for operand 1 predicate.
13702 2018-05-29 Martin Sebor <msebor@redhat.com>
13703 Richard Biener <rguenther@suse.de>
13706 * calls.c (get_size_range): Call determine_value_range instead
13707 of get_value_range..
13708 * tree-vrp.h (determine_value_range): Declared new function.
13709 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13711 2018-05-29 Richard Biener <rguenther@suse.de>
13713 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13714 sure to use non-pattern stmts for get_earlier_stmt arguments.
13715 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13716 called on pattern stmts.
13717 (get_later_stmt): Likewise.
13719 2018-05-29 Martin Liska <mliska@suse.cz>
13721 PR gcov-profile/85759
13722 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13725 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13727 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13729 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13733 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13734 VEC_PACK_FLOAT_EXPR): New tree codes.
13735 * tree-pretty-print.c (op_code_prio): Handle
13736 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13737 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13738 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13739 * tree-inline.c (estimate_operator_cost): Likewise.
13740 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13741 * fold-const.c (const_binop): Likewise.
13742 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13743 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13744 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13745 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13746 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13747 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13748 * expr.c (expand_expr_real_2): Likewise.
13749 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13750 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13751 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13753 * optabs.c (expand_widen_pattern_expr): For
13754 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13755 sign from result type rather than operand's type.
13756 (expand_binop_directly): For vec_packu_float_optab and
13757 vec_packs_float_optab allow result type to be different from operand's
13759 * optabs-tree.c (optab_for_tree_code): Handle
13760 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13761 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13762 * tree-vect-generic.c (expand_vector_operations_1): Handle
13763 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13764 VEC_PACK_FLOAT_EXPR.
13765 * tree-vect-stmts.c (supportable_widening_operation): Handle
13767 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13768 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13769 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13770 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13771 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13773 (vec_pack<floatprefix>_float_<mode>): New expander.
13774 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13776 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13777 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13778 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13779 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13780 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13782 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13783 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13784 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13785 VEC_PACK_FLOAT_EXPR): Document.
13787 2018-05-29 Richard Biener <rguenther@suse.de>
13789 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13791 (stmt_vec_info_vec): Make pointer.
13792 (init_stmt_vec_info_vec): Remove.
13793 (free_stmt_vec_info_vec): Likewise.
13794 (set_stmt_vec_info_vec): New function.
13795 (free_stmt_vec_infos): Likewise.
13796 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13797 (set_vinfo_for_stmt): Likewise.
13798 (get_earlier_stmt): Likewise.
13799 (get_later_stmt): Likewise.
13800 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13801 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13802 (vec_info::~vec_info): Free stmt_vec_infos.
13803 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13804 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13805 (pass_slp_vectorize::execute): Likewise.
13806 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13807 (free_stmt_vec_info_vec): Likewise.
13808 (set_stmt_vec_info_vec): New function.
13809 (free_stmt_vec_infos): Likewise.
13810 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13811 the global stmt_vec_info_vec.
13812 * tree-parloops.c (gather_scalar_reductions): Use
13813 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13816 2018-05-29 Richard Biener <rguenther@suse.de>
13818 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13820 2018-05-29 Martin Liska <mliska@suse.cz>
13821 David Malcolm <dmalcolm@redhat.com>
13823 * vec.c (test_reverse): New.
13824 (vec_c_tests): Add new test.
13825 * vec.h (vl_ptr>::reverse): New function.
13827 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13829 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13831 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13834 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13836 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13838 2018-05-28 Richard Biener <rguenther@suse.de>
13840 PR tree-optimization/85933
13841 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13842 look at stmts marked as vectorizable.
13844 2018-05-28 Richard Biener <rguenther@suse.de>
13846 PR tree-optimization/85934
13847 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13848 vector boolean check before scalar optimization.
13850 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13852 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13855 2018-05-28 Mark Wielaard <mark@klomp.org>
13857 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13858 if it is an expression containing a minus sign.
13860 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13862 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13864 2018-05-27 Paul Koning <ni1d@arrl.net>
13866 * config/pdp11/pdp11.md (truncsihi2): Remove.
13868 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13869 Chung-Ju Wu <jasonwucj@gmail.com>
13871 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13873 (unaligned_store_dw): Ditto.
13874 * config/nds32/nds32-memory-manipulation.c
13875 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13876 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13877 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13878 (emit_setmem_word_loop): Rename to ...
13879 (emit_setmem_doubleword_loop): ... this.
13880 (nds32_gen_dup_4_byte_to_word_value): New function.
13881 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13882 (nds32_expand_setmem_loop): Refine implementation.
13883 (nds32_expand_setmem_loop_v3m): Ditto.
13884 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13887 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13889 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13891 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13893 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13894 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13895 machine->attr_no_prologue_p.
13896 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13897 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13898 (nds32_expand_epilogue): Consider attr_naked_p.
13899 (nds32_expand_epilogue_v3pop): Likewise.
13900 (nds32_can_use_return_insn): Likewise.
13901 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13902 attr_no_prologue_p fields.
13903 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13905 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13908 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13910 * config/i386/sse.md
13911 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13913 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13915 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13917 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13919 (*<floatsuffix>floatv2div2sf2): Rename to ...
13920 (*float<floatunssuffix>v2div2sf2): ... this.
13921 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13922 (float<floatunssuffix>v2div2sf2_mask): ... this.
13923 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13924 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13925 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13927 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13929 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13931 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13933 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13935 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13937 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13938 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13939 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13940 gen_ufix_truncv8dfv8si2.
13941 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13942 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13943 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13944 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13945 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13946 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13947 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13948 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13950 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13954 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13956 2018-05-25 Jim Wilson <jimw@sifive.com>
13958 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13959 * config/riscv/riscv.c (struct machine_function): Add
13960 interrupt_handler_p and attribute_checked_p fields.
13961 (riscv_attribute_table): Add interrupt.
13962 (riscv_interrupt_type_p): New.
13963 (riscv_save_reg_p): Save extra regs for interrupt handler.
13964 (riscv_use_save_libcall): Return false for interrupt handler.
13965 (riscv_first_stack_step): Add forward declaration.
13966 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13967 for interrupt handler with large frame. Use it for saved reg list.
13968 (riscv_expand_prologue): Move flag_stack_usage_info support to
13969 eliminate duplication.
13970 (riscv_expand_epilogue): Generate mret for interrupt handler.
13971 (riscv_epilogue_uses): New.
13972 (riscv_can_use_return_insn): Return false for interrupt handler.
13973 (riscv_function_ok_for_sibcall): Likewise.
13974 (riscv_set_current_function): Add interrupt handler support.
13975 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13976 * config/riscv/riscv.md (UNSPECV_MRET): New.
13978 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13980 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13982 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13984 PR tree-optimization/85712
13985 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13986 this candidate has already been replaced in-situ by a copy.
13988 2018-05-25 Jason Merrill <jason@redhat.com>
13990 PR c++/80485 - inline function non-zero address.
13991 * symtab.c (nonzero_address): Check DECL_COMDAT.
13993 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13996 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13997 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13998 extension of SImode operation. Use const123_operand predicate.
13999 (*saddsi_1): Remove.
14000 (*saddl_se_1): Ditto.
14001 (*ssubsi_1): Ditto.
14002 (*ssubl_se_1): Ditto.
14003 * config/alpha/predicates.md (const123_operand): New predicate.
14004 * config/alpha/constraints.md (P): Use IN_RANGE.
14006 2018-05-25 Richard Biener <rguenther@suse.de>
14008 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14010 (ref_maybe_used_by_stmt_p): Likewise.
14011 (stmt_may_clobber_ref_p): Likewise.
14012 (stmt_may_clobber_ref_p_1): Likewise.
14013 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14015 (ref_maybe_used_by_stmt_p): Likewise.
14016 (stmt_may_clobber_ref_p): Likewise.
14017 (stmt_may_clobber_ref_p_1): Likewise.
14018 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14019 the alias oracle to disambiguate DRs with stmts DR analysis
14021 (vect_analyze_data_refs): Do not give up on not analyzable
14022 DRs for BB vectorization. Remove code truncating the dataref
14025 2018-05-25 Jakub Jelinek <jakub@redhat.com>
14028 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14029 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
14030 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14032 2018-05-25 Richard Biener <rguenther@suse.de>
14034 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14035 function, combining stmt data ref gathering and fatal analysis
14037 (vect_analyze_data_refs): Remove now redudnant code and simplify.
14038 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14039 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14040 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14041 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14043 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14045 PR tree-optimization/85720
14046 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14047 SCC if all partitions are builtins.
14048 (version_loop_by_alias_check): New parameter. Generate cancelable
14049 runtime alias check if all partitions are builtins.
14050 (distribute_loop): Update call to above function.
14052 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14054 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14055 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14056 (parm_default_def_partition_arg): Ditto.
14057 (set_parm_default_def_partition): Ditto.
14058 (get_parm_default_def_partitions): Ditto and make it static.
14059 (get_undefined_value_partitions): Ditto and make it static.
14060 (remove_ssa_form): Refactor call to init_var_map here.
14061 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14062 computation for loop region.
14063 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14064 (register_default_def): Delete.
14065 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14066 (parm_default_def_partition_arg): Ditto.
14067 (set_parm_default_def_partition): Ditto.
14068 (get_parm_default_def_partitions): Ditto and make it static.
14069 (get_undefined_value_partitions): Ditto and make it static.
14070 (coalesce_with_default, coalesce_with_default): Update comment.
14071 (create_coalesce_list_for_region): New func factored out from
14072 create_outofssa_var_map.
14073 (populate_coalesce_list_for_outofssa): New func factored out from
14074 create_outofssa_var_map and coalesce_ssa_name.
14075 (create_outofssa_var_map): Delete.
14076 (coalesce_ssa_name): Refactor to support live range computation.
14077 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14078 (get_parm_default_def_partitions): Delete.
14079 (get_undefined_value_partitions): Ditto.
14080 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14081 computation for loop region.
14082 (new_tree_live_info, loe_visit_block): Ditto.
14083 (live_worklist, set_var_live_on_entry): Ditto.
14084 (calculate_live_on_exit, verify_live_on_entry): Ditto.
14085 * tree-ssa-live.h (struct _var_map): New fields.
14086 (init_var_map): Change decl.
14087 (region_contains_p): New.
14089 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14091 * tree-ssa-live.h (live_merge_and_clear): Delete.
14093 2018-05-25 Richard Biener <rguenther@suse.de>
14096 * tree-dump.c (dequeue_and_dump): Remove access to removed
14097 operand 2 of a SWITCH_EXPR.
14099 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14101 * doc/sourcebuild.texi (vect_double_cond_arith): Include
14102 multiplication and division.
14103 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14104 (cond_udiv@var{m}, cond_umod@var{m}): Document.
14105 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14106 (cond_udiv_optab, cond_umod_optab): New optabs.
14107 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14108 (IFN_COND_RDIV): New internal functions.
14109 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14110 TRUNC_MOD_EXPR and RDIV_EXPR.
14111 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14112 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14114 (SVE_INT_BINARY): Include mult.
14115 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14116 (optab, sve_int_op): Handle mult.
14117 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14119 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14120 for SVE_INT_BINARY_SD.
14122 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14124 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14125 (optab, sve_int_op): Handle div and udiv.
14126 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14127 for SVE_INT_BINARY_SD.
14128 (*<optab><mode>3): New insn for the same.
14130 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14132 * tree-vect-patterns.c: Include predict.h.
14133 (vect_recog_divmod_pattern): Restrict check for division support
14134 to when optimizing for size.
14136 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14138 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14139 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14140 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14141 (gimple_match_op::set_op): Likewise.
14142 (gimple_resimplify4): Declare.
14143 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14144 (expr::gen_transform): Likewise.
14145 (decision_tree::gen): Generate a simplification routine for 4 operands.
14146 * gimple-match-head.c (gimple_simplify): Add an overload for
14147 4 operands. In the top-level function, handle up to 4 call
14148 arguments and call gimple_resimplify4.
14149 (gimple_resimplify4): New function.
14150 (build_call_internal): Pass a fourth operand.
14151 (maybe_push_to_seq): Likewise.
14152 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14153 Fold VEC_COND_EXPRs of an operation and a default value into
14154 an IFN_COND_* function if possible.
14155 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14157 (SVE_COND_FP_BINARY): Include them.
14158 (optab, sve_fp_op): Handle them.
14159 (SVE_INT_BINARY_REV): New code iterator.
14160 (SVE_COND_FP_BINARY_REV): New int iterator.
14161 (commutative): New int attribute.
14162 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14164 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14166 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14167 (*cond_<optab><mode>): New patterns for reversed operands.
14169 2018-05-25 Richard Biener <rguenther@suse.de>
14171 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14172 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14173 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14174 (STMT_VINFO_GROUPED_ACCESS): Adjust.
14175 * tree-vect-data-refs.c (everywhere): Adjust users.
14176 * tree-vect-loop.c (everywhere): Likewise.
14177 * tree-vect-slp.c (everywhere): Likewise.
14178 * tree-vect-stmts.c (everywhere): Likewise.
14179 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14181 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14183 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14185 (gcc_cv_as_section_exclude): ... this.
14186 Try Solaris as #exclude syntax.
14187 * configure: Regenerate.
14188 * config.in: Regenerate.
14189 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14191 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14192 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14194 * varasm.c (default_elf_asm_named_section): Don't check if
14195 HAVE_GAS_SECTION_EXCLUDE is defined.
14197 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14199 * doc/md.texi: Update the documentation of the cond_* optabs
14200 to mention the new final operand. Fix GET_MODE_NUNITS call.
14201 Describe the scalar case too.
14202 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14203 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14205 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14206 (get_conditional_internal_fn): Update comment.
14207 * tree-vect-loop.c (vectorizable_reduction): Pass the original
14208 accumulator value as a final argument to conditional functions.
14209 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14210 a define_expand and add an "else" operand. Assert for now that
14211 the else operand is equal to operand 2. Use SVE_INT_BINARY and
14212 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14213 (*cond_<optab><mode>): New patterns.
14214 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14215 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14216 (UNSPEC_COND_EOR): Delete.
14217 (optab): Remove associated mappings.
14218 (SVE_INT_BINARY): New code iterator.
14219 (sve_int_op): Remove int attribute and add "minus" to the code
14221 (SVE_COND_INT_OP): Delete.
14222 (SVE_COND_FP_OP): Rename to...
14223 (SVE_COND_FP_BINARY): ...this.
14225 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14227 * optabs.c (can_reuse_operands_p): New function.
14228 (maybe_legitimize_operands): Try to reuse the results for
14231 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14233 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14234 Add {q} suffix to insn mnemonic.
14236 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14238 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14239 (msp430_warn_func_return): New.
14241 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
14243 * fold-const.c (tree_nonzero_bits): New function.
14244 * fold-const.h (tree_nonzero_bits): Likewise.
14245 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14246 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14248 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14252 * varasm.c (assemble_alias): Check ifunc_resolver only on
14255 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14258 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14259 when memory input operand is handled.
14261 2018-05-24 Luis Machado <luis.machado@linaro.org>
14263 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14265 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14267 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14269 * match.pd: Delay FMA folds until after vectorization.
14271 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
14274 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14275 address check not strict.
14277 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14279 * gimple-match.h (gimple_match_op): New class.
14280 (mprts_hook): Replace parameters with a gimple_match_op *.
14281 (maybe_build_generic_op): Likewise.
14282 (gimple_simplified_result_is_gimple_val): Replace parameters with
14283 a const gimple_match_op *.
14284 (gimple_simplify): Replace code_helper * and tree * parameters with
14285 a gimple_match_op * parameter.
14286 (gimple_resimplify1): Replace code_helper *, tree and tree *
14287 parameters with a gimple_match_op * parameter.
14288 (gimple_resimplify2): Likewise.
14289 (gimple_resimplify3): Likewise.
14290 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14291 parameters with a gimple_match_op * parameter.
14292 * gimple-match-head.c (gimple_simplify): Change prototypes of
14293 auto-generated functions to take a gimple_match_op * instead of
14294 separate code_helper * and tree * parameters. Make the same
14295 change in the top-level overload and update calls to the
14296 gimple_resimplify routines. Update calls to the auto-generated
14297 functions and to maybe_push_res_to_seq in the publicly-facing
14298 operation-specific gimple_simplify overloads.
14299 (gimple_match_op::MAX_NUM_OPS): Define.
14300 (gimple_resimplify1): Replace rcode and ops with a single res_op
14301 parameter. Update call to gimple_simplify.
14302 (gimple_resimplify2): Likewise.
14303 (gimple_resimplify3): Likewise.
14304 (mprts_hook): Replace parameters with a gimple_match_op *.
14305 (maybe_build_generic_op): Likewise.
14306 (build_call_internal): Replace type, nargs and ops with
14307 a gimple_match_op *.
14308 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14309 with a single gimple_match_op *. Update calls to mprts_hook,
14310 build_call_internal and gimple_simplified_result_is_gimple_val.
14311 Factor out code that is common to the tree_code and combined_fn cases.
14312 * genmatch.c (expr::gen_transform): Replace tem_code and
14313 tem_ops with a gimple_match_op called tem_op. Update calls
14314 to the gimple_resimplify functions and maybe_push_res_to_seq.
14315 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14316 res_ops. Update call to the gimple_resimplify functions.
14317 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14318 (decision_tree::gen): Make the functions take a gimple_match_op *
14319 called res_op instead of separate res_code and res_ops parameters.
14320 Update call accordingly.
14321 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14322 and ops with a single res_op parameter. Update calls to
14323 maybe_build_generic_op and maybe_push_res_to_seq.
14324 (fold_stmt_1): Update calls to gimple_simplify and
14325 replace_stmt_with_simplification.
14326 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14327 and gimple_simplified_result_is_gimple_val.
14328 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14330 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14331 with a gimple_match_op *.
14332 (vn_nary_build_or_lookup): Likewise. Update call to
14333 vn_nary_build_or_lookup_1.
14334 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14335 gimple_match_op *. Update calls to the gimple_resimplify routines
14336 and to gimple_simplified_result_is_gimple_val.
14337 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14338 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14339 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14340 (visit_nary_op): Likewise.
14341 (visit_reference_op_load): Likewise.
14343 2018-05-23 Luis Machado <luis.machado@linaro.org>
14345 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14346 modifier for printing the step amount.
14348 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14351 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14354 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14356 * doc/sourcebuild.texi (Endianness): New subsubsection.
14358 2018-05-23 Luis Machado <luis.machado@linaro.org>
14360 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14361 <prefetch_dynamic_strides>: New const bool field.
14362 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14363 prefetch_dynamic_strides.
14364 (exynosm1_prefetch_tune): Likewise.
14365 (thunderxt88_prefetch_tune): Likewise.
14366 (thunderx_prefetch_tune): Likewise.
14367 (thunderx2t99_prefetch_tune): Likewise.
14368 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14370 (aarch64_override_options_internal): Update to set
14371 PARAM_PREFETCH_DYNAMIC_STRIDES.
14372 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14373 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14374 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14375 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14376 prefetch-dynamic-strides setting.
14378 2018-05-23 Luis Machado <luis.machado@linaro.org>
14380 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14381 <minimum_stride>: New const int field.
14382 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14383 minimum_stride field defaulting to -1.
14384 (exynosm1_prefetch_tune): Likewise.
14385 (thunderxt88_prefetch_tune): Likewise.
14386 (thunderx_prefetch_tune): Likewise.
14387 (thunderx2t99_prefetch_tune): Likewise.
14388 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14389 <default_opt_level>: Set to 3.
14390 (aarch64_override_options_internal): Update to set
14391 PARAM_PREFETCH_MINIMUM_STRIDE.
14392 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14393 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14394 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14395 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14396 stride is constant and is below the minimum stride threshold.
14398 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14400 * config/arm/arm-cpus.in (mode26): Delete.
14401 (armv4): Delete mode26 reference.
14402 * config/arm/arm.c (arm_configure_build_target): Delete use of
14405 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14407 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14409 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14410 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
14412 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
14413 (floatunsdidf2): Ditto.
14415 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14417 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14418 (fixuns_trunc<mode>si2_avx512f): Ditto.
14419 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14420 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14421 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14423 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14425 PR rtl-optimization/79985
14426 * df-scan.c (df_insn_refs_collect): Remove special case for
14427 global registers and asm statements.
14429 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14431 * extend.texi (Global Register Variables): Rewrite the bullet list.
14432 Note that the register is available for allocation. Note that access
14433 via inline asm must use constraints. Add note about async-signal
14434 handlers. Remove paragraph about automagic register selection.
14436 2018-05-23 Richard Biener <rguenther@suse.de>
14438 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14439 of fixed offset from memset VN.
14441 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
14443 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14444 first_interp field.
14445 (alloc_cand_and_find_basis): Initialize first_interp field.
14446 (slsr_process_mul): Modify first_interp field.
14447 (slsr_process_add): Likewise.
14448 (slsr_process_cast): Modify first_interp field for each new
14450 (slsr_process_copy): Likewise.
14451 (dump_candidate): Dump first_interp field.
14452 (replace_mult_candidate): Process all interpretations, not just
14454 (replace_rhs_if_not_dup): Likewise.
14455 (replace_one_candidate): Likewise.
14457 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
14459 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14461 (aarch64_needs_frame_chain): New function.
14462 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14464 2018-05-23 Sudakshina Das <sudi.das@arm.com>
14467 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14468 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14469 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14470 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14471 as true for strict-align.
14472 (aarch64_can_inline_p): Perform checks even when callee has no
14473 attributes to check for strict alignment.
14474 * doc/extend.texi (AArch64 Function Attributes): Document
14476 * doc/invoke.texi: (AArch64 Options): Likewise.
14478 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14480 PR tree-optimization/85853
14481 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14482 the handling of the root of the node to...
14483 (vect_slp_analyze_node_operations_1): ...this new function,
14484 and run the whole thing with the child nodes' def types
14485 set according to their SLP node's def type.
14487 2018-05-23 Richard Biener <rguenther@suse.de>
14489 PR middle-end/85874
14490 * tree-data-ref.c (create_runtime_alias_checks): Defer
14491 and ignore overflow warnings.
14493 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14495 PR tree-optimization/85822
14496 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14499 2018-05-23 Richard Biener <rguenther@suse.de>
14501 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14502 memset constants via native_interpret_expr.
14504 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14507 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14509 (cgraph_node::create_alias): Likewise.
14510 (cgraph_node::get_availability): Check ifunc_resolver instead
14511 of looking up ifunc attribute.
14512 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14513 * varasm.c (do_assemble_alias): Likewise.
14514 (assemble_alias): Likewise.
14515 (default_binds_local_p_3): Likewise.
14516 * cgraph.h (cgraph_node): Add ifunc_resolver.
14517 (cgraph_node::only_called_directly_or_aliased_p): Return false
14518 for IFUNC resolver.
14519 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14521 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14522 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14523 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14524 instead of looking up ifunc attribute.
14526 2018-05-22 Luis Machado <luis.machado@linaro.org>
14528 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14530 2018-05-22 Martin Sebor <msebor@redhat.com>
14532 PR middle-end/85359
14533 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14534 only when expasion succeeds.
14535 (expand_builtin_strcmp): Same.
14536 (expand_builtin_strncmp): Same.
14538 2018-05-22 Martin Sebor <msebor@redhat.com>
14540 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14542 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14543 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14545 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14546 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14548 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14549 Add check for legitimate_address.
14550 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14551 (aarch64_swap_ldrstr_operands): New.
14552 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14555 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14556 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14558 * config/aarch64/aarch64.md: New patterns to generate stp
14560 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14561 single words and double words.
14562 (load_pair_sw, load_pair_dw): Likewise.
14563 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14565 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14567 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14568 for different mode ldpstp and add peephole for merged zero stores.
14569 Likewise for loads.
14570 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14572 (aarch64_gen_store_pair): Rename calls to match new patterns.
14573 (aarch64_gen_load_pair): Rename calls to match new patterns.
14574 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14575 (load_pair<DREG:mode><DREG2:mode>): ... This.
14576 (store_pair<mode>): Rename to...
14577 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14578 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14579 New mode iterators.
14580 (V_INT_EQUIV): Handle SImode.
14581 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14584 2018-05-22 Martin Sebor <msebor@redhat.com>
14587 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14588 or ajust the presumed bound on an operation to avoid unnecessary
14591 2018-05-22 Martin Sebor <msebor@redhat.com>
14593 PR tree-optimization/85826
14594 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14595 assuming that a DECL necesarily has a constant size.
14597 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14599 PR middle-end/85862
14600 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14602 2018-05-22 Richard Biener <rguenther@suse.de>
14604 PR tree-optimization/85834
14605 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14606 non-constant and non-zero memset arguments.
14608 2018-05-22 Martin Liska <mliska@suse.cz>
14611 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14613 2018-05-22 Richard Biener <rguenther@suse.de>
14615 PR tree-optimization/85863
14616 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14617 comparisons when vectype is specified.
14618 (vectorizable_condition): Do not specify vectype for
14619 vect_is_simple_cond when SLP vectorizing.
14621 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14624 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14625 define __ibm128 as long double.
14626 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14627 as a distinct type when IEEE 128-bit support is enabled.
14628 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14629 128-bit types to use the correct functions.
14630 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14631 convert between 128-bit floating point types that have different
14632 modes but the same representation, instead of using gen_lowpart to
14634 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14636 (IFKF_reg): New attributes to give the register constraints for
14638 (extend<mode>tf2_internal): New insns to mark an explicit
14639 conversion between 128-bit floating point types that have a
14640 different mode but share the same representation.
14642 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14644 PR tree-optimization/85814
14645 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14646 a null return from get_strinfo when unsharing the next
14647 strinfo in the chain.
14649 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14652 * varasm.c (weak_finish): Clean up weak_decls.
14654 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14656 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14657 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14658 UNSPEC_UADALP values.
14659 * config/aarch64/iterators.md (ABAL): New int iterator.
14662 (sur): Add mappings for the above.
14663 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14665 (aarch64_<sur>abal<mode>_4): Likewise.
14666 (aarch64_<sur>adalp<mode>_3): Likewise.
14667 (<sur>sadv16qi): New define_expand.
14669 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14671 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14672 (*movdf_internal): Ditto.
14673 (*rcpsf2_sse): Ditto.
14674 (*rsqrtsf2_sse): Ditto.
14675 (*sqrt<mode>2_sse): Ditto.
14677 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14679 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14681 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14682 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14683 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14684 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14686 * config/aarch64/arm_neon.h: Likewise.
14687 * config/aarch64/iterators.md (VQ_I): New.
14689 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14691 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14693 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14696 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14698 * config/nds32/constraints.md (S): New constraint.
14699 * config/nds32/nds32.md (call_internal): Use constraint S.
14700 (call_value_internal): Likewise.
14701 (sibcall_internal): Likewise.
14702 (sibcall_value_internal): Likewise.
14704 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14705 Chung-Ju Wu <jasonwucj@gmail.com>
14707 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14708 into consideration.
14710 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14711 Chung-Ju Wu <jasonwucj@gmail.com>
14713 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14714 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14715 (nds32_rtx_costs_impl): Simplify.
14716 (nds32_address_cost_impl): Simplify.
14717 (nds32_init_rtx_costs): New function.
14718 (nds32_rtx_costs_speed_prefer): Likewise.
14719 (nds32_rtx_costs_size_prefer): Likewise.
14720 (nds32_address_cost_speed_prefer): Likewise.
14721 (nds32_address_cost_speed_fwprop): Likewise.
14722 (nds32_address_cost_size_prefer): Likewise.
14723 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14724 * config/nds32/nds32.c (nds32_option_override): Use
14725 nds32_init_rtx_costs function.
14727 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14729 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14730 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14731 (TARGET_PIPELINE_N8): Likewise.
14732 (TARGET_PIPELINE_N10): Likewise.
14733 (TARGET_PIPELINE_N13): Likewise.
14734 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14736 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14738 * config/nds32/nds32-fpu.md: Update copyright year.
14740 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14742 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14744 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14746 * config/nds32/nds32.c
14747 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14748 * config/nds32/nds32.opt (minline-asm-r15): New option.
14750 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14752 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14754 * config/nds32/nds32.md (abssi2): New pattern.
14756 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14758 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14759 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14760 Merge insn pattern from sse_cvtsi2ss<round_name> and
14761 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14762 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14763 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14764 using SWI48 mode iterator.
14765 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14766 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14767 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14768 pattern from sse_cvttss2si<round_saeonly_name>
14769 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14770 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14771 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14772 using SWI48 mode iterator.
14773 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14774 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14775 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14776 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14777 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14778 using SWI48 mode iterator.
14779 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14780 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14781 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14782 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14783 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14784 SWI48 mode iterator.
14785 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14786 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14787 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14788 pattern from sse_cvttsd2si<round_saeonly_name>
14789 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14791 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14793 * config/nds32/nds32-md-auxiliary.c
14794 (nds32_valid_smw_lwm_base_p): Refine.
14795 (nds32_output_smw_single_word): Refine.
14796 (nds32_output_smw_double_word): New.
14797 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14799 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14801 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14802 (nds32_output_stack_pop): Refine.
14803 (nds32_expand_unaligned_load): Refine.
14804 (nds32_expand_unaligned_store): Refine.
14806 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14807 Chung-Ju Wu <jasonwucj@gmail.com>
14809 * config/nds32/constants.md: Add TP_REGNUM constant.
14810 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14811 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14813 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14814 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14815 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14816 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14817 and PIC code generation.
14818 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14820 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14822 * config/nds32/nds32.md: Support TLS and PIC.
14823 * config/nds32/nds32.c: Support TLS and PIC.
14824 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14825 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14828 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14830 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14831 mode with E_ prefix.
14833 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14834 Chung-Ju Wu <jasonwucj@gmail.com>
14836 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14837 * config/nds32/nds32-md-auxiliary.c
14838 (symbolic_reference_mentioned_p): New.
14839 (nds32_legitimize_ict_address): New.
14840 (nds32_expand_ict_move): New.
14841 (nds32_indirect_call_referenced_p): New.
14842 (nds32_symbol_binds_local_p): Delete.
14843 (nds32_long_call_p): Modify.
14844 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14845 * config/nds32/nds32-protos.h
14846 (symbolic_reference_mentioned_p): Declare.
14847 (nds32_legitimize_ict_address): Declare.
14848 (nds32_expand_ict_move): Declare.
14849 (nds32_indirect_call_referenced_p): Declare.
14850 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14851 (nds32_relax_group): Use nds32_ict_const_p as condition.
14852 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14853 (nds32_asm_file_start): Output ict_model directive in asm code.
14854 (nds32_legitimate_address_p): Consider indirect call.
14855 (nds32_print_operand): Consider indirect call.
14856 (nds32_print_operand_address): Consider indirect call.
14857 (nds32_insert_attributes): Handle "indirect_call" attribute.
14858 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14859 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14860 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14861 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14862 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14863 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14864 (TARGET_ICT_MODEL_SMALL): Define.
14865 (TARGET_ICT_MODEL_LARGE): Define.
14866 * config/nds32/nds32.md (movsi): Consider ict model.
14867 (call, call_value): Consider ict model.
14868 (sibcall, sibcall_value): Consider ict model.
14869 * config/nds32/nds32.opt (mict-model): New option.
14870 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14873 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14874 Monk Chiang <sh.chiang04@gmail.com>
14875 Jim Wilson <jimw@sifive.com>
14877 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14878 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14879 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14880 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14881 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14882 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14883 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14884 compute save_libcall_adjustment properly.
14885 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14886 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14887 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14888 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14889 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14890 (ABI_SPEC): Handle mabi=ilp32e.
14891 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14892 (RVE): Add RVE mask.
14893 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14894 <-march>: Add rv32e as an example.
14896 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14899 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14900 (intra_create_variable_infos): Handle C++ constructors.
14902 2018-05-18 Martin Liska <mliska@suse.cz>
14904 * passes.def: Remove a redundant pass.
14906 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14909 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14911 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14913 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14915 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14917 (armv2, armv2a, armv3, armv3m): Delete architectures.
14918 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14919 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14920 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14922 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14923 (*mulsidi3adddi): Likewise.
14924 (mulsidi3): Likewise.
14925 (*mulsidi3_nov6): Likewise.
14926 (umulsidi3): Likewise.
14927 (umulsidi3_nov6): Likewise.
14928 (umaddsidi4): Likewise.
14929 (*umulsidi3adddi): Likewise.
14930 (smulsi3_highpart): Likewise.
14931 (*smulsi3_highpart_nov6): Likewise.
14932 (umulsi3_highpart): Likewise.
14933 (*umulsi3_highpart_nov6): Likewise.
14934 * config/arm/arm.h (arm_arch3m): Delete.
14935 * config/arm/arm.c (arm_arch3m): Delete.
14936 (arm_option_override_internal): Update armv3-related comment.
14937 (arm_configure_build_target): Delete use of isa_bit_mode32.
14938 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14939 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14940 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14941 (mulsa3): Likewise.
14942 (mulusa3): Likewise.
14943 * config/arm/arm-protos.h (arm_arch3m): Delete.
14944 * config/arm/arm-tables.opt: Regenerate.
14945 * config/arm/arm-tune.md: Likewise.
14946 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14947 deleted architectures.
14949 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14951 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14952 (armv5t, armv5te): New features.
14953 (ARMv5, ARMv5e): Delete fgroups.
14954 (ARMv5t, ARMv5te): Adjust for above changes.
14955 (ARMv6m): Likewise.
14956 (armv5, armv5e): Delete arches.
14957 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14959 (*call_reg_arm): Likewise.
14960 (*call_value_reg_armv5): Likewise.
14961 (*call_value_reg_arm): Likewise.
14962 (*call_symbol): Likewise.
14963 (*call_value_symbol): Likewise.
14964 (*sibcall_insn): Likewise.
14965 (*sibcall_value_insn): Likewise.
14966 (clzsi2): Likewise.
14967 (prefetch): Likewise.
14968 (define_split and define_peephole2 dependent on arm_arch5):
14970 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14972 (TARGET_ARM_QBIT): Likewise.
14973 (TARGET_DSP_MULTIPLY): Likewise.
14974 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14975 (arm_arch5, arm_arch5e): Delete.
14976 (arm_arch5t, arm_arch5te): Declare.
14977 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14978 (arm_arch5t): Declare.
14979 (arm_option_reconfigure_globals): Update for the above.
14980 (arm_options_perform_arch_sanity_checks): Update comment, replace
14981 use of arm_arch5 with arm_arch5t.
14982 (use_return_insn): Likewise.
14983 (arm_emit_call_insn): Likewise.
14984 (output_return_instruction): Likewise.
14985 (arm_final_prescan_insn): Likewise.
14986 (arm_coproc_builtin_available): Likewise.
14987 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14988 arm_arch5e with arm_arch5t and arm_arch5te.
14989 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14990 (arm_arch5t, arm_arch5te): Declare.
14991 * config/arm/arm-tables.opt: Regenerate.
14992 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14993 * config/arm/t-multilib: Likewise.
14994 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14995 instead of arm_arch5.
14996 (*call_reg_thumb1): Likewise.
14997 (*call_value_reg_thumb1_v5): Likewise.
14998 (*call_value_reg_thumb1): Likewise.
14999 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15001 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15003 2018-05-18 Martin Liska <mliska@suse.cz>
15005 PR gcov-profile/84846
15006 * doc/gcov.texi: Document -t option of gcov tool.
15008 2018-05-18 Martin Liska <mliska@suse.cz>
15010 PR gcov-profile/84846
15011 * gcov.c (print_usage): Add new -t option.
15012 (process_args): Handle the option.
15013 (generate_results): Use stdout as output when requested by
15016 2018-05-18 Martin Liska <mliska@suse.cz>
15018 PR gcov-profile/84846
15019 * coverage.c (coverage_init): Write PWD to .gcno file.
15020 * doc/gcov.texi: Document how working directory is printed.
15021 * gcov-dump.c (dump_gcov_file): Print PWD.
15022 * gcov.c (output_intermediate_file): Likewise.
15023 (read_graph_file): Read PWD string.
15024 (output_lines): Print PWD.
15026 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15028 PR middle-end/85817
15029 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15030 for retval and return false if all args to phi are zero.
15032 2018-05-18 Richard Biener <rguenther@suse.de>
15034 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15036 (evrp_dom_walker::before_dom_children): Call it.
15038 2018-05-18 Richard Biener <rguenther@suse.de>
15040 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15041 results when processing array refs with variable index.
15043 2018-05-18 Toon Moene <toon@moene.org>
15045 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15046 directly after that of -floop-interchange. Indicate that both
15047 options are enabled by default when specifying -O3.
15049 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15051 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15052 iterator. Delete separate integer-mode vec_set<mode> expander.
15053 (aarch64_simd_vec_setv2di): Delete.
15054 (vec_setv2di): Delete.
15055 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15056 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
15057 the "w, r" alternative.
15059 2018-05-18 Martin Liska <mliska@suse.cz>
15061 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15062 * tree-pass.h (make_pass_lower_switch_O0): New function.
15063 * tree-switch-conversion.c (node_has_low_bound): Remove.
15064 (node_has_high_bound): Likewise.
15065 (node_is_bounded): Likewise.
15066 (class pass_lower_switch): Make it a template type and create
15068 (pass_lower_switch::execute): Add template argument.
15069 (make_pass_lower_switch): New function.
15070 (make_pass_lower_switch_O0): New function.
15071 (do_jump_if_equal): Remove.
15072 (emit_case_nodes): Simplify to just handle all 3 cases and leave
15073 all the hard work to tree optimization passes.
15075 2018-05-18 Martin Liska <mliska@suse.cz>
15077 * dbgcnt.c (limit_low): Renamed from limit.
15078 (limit_high): New variable.
15079 (dbg_cnt_is_enabled): Check for upper limit.
15080 (dbg_cnt): Adjust dumping.
15081 (dbg_cnt_set_limit_by_index): Add new argument for high
15083 (dbg_cnt_set_limit_by_name): Likewise.
15084 (dbg_cnt_process_single_pair): Parse new format.
15085 (dbg_cnt_process_opt): Use strtok.
15086 (dbg_cnt_list_all_counters): Remove 'value' and add
15088 * doc/invoke.texi: Document changes.
15090 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
15092 * doc/sourcebuild.texi (scalar_all_fma): Document.
15093 * tree.def (FMA_EXPR): Delete.
15094 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15095 * internal-fn.c (ternary_direct): New macro.
15096 (expand_ternary_optab_fn): Likewise.
15097 (direct_ternary_optab_supported_p): Likewise.
15098 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15099 * builtins.c (fold_builtin_fma): Delete.
15100 (fold_builtin_3): Don't call it.
15101 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15102 * expr.c (expand_expr_real_2): Likewise.
15103 * fold-const.c (operand_equal_p): Likewise.
15104 (fold_ternary_loc): Likewise.
15105 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15106 * gimple.c (DEFTREECODE): Likewise.
15107 * gimplify.c (gimplify_expr): Likewise.
15108 * optabs-tree.c (optab_for_tree_code): Likewise.
15109 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15110 * tree-eh.c (operation_could_trap_p): Likewise.
15111 (stmt_could_throw_1_p): Likewise.
15112 * tree-inline.c (estimate_operator_cost): Likewise.
15113 * tree-pretty-print.c (dump_generic_node): Likewise.
15114 (op_code_prio): Likewise.
15115 * tree-ssa-loop-im.c (stmt_cost): Likewise.
15116 * tree-ssa-operands.c (get_expr_operands): Likewise.
15117 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15118 * fold-const-call.h (fold_fma): Delete.
15119 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15120 CFN_FNMA and CFN_FNMS.
15121 (fold_fma): Delete.
15122 * genmatch.c (combined_fn): New enum.
15123 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15124 (commutative_op): New function.
15125 (commutate): Use it. Handle more than 2 operands.
15126 (dt_operand::gen_gimple_expr): Use commutative_op.
15127 (parser::parse_expr): Allow :c to be used with non-binary
15128 operators if the commutative operand is known.
15129 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15130 CFN_FMS, CFN_FNMA and CFN_FNMS.
15131 (backprop::process_assign_use): Remove FMA_EXPR handling.
15132 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15133 (gen_hsa_fma): New function.
15134 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15135 IFN_FNMA and IFN_FNMS.
15136 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15137 * gimple-fold.h (follow_all_ssa_edges): Declare.
15138 * gimple-fold.c (follow_all_ssa_edges): New function.
15139 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15140 gimple_build interface and use follow_all_ssa_edges to fold the result.
15141 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15142 instead of checking for optabs directly.
15143 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15144 rather than FMA_EXPRs.
15145 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15146 call to IFN_FMA instead of an FMA_EXPR.
15148 2018-05-17 Jim Wilson <jimw@sifive.com>
15150 * expr.c (do_tablejump): When converting index to Pmode, if we have a
15151 sign extended promoted subreg, and the range does not have the sign bit
15152 set, then do a sign extend.
15154 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15155 test, check for sign extended subreg and/or constant operands, and
15156 do a sign extend in that case.
15158 2018-05-17 Steve Ellcey <sellcey@cavium.com>
15160 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15161 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15163 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15164 Change logics_shift_reg to logics_shift_imm.
15165 (thunderx2t99_fp_loadpair_basic): Delete.
15166 (thunderx2t99_fp_storepair_basic): Delete.
15167 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15168 (thunderx2t99_asimd_polynomial): Delete.
15169 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15170 and neon_fp_mul_d_scalar_q.
15171 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15172 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15173 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15174 (thunderx2t99_asimd_lut): Add missing tbl types.
15175 (thunderx2t99_asimd_ext): Delete.
15176 (thunderx2t99_asimd_load1_1_mult): Delete.
15177 (thunderx2t99_asimd_load1_2_mult): Delete.
15178 (thunderx2t99_asimd_load1_ldp): New.
15179 (thunderx2t99_asimd_load1): New.
15180 (thunderx2t99_asimd_load2): Add missing *load2* types.
15181 (thunderx2t99_asimd_load3): New.
15182 (thunderx2t99_asimd_load4): New.
15183 (thunderx2t99_asimd_store1_1_mult): Delete.
15184 (thunderx2t99_asimd_store1_2_mult): Delete.
15185 (thunderx2t99_asimd_store2_mult): Delete.
15186 (thunderx2t99_asimd_store2_onelane): Delete.
15187 (thunderx2t99_asimd_store_stp): New.
15188 (thunderx2t99_asimd_store1): New.
15189 (thunderx2t99_asimd_store2): New.
15190 (thunderx2t99_asimd_store3): New.
15191 (thunderx2t99_asimd_store4): New.
15193 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
15195 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15196 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
15198 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
15199 Segher Boessenkool <segher@kernel.crashing.org>
15202 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15205 2018-05-17 Richard Biener <rguenther@suse.de>
15207 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15208 for pruning loop and prune defs feeding only already visited PHIs.
15210 2018-05-17 Richard Biener <rguenther@suse.de>
15212 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15214 2018-05-17 Bin Cheng <bin.cheng@arm.com>
15215 Richard Biener <rguenther@suse.de>
15217 PR tree-optimization/85793
15218 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15219 for VMAT_ELEMENTWISE.
15221 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15223 * internal-fn.h (lookup_internal_fn): Declare
15224 * internal-fn.c (lookup_internal_fn): New function.
15225 * gimple.c (gimple_build_call_from_tree): Handle calls to
15226 internal functions.
15227 * gimple-pretty-print.c (dump_gimple_call): Print "." before
15228 internal function names.
15229 * tree-pretty-print.c (dump_generic_node): Likewise.
15230 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15232 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15234 * gimple-fold.h (gimple_build): Make the function forms take
15235 combined_fn rather than built_in_function.
15236 (gimple_simplify): Likewise.
15237 * gimple-match-head.c (gimple_simplify): Likewise.
15238 * gimple-fold.c (gimple_build): Likewise.
15239 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15240 rather than gimple_build_call_internal.
15241 (get_initial_defs_for_reduction): Likewise.
15242 (vect_create_epilog_for_reduction): Likewise.
15243 (vectorizable_live_operation): Likewise.
15245 2018-05-17 Martin Liska <mliska@suse.cz>
15247 * gimple-ssa-sprintf.c (format_directive): Do not use
15248 space in between 'G_' and '('.
15250 2018-05-17 Jakub Jelinek <jakub@redhat.com>
15253 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15254 even if the mask is not all ones.
15257 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15259 (ix86_gimple_fold_builtin): Likewise.
15262 * config/i386/i386.c: Include tree-vector-builder.h.
15263 (ix86_vector_shift_count): New function.
15264 (ix86_fold_builtin): Fold shift builtins by scalar count.
15265 (ix86_gimple_fold_builtin): Likewise.
15267 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15268 _mm512_setzero): New intrinsics.
15270 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
15271 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15273 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15274 code generation for cases where splatting a value is not useful.
15275 * simplify-rtx.c (simplify_ternary_operation): Simplify
15276 vec_merge across a vec_duplicate and a paradoxical subreg forming
15277 a vector mode to a vec_concat.
15279 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
15281 * config.gcc: Support "goldmont-plus".
15282 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15284 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15285 PROCESSOR_GOLDMONT_PLUS.
15286 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15287 (processor_target_table): Add "goldmont-plus".
15288 (PTA_GOLDMONT_PLUS): Define.
15289 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15290 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15291 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15292 (fold_builtin_cpu): Add "goldmont-plus".
15293 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15294 (ix86_option_override_internal): Add "goldmont-plus".
15295 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15296 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15297 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15298 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15300 2018-05-17 Richard Biener <rguenther@suse.de>
15302 PR tree-optimization/85757
15303 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15304 remove defs that only feed that PHI from further processing.
15306 2018-05-16 Jim Wilson <jimw@sifive.com>
15308 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15310 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15312 2018-05-16 Mark Wielaard <mark@klomp.org>
15314 * dwarf2out.c (count_index_strings): New function.
15315 (output_indirect_strings): Call count_index_strings and generate
15316 header for dwarf_version >= 5.
15318 2018-05-16 Mark Wielaard <mark@klomp.org>
15320 * dwarf2out.c (dwarf_FORM): New function.
15321 (set_indirect_string): Use dwarf_FORM.
15322 (reset_indirect_string): Likewise.
15323 (size_of_die): Likewise.
15324 (value_format): Likewise.
15325 (output_die): Likewise.
15326 (add_skeleton_AT_string): Likewise.
15327 (output_macinfo_op): Likewise.
15328 (index_string): Likewise.
15329 (output_index_string_offset): Likewise.
15330 (output_index_string): Likewise.
15331 (count_index_strings): Likewise.
15333 2018-05-16 Carl Love <cel@us.ibm.com>
15335 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15336 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15338 2018-05-16 Martin Jambor <mjambor@suse.cz>
15340 * ipa-prop.c (ipa_free_all_edge_args): Remove.
15341 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15343 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15345 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15346 (fnma<mode>4): Likewise.
15347 (fms<mode>4): Likewise.
15348 (fnms<mode>4): Likewise.
15349 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15350 (aarch64_fnma<mode>4): Likewise.
15351 (aarch64_fms<mode>4): Likewise.
15352 (aarch64_fnms<mode>4): Likewise.
15353 (aarch64_fnmadd<mode>4): Likewise.
15355 2018-05-16 Jason Merrill <jason@redhat.com>
15357 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15359 2018-05-16 Richard Biener <rguenther@suse.de>
15361 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15362 (dump_stmt_cost): Declare.
15363 (add_stmt_cost): Dump cost we add.
15364 (add_stmt_costs): New function.
15365 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15366 No longer exported.
15367 (vect_analyze_stmt): Adjust prototype.
15368 (vectorizable_condition): Likewise.
15369 (vectorizable_live_operation): Likewise.
15370 (vectorizable_reduction): Likewise.
15371 (vectorizable_induction): Likewise.
15372 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15373 cost vector to pass to vectorizable_ and record afterwards.
15374 (vect_model_reduction_cost): Take cost vector argument and adjust.
15375 (vect_model_induction_cost): Likewise.
15376 (vectorizable_reduction): Likewise.
15377 (vectorizable_induction): Likewise.
15378 (vectorizable_live_operation): Likewise.
15379 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15380 SLP_TREE_NUMBER_OF_VEC_STMTS.
15381 (vect_analyze_slp_cost_1): Remove.
15382 (vect_analyze_slp_cost): Likewise.
15383 (vect_slp_analyze_node_operations): Take visited args and
15384 a target cost vector. Avoid processing already visited stmt sets.
15385 (vect_slp_analyze_operations): Use a local cost vector to gather
15386 costs and register those of non-discarded instances.
15387 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15388 (vect_schedule_slp_instance): Remove copying of
15389 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15391 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15392 adding cost. Record cost entry location.
15393 (vect_prologue_cost_for_slp_op): Function to compute cost of
15394 a constant or invariant generated for SLP vect in the prologue,
15395 split out from vect_analyze_slp_cost_1.
15396 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15397 (vect_model_promotion_demotion_cost): Likewise.
15398 (vect_model_store_cost): Likewise, make static.
15399 (vect_model_load_cost): Likewise.
15400 (vectorizable_bswap): Add cost vector arg and adjust.
15401 (vectorizable_call): Likewise.
15402 (vectorizable_simd_clone_call): Likewise.
15403 (vectorizable_conversion): Likewise.
15404 (vectorizable_assignment): Likewise.
15405 (vectorizable_shift): Likewise.
15406 (vectorizable_operation): Likewise.
15407 (vectorizable_store): Likewise.
15408 (vectorizable_load): Likewise.
15409 (vectorizable_condition): Likewise.
15410 (vectorizable_comparison): Likewise.
15411 (can_vectorize_live_stmts): Likewise.
15412 (vect_analyze_stmt): Likewise.
15413 (vect_transform_stmt): Adjust calls to vectorizable_*.
15414 * tree-vectorizer.c: Include gimple-pretty-print.h.
15415 (dump_stmt_cost): New function.
15417 2018-05-16 Richard Biener <rguenther@suse.de>
15419 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15420 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15421 * tree-ssa-dse.c: Include tree-ssa-loop.h.
15422 (check_name): New callback.
15423 (dse_classify_store): Track cycles via a visited bitmap of PHI
15424 defs and simplify handling of in-loop and across loop dead stores
15425 and properly fail for loop-variant refs. Handle byte-tracking with
15426 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15429 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
15431 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15432 (vect_get_mask_type_for_stmt): Likewise.
15433 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15435 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
15436 to determine the statement's vector type and the vector type that
15437 should be used for calculating nunits. Deal with cases in which
15438 the type has to be deferred.
15439 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15440 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15441 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15442 (vect_determine_vf_for_stmt): New functions, split out from...
15443 (vect_determine_vectorization_factor): ...here.
15444 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15445 (vect_get_mask_type_for_stmt): New functions, split out from
15446 vect_determine_vectorization_factor.
15448 2018-05-16 Richard Biener <rguenther@suse.de>
15450 * tree-cfg.c (verify_gimple_assign_ternary): Properly
15451 verify the [VEC_]COND_EXPR embedded comparison.
15453 2018-05-15 Martin Sebor <msebor@redhat.com>
15455 PR tree-optimization/85753
15456 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15457 RECORD_TYPE in addition to ARRAY_TYPE.
15459 2018-05-15 Martin Sebor <msebor@redhat.com>
15461 PR middle-end/85643
15462 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15464 2018-05-15 Richard Biener <rguenther@suse.de>
15466 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15467 add by_clobber_p one. Change algorithm to collect all defs
15468 representing uses we need to walk and try reducing them to
15469 a single one before failing.
15470 (dse_dom_walker::dse_optimize_stmt): Adjust.
15472 2018-05-13 Mark Wielaard <mark@klomp.org>
15474 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15475 (size_of_loc_descr): Likewise.
15476 (output_loc_operands): Likewise.
15477 (output_loc_operands_raw): Likewise.
15478 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15479 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15480 (hash_loc_operands): Likewise.
15481 (compare_loc_operands): Likewise.
15483 2018-05-14 Mark Wielaard <mark@klomp.org>
15485 * dwarf2out.c (count_index_addrs): New function.
15486 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15488 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15490 PR tree-optimization/83648
15491 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15492 return value as malloc candidate.
15494 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15497 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15498 param as true in call to suggest_attribute.
15500 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15502 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15503 -mreadonly-in-sdata.
15505 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15507 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15509 (aarch64_crypto_aesd_fused): Likewise.
15511 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15513 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15514 (movsi_aarch64): Likewise.
15515 (load_pairsi): Likewise.
15516 (load_pairdi): Likewise.
15517 (store_pairsi): Likewise.
15518 (store_pairdi): Likewise.
15519 (load_pairsf): Likewise.
15520 (load_pairdf): Likewise.
15521 (store_pairsf): Likewise.
15522 (store_pairdf): Likewise.
15523 (zero_extend): Likewise.
15524 (trunc): Swap alternatives.
15525 (fcvt_target): Add '?' to prefer w over r.
15527 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15530 * config/i386/i386.md: Disallow non-commutative arithmetics in
15531 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15532 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15533 in the peephole2 before it.
15535 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15537 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15538 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15539 (ix86_handle_option): Handle -mcldemote.
15540 * config.gcc: New header.
15541 * config/i386/cldemoteintrin.h: New file.
15542 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15543 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15545 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15546 OPTION_MASK_ISA_CLDEMOTE.
15547 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15548 (ix86_valid_target_attribute_inner_p): Ditto.
15549 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15550 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15551 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15552 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15553 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15555 * config/i386/i386.opt: Add -mcldemote.
15556 * config/i386/x86intrin.h: New header.
15557 * doc/invoke.texi: Add -mcldemote.
15559 2018-05-14 Richard Biener <rguenther@suse.de>
15561 * doc/match-and-simplify.texi: Adjust :s documentation.
15563 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15565 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15566 intended memcpy size.
15567 (REORDER_45): Likewise.
15569 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15571 * sort.cc: New file.
15572 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15573 * vec.c (qsort_chk): Use gcc_qsort.
15574 * Makefile.in (OBJS-libcommon): Add sort.o.
15575 (build/sort.o): New target. Use it...
15576 (BUILD_RTL): ... here, and...
15577 (build/gencfn-macros): ... here, and...
15578 (build/genmatch): ... here.
15580 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15581 Chung-Ju Wu <jasonwucj@gmail.com>
15583 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15584 * config/nds32/nds32-graywolf.md: New file.
15585 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15586 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15588 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15589 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15590 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15591 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15592 * config/nds32/pipelines.md: Include n15 settings.
15594 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15595 Chung-Ju Wu <jasonwucj@gmail.com>
15597 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15598 * config/nds32/nds32-n13.md: New file.
15599 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15600 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15602 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15603 * config/nds32/nds32.md (pipeline_model): Add n13.
15604 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15605 * config/nds32/pipelines.md: Include n13 settings.
15607 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15608 Chung-Ju Wu <jasonwucj@gmail.com>
15610 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15611 * config/nds32/nds32-n10.md: New file.
15612 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15613 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15615 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15616 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15617 * config/nds32/nds32.md (pipeline_model): Add n10.
15618 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15619 * config/nds32/pipelines.md: Include n10 settings.
15621 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15622 Kito Cheng <kito.cheng@gmail.com>
15623 Chung-Ju Wu <jasonwucj@gmail.com>
15625 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15626 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15627 Add enum values for DSP extension instructions.
15628 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15630 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15631 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15632 New code iterators.
15633 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15634 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15635 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15636 * config/nds32/nds32-intrinsic.md: Likewise.
15637 * config/nds32/nds32_intrinsic.h: Likewise.
15638 * config/nds32/nds32-md-auxiliary.c: Likewise.
15639 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15640 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15641 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15642 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15643 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15644 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15645 TYPE_DMAC in switch statement.
15646 * config/nds32/nds32.c: New checking and implementation for DSP
15647 extension instructions.
15648 * config/nds32/nds32.h: Likewise.
15649 * config/nds32/nds32.md: Likewise.
15650 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15651 * config/nds32/predicates.md: Implement new predicates for DSP
15654 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15656 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15657 Reformat alternatives and attributes so it is easier to identify
15658 which constraints/attributes go with which instruction.
15659 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15660 (mov<mode>_softfloat32, FMOVE64): Likewise.
15661 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15662 (mov<mode>_softfloat64, FMOVE64): Likewise.
15664 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15666 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15668 (Basic PowerPC Built-in Functions): The new name of the
15669 subsection previously known as "PowerPC Built-in Functions".
15670 (Basic PowerPC Built-in Functions Available on all Configurations):
15672 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15673 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15674 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15675 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15677 2018-05-11 Martin Jambor <mjambor@suse.cz>
15680 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15683 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15686 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15688 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15690 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15691 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15692 (ix86_handle_option): Handle -mwaitpkg.
15693 * config.gcc: New header.
15694 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15695 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15696 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15698 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15699 OPTION_MASK_ISA_WAITPKG.
15700 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15701 (ix86_option_override_internal): Add PTA_WAITPKG.
15702 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15703 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15704 IX86_BUILTIN_TPAUSE.
15705 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15706 __builtin_ia32_umwait and __builtin_ia32_tpause.
15707 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15708 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15709 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15710 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15711 UNSPECV_TPAUSE): New.
15712 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15713 * config/i386/i386.opt: Add -mwaitpkg.
15714 * config/i386/waitpkgintrin.h: New file.
15715 * config/i386/x86intrin.h: New header.
15716 * doc/invoke.texi: Add -mwaitpkg.
15718 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15721 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15723 (cortex-m0): Use armv6s-m isa.
15724 (cortex-m0plus): Likewise.
15725 (cortex-m1): Likewise.
15726 (cortex-m0.small-multiply): Likewise.
15727 (cortex-m0plus.small-multiply): Likewise.
15728 (cortex-m1.small-multiply): Likewise.
15730 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15731 Jakub Jelinek <jakub@redhat.com>
15733 PR tree-optimization/85692
15734 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15735 source permute as well.
15737 2018-05-11 Martin Liska <mliska@suse.cz>
15740 * doc/extend.texi: Document LLVM style format for no_sanitize
15743 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15745 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15746 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15747 (mode_supports_vsx_dform_quad): Likewise.
15748 (mode_supports_vmx_dform): Move these functions to be next to the
15749 other mode_supports functions.
15750 (mode_supports_dq_form): Likewise.
15751 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15752 mode_supports_dq_form.
15753 (reg_offset_addressing_ok_p): Likewise.
15754 (offsettable_ok_by_alignment): Likewise.
15755 (rs6000_legitimate_offset_address_p): Likewise.
15756 (legitimate_lo_sum_address_p): Likewise.
15757 (rs6000_legitimize_address): Likewise.
15758 (rs6000_legitimize_reload_address): Likewise.
15759 (rs6000_secondary_reload_inner): Likewise.
15760 (rs6000_preferred_reload_class): Likewise.
15761 (rs6000_output_move_128bit): Likewise.
15763 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15765 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15766 Generate SImode target register for null target.
15767 <case IX86_BUILTIN_XGETBV>: Ditto.
15768 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15769 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15771 2018-05-10 Carl Love <cel@us.ibm.com>
15773 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15774 dcbtt and dcbtstt if operands[2] is 0.
15776 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15779 * config/i386/sse.md (usadv64qi): New expander.
15781 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15783 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15784 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15785 -maltivec=be support.
15786 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15787 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15788 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15789 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15790 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15791 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15792 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15793 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15794 altivec_vsumsws): Adjust.
15795 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15796 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15797 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15799 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15800 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15801 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15802 (altivec_lve<VI_char>x): Delete expand.
15803 (*altivec_lve<VI_char>x_internal): Rename to...
15804 (altivec_lve<VI_char>x): ... this.
15805 (altivec_lvxl_<mode>): Delete expand.
15806 (*altivec_lvxl_<mode>_internal): Rename to ...
15807 (altivec_lvxl_<mode>): ... this.
15808 (altivec_stvxl_<mode>): Delete expand.
15809 (*altivec_stvxl_<mode>_internal): Rename to ...
15810 (altivec_stvxl_<mode>): ... this.
15811 (altivec_stve<VI_char>x): Delete expand.
15812 (*altivec_stve<VI_char>x_internal): Rename to ...
15813 (altivec_stve<VI_char>x): ... this.
15814 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15815 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15816 reduc_plus_scal_<mode>): Adjust.
15817 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15819 (rs6000_cpu_cpp_builtins): Adjust.
15820 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15821 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15822 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15823 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15824 -maltivec=be support.
15825 (rs6000_split_vec_extract_var): Adjust.
15826 (rs6000_split_v4si_init): Adjust.
15827 (swap_selector_for_mode): Delete.
15828 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15829 altivec_expand_stvex_be): Delete.
15830 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15831 -maltivec=be support.
15832 (rs6000_gimple_fold_builtin): Ditto.
15833 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15835 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15836 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15837 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15838 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15839 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15840 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15841 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15842 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15843 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15844 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15845 anonymous split): Adjust.
15846 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15847 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15849 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15851 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15852 when --with-gxx-include-dir is also specified.
15853 * configure: Regenerate.
15855 2018-05-09 Jim Wilson <jimw@sifive.com>
15858 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15859 * config/riscv/t-withmultilib: New.
15860 * config/riscv/withmultilib.h: New.
15861 * doc/install.texi: Document RISC-V --with-multilib-list support.
15863 2018-05-09 Richard Biener <rguenther@suse.de>
15865 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15867 (vect_bb_vectorization_profitable_p): Adjust. Compute
15868 actual scalar cost using the cost vector and the add_stmt_cost
15871 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15873 PR rtl-optimization/85645
15874 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15875 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15877 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15879 PR rtl-optimization/85645
15880 * shrink-wrap.c (spread_components): Return a boolean saying if
15881 anything was changed.
15882 (try_shrink_wrapping_separate): Iterate spread_components until
15883 nothing changes anymore.
15885 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15887 PR rtl-optimization/85645
15888 * regrename.c (build_def_use): Also kill the chains that include the
15889 destination of a REG_CFA_REGISTER note.
15891 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15893 PR rtl-optimization/85645
15894 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15895 insn that has a REG_CFA_REGISTER note.
15897 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15899 * cfgexpand.c (expand_clobber): New function.
15900 (expand_gimple_stmt_1): Use it.
15901 * tree-vect-stmts.c (vect_clobber_variable): New function,
15903 (vectorizable_simd_clone_call): ...here.
15904 (vectorizable_store): Emit a clobber either side of an
15905 IFN_STORE_LANES sequence.
15906 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15908 2018-05-09 Tom de Vries <tom@codesourcery.com>
15911 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15912 (define_insn "trap_if_false"): Add exit after trap.
15914 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15916 PR rtl-optimization/85638
15917 * bb-reorder.c: Include common/common-target.h.
15918 (create_forwarder_block): New function extracted from...
15919 (fix_up_crossing_landing_pad): ...here. Rename into...
15920 (dw2_fix_up_crossing_landing_pad): ...this.
15921 (sjlj_fix_up_crossing_landing_pad): New function.
15922 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15923 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15924 from both partitions and exit the loop after one iteration.
15926 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15929 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15931 (Basic PowerPC Built-in Functions): The new name of the
15932 subsection previously known as "PowerPC Built-in Functions".
15933 (Basic PowerPC Built-in Functions Available on all Configurations):
15935 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15937 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15939 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15941 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15944 2018-05-08 Jim Wilson <jimw@sifive.com>
15946 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15947 (LD_EMUL_SUFFIX): New.
15948 (LINK_SPEC): Use it.
15950 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15952 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15954 (Basic PowerPC Built-in Functions): The new name of the
15955 subsection previously known as "PowerPC Built-in Functions".
15956 (Basic PowerPC Built-in Functions Available on all Configurations):
15958 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15960 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15962 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15964 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15967 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15970 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15971 after cmpelim optimization.
15973 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15975 * config.gcc: Support "goldmont".
15976 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15977 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15978 PROCESSOR_GOLDMONT.
15979 * config/i386/i386.c (m_GOLDMONT): Define.
15980 (processor_target_table): Add "goldmont".
15981 (PTA_GOLDMONT): Define.
15982 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15983 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15984 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15985 (fold_builtin_cpu): Add "goldmont".
15986 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15987 (ix86_option_override_internal): Add "goldmont".
15988 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15989 (processor_type): Add PROCESSOR_GOLDMONT.
15990 * config/i386/i386.md: Add CPU "glm".
15991 * config/i386/glm.md: New file.
15992 * config/i386/x86-tune.def: Add m_GOLDMONT.
15993 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15995 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15998 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16000 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16001 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
16002 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
16005 * config/i386/i386.c (ix86_fold_builtin): Handle
16006 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16009 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16010 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16012 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
16015 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16016 (check_arch): Likewise.
16017 (check_fpu): Return the result rather than printing it.
16018 (end arch): Fix operator precedence.
16019 (end cpu): Likewise.
16020 (END): Print the result from check_fpu.
16022 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
16023 Alan Hayward <alan.hayward@arm.com>
16024 David Sherwood <david.sherwood@arm.com>
16026 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16027 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16028 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16029 (*fcmuo<mode>_and): New patterns.
16031 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
16033 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16034 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16035 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16036 (cmp_op, sve_imm_con): New code attributes.
16037 (SVE_COND_INT_CMP, imm_con): Delete.
16038 (cmp_op): Remove above unspecs from int attribute.
16039 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16041 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
16042 comparison-specific unspecs.
16043 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16044 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16045 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16046 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16047 (*vec_fcm<cmp_op><mode>): Rename to...
16048 (*fcm<cmp_op><mode>): ...this and adjust likewise.
16049 (*vec_fcmuo<mode>): Rename to...
16050 (*fcmuo<mode>): ...this and adjust likewise.
16051 (*pred_fcm<cmp_op><mode>): New pattern.
16052 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16053 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16055 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16057 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16058 (aarch64_emit_sve_predicated_cond): New function.
16059 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16060 (aarch64_emit_unspec_cond_or): Replace with...
16061 (aarch64_emit_sve_or_conds): ...this new function. Use
16062 aarch64_emit_sve_ptrue_op for the individual comparisons and
16063 aarch64_emit_binop to OR them together.
16064 (aarch64_emit_inverted_unspec_cond): Replace with...
16065 (aarch64_emit_sve_inverted_cond): ...this new function. Use
16066 aarch64_emit_sve_ptrue_op for the comparison and
16067 aarch64_emit_unop to invert the result.
16068 (aarch64_expand_sve_vec_cmp_float): Update after the above
16069 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
16071 2018-05-07 Nathan Sidwell <nathan@acm.org>
16073 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16074 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16075 (Backwards Compatibility): Likewise.
16077 2018-05-07 Luis Machado <luis.machado@linaro.org>
16081 2018-05-07 Luis Machado <luis.machado@linaro.org>
16083 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16084 <prefetch_dynamic_strides>: New const bool field.
16085 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16086 prefetch_dynamic_strides.
16087 (exynosm1_prefetch_tune): Likewise.
16088 (thunderxt88_prefetch_tune): Likewise.
16089 (thunderx_prefetch_tune): Likewise.
16090 (thunderx2t99_prefetch_tune): Likewise.
16091 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16093 (aarch64_override_options_internal): Update to set
16094 PARAM_PREFETCH_DYNAMIC_STRIDES.
16095 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16096 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16097 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16098 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16099 prefetch-dynamic-strides setting.
16101 2018-05-07 Luis Machado <luis.machado@linaro.org>
16103 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16104 <minimum_stride>: New const int field.
16105 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16106 minimum_stride field.
16107 (exynosm1_prefetch_tune): Likewise.
16108 (thunderxt88_prefetch_tune): Likewise.
16109 (thunderx_prefetch_tune): Likewise.
16110 (thunderx2t99_prefetch_tune): Likewise.
16111 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16112 (aarch64_override_options_internal): Update to set
16113 PARAM_PREFETCH_MINIMUM_STRIDE.
16114 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16115 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16116 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16117 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16118 stride is constant and is below the minimum stride threshold.
16120 2018-05-07 Luis Machado <luis.machado@linaro.org>
16122 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16125 2018-05-07 Luis Machado <luis.machado@linaro.org>
16127 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16128 <prefetch_dynamic_strides>: New const bool field.
16129 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16130 prefetch_dynamic_strides.
16131 (exynosm1_prefetch_tune): Likewise.
16132 (thunderxt88_prefetch_tune): Likewise.
16133 (thunderx_prefetch_tune): Likewise.
16134 (thunderx2t99_prefetch_tune): Likewise.
16135 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16137 (aarch64_override_options_internal): Update to set
16138 PARAM_PREFETCH_DYNAMIC_STRIDES.
16139 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16140 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16141 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16142 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16143 prefetch-dynamic-strides setting.
16145 2018-05-07 Luis Machado <luis.machado@linaro.org>
16147 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16148 <minimum_stride>: New const int field.
16149 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16150 minimum_stride field.
16151 (exynosm1_prefetch_tune): Likewise.
16152 (thunderxt88_prefetch_tune): Likewise.
16153 (thunderx_prefetch_tune): Likewise.
16154 (thunderx2t99_prefetch_tune): Likewise.
16155 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16156 (aarch64_override_options_internal): Update to set
16157 PARAM_PREFETCH_MINIMUM_STRIDE.
16158 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16159 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16160 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16161 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16162 stride is constant and is below the minimum stride threshold.
16164 2018-05-06 Jakub Jelinek <jakub@redhat.com>
16167 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16168 the type is addressable. Don't force op into register if it has
16171 2018-05-05 Roland McGrath <mcgrathr@google.com>
16174 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16175 any section for which we don't know a specific type it should have,
16176 regardless of name. Previously this was done only for the exact
16177 names ".init_array", ".fini_array", and ".preinit_array".
16178 (default_elf_asm_named_section): Add comment about
16179 relationship with default_section_type_flags and SECTION_NOTYPE.
16180 (get_section): Don't consider it a type conflict if one side has
16181 SECTION_NOTYPE and the other doesn't, as long as neither has the
16182 SECTION_BSS et al used in the default_section_type_flags logic.
16184 2018-05-05 Tom de Vries <tom@codesourcery.com>
16187 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16188 (workaround_barsyncs): New function.
16189 (nvptx_reorg): Use workaround_barsyncs.
16190 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16191 (define_expand "nvptx_membar_cta"): New define_expand.
16192 (define_insn "*nvptx_membar_cta"): New insn.
16194 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
16196 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16197 To improve optimization opportunities.
16198 * builtin-types.def: The new needed builtin types for the above.
16200 2018-05-04 Richard Biener <rguenther@suse.de>
16202 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16203 * gimple-ssa-store-merging.c
16204 (imm_store_chain_info::output_merged_store): Remove redundant create,
16205 release split_store vector contents on failure.
16206 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16207 scalar stmt vector on cache hit.
16209 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
16211 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16213 * config.gcc (powerpc-xilinx-eabi*): Remove.
16214 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16216 (fusion_addis_mem_combo_load): Ditto.
16217 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16219 (rs6000_cpu_cpp_builtins): Ditto.
16220 * config/rs6000/rs6000-linux.c
16221 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16222 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16223 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16225 (rs6000_setup_reg_addr_masks): Ditto.
16226 (rs6000_init_hard_regno_mode_ok): Ditto.
16227 (rs6000_option_override_internal): Ditto.
16228 (legitimate_lo_sum_address_p): Ditto.
16229 (rs6000_legitimize_address): Ditto.
16230 (rs6000_legitimize_reload_address): Ditto.
16231 (rs6000_legitimate_address_p): Ditto.
16232 (abi_v4_pass_in_fpr): Ditto.
16233 (setup_incoming_varargs): Ditto.
16234 (rs6000_gimplify_va_arg): Ditto.
16235 (rs6000_split_multireg_move): Ditto.
16236 (rs6000_savres_strategy): Ditto.
16237 (rs6000_emit_prologue_components): Ditto.
16238 (rs6000_emit_epilogue_components): Ditto.
16239 (rs6000_emit_prologue): Ditto.
16240 (rs6000_emit_epilogue): Ditto.
16241 (rs6000_elf_file_end): Ditto.
16242 (rs6000_function_value): Ditto.
16243 (rs6000_libcall_value): Ditto.
16244 * config/rs6000/rs6000.h: Ditto.
16245 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16246 (TARGET_MINMAX): ... this. New.
16247 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16248 * config/rs6000/rs6000.md: Remove Xilinx FP support.
16249 (*movsi_internal1_single): Delete.
16250 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16251 mfpu=, mxilinx-fpu): Delete.
16252 * config/rs6000/singlefp.h: Delete.
16253 * config/rs6000/sysv4.h: Remove Xilinx FP support.
16254 * config/rs6000/t-rs6000: Ditto.
16255 * config/rs6000/t-xilinx: Delete.
16256 * config/rs6000/titan.md: Adjust for fp_type removal.
16257 * config/rs6000/vsx.md: Remove Xilinx FP support.
16258 (VStype_simple): Delete.
16259 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16260 * config/rs6000/xfpu.h: Delete.
16261 * config/rs6000/xfpu.md: Delete.
16262 * config/rs6000/xilinx.h: Delete.
16263 * config/rs6000/xilinx.opt: Delete.
16264 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16265 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16267 2018-05-04 Tom de Vries <tom@codesourcery.com>
16270 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16273 2018-05-04 Richard Biener <rguenther@suse.de>
16275 PR middle-end/85627
16276 * tree-complex.c (update_complex_assignment): We are always in SSA form.
16277 (expand_complex_div_wide): Likewise.
16278 (expand_complex_operations_1): Likewise.
16279 (expand_complex_libcall): Preserve EH info of the original stmt.
16280 (tree_lower_complex): Handle removed blocks.
16281 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16282 on complex multiplication and division libcall builtins.
16284 2018-05-04 Richard Biener <rguenther@suse.de>
16286 PR middle-end/85574
16287 * fold-const.c (negate_expr_p): Restrict negation of operand
16288 zero of a division to when we know that can happen without
16290 (fold_negate_expr_1): Likewise.
16292 2018-05-04 Jakub Jelinek <jakub@redhat.com>
16295 * real.h (real_nextafter): Declare.
16296 * real.c (real_nextafter): New function.
16297 * fold-const-call.c (fold_const_nextafter): New function.
16298 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16299 CASE_CFN_NEXTTOWARD.
16300 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16301 even when arg1_mode is different from arg0_mode.
16303 2018-05-03 Nathan Sidwell <nathan@acm.org>
16305 * doc/extend.texi (Deprecated Features): Remove
16306 -ffriend-injection.
16307 (Backwards Compatibility): Likewise.
16308 * doc/invoke.texi (C++ Language Options): Likewise.
16309 (C++ Dialect Options): Likewise.
16311 2018-05-03 Jakub Jelinek <jakub@redhat.com>
16314 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16315 _mm512_mask_mullox_epi64): New intrinsics.
16317 2018-05-03 Tom de Vries <tom@codesourcery.com>
16320 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16321 dump files): Add offload-tree.
16323 2018-05-03 Richard Biener <rguenther@suse.de>
16325 PR tree-optimization/85615
16326 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16327 to loops not nested in BBs loop father to avoid creating multi-entry
16330 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16332 PR tree-optimization/70291
16333 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16334 arguments. Change return type to tree. Emit libcall as a new
16335 statement rather than replacing existing one when inplace_p is true.
16336 (expand_complex_multiplication_components): New function.
16337 (expand_complex_multiplication): Expand floating-point complex
16338 multiplication using the above.
16339 (expand_complex_division): Rename inner_type parameter to type.
16340 Update expand_complex_libcall call-site.
16341 (expand_complex_operations_1): Update expand_complex_multiplication
16342 and expand_complex_division call-sites.
16344 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16347 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16348 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16349 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16350 the highest significant bit of the shift count mask is clear. In
16351 check whether and[sq]i3 is needed verify that all significant bits
16352 of the shift count other than the highest are set.
16354 2018-05-02 Tom de Vries <tom@codesourcery.com>
16357 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16358 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16359 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16360 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16361 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16362 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16363 __builtin_goacc_parlevel_size.
16365 2018-05-02 Richard Biener <rguenther@suse.de>
16367 PR tree-optimization/85597
16368 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16369 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16372 2018-05-02 Tom de Vries <tom@codesourcery.com>
16375 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16376 dump files): Add ltrans-tree.
16378 2018-05-02 Tom de Vries <tom@codesourcery.com>
16381 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16382 dump files): Add wpa-ipa.
16384 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16386 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16387 powerpc*-*-linux*paired* target.
16388 * config/rs6000/750cl.h: Delete.
16389 * config/rs6000/paired.h: Delete.
16390 * config/rs6000/paired.md: Delete.
16391 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16393 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16394 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16395 comment. Remove paired float support.
16396 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16397 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16399 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16400 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16402 * config/rs6000/rs6000.c: Remove paired float support.
16403 (paired_expand_vector_init, paired_expand_vector_move,
16404 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16405 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16406 paired_expand_builtin, paired_expand_predicate_builtin,
16407 paired_init_builtins): Delete.
16408 * config/rs6000/rs6000.h: Remove paired float support.
16409 * config/rs6000/rs6000.md: Remove paired float support.
16410 (move_from_CR_ov_bit): Delete.
16411 * config/rs6000/rs6000.opt (mpaired): Delete.
16412 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16413 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16415 2018-05-02 Richard Biener <rguenther@suse.de>
16417 PR middle-end/85567
16418 * gimplify.c (gimplify_save_expr): When in SSA form allow
16419 SAVE_EXPRs to compute to SSA vars.
16421 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16424 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16425 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16426 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16427 clobber operands[2], instead use a new pseudo. Formatting fixes.
16429 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
16431 PR tree-optimization/85586
16432 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16433 exit early for statements in the same group if the accesses are
16436 2018-05-02 Tom de Vries <tom@codesourcery.com>
16439 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16442 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
16444 PR tree-optimization/85143
16445 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16447 2018-05-01 Tom de Vries <tom@codesourcery.com>
16450 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16451 not found" error message.
16453 2018-05-01 Tom de Vries <tom@codesourcery.com>
16456 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16457 * vec.c (test_ordered_remove_if): New function.
16458 (vec_c_tests): Call test_ordered_remove_if.
16459 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16460 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16461 * tree-vect-patterns.c (vect_pattern_recog_1): Use
16462 VEC_ORDERED_REMOVE_IF.
16464 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16466 PR tree-optimization/82665
16467 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16468 pointer subtraction where arguments come from a memchr call.
16470 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16472 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16473 --push-state --as-needed and --pop-state instead of --as-needed and
16474 --no-as-needed if ld supports it.
16475 * configure: Regenerated.
16478 * doc/install.texi2html: Replace _002d with - and _002a with * in
16479 generated html files using sed.
16481 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16484 * gcc-rich-location.c (blank_line_before_p): New function.
16485 (use_new_line): New function.
16486 (gcc_rich_location::add_fixit_insert_formatted): New function.
16487 * gcc-rich-location.h
16488 (gcc_rich_location::add_fixit_insert_formatted): New function.
16490 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16492 * selftest.c (assert_streq): Rename "expected" and "actual" to
16493 "val1" and "val2". Extend NULL-handling to cover both inputs
16494 symmetrically, while still requiring both to be non-NULL for a pass.
16495 * selftest.h (assert_streq): Rename "expected" and "actual" to
16497 (ASSERT_EQ): Likewise.
16498 (ASSERT_EQ_AT): Likewise.
16499 (ASSERT_KNOWN_EQ): Likewise.
16500 (ASSERT_KNOWN_EQ_AT): Likewise.
16501 (ASSERT_NE): Likewise.
16502 (ASSERT_MAYBE_NE): Likewise.
16503 (ASSERT_MAYBE_NE_AT): Likewise.
16504 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16505 the assertion to pass.
16506 (ASSERT_STREQ_AT): Likewise.
16508 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16510 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16511 interaction with -pie.
16513 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16515 * selftest.h: Fix alphabetization of per-source-file selftest
16518 2018-04-30 Jason Merrill <jason@redhat.com>
16520 PR c++/61982 - dead stores to destroyed objects.
16521 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16524 2018-04-30 Jason Merrill <jason@redhat.com>
16526 * tree.c (build_clobber): New.
16527 * tree.h: Declare it.
16528 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16530 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16532 * diagnostic-show-locus.c (layout::layout): Update for
16533 location_get_source_line returning a char_span.
16534 (struct char_span): Move to input.h.
16535 (struct correction): Update for fields in char_span becoming
16537 (struct source_line): Update for location_get_source_line
16538 returning a char_span.
16539 (layout::print_line): Likewise.
16540 * edit-context.c (edited_file::print_content): Likewise.
16541 (edited_file::print_diff_hunk): Likewise.
16542 (edited_file::print_run_of_changed_lines): Likewise.
16543 (edited_file::get_num_lines): Likewise.
16544 (edited_line::edited_line): Likewise.
16545 * final.c (asm_show_source): Likewise.
16546 * input.c (location_get_source_line): Convert return type
16547 from const char * to char_span, losing the final "line_len"
16549 (dump_location_info): Update for the above.
16550 (get_substring_ranges_for_loc): Likewise. Use a char_span
16551 when handling the literal within the line.
16552 (test_reading_source_line): Update for location_get_source_line
16553 returning a char_span.
16554 * input.h (class char_span): Move here from
16555 diagnostic-show-locus.c, converting from a struct to a class.
16556 Make data members private.
16557 (char_span::operator bool): New.
16558 (char_span::length): New.
16559 (char_span::get_buffer): New.
16560 (char_span::operator[]): New.
16561 (char_span::subspan): Make const.
16562 (char_span::xstrdup): New.
16563 (location_get_source_line): Convert return type from const char *
16564 to char_span, losing the final "line_size" param.
16566 2018-04-30 Jan Hubicka <jh@suse.cz>
16568 * lto-wrapper.c (ltrans_priorities): New static var.
16569 (cmp_priority): New.
16570 (run_gcc): Read priorities and if doing parallel build order
16571 the Makefile by them.
16573 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16575 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16577 2018-04-30 Richard Biener <rguenther@suse.de>
16579 * tree-cfg.c (verify_address): Remove base argument, add
16580 flag whether to check TREE_ADDRESSABLE and do that.
16581 (verify_expr): Remove.
16582 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16583 (verify_gimple_assign_single): Likewise.
16584 (verify_gimple_switch): Likewise.
16585 (verify_expr_location_1): Dereference tp once. Add (disabled)
16586 piece from verify_expr.
16587 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16589 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16591 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16593 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16595 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16596 (small_data_pattern): Likewise.
16597 (arc_rewrite_small_data): Likewise.
16598 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16599 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16600 (get_symbol_alignment): New function.
16601 (legitimate_small_data_address_p): Likewise.
16602 (legitimate_scaled_address): Update, call
16603 legitimate_small_data_address_p.
16604 (output_sdata): New static variable.
16605 (arc_print_operand): Update how we handle small data operands.
16606 (arc_print_operand_address): Likewise.
16607 (arc_legitimate_address_p): Update, use
16608 legitimate_small_data_address_p.
16609 (arc_rewrite_small_data_p): Remove.
16610 (arc_rewrite_small_data_1): Likewise.
16611 (arc_rewrite_small_data): Likewise.
16612 (small_data_pattern): Likewise.
16613 (compact_sda_memory_operand): Update to use
16614 legitimate_small_data_address_p and get_symbol_alignment.
16615 (prepare_move_operands): Don't rewite sdata pattern.
16616 (prepare_extend_operands): Remove.
16617 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16619 (zero_extendqisi2): Likewise.
16620 (zero_extendhisi2): Likewise.
16621 (extendqihi2): Likewise.
16622 (extendqisi2): Likewise.
16623 (extendhisi2): Likewise.
16624 (addsi3): Likewise.
16625 (subsi3): Likewise.
16626 (andsi3): Likewise.
16627 * config/arc/constraints.md (Usd): Change it to memory constraint.
16629 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16631 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16632 as source of std instructions.
16633 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16634 allow 6-bit constants as source for store instructions.
16635 (movdi_insn): Update instruction pattern to allow 6-bit constants
16636 as source for store instructions.
16638 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16640 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16642 2018-04-30 Nathan Sidwell <nathan@acm.org>
16643 Sandra Loosemore <sandra@codesourcery.com>
16645 * dumpfile.c (dump_open): Allow '-' for stdout.
16646 * doc/invoke.texi (Developer Options): Document dump filename
16647 determination early. Document stdin/stdout selection.
16649 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16651 Microblaze Target: PIC data text relative
16653 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16654 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16656 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16657 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16658 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16659 New addressing mode for data-text relative position indepenedent code.
16660 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16661 'ADDRESS_SYMBOLIC_TXT_REL'.
16662 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16663 (microblaze_legitimate_pic_operand): Exclude function calls from
16664 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16665 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16667 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16668 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16669 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16670 for 'address + offset'.
16671 (microblaze_expand_prologue): Add new function prologue call for
16673 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16674 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16675 table in case of TARGET_PIC_DATA_TEXT_REL.
16676 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16677 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16678 Add new macros 'UNSPEC_TEXT',
16679 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16680 + exclude function calls from 'UNSPEC_PLT' in case of data text
16682 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16683 new target hook for generating address diff vector tables in case of
16685 * doc/tm.texi : Regenerate.
16686 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16687 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16688 of addr diff vector generation.
16689 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16690 target hook definition.
16691 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16692 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16693 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16694 option for data text relative.
16696 2018-04-30 Richard Biener <rguenther@suse.de>
16698 * tree-chrec.h (evolution_function_is_constant_p): Remove
16700 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16702 2018-04-30 Richard Biener <rguenther@suse.de>
16705 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16707 2018-04-30 Richard Biener <rguenther@suse.de>
16709 PR tree-optimization/28364
16710 PR tree-optimization/85275
16711 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16712 copying first exit test.
16714 2018-04-28 Mark Wielaard <mark@klomp.org>
16716 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16717 dwarf_version >= 5.
16718 (dwarf_AT): Handle DW_AT_addr_base.
16719 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16721 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16724 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16725 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16726 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16727 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16729 2018-04-28 Richard Biener <rguenther@suse.de>
16731 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16732 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16733 to reflect use. Only add interesting stmts.
16735 2018-04-27 Martin Jambor <mjambor@suse.cz>
16738 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16739 the jump function allows for passing through aggregate values.
16741 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16743 * input.h (in_system_header_at): Convert from macro to inline
16745 (from_macro_expansion_at): Likewise.
16746 (from_macro_definition_at): Likewise.
16748 2018-04-27 Jeff Law <law@redhat.com>
16750 * config.gcc: Mark tile* targets as deprecated/obsolete.
16752 2018-04-27 Richard Biener <rguenther@suse.de>
16754 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16757 2018-04-27 Richard Biener <rguenther@suse.de>
16759 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16761 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16763 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16764 with Yd constraint. Set "preferred_for_speed" attribute from
16765 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16766 with Yd constraint.
16767 (*movdi_internal): Ditto.
16768 (movti_interunit splitters): Remove
16769 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16770 (movdi_interunit splitters): Ditto.
16771 * config/i386/constraints.md (Ye): Remove.
16772 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16774 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16777 * config/aarch64/constraints.md (Usg): Limit to 31.
16778 (Usj): Limit to 63.
16780 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16782 PR tree-optimization/85529
16783 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16784 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16785 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16786 zero extension or masking of the MSB bit.
16787 (optimize_range_tests): Add FIRST_BB argument, pass it through
16788 to optimize_range_tests_var_bound.
16789 (maybe_optimize_range_tests, reassociate_bb): Adjust
16790 optimize_range_tests callers.
16792 2018-04-26 Richard Biener <rguenther@suse.de>
16793 Jakub Jelinek <jakub@redhat.com>
16795 * cgraph.h (symbol_table): Just declare debug method here.
16796 * symtab.c (symbol_table::debug): Define.
16798 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16800 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16802 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16804 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16805 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16806 (*movdi_internal): Substitute Yi and Yj constraint with x
16807 and Ym and Yn constraint with y constraint. Update "isa"
16808 attribute and set "preferred_for_speed" attribute from
16809 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16810 (*movsi_internal): Ditto.
16811 (*movdf_internal): Ditto.
16812 (*movsf_internal): Ditto.
16813 (*zero_extendsidi2): Ditto.
16814 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16815 (sse2_loadld): Ditto.
16816 (*vec_extract<ssevecmodelower>_0): Ditto.
16817 (*vec_extractv4si_0_zext_sse4): Ditto.
16818 (vec_concatv2di): Ditto.
16819 (*vec_dup<mode>): Ditto.
16820 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16821 * config/i386/constraints.md (Yi): Remove.
16826 2018-04-26 Nathan Sidwell <nathan@acm.org>
16828 * dumpfile.c (dump_open): New.
16829 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16830 (dump_finish): Detect stdio/stderr by value not name.
16832 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16834 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16836 2018-04-26 Tom de Vries <tom@codesourcery.com>
16839 * config/nvptx/nvptx.c (verify_neutering_jumps)
16840 (verify_neutering_labels): New function
16841 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16843 2018-04-26 Tom de Vries <tom@codesourcery.com>
16846 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16847 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16850 2018-04-26 Richard Biener <rguenther@suse.de>
16851 Tom de Vries <tom@codesourcery.com>
16854 * lto-streamer-out.c (output_function): Fixup loops if required to match
16855 discovery done in the reader.
16857 2018-04-26 Richard Biener <rguenther@suse.de>
16859 PR tree-optimization/85116
16860 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16861 have a loop exit from the single latch predecessor. Remove
16862 case of header with just condition.
16863 (ch_base::copy_headers): Exclude infinite loops from any
16865 (pass_ch::execute): Record exits.
16867 2018-04-26 Richard Biener <rguenther@suse.de>
16869 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16870 prologue cost vector and pass it to vect_get_load_cost.
16871 (vect_get_peeling_costs_all_drs): Likewise.
16872 (vect_peeling_hash_get_lowest_cost): Likewise.
16873 (vect_enhance_data_refs_alignment): Likewise.
16875 2018-04-26 Richard Biener <rguenther@suse.de>
16877 PR middle-end/85450
16878 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16879 checking of integer<->pointer conversions.
16880 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16881 sign-/zero-extending pointer types.
16882 (expand_omp_for_static_chunk): Likewise.
16884 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16885 Jean Lee <xiaoyur347@gmail.com>
16887 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16888 (TARGET_ASAN_SHADOW_OFFSET): Define.
16889 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16890 true for -fsanitize=address.
16892 2018-04-25 Mark Wielaard <mark@klomp.org>
16894 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16897 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16899 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16900 than "alu", remove explicit "memory" and "imm_disp" attributes.
16901 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16903 PR middle-end/85414
16904 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16905 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16906 gen_lowpart_no_emit.
16908 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16911 * config/i386/i386.c (ix86_expand_builtin): Change memory
16912 operand to XI, extend p0 to Pmode.
16913 * config/i386/i386.md: Change unspec volatile and operand
16914 1 mode to XI, change operand 0 mode to P.
16916 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16918 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16919 GET_MODE_MASK before any checking.
16920 (nds32_can_use_bset_p): Likewise.
16921 (nds32_can_use_btgl_p): Likewise.
16923 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16925 * config/nds32/nds32-doubleword.md: New define_split pattern for
16926 illegal register number.
16928 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16930 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16932 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16934 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16936 2018-04-25 Richard Biener <rguenther@suse.de>
16938 * lto-streamer.h (LTO_major_version): Bump to 8.
16940 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16942 * BASE-VER: Set to 9.0.0.
16944 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16946 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16947 in __abskf2 and __powikf2.
16949 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16952 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16953 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16954 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16955 Use the above on operand 2. Reindent.
16956 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16958 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16961 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16963 * config/i386/i386.opt (mcet): Removed.
16964 * doc/install.texi: Remove -mcet documentation.
16965 * doc/invoke.texi: Likewise.
16967 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16970 * doc/install.texi: Remove -mcet from bootstrap-cet.
16972 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16975 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16976 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16980 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16981 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16982 containing a CONST_VECTOR.
16984 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16986 * doc/install.texi: Update newlib dependency for nvptx.
16988 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16991 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16992 instead of INTVAL when shifting x left.
16994 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16996 PR tree-optimization/85478
16997 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16998 vect_grouped_store_supported for single element vectors.
17000 2018-04-24 Richard Biener <rguenther@suse.de>
17003 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17004 load cost increase to the case of non-constant step.
17006 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17009 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17010 destination if any_malformed_asm.
17012 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
17014 PR middle-end/85496
17015 * expr.c (store_field): In the bitfield case, if the value comes from
17016 a function call and is returned in registers by means of a PARALLEL,
17017 do not change the mode of the temporary unless BLKmode and VOIDmode.
17019 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
17021 PR rtl-optimization/85423
17022 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17023 dependencies to debug insns when the previous insn is non-debug.
17025 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
17027 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17028 enums into a single definition.
17029 (fls): Fix predicates and printing.
17032 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
17034 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17035 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17036 and short u6 immediate.
17037 (check_if_valid_sleep_operand): Remove.
17038 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17040 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17042 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17043 flag_always_save_lp condition.
17044 * config/nds32/nds32.opt (malways-save-lp): New option.
17046 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17048 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17049 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17050 * config/nds32/nds32.h
17051 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17052 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17054 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17056 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17057 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17059 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17060 Chung-Ju Wu <jasonwucj@gmail.com>
17062 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17064 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17065 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17067 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17069 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17071 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17073 * config/nds32/nds32-protos.h (nds32_data_alignment,
17074 nds32_local_alignment): Declare.
17075 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17076 nds32_local_alignment): New functions.
17077 (TARGET_CONSTANT_ALIGNMENT): Define.
17078 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17080 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17082 * config/nds32/nds32.c
17083 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17084 (TARGET_MODES_TIEABLE_P): Likewise.
17086 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17088 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17089 level Ofast and Og.
17091 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
17092 Chung-Ju Wu <jasonwucj@gmail.com>
17094 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17095 for unaligned access.
17096 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17098 * config/nds32/nds32-intrinsic.md: Likewise.
17099 * config/nds32/nds32_intrinsic.h: Likewise.
17100 * config/nds32/nds32.h (nds32_builtins): Likewise.
17101 * config/nds32/nds32.opt (munaligned-access): New option.
17102 * config/nds32/nds32.c (nds32_asm_file_start): Display
17103 flag_unaligned_access status.
17105 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
17107 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17108 -mno-relax is present.
17109 * config/riscv/linux.h (LINK_SPEC): Ditto.
17111 2018-04-20 Martin Sebor <msebor@redhat.com>
17114 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17116 (gimple_fold_builtin_stxcpy_chk): Same.
17117 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17119 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
17122 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17123 __powikf2 when long double is IEEE 128-bit.
17125 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
17127 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17128 step to make sure stack always aligned.
17130 2018-04-20 Carl Love <cel@us.ibm.com>
17133 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17134 size check for arg0.
17136 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
17137 Tom de Vries <tom@codesourcery.com>
17140 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17141 Emit insns for calls too.
17142 (nvptx_find_par): Always look for worker-level predecessor insn.
17143 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
17145 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17146 (nvptx_process_pars): Propagate frames for calls.
17148 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
17151 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17153 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17154 (ix86_handle_option): Don't handle OPT_mibt.
17155 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17157 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17159 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17160 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17161 (ix86_target_macros): Define __CET__ with flag_cf_protection
17162 for -fcf-protection.
17163 * config/i386/i386.c (isa2_opts): Remove -mibt.
17164 * config/i386/i386.h (TARGET_IBT): Removed.
17165 (TARGET_IBT_P): Likewise.
17166 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17167 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17168 * config/i386/i386.opt (mcet): Update help message.
17169 (mshstk): Likewise.
17171 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
17172 -mcet as an alias for -mshstk.
17174 2018-04-20 Richard Biener <rguenther@suse.de>
17176 PR middle-end/85475
17177 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17178 complexity by forcing a single use of the multiply operand.
17180 2018-04-20 Martin Jambor <mjambor@suse.cz>
17183 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17184 recursion dependency to only apply to non-clones.
17186 2018-04-20 Martin Jambor <mjambor@suse.cz>
17189 * ipa-cp.c (create_specialized_node): Check that clones of
17190 self-recursive edges exist during IPA-CP.
17192 2018-04-19 Toon Moene <toon@moene.org>
17194 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17197 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17199 PR tree-optimization/85467
17200 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17201 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
17202 VECTOR_CST element to type.
17204 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17207 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17208 * config/i386/i386.md (builtin_setjmp_setup): Removed.
17209 (builtin_longjmp): Likewise.
17210 (save_stack_nonlocal): New pattern.
17211 (restore_stack_nonlocal): Likewise.
17213 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17216 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17217 Replace ASM_OUTPUT_LABEL with fprintf.
17219 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17222 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17223 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17224 * config/i386/i386-c.c (ix86_target_macros_internal): Also
17225 define __IBT__ and __SHSTK__ for -fcf-protection.
17226 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17228 (ix86_trampoline_init): Likewise.
17229 (x86_output_mi_thunk): Likewise.
17230 (ix86_notrack_prefixed_insn_p): Likewise.
17231 (ix86_option_override_internal): Don't disallow -fcf-protection.
17232 * config/i386/i386.md (rdssp<mode>): Also enable for
17234 (incssp<mode>): Likewise.
17235 (nop_endbr): Likewise.
17236 * config/i386/i386.opt (mcet): Change help message to built-in
17239 (mshstk): Likewise.
17240 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17241 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
17242 enable CET built-in functions.
17244 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
17246 * common/config/i386/i386-common.c
17247 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17248 OPTION_MASK_ISA_MOVDIRI_UNSET,
17249 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17250 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17251 * config.gcc (movdirintrin.h): New header.
17252 * config/i386/cpuid.h (bit_MOVDIRI,
17253 bit_MOVDIR64B): New bits.
17254 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17256 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17257 (VOID, PVOID, PCVOID)): New function types.
17258 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17259 __builtin_ia32_directstoreu_u64,
17260 __builtin_ia32_movdir64b): New builtins.
17261 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17262 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17264 (ix86_valid_target_attribute_inner_p): Ditto.
17265 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17266 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17267 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17268 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17269 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17270 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17271 (movdiri<mode>, movdir64b_<mode>): New.
17272 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17273 * config/i386/immintrin.h: Include movdirintrin.h.
17274 * config/i386/movdirintrin.h: New file.
17275 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17277 2018-04-19 Richard Biener <rguenther@suse.de>
17279 PR middle-end/85455
17280 * cfg.c (clear_bb_flags): When loop state says we have
17281 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17283 2018-04-19 Richard Biener <rguenther@suse.de>
17285 PR tree-optimization/84737
17286 * tree-vect-data-refs.c (vect_copy_ref_info): New function
17287 copying restrict info.
17288 (vect_setup_realignment): Use it.
17289 * tree-vectorizer.h (vect_copy_ref_info): Declare.
17290 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17291 the first DR to all generated stores.
17292 (vectorizable_load): Likewise for loads.
17294 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17296 PR tree-optimization/85446
17297 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17298 the integral and pointer types to have the same precision.
17300 * doc/install.texi: Document --disable-cet being the default and
17303 2018-04-18 Martin Liska <mliska@suse.cz>
17305 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17308 2018-04-18 Martin Liska <mliska@suse.cz>
17311 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17314 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17315 arguments if they are comparable.
17317 2018-04-18 Martin Liska <mliska@suse.cz>
17320 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17323 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17326 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
17329 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17330 ENDBR after calling __morestack.
17332 2018-04-18 David Malcolm <dmalcolm@redhat.com>
17335 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17336 by using gcc_base_ver to generate a gcc_driver_version, and use
17337 it when generating GCC_DRIVER_NAME.
17338 * configure: Regenerate.
17340 2018-04-18 Jakub Jelinek <jakub@redhat.com>
17343 * config.gcc: Obsolete powerpc*-*-*spe*.
17345 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17348 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17349 (stabstr_D): Change type of unum from unsigned int to
17350 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17353 2018-04-17 Jim Wilson <jimw@sifive.com>
17356 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17357 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17358 Set arg_pointer_offset after using pretend_args_size.
17360 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17362 PR rtl-optimization/85431
17363 * dse.c (record_store): Ignore zero width stores.
17366 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17367 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17368 __builtin_stack_restore rather than after it.
17369 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17370 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17371 argument instead of virtual_dynamic_stack_rtx.
17373 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17375 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17377 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17378 Add note to error message to explain internal mapping of overloaded
17379 built-in function name to non-overloaded built-in function name.
17380 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17383 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17386 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17387 where the inputs overlap with the output.
17389 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17391 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17392 (=v, v) alternative and explicit "memory" attribute.
17393 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17394 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17396 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17397 "sselog1" type instead of "sselog".
17398 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17399 "sselog". Remove explicit "memory" attribute.
17400 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17401 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17403 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17404 "sselog1" type instead of "sselog". Remove explicit "memory"
17406 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17407 use "sselog1" type instead of "sselog". Remove explicit "memory"
17409 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17410 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17412 (vec_extract_hi_v64qi): Merge all alternatives into one, use
17413 "sselog1" type instead of "sselog". Remove explicit "memory"
17415 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17416 use "sselog1" type instead of "sselog". Remove explicit "memory"
17420 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17422 PR middle-end/85414
17423 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17426 2018-04-17 Martin Jambor <mjambor@suse.cz>
17429 * ipa-cp.c (create_specialized_node): Call
17430 expand_all_artificial_thunks if necessary.
17432 2018-04-17 Martin Liska <mliska@suse.cz>
17435 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17436 in message, remote space in between '_G' and '('.
17438 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17441 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17442 avx512f_vmcmp<mode>3<round_saeonly_name>,
17443 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17444 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17445 avx512f_rndscale<mode><round_saeonly_name>,
17446 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17447 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17448 Use %<iptr>2 instead of %2 for -masm=intel.
17449 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17450 avx512f_vcvttss2usi<round_saeonly_name>,
17451 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17453 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17454 avx512f_vcvttsd2usi<round_saeonly_name>,
17455 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17456 Use %q1 instead of %1 for -masm=intel.
17457 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17458 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17459 of %3 for -masm=intel.
17460 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17462 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17464 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17466 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17467 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17469 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17471 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17472 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17473 %g1 and one with %0 and %1.
17474 (avx512er_vmrcp28<mode><round_saeonly_name>,
17475 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17476 %1 for -masm=intel.
17477 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17478 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17479 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17480 of %0 and %{%4%} for -masm=intel.
17481 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17482 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17483 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17484 order of %0 and %{%5%}%{z%} for -masm=intel.
17486 2018-04-17 Jan Hubicka <jh@suse.cz>
17489 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17491 2018-04-17 Martin Liska <mliska@suse.cz>
17494 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17495 for target_clone error message. Make default implementation
17496 clone to be a local declaration.
17497 (separate_attrs): Add new argument and check for an empty
17499 (expand_target_clones): Handle it.
17500 (ipa_target_clone): Make redirection just for target_clones
17503 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17504 Tom de Vries <tom@codesourcery.com>
17506 PR middle-end/84955
17507 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17508 tiled basic blocks without omp continue statements.
17510 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17513 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17514 vec_extract expression as having side effects to make sure it gets
17517 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17520 * config/i386/i386.c (get_builtin_code_for_version): Check
17523 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17526 * config.gcc: Support "skylake".
17527 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17529 * config/i386/i386.c (m_SKYLAKE): Define.
17530 (processor_target_table): Add "skylake".
17531 (ix86_option_override_internal): Add "skylake".
17532 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17533 PROCESSOR_CANNONLAKE.
17534 (get_builtin_code_for_version): Fix priority for
17535 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17536 PROCESSOR_SKYLAKE-AVX512.
17537 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17538 (processor_type): Add PROCESSOR_SKYLAKE.
17540 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17541 Jason Merrill <jason@redhat.com>
17544 * convert.c (convert_to_integer_1): Use direct recursion for
17545 enumeral types and types with a precision less than the number
17546 of bits in their mode.
17548 2018-04-16 Julia Koval <julia.koval@intel.com>
17551 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17552 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17554 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17557 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17558 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17559 and -mno-direct-move.
17561 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17564 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17565 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17566 Ensure negative shifts result in {0}.
17568 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17570 PR rtl-optimization/79916
17571 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17572 regs (if any) to define how to gnerate SD moves when LRA is in
17575 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17577 PR rtl-optimization/85393
17578 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17579 * except.c (expand_dw2_landing_pad_for_region): Make static.
17580 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17581 a label and unconditional jump to old_bb, rather than
17582 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17585 PR rtl-optimization/85376
17586 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17587 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17588 instead of a specific value.
17590 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17591 Bin Cheng <bin.cheng@arm.com>
17593 PR tree-optimization/82965
17594 PR tree-optimization/83991
17595 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17596 by_profile_only parameter.
17597 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17598 information if the loop was predicted to iterate too many times.
17599 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17601 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17604 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17607 2018-04-13 Martin Liska <mliska@suse.cz>
17608 Jakub Jelinek <jakub@redhat.com>
17610 PR middle-end/81657
17611 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17612 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17613 * builtins.c (expand_builtin_memory_copy_args): Use
17614 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17615 handle dest_addr == pc_rtx.
17617 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17620 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17621 asked to not generate direct moves.
17622 (fix_trunc<mode>si2_stfiwx): Similar.
17623 (fix_trunc<mode>si2_internal): Similar.
17625 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17628 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17629 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17630 lookup if dest in some wider mode is known to be const0_rtx and
17631 if so, record permanent equivalence for it to be ZERO_EXTEND of
17632 the narrower mode destination.
17634 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17636 * lto-streamer-out.c (output_function): Revert 259346.
17637 * omp-expand.c (expand_oacc_for): Likewise.
17639 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17641 PR rtl-optimization/85354
17642 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17643 * sel-sched.c (sel_global_init): ... here.
17645 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17648 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17649 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17650 mode for PE-COFF targets.
17651 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17652 (i386_pe_asm_lto_end): Likewise.
17653 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17654 (TARGET_ASM_LTO_END): Likewise.
17655 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17656 (i386_pe_asm_lto_start): New function.
17657 (i386_pe_asm_lto_end): Likewise.
17659 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17660 Richard Biener <rguenther@suse.de>
17662 PR middle-end/84955
17663 * lto-streamer-out.c (output_function): Fix CFG loop state before
17665 * omp-expand.c (expand_oacc_for): Handle calls to internal
17666 functions like regular functions.
17668 2018-04-12 Richard Biener <rguenther@suse.de>
17671 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17672 for the early LTO debug to properly generate references to it
17673 during DIE emission. Do not re-use that for the skeleton for
17675 (dwarf2out_early_finish): Likewise.
17677 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17680 * config/i386/sse.md
17681 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17682 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17683 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17684 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17685 and output is a reg, avoid creating invalid lowpart subreg, but
17686 instead split into a 512-bit move. Don't split if not AVX512VL,
17687 input is xmm16+ reg and output is a mem.
17688 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17689 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17690 xmm16+ reg and output is a mem.
17692 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17694 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17695 also for flag_dwarf2_cfi_asm.
17697 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17699 PR rtl-optimization/85342
17700 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17701 a bool scalar var inside of the loop instead. Don't try to update
17702 recog_data.operand after failed apply_change_group.
17704 2018-04-12 Tom de Vries <tom@codesourcery.com>
17707 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17708 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17709 array with flexible array member as array without given dimension.
17710 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17711 argument for undefined param to true.
17713 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17716 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17717 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17718 from PowerPC section.
17719 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17720 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17721 help text that is too long.
17722 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17723 help text that is too long.
17724 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17725 help text that is too long.
17727 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17729 * config/alpha/alpha.md (stack_probe_internal): Rename
17730 from "probe_stack". Update all callers.
17732 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17734 PR rtl-optimization/84566
17735 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17736 sched_macro_fuse_insns.
17738 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17741 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17742 (compute_block_dependences): ... from here.
17744 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17746 PR tree-optimization/85331
17747 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17748 from int to HOST_WIDE_INT.
17750 2018-04-11 Martin Jambor <mjambor@suse.cz>
17753 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17754 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17755 not the same as the source val.
17756 (cgraph_edge_brings_value_p): New parameter.
17757 (gather_edges_for_value): Pass destination value to
17758 cgraph_edge_brings_value_p.
17759 (perhaps_add_new_callers): Likewise.
17760 (get_info_about_necessary_edges): Likewise and exclude values brought
17761 only by self-recursive edges.
17762 (create_specialized_node): Redirect only clones of self-calling edges.
17763 (+self_recursive_pass_through_p): New function.
17764 (find_more_scalar_values_for_callers_subset): Use it.
17765 (find_aggregate_values_for_callers_subset): Likewise.
17766 (known_aggs_to_agg_replacement_list): Removed.
17767 (decide_whether_version_node): Re-calculate known constants for all
17768 remaining context clones.
17770 2018-04-11 Richard Biener <rguenther@suse.de>
17773 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17774 from early DWARF output.
17775 (dwarf2out_early_finish): Output line info unconditionally into
17776 early DWARF and add reference to it.
17778 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17781 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17782 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17783 other than V2DFmode using iptr mode attribute.
17784 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17786 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17788 PR rtl-optimization/84659
17789 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17791 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17794 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17796 (output_loc_list): Pass address of a dummy size variable even in the
17797 locview handling loop.
17798 (index_location_lists): Add comment on why skip_loc_list_entry can't
17801 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17804 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17807 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17810 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17811 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17812 and -mstring-compare-inline-limit.
17814 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17817 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17818 for stack clash protection in a register whenever we need it to be in
17821 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17823 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17824 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17826 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17829 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17831 (mlong-double-): Ditto.
17832 * config/rs6000/sysv4.opt (msdata=): Ditto.
17833 (mtls-size=): Ditto.
17835 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17837 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17838 erroneous entries for
17839 "vector int vec_ldl (int, long int *)", and
17840 "vector unsigned int vec_ldl (int, unsigned long int *)".
17841 Add comments and entries for
17842 "vector bool char vec_ldl (int, bool char *)",
17843 "vector bool short vec_ldl (int, bool short *)",
17844 "vector bool int vec_ldl (int, bool int *)",
17845 "vector bool long long vec_ldl (int, bool long long *)",
17846 "vector pixel vec_ldl (int, pixel *)",
17847 "vector long long vec_ldl (int, long long *)",
17848 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17849 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17850 type tree bool_long_long_type_node and correct definition of
17851 bool_V2DI_type_node to make reference to this new type tree.
17852 (rs6000_mangle_type): Replace erroneous reference to
17853 bool_long_type_node with bool_long_long_type_node.
17854 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17855 comments to emphasize sign distinctions for char and int types and
17856 replace RS6000_BTI_bool_long constant with
17857 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17858 use of RS6000_BTI_pixel.
17859 (bool_long_type_node): Remove this macro definition.
17860 (bool_long_long_type_node): New macro definition
17862 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17864 PR rtl-optimization/85300
17865 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17866 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17867 simplify_unary_operation fails.
17869 2018-04-10 Martin Liska <mliska@suse.cz>
17871 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17872 cgraph_edge and ipa_ref.
17874 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17878 * config/i386/sse.md
17879 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17880 computation of the VEC_MERGE selector from mask.
17881 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17882 Fix decoding of the VEC_MERGE selector into mask.
17884 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17886 PR tree-optimization/85286
17887 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17889 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17891 * final.c (final_1): Set insn_last_address as well as
17892 insn_current_address.
17894 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17897 * explow.c (emit_stack_probe): Call validize_mem on memory location
17898 before passing it to gen_probe_stack. Create address operand and
17899 legitimize it for the probe_stack_address case.
17901 2018-04-09 Jan Hubicka <jh@suse.cz>
17904 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17905 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17906 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17908 (free_lang_data): Rebuild type inheritance graph.
17910 2018-04-09 Martin Sebor <msebor@redhat.com>
17912 * invoke.texi (-finline-small-functions): Mention other optimization
17914 (-findirect-inlining, -fpartial-inlining): Same.
17915 (-finline-functions-called-once): Same.
17916 (-freorder-blocks-and-partition): Same.
17918 2018-04-09 Jan Hubicka <jh@suse.cz>
17921 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17922 jumps; choose last target that matches the criteria (i.e.
17923 no partition changes for non-crossing jumps).
17924 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17925 support for redirecting crossing jumps to non-crossing.
17927 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17929 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17930 also for naked functions.
17932 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17934 * config/arc/arc.md (add_shift): New pattern.
17935 (add_shift2): Likewise.
17936 (sub_shift): Likewise.
17937 (sub_shift_cmp0_noout): Likewise.
17938 (compare_si_ashiftsi): Likewise.
17939 (xbfu_cmp0_noout): New combine pattern.
17940 (xbfu_cmp0"): Likewise.
17941 (movsi_set_cc_insn): Place the predicable variant first.
17942 (commutative_binary_cmp0_noout): Remove clobber.
17943 (commutative_binary_cmp0): New pattern.
17944 (noncommutative_binary_cmp0): Likewise.
17945 (noncommutative_binary_cmp0_noout): Likewise.
17946 (noncommutative_binary_comparison_result_used): Removed.
17947 (rsub_cmp0): New pattern.
17948 (rsub_cmp0_noout): Likewise.
17949 (extzvsi): Changed, keep only meaningful variants.
17950 (SQH, SEZ): New iterators.
17951 (SQH_postfix): New mode attribute.
17952 (SEZ_prefix): New code attribute.
17953 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17954 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17955 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17956 of numerical value.
17957 (noncommutative_operator): Check the availability of barrel
17960 2018-04-09 Richard Biener <rguenther@suse.de>
17962 PR tree-optimization/85284
17963 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17964 Only use the niter constraining form of simple_iv when the exit
17965 is always executed.
17967 2018-04-09 Tom de Vries <tom@codesourcery.com>
17970 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17971 (define_expand "*memory_barrier"): New define_expand.
17972 (define_insn "memory_barrier"): New insn.
17974 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17976 PR rtl-optimization/80463
17977 PR rtl-optimization/83972
17978 PR rtl-optimization/83480
17980 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17981 correct producer for the insn.
17982 (tidy_control_flow): Fixup seqnos in case of debug insns.
17984 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17986 PR rtl-optimization/83913
17988 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17989 different sched-times when merging exprs.
17991 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17993 PR rtl-optimization/83962
17995 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17996 tidy_fallthru_edge and tidy_control_flow.
17998 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18000 PR rtl-optimization/83530
18002 * sel-sched.c (force_next_insn): New global variable.
18003 (remove_insn_for_debug): When force_next_insn is true, also leave only
18004 next insn in the ready list.
18005 (sel_sched_region): When the region wasn't scheduled, make another pass
18006 over it with force_next_insn set to 1.
18008 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
18010 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18012 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18013 for interrupt control.
18014 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18015 functions for interrupt control.
18016 * config/nds32/nds32-intrinsic.md: Likewise.
18017 * config/nds32/nds32_intrinsic.h: Likewise.
18018 * config/nds32/nds32.h (nds32_builtins): Likewise.
18020 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
18022 * config/nds32/nds32.c (nds32_init_machine_status,
18023 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18024 strict_aligned_p field.
18025 (nds32_expand_to_rtl_hook): New function.
18026 (TARGET_EXPAND_TO_RTL_HOOK): Define.
18027 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18029 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18030 Chung-Ju Wu <jasonwucj@gmail.com>
18032 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18033 * config/nds32/nds32-n7.md: New file.
18034 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18035 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18037 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18038 * config/nds32/nds32.md (pipeline_model): Add n7.
18039 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18040 * config/nds32/pipelines.md: Include n7 settings.
18042 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18043 Chung-Ju Wu <jasonwucj@gmail.com>
18045 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18046 * config/nds32/nds32-e8.md: New file.
18047 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18048 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18050 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18051 * config/nds32/nds32.md (pipeline_model): Add e8.
18052 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18053 * config/nds32/pipelines.md: Include e8 settings.
18055 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18056 Chung-Ju Wu <jasonwucj@gmail.com>
18058 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18059 * config/nds32/nds32-n8.md: New file.
18060 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18061 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18063 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18064 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18065 * config/nds32/nds32.md (pipeline_model): Add n8.
18066 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18067 * config/nds32/pipelines.md: Include n8 settings.
18069 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18070 Chung-Ju Wu <jasonwucj@gmail.com>
18072 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18073 * config/nds32/nds32-n9-2r1w.md: New file.
18074 * config/nds32/nds32-n9-3r2w.md: New file.
18075 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18076 nds32_register_ports): New or modify for cpu n9.
18077 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18079 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18080 * config/nds32/nds32-utils.c: New file.
18081 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18082 TARGET_MUL_SLOW): Define.
18083 * config/nds32/nds32.md (pipeline_model): New attribute.
18084 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18085 New options that support cpu n9.
18086 * config/nds32/pipelines.md: Include n9 settings.
18087 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18089 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
18091 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18092 information if necessary.
18093 (output_cond_branch_compare_zero): Likewise.
18094 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18095 (nds32_target_alignment): Refine for alignment.
18096 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18097 (FUNCTION_BOUNDARY): Modify.
18098 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18100 * config/nds32/nds32.opt (malways-align, malign-functions): New.
18102 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
18104 * config/nds32/constants.md (unspec_volatile_element): Add values for
18105 TLB operation and data prefetch.
18106 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18107 functions for TLB operation and data prefetch.
18108 * config/nds32/nds32-intrinsic.md: Likewise.
18109 * config/nds32/nds32_intrinsic.h: Likewise.
18110 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18111 (nds32_print_operand): Likewise.
18112 * config/nds32/nds32.h (nds32_builtins): Likewise.
18114 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
18115 Andrew Pinski <pinsika@gcc.gnu.org>
18117 PR middle-end/82976
18118 * match.pd: Use constant_boolean_node of correct type instead of
18119 boolean_true_node or boolean_false_node for simplifying
18120 pointer comparisons to zero.
18122 2018-04-07 Jakub Jelinek <jakub@redhat.com>
18124 PR tree-optimization/80021
18125 * tree.c (verify_type_variant): Make error call in verify_variant_match
18126 translatable and remove final full stop.
18128 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18130 * config/nds32/constants.md (unspec_volatile_element): Add
18131 UNSPEC_VOLATILE_EH_RETURN.
18132 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18133 nds32_output_stack_pop): Support dwarf exception handling process.
18134 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18135 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18136 exception handling process.
18137 (nds32_compute_stack_frame): Likewise.
18138 (nds32_return_addr_rtx): Likewise.
18139 (nds32_initial_elimination_offset): Likewise.
18140 (nds32_expand_prologue): Likewise.
18141 (nds32_expand_epilogue): Likewise.
18142 (nds32_dynamic_chain_address): New function.
18143 * config/nds32/nds32.h (machine_function): Add fields for dwarf
18144 exception handling.
18145 (DYNAMIC_CHAIN_ADDRESS): Define.
18146 (EH_RETURN_DATA_REGNO): Define.
18147 (EH_RETURN_STACKADJ_RTX): Define.
18148 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18149 patterns for dwarf exception handling.
18151 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18153 * config/nds32/nds32.h: Clean up obsolete macros.
18155 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18157 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18158 Add enum values for particular instructions.
18159 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18160 particular intrinsic functions.
18161 * config/nds32/nds32-intrinsic.md: Likewise.
18162 * config/nds32/nds32_intrinsic.h: Likewise.
18163 * config/nds32/nds32.h (nds32_builtins): Likewise.
18164 * config/nds32/nds32.md (type): Add pbsad and pbsada.
18165 (btst, ave): New patterns for particular instructions.
18167 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18169 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18170 Add enum values for atomic load/store and memory sync.
18171 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18173 * config/nds32/nds32-intrinsic.md: Likewise.
18174 * config/nds32/nds32_intrinsic.h: Likewise.
18175 * config/nds32/nds32.h (nds32_builtins): Likewise.
18177 2018-04-07 Jakub Jelinek <jakub@redhat.com>
18179 PR tree-optimization/85257
18180 * fold-const.c (native_encode_vector): If not all elts could fit
18181 and off is -1, return 0 rather than offset.
18182 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18183 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18184 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
18185 adjust buffer in native_interpret_expr call.
18187 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18189 * config/nds32/constants.md (unspec_volatile_element): Add cache
18190 control enum values.
18191 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18192 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18193 * config/nds32/nds32.c (nds32_cctl_names): New.
18194 (nds32_print_operand): Handle cache control register names.
18195 * config/nds32/nds32.h (nds32_builtins): New enum values.
18196 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18198 * config/nds32/nds32.md (type): Add mmu.
18199 * config/nds32/pipelines.md (simple_insn): Add mmu.
18201 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18203 * config/nds32/nds32.md (type): Remove call.
18204 * config/nds32/pipelines.md (simple_insn): Likewise.
18206 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18208 * config/nds32/constants.md (unspec_volatile_element): Add
18209 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18210 UNSPEC_VOLATILE_FMFCFG.
18211 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18212 description for fmfcfg and fmfcsr.
18213 (bdesc_1arg): Add fmtcsr.
18214 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18215 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18216 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18217 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18218 unspec_fmfcfg): New patterns.
18219 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18220 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18221 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18222 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18223 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18224 __nds32__fmfcfg): Define.
18226 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18228 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18229 intrinsic register names.
18230 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18231 intrinsic register enum values and macros.
18233 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18235 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18236 for load/store addressing form.
18237 (nds32_print_operand_address): Likewise.
18239 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
18242 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18243 based on LABEL_REF. Remove useless assertion.
18244 (pic_address_needs_scratch): Fix formatting.
18245 (sparc_legitimize_pic_address): Minor tweaks.
18246 (sparc_delegitimize_address): Adjust assertion accordingly.
18247 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18248 into symbolic_operand.
18249 (movsi_high_pic_label_ref): Likewise.
18250 (movsi_lo_sum_pic_label_ref): Likewise.
18251 (movdi_pic_label_ref): Likewise.
18252 (movdi_high_pic_label_ref): Likewise.
18253 (movdi_lo_sum_pic_label_ref): Likewise.
18255 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
18257 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18258 custom LIB_SPEC setup.
18260 2018-04-06 Ruslan Bukin <br@bsdpad.com>
18261 Kito Cheng <kito.cheng@gmail.com>
18263 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18264 * config/riscv/freebsd.h: New.
18266 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18268 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18269 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18272 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18273 Kito Cheng <kito.cheng@gmail.com>
18275 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18276 nds32_output_call, nds32_symbol_binds_local_p): New functions.
18277 * config/nds32/nds32-protos.h (nds32_output_call,
18278 nds32_output_return): Declare.
18279 * config/nds32/nds32.md: Refine all the call and return patterns.
18281 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18284 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18285 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18287 PR rtl-optimization/84872
18288 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18289 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18290 EDGE_CROSSING edge.
18292 2018-04-06 Tamar Christina <tamar.christina@arm.com>
18294 * expr.c (copy_blkmode_to_reg): Revert 254862.
18295 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18297 2018-04-06 Richard Biener <rguenther@suse.de>
18299 PR middle-end/85244
18300 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18301 after seeing a component reference with an adjacent field. Treat
18302 refs to arrays at struct end of external decls similar to
18303 refs to unconstrained commons.
18305 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18308 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18309 look through SAVE_EXPRs with non-side-effects argument. Adjust
18311 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18314 2018-04-06 Richard Biener <rguenther@suse.de>
18316 PR middle-end/85180
18317 * alias.c (find_base_term): New wrapper around find_base_term
18318 unwinding CSELIB_VAL_PTR changes.
18319 (find_base_term): Do not restore CSELIB_VAL_PTR during the
18322 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18324 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18326 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18327 constant definitions.
18328 ("nop"): lr 0,0 -> nopr r0
18329 ("nop_lr0", "nop_lr1"): New insn definitions.
18331 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18333 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18334 NDS32_V3PUSH_AVAILABLE_P macro.
18336 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
18337 Chung-Ju Wu <jasonwucj@gmail.com>
18339 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18340 (nds32*-*-*): Add float and fpu_config into supported_defaults.
18341 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18342 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18343 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18344 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18345 * config/nds32/constraints.md: New constraints and checking for hard
18346 float configuration.
18347 * config/nds32/iterators.md: New mode iterator and attribute for hard
18348 float configuration.
18349 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18351 * config/nds32/nds32-fpu.md: New file.
18352 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18353 deal with hard float code generation.
18354 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18356 (abi_type, float_reg_number): New enum type.
18357 * config/nds32/nds32-predicates.c: New predicates for hard float.
18358 * config/nds32/nds32-protos.h: Declare functions for hard float.
18359 * config/nds32/nds32.c: Implementation for hard float configuration.
18360 * config/nds32/nds32.h: Definitions for hard float configuration.
18361 * config/nds32/nds32.md: Include hard float machine description and
18362 modify patterns for hard float configuration.
18363 * config/nds32/nds32.opt: New options for hard float configuration.
18364 * config/nds32/predicates.md: New predicates for hard float
18367 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18369 * common/config/nds32/nds32-common.c
18370 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18372 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18374 PR middle-end/85195
18375 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18376 CONSTRUCTOR_ELT (ctor, ...)->value.
18378 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18381 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18383 2018-04-05 Tom de Vries <tom@codesourcery.com>
18386 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18389 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18390 Kito Cheng <kito.cheng@gmail.com>
18392 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18393 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18394 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18395 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18397 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18398 Kito Cheng <kito.cheng@gmail.com>
18400 * config/nds32/constraints.md (Ufe): New memory constraint.
18401 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18402 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18403 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18405 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18406 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18408 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18410 * config/nds32/nds32.md: Use optimize_size in the condition for
18411 alu-shift instructions.
18413 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18415 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18417 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18419 * config/nds32/nds32.md (negsi2): Refine pattern.
18421 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18422 Chung-Ju Wu <jasonwucj@gmail.com>
18424 * config/nds32/iterators.md (shift_rotate): New code iterator.
18425 (shift): New code attribute.
18426 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18427 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18428 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18429 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18430 bit-wise operations.
18431 (andsi3, *andsi3): Ditto.
18432 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18433 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18434 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18435 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18436 nds32_ior_operand, nds32_xor_operand): New predicates.
18438 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18440 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18441 (addsi3, subsi3): ... this.
18443 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18445 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18447 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18449 * config/nds32/nds32.md: Adjust indention.
18451 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18453 * config/nds32/nds32.md (feature): New attribute.
18455 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18457 * config/nds32/nds32.md (subtype): New attribute.
18459 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
18462 * config/arm/arm-builtins.c (arm_expand_builtin): Change
18463 expansion to perform a bitwise AND of the argument followed by a
18464 boolean negation of the result.
18466 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
18468 PR rtl-optimization/84878
18469 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18470 the basic block. Assert the use reference is not artificial and that
18471 it has an associated insn.
18473 2018-04-04 Michael Matz <matz@suse.de>
18475 * builtins.c (compute_objsize): Pass correct operand
18476 to array_at_struct_end_p.
18478 2018-04-04 Richard Biener <rguenther@suse.de>
18481 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18482 from contexts for DINFO_LEVEL_TERSE and below.
18484 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18486 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18487 resiter_operand condition.
18488 * config/nds32/nds32.md (*move<mode>): Ditto.
18490 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18491 Monk Chiang <sh.chiang04@gmail.com>
18493 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18495 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18497 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18499 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18500 Kito Cheng <kito.cheng@gmail.com>
18502 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18503 nds32_cond_code_str, output_cond_branch,
18504 output_cond_branch_compare_zero, nds32_expand_cbranch,
18505 nds32_expand_cstore, nds32_expand_movcc,
18506 nds32_output_cbranchsi4_equality_zero,
18507 nds32_output_cbranchsi4_equality_reg,
18508 nds32_output_cbranchsi4_equality_reg_or_const_int,
18509 nds32_output_cbranchsi4_greater_less_zero: New functions.
18510 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18511 nds32_expand_cstore, nds32_expand_movcc,
18512 nds32_output_cbranchsi4_equality_zero,
18513 nds32_output_cbranchsi4_equality_reg,
18514 nds32_output_cbranchsi4_equality_reg_or_const_int,
18515 nds32_output_cbranchsi4_greater_less_zero): Declare.
18516 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18517 nds32_rimm11s_operand): New predicates.
18518 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18519 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18522 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18524 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18525 * config/nds32/nds32.md: Ditto.
18526 * config/nds32/pipelines.md: Ditto.
18528 2018-04-04 Richard Biener <rguenther@suse.de>
18530 PR tree-optimization/85168
18531 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18532 propagating abnormals.
18534 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18536 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18538 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18539 Kito Cheng <kito.cheng@gmail.com>
18541 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18542 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18543 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18544 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18545 * config/nds32/nds32.md (sibcall_internal): New.
18546 (sibcall_register): Remove.
18547 (sibcall_immediate): Remove.
18548 (sibcall_value_internal): New.
18549 (sibcall_value_register): Remove.
18550 (sibcall_value_immediate): Remove.
18551 * config/nds32/predicates.md (nds32_general_register_operand): New.
18552 (nds32_call_address_operand): New.
18554 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18556 PR rtl-optimization/85167
18557 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18558 bb_defs if *split_p, instead preinitialize it to NULL.
18560 PR tree-optimization/85156
18561 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18562 evaluating the argument multiple times.
18564 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18566 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18568 (_mm_cvtpd_ps): Likewise.
18569 (_mm_cvttpd_epi32): Likewise.
18570 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18571 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18572 vector, pixel, and bool following altivec.h include.
18574 2018-04-03 Martin Sebor <msebor@redhat.com>
18576 * doc/extend.texi (Common Function Attributes): Clarify.
18577 (const attribute): Likewise.
18578 (pure attribute): Likewise.
18580 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18583 * config/i386/i386.c (ix86_expand_vector_set): Use
18584 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18586 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18588 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18589 instructions when changing rounding bits to preserve precision bits
18590 in the x87 control word.
18592 2018-04-03 Martin Liska <mliska@suse.cz>
18594 PR tree-optimization/82491
18595 * rtl.h (strip_offset_and_add): Replace += suboffset with
18596 poly_uint64 () + suboffset.
18598 2018-03-29 Martin Liska <mliska@suse.cz>
18599 Martin Jambor <mjambor@suse.cz>
18602 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18603 param_type is not an integral or pointer type.
18605 2018-04-03 Richard Biener <rguenther@suse.de>
18607 * sese.h (recompute_all_dominators): Remove.
18609 2018-04-02 Martin Sebor <msebor@redhat.com>
18611 * doc/invoke.texi (-Wrestrict): Fix typos.
18613 2018-04-02 Jim Wilson <jimw@sifive.com>
18615 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18616 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18617 (<optab>di3, <optab>si3_extend): Likewise.
18618 (<optab>si3_mask, <optab>si3_mask_1): New.
18619 (<optab>di3_mask, <optab>di3_mask_1): New.
18620 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18621 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18622 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18624 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18626 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18629 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18631 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18632 (nds32_canonicalize_comparison): New function.
18634 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18635 Kito Cheng <kito.cheng@gmail.com>
18636 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18638 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18639 * config/nds32/constants.md (unspec_volatile_element): Add
18640 UNSPEC_VOLATILE_RELAX_GROUP.
18641 * config/nds32/nds32-relax-opt.c: New file.
18642 * config/nds32/nds32-predicates.c
18643 (nds32_symbol_load_store_p): New function.
18644 * config/nds32/nds32-protos.h
18645 (nds32_symbol_load_store_p): Declare function.
18646 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18647 * config/nds32/nds32.c
18648 (nds32_register_pass): New function to register pass.
18649 (nds32_register_passes): New function to register passes.
18650 * config/nds32/nds32.md (relax_group): New pattern.
18651 * config/nds32/nds32.opt (mrelax-hint): New option.
18652 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18654 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18656 * config/nds32/t-nds32: Modify files dependency.
18658 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18660 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18661 (PROFILE_HOOK): Define its implementation.
18663 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18665 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18666 type and 32-bit size.
18668 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18670 PR middle-end/85090
18671 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18672 (V_128_256): New mode iterator.
18673 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18674 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18675 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18677 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18678 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18680 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18683 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18684 NaN inputs correctly.
18686 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18689 * config/rs6000/vsx.md (??r): New mode attribute.
18690 (*vsx_mov<mode>_64bit): Use it.
18691 (*vsx_mov<mode>_32bit): Likewise.
18693 2018-03-30 Martin Sebor <msebor@redhat.com>
18695 PR tree-optimization/84818
18696 * builtins.c (check_access): Use warning_n.
18698 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18701 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18703 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18706 2018-03-30 Julia Koval <julia.koval@intel.com>
18709 * x86-tune.def (movx, partial_reg_dependency): Enable for
18712 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18714 PR inline-asm/84985
18715 * lra-constraints.c (process_alt_operands): Move setting
18716 this_alternative_matches below.
18718 2018-03-29 Martin Liska <mliska@suse.cz>
18721 * doc/invoke.texi: Document how LTO works with debug info.
18722 Describe auto-load support of binutils. Mention 'x86-64'
18723 as valid option value of -march option.
18725 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18727 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18730 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18731 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18732 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18735 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18738 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18739 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18740 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18741 for RS6000_BTM_POWERPC64.
18742 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18743 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18744 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18747 (DIVDEU): Likewise.
18749 2018-03-28 Carl Love <cel@us.ibm.com>
18752 2017-09-27 Carl Love <cel@us.ibm.com>
18754 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18755 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18756 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18759 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18761 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18762 instead of __vector bool.
18763 (_mm_max_pu8): Likewise.
18764 (_mm_min_pi16): Likewise.
18766 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18769 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18770 (DIVWEUO): Likewise.
18771 (DIVDEO): Likewise.
18772 (DIVDEUO): Likewise.
18773 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18774 DIVWEUO and DIVDEUO.
18775 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18776 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18777 (div_extend): Likewise.
18778 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18780 (__builtin_divweuo): Likewise.
18781 (__builtin_divdeo): Likewise.
18782 (__builtin_divdeuo): Likewise.
18784 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18787 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18788 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18790 PR tree-optimization/82004
18791 * gimple-match-head.c (optimize_pow_to_exp): New function.
18792 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18793 Don't fold to exp if optimize_pow_to_exp is false.
18795 2018-03-28 Martin Liska <mliska@suse.cz>
18798 * calls.c (initialize_argument_information): Fix trailing space.
18799 * common.opt: Fix typo and provide better explanation for
18800 -fsanitize-coverage option.
18801 * config/i386/i386.opt: Fix typo.
18803 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18804 Martin Liska <mliska@suse.cz>
18807 * gimplify.c (asan_poison_variable): Don't do the check for
18808 gimplify_omp_ctxp here.
18809 (gimplify_decl_expr): Do it here.
18810 (gimplify_target_expr): Likewise.
18812 2018-03-28 Martin Liska <mliska@suse.cz>
18815 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18816 chkp_type_bounds_count if MPX is not enabled.
18818 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18820 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18822 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18825 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18826 function to create the function decl for complex long double
18827 multiply and divide for -mabi=ieeelongdouble.
18828 (init_float128_ieee): Call it.
18830 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18833 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18834 -fcf-protection=branch -mibt.
18835 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18837 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18840 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18841 arm_word_relocations.
18843 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18846 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18847 extern array declarations.
18849 2018-03-27 Richard Biener <rguenther@suse.de>
18851 PR middle-end/84067
18852 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18853 explicit single_use checks.
18855 2018-03-27 Richard Biener <rguenther@suse.de>
18857 PR tree-optimization/85082
18858 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18861 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18863 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18864 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18865 Turn on fasynchronous-unwind-tables and funwind-tables.
18867 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18870 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18871 (*bmi_blsr_<mode>_ccz): Ditto.
18873 2018-03-26 Tom de Vries <tom@codesourcery.com>
18875 PR tree-optimization/85063
18876 * omp-general.c (offloading_function_p): New function. Factor out
18878 * omp-offload.c (pass_omp_target_link::gate): ... here.
18879 * omp-general.h (offloading_function_p): Declare.
18880 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18881 with attribute omp declare target for offloading functions.
18883 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18885 PR tree-optimization/84005
18886 * tree-data-ref.h (get_base_for_alignment): Declare.
18887 * tree-data-ref.c (get_base_for_alignment_1): New function.
18888 (get_base_for_alignment): Likewise.
18889 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18890 get_base_for_alignment to find a suitable base object, instead
18891 of always using drb->base_address.
18893 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18895 PR inline-asm/85022
18896 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18897 known size by default.
18899 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18901 PR inline-asm/85030
18902 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18903 and non BLKmode operands.
18905 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18908 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18909 Clean up attributes.
18911 2018-03-23 Richard Biener <rguenther@suse.de>
18914 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18915 we are going to emit early debug for LTO.
18917 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18919 PR inline-asm/85034
18920 * function.c (match_asm_constraints_1): Don't optimize if input
18921 doesn't satisfy general_operand predicate for output's mode.
18923 PR inline-asm/85022
18924 * alias.c (write_dependence_p): Don't require for x_canonicalized
18925 non-VOIDmode if x has VOIDmode.
18928 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18929 just don't try to optimize it rather than assert it never happens.
18931 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18933 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18934 macro expansions for definition of ST_INTERNAL_<mode> and
18935 LD_INTERNAL_<mode> builtins.
18936 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18938 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18940 (altivec_expand_st_builtin): Likewise.
18941 (altivec_expand_builtin): Remove calls to deleted functions.
18942 (rs6000_address_for_altivec): Delete this function.
18943 * config/rs6000/vector.md: Remove expands for
18944 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18946 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18949 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18950 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18951 re-computing once computed.
18952 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18953 (arm_init_machine_status): Initialize
18954 machine->static_chain_stack_bytes.
18956 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18959 * doc/extend.texi: Add four new prototypes for vec_ld.
18960 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18961 definitions for more logical presentation.
18962 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18963 entries for V1TI variants of __builtin_altivec_ld builtin.
18964 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18965 handling of V1TI variant of LVX icode pattern.
18966 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18967 (rs6000_gimple_fold_builtin): Likewise.
18968 (altivec_init_builtins): Add code to define
18969 __builtin_altivec_lvx_v1ti function.
18971 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18973 PR inline-asm/84941
18974 * function.c (match_asm_constraints_1): Don't do the optimization
18975 if input isn't a REG, SUBREG, MEM or constant.
18977 2018-03-22 Tom de Vries <tom@codesourcery.com>
18979 PR tree-optimization/84956
18980 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18981 bb_has_abnormal_pred.
18983 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18986 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18987 DECL_INITIAL (decl) to decl at the end.
18988 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18989 adjust the comment.
18991 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18993 * doc/extend.texi (__builtin_tgmath): Document when complex
18994 integer types are treated as _Complex _Float64.
18996 2018-03-21 Tom de Vries <tom@codesourcery.com>
18998 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19000 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19002 PR tree-optimization/84960
19003 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19004 if it is ENTRY block, move them into single succ of ENTRY in that case.
19006 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
19008 PR tree-optimization/84811
19009 * poly-int.h (poly_span_traits): Remove the T3 parameter and
19010 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19011 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19012 (known_subrange_p): Update accordingly. Cast each value involved
19013 in the size comparison, rather than casting the result of the
19016 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19018 PR tree-optimization/84982
19019 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19020 by flipping the least significant bit rather than all bits from
19021 bitpos to bitpos + bitsize - 1.
19023 2018-03-21 Nathan Sidwell <nathan@acm.org>
19025 * doc/extend.texi (Deprecated Features): Remove mention of
19026 long-deleted deprecations.
19028 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19031 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19032 * configure: Regenerate.
19034 2018-03-21 Tom de Vries <tom@codesourcery.com>
19036 PR tree-optimization/83126
19037 * tree-parloops.c (num_phis): New function.
19038 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19040 2018-03-21 Nathan Sidwell <nathan@acm.org>
19042 * doc/extend.texi (Deprecated Features): Update deprecated flags,
19043 mention anon-struct/union members and trailing attributes.
19045 2018-03-21 Bin Cheng <bin.cheng@arm.com>
19047 PR tree-optimization/84969
19048 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19049 builtin memset partitions if they set different rhs values.
19051 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19053 PR rtl-optimization/84989
19054 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19055 VEC_DUPLICATE with scalar result mode.
19057 2018-03-21 Martin Liska <mliska@suse.cz>
19060 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19061 not intended return statement.
19063 2018-03-21 Martin Liska <mliska@suse.cz>
19066 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19067 (chkp_find_bound_slots_1): Limit number of iterations.
19069 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
19072 * Minor grammar fixes for x86 options.
19074 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19077 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19078 holding REG_CFA_RESTORE notes, instead turn them into a USE.
19080 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
19083 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19084 (altivec_lvx_<mode>_1op): Likewise.
19085 (altivec_stvx_<mode>_2op): Likewise.
19086 (altivec_stvx_<mode>_1op): Likewise.
19087 (altivec_lvx_<VM2:mode>): New define_expand.
19088 (altivec_stvx_<VM2:mode>): Likewise.
19089 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19090 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19091 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19092 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19093 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19094 (rs6000_gen_lvx): Likewise.
19095 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19096 (altivec_expand_stv_builtin): Likewise.
19097 (altivec_expand_builtin): Likewise.
19098 * config/rs6000/vector.md: Likewise.
19100 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19103 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19106 2018-03-20 Richard Biener <rguenther@suse.de>
19109 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19110 sign-conversions as zero, fall back to standard scalar_stmt
19113 2018-03-20 Martin Liska <mliska@suse.cz>
19116 * predict.c (rebuild_frequencies): Handle case when we have
19117 PROFILE_ABSENT, but flag_guess_branch_prob is false.
19119 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19122 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19123 flag_section_anchors.
19124 * varasm.c (use_blocks_for_decl_p): Remove hack for
19125 dw2_force_const_mem.
19128 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19130 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
19131 be created, use lowpart_subreg of operands[0] rather than operands[0]
19133 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19134 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19135 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19136 and n constraint instead of aarch64_shift_imm_di and Usd.
19137 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19138 (*aarch64_<optab>_reg_minus<mode>3): ... this.
19140 2018-03-20 Sudakshina Das <sudi.das@arm.com>
19143 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19144 to favor GPR over NEON registers.
19145 (<shift>di3_neon): Likewise.
19147 2018-03-20 Tom de Vries <tom@codesourcery.com>
19150 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19151 (nvptx_process_pars): Emit bar.sync asap and alap.
19153 2018-03-20 Tom de Vries <tom@codesourcery.com>
19156 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19157 seen_label if seen_label is already set.
19159 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19162 * config/i386/i386.c (fold_builtin_cpu): For features above 31
19163 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19164 Use 1U instead of 1. Formatting fixes.
19167 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19168 instead of TREE_TYPE (s1) for the return value.
19170 2018-03-19 Jakub Jelinek <jakub@redhat.com>
19172 PR tree-optimization/84946
19173 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19174 bitsize + bitsize in poly_uint64 rather than poly_int64.
19177 * dwarf2asm.c: Include fold-const.c.
19178 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19179 of decl rather than decl itself.
19181 PR rtl-optimization/84643
19182 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19184 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
19187 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19188 calling assemble_variable.
19190 2018-03-19 Sudakshina Das <sudi.das@arm.com>
19193 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19194 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19196 2018-03-19 Jim Wilson <jimw@sifive.com>
19199 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19200 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19201 (riscv_first_stack_step): Likewise.
19202 (riscv_option_override): Use STACK_BOUNDARY instead of
19203 MIN_STACK_BOUNDARY.
19204 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19205 MIN_STACK_BOUNDARY.
19206 (BIGGEST_ALIGNMENT): Set to 128.
19207 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19208 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19211 2018-03-19 Richard Biener <rguenther@suse.de>
19213 PR tree-optimization/84933
19214 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19215 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19217 2018-03-19 Richard Biener <rguenther@suse.de>
19219 PR tree-optimization/84859
19220 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19221 (cond_if_else_store_replacement): Perform sinking operation on
19222 single-store BBs regardless of MAX_STORES_TO_SINK setting.
19223 Generalize what a BB with a single eligible store is.
19225 2018-03-19 Richard Biener <rguenther@suse.de>
19227 PR tree-optimization/84929
19228 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19229 chrec_is_positive against non-chrec arg.
19231 2018-03-19 Tamar Christina <tamar.christina@arm.com>
19234 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19236 2018-03-18 Martin Liska <mliska@suse.cz>
19238 PR rtl-optimization/84635
19239 * regrename.c (build_def_use): Use matches_mode only when
19242 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
19244 PR tree-optimization/84913
19245 * tree-vect-loop.c (vectorizable_reduction): Don't try to
19246 vectorize chains of COND_EXPRs.
19248 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19250 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19252 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19254 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19256 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19258 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19260 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19261 Kito Cheng <kito.cheng@gmail.com>
19263 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19264 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19265 (nds32_adjust_reg_alloc_order): New function.
19266 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19268 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
19270 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19271 nds32_print_operand, nds32_print_operand_address): Use
19272 HOST_WIDE_INT_PRINT_DEC instead.
19274 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19276 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19278 2018-03-17 Jakub Jelinek <jakub@redhat.com>
19281 * config/i386/i386.c (initial_ix86_tune_features,
19282 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19283 unsigned long long.
19284 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19285 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19286 rather than 1u << ix86_tune. Formatting fix.
19287 (ix86_option_override_internal): Change ix86_arch_mask from
19288 unsigned int to unsigned HOST_WIDE_INT, initialize to
19289 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19290 (ix86_function_specific_restore): Likewise.
19292 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19295 * postreload.c (reload_combine_recognize_pattern): Perform
19296 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19297 truncate_int_for_mode the result for the destination's mode.
19300 * hsa-gen.c (mem_type_for_type): Fix comment typo.
19301 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19303 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19306 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
19309 * lra-assigns.c (lra_split_hard_reg_for): Don't use
19310 regno_allocno_class_array and sorted_pseudos.
19311 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19312 insns where regno is used.
19314 2018-03-16 Martin Liska <mliska@suse.cz>
19317 * multiple_target.c (create_dispatcher_calls): Redirect
19318 reference in the symbol table.
19320 2018-03-16 Martin Liska <mliska@suse.cz>
19323 * multiple_target.c (create_dispatcher_calls): Redirect also
19326 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19330 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19331 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19332 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19334 2018-03-16 Julia Koval <julia.koval@intel.com>
19336 * doc/invoke.texi (Skylake Server): Add CLWB.
19337 Cannonlake): Remove CLWB.
19339 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19341 PR tree-optimization/84841
19342 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19344 (FLOAT_ONE_CONST_TYPE): Define.
19345 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19346 (sort_by_operand_rank): Put entries with higher constant_type last
19347 rather than first to match comments.
19349 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19351 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19354 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19357 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19358 check and use address of target always.
19360 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19363 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19364 (indirect_thunk_bnd_needed): Likewise.
19365 (indirect_thunks_used): Likewise.
19366 (indirect_thunks_bnd_used): Likewise.
19367 (indirect_return_needed): New.
19368 (indirect_return_bnd_needed): Likewise.
19369 (output_indirect_thunk_function): Add a bool argument for
19371 (output_indirect_thunk_function): Don't generate alias for
19372 function return thunk.
19373 (ix86_code_end): Call output_indirect_thunk_function to generate
19374 function return thunks.
19375 (ix86_output_function_return): Set indirect_return_bnd_needed
19376 and indirect_return_needed instead of indirect_thunk_bnd_needed
19377 and indirect_thunk_needed.
19379 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19381 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19382 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19383 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19385 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19386 Paul Hua <paul.hua.gm@gmail.com>
19389 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19391 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19393 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19394 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19395 resp. SFmode cases.
19397 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19400 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19401 instead of GET_MODE_SIZE when comparing Units.
19403 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19406 * varasm.c (hash_section): Return an unchangeble hash value
19407 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19408 Return !aarch64_can_use_per_function_literal_pools_p ().
19410 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19413 * optabs.c (emit_conditional_move): Pass address of cmode's copy
19414 rather than address of cmode as last argument to prepare_cmp_insn.
19416 2018-03-15 Julia Koval <julia.koval@intel.com>
19418 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19419 F_AVX512VNNI, F_AVX512BITALG): New.
19421 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
19424 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
19425 insn for floating-point loads and stores.
19427 2018-03-14 Carl Love <cel@us.ibm.com>
19429 * config/rs6000/rs6000-c.c: Add macro definitions for
19430 ALTIVEC_BUILTIN_VEC_PERMXOR.
19431 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19432 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19433 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19434 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19436 * config/doc/extend.texi: Add prototypes for vec_permxor.
19438 2018-03-14 David Malcolm <dmalcolm@redhat.com>
19441 * diagnostic-show-locus.c (class layout_point): Convert m_line
19442 from int to linenum_type.
19443 (line_span::comparator): Use linenum "compare" function when
19444 comparing line numbers.
19445 (test_line_span): New function.
19446 (layout_range::contains_point): Convert param "row" from int to
19448 (layout_range::intersects_line_p): Likewise.
19449 (layout::will_show_line_p): Likewise.
19450 (layout::print_source_line): Likewise.
19451 (layout::should_print_annotation_line_p): Likewise.
19452 (layout::print_annotation_line): Likewise.
19453 (layout::print_leading_fixits): Likewise.
19454 (layout::annotation_line_showed_range_p): Likewise.
19455 (struct line_corrections): Likewise for field m_row.
19456 (line_corrections::line_corrections): Likewise for param "row".
19457 (layout::print_trailing_fixits): Likewise.
19458 (layout::get_state_at_point): Likewise.
19459 (layout::get_x_bound_for_row): Likewise.
19460 (layout::print_line): Likewise.
19461 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19462 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19463 * input.c (selftest::test_linenum_comparisons): New function.
19464 (selftest::input_c_tests): Call it.
19465 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19466 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19467 * selftest.h (ASSERT_GT): New macro.
19468 (ASSERT_GT_AT): New macro.
19469 (ASSERT_LT): New macro.
19470 (ASSERT_LT_AT): New macro.
19472 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19474 PR rtl-optimization/84780
19475 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19477 2018-03-14 Martin Liska <mliska@suse.cz>
19479 * tree.c (record_node_allocation_statistics): Use
19480 get_stats_node_kind.
19481 (get_stats_node_kind): New function extracted from
19482 record_node_allocation_statistics.
19483 (free_node): Use get_stats_node_kind.
19485 2018-03-14 Richard Biener <rguenther@suse.de>
19487 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19488 that the value-set of ANTIC_IN doesn't grow.
19491 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19493 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19494 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19496 2018-03-14 Julia Koval <julia.koval@intel.com>
19498 * config.gcc (icelake-client, icelake-server): New.
19500 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19501 (initial_ix86_arch_features): Ditto.
19502 (PTA_SKYLAKE): Add SGX.
19503 (PTA_ICELAKE): Remove.
19504 (PTA_ICELAKE_CLIENT): New.
19505 (PTA_ICELAKE_SERVER): New.
19506 (ix86_option_override_internal): Split up icelake on icelake client and
19508 (get_builtin_code_for_version): Ditto.
19509 (fold_builtin_cpu): Ditto.
19510 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19511 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19512 * config/i386/i386.h (processor_type): Ditto.
19513 * doc/invoke.texi: Ditto.
19515 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19518 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19519 INTEGER_CST offset, add it together with bitpos / 8 and
19520 sign extend based on POINTER_SIZE.
19524 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19527 * config/i386/constraints.md (Yc): New register constraint.
19528 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19529 Use Yc constraint for alternative 2 of operand 0. Remove
19530 preferred_for_speed attribute.
19532 2018-03-14 Richard Biener <rguenther@suse.de>
19534 PR tree-optimization/84830
19535 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19536 with the old one to avoid oscillations.
19538 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19541 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19543 (assign_by_spills): Return a flag of reload assignment failure.
19544 Do not process the reload assignment failures. Do not spill other
19545 reload pseudos if they has the same reg class. Update n if
19547 (lra_assign): Add a return arg. Set up from the result of
19548 assign_by_spills call.
19549 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19550 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19551 usage_insns if it is not NULL.
19552 (spill_hard_reg_in_range): New function.
19553 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19554 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19555 function prototypes.
19556 (lra_assign): Change prototype.
19557 * lra.c (lra): Add code to deal with fails by splitting hard reg
19560 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19562 * config/riscv/riscv.opt (mrelax): New option.
19563 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19564 "norelax" when riscv_mrelax is disabled.
19565 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19567 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19570 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19571 reassociation for int modes.
19573 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19575 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19576 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19578 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19579 * config/aarch64/aarch64-sve.md
19580 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19581 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19582 (*extend<mode><Vwide>2): Rename to...
19583 (aarch64_sve_extend<mode><Vwide>2): ...this.
19584 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19585 renaming the old pattern to...
19586 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19588 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19589 define_expand, renaming the old pattern to...
19590 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19591 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19592 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19593 account when deciding which SVE instruction the optab should use.
19594 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19596 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19598 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19599 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19600 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19601 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19602 (tlsdesc_small_<mode>): Turn a define_expand and use
19603 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19604 (tlsdesc_small_advsimd_<mode>): ...this.
19605 (tlsdesc_small_sve_<mode>): New pattern.
19607 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19609 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19610 (UNSPEC_UMUL_HIGHPART): New constants.
19611 (MUL_HIGHPART): New int iteraor.
19612 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19613 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19615 (*<su>mul<mode>3_highpart): New define_insn.
19617 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19620 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19623 2018-03-13 Martin Liska <mliska@suse.cz>
19626 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19628 (sem_item_optimizer::~sem_item_optimizer): Release it.
19629 (sem_item_optimizer::merge_classes): Register variable aliases.
19630 (sem_item_optimizer::fixup_pt_set): New function.
19631 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19632 * ipa-icf.h: Declare new variables and functions.
19634 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19636 PR middle-end/84834
19637 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19638 integer_pow2p@2 and test integer_pow2p in condition.
19639 (A < 0 ? C : 0): Similarly for @1.
19641 PR middle-end/84831
19642 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19643 characters starting at p contain '\0' character, don't look beyond
19647 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19648 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19651 * reg-stack.c (change_stack): Change update_end var from int to
19652 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19653 also call set_block_for_insn on the newly added insns and rescan.
19656 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19657 on the last operand.
19660 * tree.c (stabilize_reference_1): Return save_expr (e) for
19661 STATEMENT_LIST even if it doesn't have side-effects.
19663 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19665 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19667 2018-03-12 Renlin Li <renlin.li@arm.com>
19669 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19670 aarch64_output_scalar_simd_mov_immediate.
19672 2018-03-12 Martin Sebor <msebor@redhat.com>
19674 PR tree-optimization/83456
19675 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19676 for perfectly overlapping calls to memcpy.
19677 (gimple_fold_builtin_memory_chk): Same.
19678 (gimple_fold_builtin_strcpy): Handle no-warning.
19679 (gimple_fold_builtin_stxcpy_chk): Same.
19680 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19682 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19684 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19685 parameter. Use it for SFmode.
19686 (rs6000_function_arg_advance_1): Adjust.
19687 (rs6000_function_arg): Adjust.
19688 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19690 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19692 PR rtl-optimization/84169
19693 PR rtl-optimization/84780
19694 * combine.c (can_combine_p): Check for a 2-insn combination whether
19695 the destination register is used between the two insns, too.
19697 2018-03-12 Richard Biener <rguenther@suse.de>
19699 PR tree-optimization/84803
19700 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19701 for refs DR analysis didn't process.
19703 2018-03-12 Richard Biener <rguenther@suse.de>
19705 PR tree-optimization/84777
19706 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19707 force-vectorize loops ignore whether we are optimizing for size.
19709 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19711 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19712 (TARGET_MD_ASM_ADJUST): Define.
19714 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19715 Kito Cheng <kito.cheng@gmail.com>
19716 Chung-Ju Wu <jasonwucj@gmail.com>
19718 * config/nds32/nds32.c (nds32_compute_stack_frame,
19719 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19720 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19721 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19722 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19723 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19724 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19725 * config/nds32/nds32.md (prologue, epilogue): Use macro
19726 NDS32_V3PUSH_AVAILABLE_P to do checking.
19728 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19731 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19732 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19733 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19734 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19735 addition of most attributes on !orig_type_die or the attribute not
19736 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19738 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19739 Chung-Ju Wu <jasonwucj@gmail.com>
19741 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19742 __NDS32_VH__ macro.
19743 * config/nds32/nds32.opt (mvh): New option.
19745 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19746 Chung-Ju Wu <jasonwucj@gmail.com>
19748 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19750 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19751 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19754 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19755 Chung-Ju Wu <jasonwucj@gmail.com>
19757 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19759 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19760 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19762 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19763 Kito Cheng <kito.cheng@gmail.com>
19764 Chung-Ju Wu <jasonwucj@gmail.com>
19766 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19767 UNSPEC_FFMISM and UNSPEC_FLMISM.
19768 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19769 for ffb, ffmism and flmism.
19770 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19771 (unspec_ffmism): Ditto.
19772 (unspec_flmism): Ditto.
19773 (nds32_expand_builtin_impl): Check if string extension is available.
19774 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19775 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19777 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19780 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19783 * lra-assigns.c (assign_by_spills): Return a flag of reload
19784 assignment failure. Do not process the reload assignment
19785 failures. Do not spill other reload pseudos if they has the same
19787 (lra_assign): Add a return arg. Set up from the result of
19788 assign_by_spills call.
19789 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19790 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19791 usage_insns if it is not NULL.
19792 (spill_hard_reg_in_range): New function.
19793 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19794 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19795 function prototypes.
19796 (lra_assign): Change prototype.
19797 * lra.c (lra): Add code to deal with fails by splitting hard reg
19800 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19803 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19805 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19808 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19809 (dw_val_node): Add val_symbolic_view.
19810 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19811 (symview_upper_bound): New.
19812 (new_line_info_table): Initialize symviews_since_reset.
19813 (dwarf2out_source_line): Count symviews_since_reset and set
19814 symview_upper_bound.
19815 (dw_val_equal_p): Handle symview.
19816 (add_AT_symview): New.
19817 (print_dw_val): Handle symview.
19818 (attr_checksum, attr_checksum_ordered): Likewise.
19819 (same_dw_val_p, size_of_die): Likewise.
19820 (value_format, output_die): Likewise.
19821 (add_high_low_attributes): Use add_AT_symview for entry_view.
19822 (dwarf2out_finish): Reset symview_upper_bound, clear
19825 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19828 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19829 Add strict argument and use it.
19830 (rs6000_split_multireg_move): Update for new strict argument.
19831 (mem_operand_gpr): Disallow all non-offsettable addresses.
19832 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19834 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19837 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19838 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19839 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19842 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19843 decl, use remap_type if we want to use the type.
19845 2018-03-09 Martin Sebor <msebor@redhat.com>
19847 PR tree-optimization/84526
19848 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19850 (builtin_access::generic_overlap): Be prepared to handle non-array
19853 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19855 PR rtl-optimization/84682
19856 * lra-constraints.c (process_address_1): Check is_address flag
19857 for address constraints.
19858 (process_alt_operands): Likewise.
19859 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19860 preprocess_constraints.
19861 * recog.h (preprocess_constraints): Add oploc parameter.
19863 * recog.c (preprocess_constraints): Test address_operand for
19864 CT_ADDRESS constraints.
19866 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19869 * lra-assigns.c (assign_by_spills): Return a flag of reload
19870 assignment failure. Do not process the reload assignment
19871 failures. Do not spill other reload pseudos if they has the same
19873 (lra_assign): Add a return arg. Set up from the result of
19874 assign_by_spills call.
19875 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19876 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19877 usage_insns if it is not NULL.
19878 (spill_hard_reg_in_range): New function.
19879 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19880 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19881 function prototypes.
19882 (lra_assign): Change prototype.
19883 * lra.c (lra): Add code to deal with fails by splitting hard reg
19886 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19889 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19890 Accept complain bool parameter. Only emit errors if it is true.
19891 (arm_parse_cpu_option_name): Likewise.
19892 (arm_target_thumb_only): Adjust callers of the above.
19893 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19894 prototype to take a default true bool parameter.
19895 (arm_parse_arch_option_name): Likewise.
19897 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19898 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19902 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19903 * configure: Regenerate.
19904 * configure.ac ("linker --version-script option"): New.
19905 ("linker soname option"): New.
19907 2018-03-09 Richard Biener <rguenther@suse.de>
19909 PR tree-optimization/84775
19910 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19911 immediate uses of predicate stmts and mark them modified.
19914 PR tree-optimization/84178
19915 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19917 (version_loop_for_if_conversion): Delay update_ssa call.
19918 (tree_if_conversion): Delay update_ssa until after predicate
19921 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19924 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19925 when the function accesses prior frames.
19927 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19930 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19931 gen_llsym, otherwise call maybe_gen_llsym.
19933 PR inline-asm/84742
19934 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19935 has ',' character inside of it.
19937 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19940 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19941 as clobbering CC_REGNUM.
19943 2018-03-08 Richard Biener <rguenther@suse.de>
19945 PR middle-end/84552
19946 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19947 (follow_copies_to_constant): Do not follow SSA names registered
19950 2018-03-08 Richard Biener <rguenther@suse.de>
19952 PR tree-optimization/84178
19953 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19955 (version_loop_for_if_conversion): Delay update_ssa call.
19956 (tree_if_conversion): Delay update_ssa until after predicate
19959 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19961 PR tree-optimization/84178
19962 * tree-if-conv.c (release_bb_predicate): Remove the
19963 the assertion that the stmts have NULL use_ops.
19964 Discard the statements, asserting that they haven't
19965 yet been added to a BB.
19967 2018-03-08 Richard Biener <rguenther@suse.de>
19969 PR tree-optimization/84746
19970 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19971 (phi_translate): Pass in destination ANTIC_OUT set.
19972 (phi_translate_1): Likewise. For a simplified result lookup
19973 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19974 (phi_translate_set): Adjust.
19975 (do_pre_regular_insertion): Likewise.
19976 (do_pre_partial_partial_insertion): Likewise.
19978 2018-03-08 Martin Liska <mliska@suse.cz>
19980 PR gcov-profile/84735
19981 * doc/gcov.texi: Document usage of profile files.
19982 * gcov-io.h: Document changes in the format.
19984 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19988 * dwarf2out.c (struct dw_line_info_table): Update comments for
19990 (FORCE_RESET_NEXT_VIEW): New.
19991 (FORCE_RESETTING_VIEW_P): New.
19992 (RESETTING_VIEW_P): Check for -1 too.
19993 (ZERO_VIEW_P): Likewise.
19994 (new_line_info_table): Force-reset next view.
19995 (dwarf2out_begin_function): Likewise.
19996 (dwarf2out_source_line): Simplify zero_view_p initialization.
19997 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19998 view directly. Omit view when omitting .loc at line 0.
20000 2018-03-08 Jakub Jelinek <jakub@redhat.com>
20002 PR tree-optimization/84740
20003 * tree-switch-conversion.c (process_switch): Call build_constructors
20004 only if info.phi_count is non-zero.
20006 PR tree-optimization/84739
20007 * tree-tailcall.c (find_tail_calls): Check call arguments against
20008 DECL_ARGUMENTS (current_function_decl) rather than
20009 DECL_ARGUMENTS (func) when checking for tail recursion.
20011 2018-03-07 Jakub Jelinek <jakub@redhat.com>
20013 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20014 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20015 Volker Reichelt's entry and add entries for people that perform
20016 GCC fuzzy testing and report numerous bugs.
20018 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
20021 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20022 readonly data in sdata, if that is disabled.
20023 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20024 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20025 -mreadonly-in-sdata option.
20027 2018-03-07 Martin Sebor <msebor@redhat.com>
20029 PR tree-optimization/84468
20030 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20031 basic block when looking for nul assignment.
20033 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
20036 * except.h (output_function_exception_table): Adjust prototype.
20037 * except.c (output_function_exception_table): Remove FNNAME parameter
20038 and add SECTION parameter. Ouput one part of the table at a time.
20039 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20040 the first part of the exception table and emit unwind directives.
20041 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20042 (i386_pe_seh_cold_init): Likewise.
20043 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20044 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20045 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20046 (ix86_output_call_insn): Emit a nop in one more case for SEH.
20047 * config/i386/winnt.c: Include except.h.
20048 (struct seh_frame_state): Add reg_offset, after_prologue and
20049 in_cold_section fields.
20050 (i386_pe_seh_end_prologue): Set seh->after_prologue.
20051 (i386_pe_seh_cold_init): New function.
20052 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20053 to seh->in_cold_section.
20054 (seh_emit_push): Record the offset of the push.
20055 (seh_emit_save): Record the offet of the save.
20056 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20057 Test seh->after_prologue to disregard the epilogue.
20058 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20059 (i386_pe_end_cold_function): New function.
20061 2018-03-07 Jakub Jelinek <jakub@redhat.com>
20064 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20065 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20068 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20070 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20071 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20073 PR middle-end/84723
20074 * multiple_target.c: Include tree-inline.h and intl.h.
20075 (expand_target_clones): Diagnose and fail if node->definition and
20076 !tree_versionable_function_p (node->decl).
20078 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
20080 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20082 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20083 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20084 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20086 2018-03-06 Jakub Jelinek <jakub@redhat.com>
20089 * combine.c (try_combine): Use reg_or_subregno instead of handling
20090 just paradoxical SUBREGs and REGs.
20092 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
20094 * config/arc/arc.c (arc_finalize_pic): Remove function.
20095 (arc_must_save_register): We use single base PIC register, remove
20096 checks to save/restore the PIC register.
20097 (arc_expand_prologue): Likewise.
20098 * config/arc/arc-protos.h (arc_set_default_type_attributes):
20100 (arc_verify_short): Likewise.
20101 (arc_attr_type): Likewise.
20102 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20103 (walk_stores): Likewise.
20104 (arc_address_cost): Make it static.
20105 (arc_verify_short): Likewise.
20106 (branch_dest): Likewise.
20107 (arc_attr_type): Likewise.
20108 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20109 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20110 (arc_final_prescan_insn): Remove inserting the nops due to
20111 hardware hazards. It is done in reorg step.
20112 (insn_length_variant_t): Remove.
20113 (insn_length_parameters_t): Likewise.
20114 (arc_insn_length_parameters): Likewise.
20115 (arc_get_insn_variants): Likewise.
20116 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20118 2018-03-06 Jakub Jelinek <jakub@redhat.com>
20120 PR inline-asm/84683
20121 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20124 PR tree-optimization/84687
20125 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20127 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20129 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20131 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20132 Rename to ppc_speculation_barrier.
20133 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20134 __builtin_ppc_speculation_barrier.
20136 2018-03-05 Jakub Jelinek <jakub@redhat.com>
20139 * combine.c (combine_simplify_rtx): Don't try to simplify if
20140 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20143 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
20145 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20146 to 32 bytes when compiling for POWER9.
20148 2018-03-05 Jakub Jelinek <jakub@redhat.com>
20151 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20152 regparm >= 3 with no arg reg available also for calls with
20153 flag_force_indirect_call. Pass decl to ix86_function_regparm.
20156 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20158 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
20160 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
20163 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20165 2018-03-05 Richard Biener <rguenther@suse.de>
20167 PR tree-optimization/84486
20168 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20169 When inserting a __builtin_assume_aligned call set the LHS
20170 SSA name alignment info accordingly.
20172 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
20174 PR tree-optimization/84114
20175 * config/aarch64/aarch64.c (aarch64_reassociation_width)
20176 Avoid reassociation of FLOAT_MODE addition.
20178 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
20180 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20181 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20182 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20183 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20184 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20185 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20186 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20188 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20189 __builtin_ia32_wbinvd): New builtins.
20190 (SPECIAL_ARGS2): New.
20191 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20192 (SPECIAL_ARGS2): New.
20193 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20194 (ix86_valid_target_attribute_inner_p): Ditto.
20195 (ix86_init_mmx_sse_builtins): Add special_args2.
20196 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20197 TARGET_WBNOINVD_P): New.
20198 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20199 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20200 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20201 * config/i386/immintrin.h (_wbinvd): New intrinsic.
20202 * config/i386/pconfigintrin.h: New file.
20203 * config/i386/wbnoinvdintrin.h: Ditto.
20204 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20206 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20208 2018-03-05 Richard Biener <rguenther@suse.de>
20210 PR tree-optimization/84670
20211 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20213 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20214 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20215 (compute_antic_aux): Only assert the number of values in ANTIC_IN
20216 doesn't grow if all successors (recursively) were visited at least
20219 2018-03-05 Richard Biener <rguenther@suse.de>
20221 PR tree-optimization/84650
20222 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20223 if executed in the loop pipeline.
20225 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
20227 * doc/configfiles.texi (Configuration Files): Move info about
20228 conditionalizing $target-protos.h to...
20229 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
20230 differs from $target-protos.h.
20232 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
20233 Chung-Ju Wu <jasonwucj@gmail.com>
20235 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20236 * config/nds32/nds32-multiple.md (setmemsi): Define.
20237 * config/nds32/nds32-memory-manipulation.c
20238 (nds32_gen_dup_4_byte_to_word_value): New.
20239 (emit_setmem_word_loop): New.
20240 (emit_setmem_byte_loop): New.
20241 (nds32_expand_setmem_loop): New.
20242 (nds32_expand_setmem_loop_v3m): New.
20243 (nds32_expand_setmem_unroll): New.
20244 (nds32_expand_setmem): New.
20246 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20247 Chung-Ju Wu <jasonwucj@gmail.com>
20249 * config/nds32/nds32-memory-manipulation.c
20250 (nds32_emit_load_store): New.
20251 (nds32_emit_post_inc_load_store): New.
20252 (nds32_emit_mem_move): New.
20253 (nds32_emit_mem_move_block): New.
20254 (nds32_expand_movmemsi_loop_unknown_size): New.
20255 (nds32_expand_movmemsi_loop_known_size): New.
20256 (nds32_expand_movmemsi_loop): New.
20257 (nds32_expand_movmemsi_unroll): New.
20258 (nds32_expand_movmemqi): Rename ...
20259 (nds32_expand_movmemsi): ... to this.
20260 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20261 (movmemsi): ... to this.
20262 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20263 (nds32_expand_movmemsi): ... to this.
20265 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20266 Monk Chiang <sh.chiang04@gmail.com>
20267 Chung-Ju Wu <jasonwucj@gmail.com>
20269 * config/nds32/nds32-protos.h
20270 (nds32_expand_load_multiple): New arguments.
20271 (nds32_expand_store_multiple): Ditto.
20272 (nds32_valid_multiple_load_store): Rename ...
20273 (nds32_valid_multiple_load_store_p): ... to this.
20274 * config/nds32/nds32-memory-manipulation.c
20275 (nds32_expand_load_multiple): Refine implementation.
20276 (nds32_expand_store_multiple): Ditto.
20277 * config/nds32/nds32-multiple.md
20278 (load_multiple): Update nds32_expand_load_multiple interface.
20279 (store_multiple): Update nds32_expand_store_multiple interface.
20280 * config/nds32/nds32-predicates.c
20281 (nds32_valid_multiple_load_store): Rename ...
20282 (nds32_valid_multiple_load_store_p): ... to this and refine
20284 * config/nds32/predicates.md
20285 (nds32_load_multiple_and_update_address_operation): New predicate.
20286 (nds32_store_multiple_and_update_address_operation): New predicate.
20288 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20289 Chung-Ju Wu <jasonwucj@gmail.com>
20291 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20292 (combo): New attribute.
20293 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20295 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
20297 * config/nds32/nds32.opt: Change -mcmodel= default value.
20299 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
20300 Monk Chiang <sh.chiang04@gmail.com>
20301 Chung-Ju Wu <jasonwucj@gmail.com>
20303 * config/nds32/constants.md (unspec_element): New enum.
20304 * config/nds32/constraints.md (Umw): New constraint.
20305 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20306 * config/nds32/nds32-intrinsic.md: Likewise.
20307 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20308 (nds32_valid_smw_lwm_base_p): New.
20309 (nds32_output_smw_single_word): New.
20310 (nds32_output_lmw_single_word): New.
20311 (nds32_expand_unaligned_load): New.
20312 (nds32_expand_unaligned_store): New.
20313 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20314 (nds32_output_smw_single_word): Declare.
20315 (nds32_output_lmw_single_word): Declare.
20316 (nds32_expand_unaligned_load): Declare.
20317 (nds32_expand_unaligned_store): Declare.
20318 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20319 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20320 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20321 NDS32_BUILTIN_UASTORE_DW.
20322 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20325 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
20326 Kito Cheng <kito.cheng@gmail.com>
20327 Chung-Ju Wu <jasonwucj@gmail.com>
20329 * config/nds32/nds32-intrinsic.c
20330 (nds32_expand_builtin_null_ftype_reg): Delete.
20331 (nds32_expand_builtin_reg_ftype_imm): Ditto.
20332 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20333 (nds32_read_argument): New.
20334 (nds32_legitimize_target): Ditto.
20335 (nds32_legitimize_argument): Ditto.
20336 (nds32_check_constant_argument): Ditto.
20337 (nds32_expand_unop_builtin): Ditto.
20338 (nds32_expand_unopimm_builtin): Ditto.
20339 (nds32_expand_binop_builtin): Ditto.
20340 (nds32_builtin_decl_impl): Ditto.
20341 (builtin_description): Ditto.
20342 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20343 (nds32_init_builtins_impl): Ditto.
20344 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20345 (nds32_builtin_decl): New.
20346 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20347 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20349 2018-03-02 Jeff Law <law@redhat.com>
20351 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20352 (redundant_insn, fill_simple_delay_slots): Likewise.
20353 (fill_slots_from_thread): Likewise.
20354 * resource.c (mark_referenced_resources): Likewise.
20355 (mark_set_resources, find_dead_or_set_registers): Likewise.
20357 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20359 * substring-locations.h (format_warning_va): Formatting fix for
20360 ATTRIBUTE_GCC_DIAG.
20361 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20363 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20364 * substring-locations.c: Include intl.h.
20365 (format_warning_va): Turned into small wrapper around
20366 format_warning_n_va, renamed to ...
20367 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20368 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20370 (format_warning_at_substring_n): New function.
20371 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20372 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20373 format_warning_at_substring with just a shorter name instead of
20374 const function pointer.
20375 (fmtwarn_n): New function.
20376 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20377 appropriate, get rid of all the fmtstr temporaries, move conditionals
20378 with G_() wrapped string literals directly into fmtwarn arguments,
20379 cast dir.len to (int), formatting fixes.
20381 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20383 * doc/invoke.texi: Remove "Cilk Plus" references.
20385 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20386 Richard Biener <rguenther@suse.de>
20389 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20390 for error or warning attributes if CALL_FROM_THUNK_P is set.
20393 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20396 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20397 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20400 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20401 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20403 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20404 instead of -1U in last predictors element's probability member.
20406 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20409 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20410 arguments if they are comparable.
20412 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20414 PR tree-optimization/84634
20415 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20416 masks and masked_loop_p with a single loop_masks, making sure it's
20417 null for bb vectorization.
20419 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20421 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20422 (vect_analyze_data_ref_access): Use loop->safe_len rather than
20423 loop->force_vectorize to check whether there is no alias.
20425 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20428 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20430 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20432 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20433 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20434 instead of a loop around prev_real_insn.
20435 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20438 PR inline-asm/84625
20439 * config/i386/i386.c (ix86_print_operand): Use conditional
20440 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20443 2018-03-02 Richard Biener <rguenther@suse.de>
20445 PR tree-optimization/84427
20446 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20447 (bitmap_set_subtract_values): Rewrite to handle multiple
20450 (prune_clobbered_mems): Likewise.
20451 (phi_translate): Take edge instead of pred/phiblock.
20452 (phi_translate_1): Likewise.
20453 (phi_translate_set): Likewise. Insert all translated
20454 exprs for a value into the set, keeping possibly multiple
20455 expressions per value.
20456 (compute_antic_aux): Adjust for phi_translate changes.
20457 When intersecting union the expressions and prune those
20458 not in the final value set, keeping possibly multiple
20459 expressions per value. Do not use value-insertion
20460 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20461 all expressions. Add verification that the value-sets
20462 only shrink during iteration.
20463 (compute_partial_antic_aux): Adjust for the phi_translate changes.
20464 (do_pre_regular_insertion): Likewise.
20465 (do_pre_partial_partial_insertion): Likewise.
20467 2018-03-02 Richard Biener <rguenther@suse.de>
20470 * config/darwin.c (saved_debug_info_level): New static global.
20471 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20472 (darwin_asm_lto_end): Restore debug info generation settings.
20474 2018-03-01 Martin Liska <mliska@suse.cz>
20477 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20478 volatile arguments.
20480 2018-03-01 Richard Biener <rguenther@suse.de>
20483 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20484 type annotation with LTO when debug was disabled at compile-time.
20486 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20488 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20490 (mips_final_postscan_insn): Likewise.
20492 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20494 PR rtl-optimization/84528
20495 * alias.c (init_alias_target): Add commentary.
20496 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20497 a unique base value if the frame pointer is not eliminated
20498 to the stack pointer.
20500 2018-03-01 Tom de Vries <tom@codesourcery.com>
20502 PR rtl-optimization/83327
20503 * lra-int.h (hard_regs_spilled_into): Declare.
20504 * lra.c (hard_regs_spilled_into): Define.
20505 (init_reg_info): Init hard_regs_spilled_into.
20506 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20507 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20508 (process_bb_lives): Handle hard_regs_spilled_into.
20509 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20510 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20512 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20514 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20515 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20516 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20517 * config/rs6000/aix72.h: New file.
20519 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20521 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20522 instead of warning_at with conditional singular and plural messages
20526 * stor-layout.c (update_alignment_for_field): For
20527 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20528 && !DECL_PACKED (field), do the alignment update, just use
20529 only desired_align instead of MAX (type_align, desired_align)
20531 (place_field): Don't do known_align < desired_align handling
20532 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20533 is non-NULL, instead do it after rli->prev_field handling and
20534 only if not within a bitfield word. For DECL_PACKED (field)
20535 use type_align of BITS_PER_UNIT.
20537 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20539 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20540 superfluous parentheses and trailing spaces.
20542 2018-02-28 Richard Biener <rguenther@suse.de>
20544 PR tree-optimization/84584
20545 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20546 SCoPs with fake exit edge.
20548 2018-02-28 Martin Liska <mliska@suse.cz>
20551 * timevar.c (timer::print): Fix format to properly print 100%
20554 2018-02-28 Richard Biener <rguenther@suse.de>
20556 PR middle-end/84607
20557 * genmatch.c (capture_info::walk_match): Do not mark
20558 captured expressions without operands as expr_p given
20559 they act more like predicates and should be subject to
20560 "lost tail" side-effect preserving.
20562 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20564 PR rtl-optimization/81611
20565 * auto-inc-dec.c (attempt_change): Move dead note from
20566 mem_insn if it's the next use of regno
20567 (find_address): Take address use of reg holding
20568 non-incremented value. Add parm to limit search to the named
20570 (merge_in_block): Attempt to use a mem insn that is the next
20571 use of the original regno.
20573 2018-02-27 Martin Sebor <msebor@redhat.com>
20576 * doc/invoke.texi (-Wmissing-attributes): New option.
20577 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20579 2018-02-27 Martin Sebor <msebor@redhat.com>
20581 PR translation/84207
20582 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20583 n argument to unsigned HOST_WIDE_INT.
20584 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20585 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20586 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20587 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20589 2018-02-27 Richard Biener <rguenther@suse.de>
20591 PR tree-optimization/84512
20592 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20593 Do not use the estimate returned from record_stmt_cost for
20594 the scalar iteration cost but sum properly using add_stmt_cost.
20596 2018-02-27 Richard Biener <rguenther@suse.de>
20598 PR tree-optimization/84466
20599 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20600 Adjust last change to less strictly validate use operands.
20602 2018-02-27 Martin Liska <mliska@suse.cz>
20604 PR gcov-profile/84548
20605 * gcov.c (process_file): Allow partial overlap and consider it
20606 also as group functions.
20607 (output_lines): Properly calculate range of lines for a group.
20609 2018-02-27 Martin Liska <mliska@suse.cz>
20611 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20612 'ggc' suffixes. Change first column width.
20613 (timer::print): Fix formatting of the column.
20615 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20617 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20618 preserve inline entry blocks for the sake of debug inline
20619 entry point markers alone.
20620 (remove_unused_locals): Suggest in comments a better place to
20621 force the preservation of inline entry blocks that are
20622 otherwise unused, but do not preserve them.
20624 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20626 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20628 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20631 * config/i386/constraints.md (Bs): Replace
20632 ix86_indirect_branch_register with
20633 TARGET_INDIRECT_BRANCH_REGISTER.
20635 * config/i386/i386.md (indirect_jump): Likewise.
20636 (tablejump): Likewise.
20637 (*sibcall_memory): Likewise.
20638 (*sibcall_value_memory): Likewise.
20639 Peepholes of indirect call and jump via memory: Likewise.
20640 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20641 (*sibcall_value_GOT_32): Likewise.
20642 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20643 (GOT_memory_operand): Likewise.
20644 (call_insn_operand): Likewise.
20645 (sibcall_insn_operand): Likewise.
20646 (GOT32_symbol_operand): Likewise.
20647 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20649 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20651 PR rtl-optimization/83496
20652 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20653 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20654 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20655 redundant insn, if any.
20656 (relax_delay_slots): Likewise.
20657 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20659 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20661 PR tree-optimization/83965
20662 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20663 that grouped statements are part of a reduction chain. Return
20664 true if the statement is not marked as a reduction itself but
20665 is part of a group.
20666 (vect_recog_dot_prod_pattern): Don't check whether the statement
20667 is part of a group here.
20668 (vect_recog_sad_pattern): Likewise.
20669 (vect_recog_widen_sum_pattern): Likewise.
20671 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20674 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20676 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20679 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20681 (ix86_output_indirect_function_return): New prototype.
20682 (ix86_split_simple_return_pop_internal): Likewise.
20683 * config/i386/i386.c (indirect_return_via_cx): New.
20684 (indirect_return_via_cx_bnd): Likewise.
20685 (indirect_thunk_name): Handle return va CX_REG.
20686 (output_indirect_thunk_function): Create alias for
20687 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20688 (ix86_output_indirect_jmp): Remove the bool argument.
20689 (ix86_output_indirect_function_return): New function.
20690 (ix86_split_simple_return_pop_internal): Likewise.
20691 * config/i386/i386.md (*indirect_jump): Don't pass false
20692 to ix86_output_indirect_jmp.
20693 (*tablejump_1): Likewise.
20694 (simple_return_pop_internal): Change it to define_insn_and_split.
20695 Call ix86_split_simple_return_pop_internal to split it for
20696 -mfunction-return=.
20697 (simple_return_indirect_internal): Call
20698 ix86_output_indirect_function_return instead of
20699 ix86_output_indirect_jmp.
20701 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20704 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20705 memset and value initialization afterwards.
20707 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20709 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20711 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20714 * common/config/aarch64/aarch64-common.c
20715 (aarch_option_optimization_table[]): Switch
20716 off fomit-frame-pointer
20718 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20719 Chung-Ju Wu <jasonwucj@gmail.com>
20721 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20723 (store_multiple): Ditto.
20725 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20727 * config.gcc: Add --with-cpu support for nds32 target.
20728 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20729 * config/nds32/nds32.opt: Add -mcpu= option.
20731 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20733 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20734 isel=yes): Warn for these deprecated options.
20736 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20738 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20739 ISA_2_5_MASKS_EMBEDDED.
20741 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20743 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20744 p->max as pointers rather than using iterative_hash_expr.
20746 2018-02-23 Carl Love <cel@us.ibm.com>
20748 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20749 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20751 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20752 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20753 P8V_BUILTIN_VEC_VUNSIGNED2.
20755 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20758 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20759 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20761 * lra-constraints.c (curr_insn_transform): Set up
20762 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20764 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20765 * lra-eliminations.c (spill_pseudos): Ditto.
20766 (process_insn_for_elimination): Ditto.
20767 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20768 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20769 LRA_NON_CLOBBERED_ALT.
20771 2018-02-22 Martin Sebor <msebor@redhat.com>
20773 PR tree-optimization/84480
20774 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20775 to maybe_diag_stxncpy_trunc. Call it.
20776 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20777 from gimple_fold_builtin_strcpy. Print inlining stack.
20778 (handle_builtin_stxncpy): Print inlining stack.
20779 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20781 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20784 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20785 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20786 and -fcheck-pointer-bounds are used together.
20787 (indirect_thunk_prefix): New enum.
20788 (indirect_thunk_need_prefix): New function.
20789 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20790 "_nt" instead of "_bnd" for NOTRACK prefix.
20791 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20792 (output_indirect_thunk_function): Likewise.
20794 (ix86_code_end): Update output_indirect_thunk_function calls.
20795 (ix86_output_indirect_branch_via_reg): Replace
20796 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20797 (ix86_output_indirect_branch_via_push): Likewise.
20798 (ix86_output_function_return): Likewise.
20799 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20800 incompatible with -fcf-protection=branch and
20801 -fcheck-pointer-bounds.
20803 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20806 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20807 Change gcc_assert call to output_operand_lossage.
20809 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20811 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20813 2018-02-22 DJ Delorie <dj@redhat.com>
20814 Sebastian Perta <sebastian.perta@renesas.com>
20815 Oleg Endo <olegendo@gcc.gnu.org>
20817 * config/rx/rx.c (rx_rtx_costs): New function.
20818 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20820 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20822 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20824 2018-02-22 Martin Liska <mliska@suse.cz>
20827 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20828 Add "native" as a possible value.
20830 2018-02-22 Martin Liska <mliska@suse.cz>
20833 * config/i386/i386.c (ix86_option_override_internal):
20834 Add "native" as a possible value for -march and -mtune.
20836 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20839 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20840 to all type variants.
20842 PR tree-optimization/84503
20843 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20844 width as info->bitpos + info->bitsize - start.
20845 (merged_store_group::merge_overlapping): Simplify width computation.
20846 (check_no_overlap): New function.
20847 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20848 start + width and last_order of the group, fail if check_no_overlap
20850 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20851 to group if check_no_overlap fails.
20853 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20855 * config/rs6000/altivec.md: Delete contraint arguments to
20856 define_expand, define_split, and define_peephole2, and in
20857 define_insn_and_split if always unused.
20858 * config/rs6000/darwin.md: Ditto.
20859 * config/rs6000/dfp.md: Ditto.
20860 * config/rs6000/rs6000.md: Ditto.
20861 * config/rs6000/sync.md: Ditto.
20862 * config/rs6000/vector.md: Ditto.
20863 * config/rs6000/vsx.md: Ditto.
20865 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20867 * config/rs6000/altivec.md: Write output control strings as braced
20868 blocks instead of double-quoted strings.
20869 * config/rs6000/darwin.md: Ditto.
20870 * config/rs6000/rs6000.md: Ditto.
20871 * config/rs6000/vector.md: Ditto.
20872 * config/rs6000/vsx.md: Ditto.
20874 2018-02-21 Jason Merrill <jason@redhat.com>
20876 PR c++/84314 - ICE with templates and fastcall attribute.
20877 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20879 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20881 * ipa-cp.c (determine_versionability): Fix comment typos.
20883 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20886 * ipa-cp.c (determine_versionability): Do not version functions caling
20889 2018-02-21 Martin Liska <mliska@suse.cz>
20892 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20893 Add "native" as a possible value.
20894 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20895 the macro when native cpu detection is available.
20897 2018-02-21 Martin Liska <mliska@suse.cz>
20900 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20901 Add "native" as a possible value.
20902 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20903 when native cpu detection is available.
20905 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20906 Martin Sebor <msebor@redhat.com>
20908 PR tree-optimization/84478
20909 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20911 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20912 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20913 support which is conservatively correct, for 2 only stay conservative
20914 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20915 argument to the 2 argument get_range_strlen, adjust 6 arg
20916 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20918 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20919 (gimple_fold_builtin_strlen): Pass true as last argument to
20922 2018-02-20 Martin Sebor <msebor@redhat.com>
20924 PR middle-end/84095
20925 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20926 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20927 (builtin_memref::builtin_memref): Factor out parts into
20928 set_base_and_offset and call it.
20930 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20932 PR middle-end/84406
20933 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20934 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20935 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20936 search at the associated MODE_INT.
20938 2018-02-20 Jeff Law <law@redhat.com>
20940 PR middle-end/82123
20941 PR tree-optimization/81592
20942 PR middle-end/79257
20943 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20944 for range data rather than using global data.
20945 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20946 range data rather than using global data.
20947 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20948 pass it to children as needed.
20949 (struct directive::fmtresult): Similarly.
20950 (struct directive::set_width): Similarly.
20951 (struct directive::set_precision): Similarly.
20952 (format_integer, format_directive, parse_directive): Similarly.
20953 (format_none): Accept unnamed vr_values parameter.
20954 (format_percent, format_floating, format_character): Similarly.
20955 (format_string, format_plain): Similarly.
20956 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20957 the EVRP range analyzer for range data rather than using global data.
20958 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20959 gimple-ssa-evrp-analyze.h
20960 (class sprintf_dom_walker): Add after_dom_children member function.
20961 Add evrp_range_analyzer member.
20962 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20963 range analyzer as needed.
20964 (sprintf_dom_walker::after_dom_children): New member function.
20965 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20967 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20968 (evrp_range_analyzer::pop_to_marker): Likewise.
20970 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20972 PR tree-optimization/84419
20973 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20974 with the required type if its current type is compatible but
20977 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20979 PR middle-end/82004
20980 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20981 after vectorization.
20983 2018-02-20 Martin Liska <mliska@suse.cz>
20986 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20987 possible values if we don't have a hint.
20989 2018-02-20 Martin Liska <mliska@suse.cz>
20993 * final.c (shorten_branches): Build align_tab array with one
20995 * opts.c (finish_options): Add alignment option limit check.
20996 (MAX_CODE_ALIGN): Likewise.
20997 (MAX_CODE_ALIGN_VALUE): Likewise.
20998 * doc/invoke.texi: Document maximum allowed option value for
20999 all -falign-* options.
21001 2018-02-19 Jakub Jelinek <jakub@redhat.com>
21004 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21005 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21006 * var-tracking.c (emit_note_insn_var_location): Remove all references
21007 to NOTE_INSN_CALL_ARG_LOCATION.
21008 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21009 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21010 Use copy_rtx_if_shared.
21011 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21012 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21013 (dwarf2out_var_location): Remove handling of
21014 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21016 * final.c (final_scan_insn): Remove all references to
21017 NOTE_INSN_CALL_ARG_LOCATION.
21018 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
21019 before dumping final insns.
21020 * except.c (emit_note_eh_region_end): Remove all references to
21021 NOTE_INSN_CALL_ARG_LOCATION.
21022 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21023 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21024 * config/arc/arc.c (hwloop_optimize): Likewise.
21025 * config/arm/arm.c (create_fix_barrier): Likewise.
21026 * config/s390/s390.c (s390_chunkify_start): Likewise.
21027 * config/sh/sh.c (find_barrier): Likewise.
21028 * config/i386/i386.c (rest_of_insert_endbranch,
21029 ix86_seh_fixup_eh_fallthru): Likewise.
21030 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21031 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21032 * config/frv/frv.c (frv_function_prologue): Likewise.
21033 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
21035 (note_outside_basic_block_p): Remove all references to
21036 NOTE_INSN_CALL_ARG_LOCATION.
21037 * gengtype.c (adjust_field_rtx_def): Likewise.
21038 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21040 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21041 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21044 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21047 PR tree-optimization/84452
21048 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21049 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21052 2018-02-19 Martin Liska <mliska@suse.cz>
21055 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21057 2018-02-19 Martin Liska <mliska@suse.cz>
21058 Richard Sandiford <richard.sandiford@linaro.org>
21060 PR tree-optimization/82491
21061 * gimple-fold.c (get_base_constructor): Make earlier bail out
21064 2018-02-19 Carl Love <cel@us.ibm.com>
21066 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21067 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21069 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21070 P8V_BUILTIN_VEC_NEG.
21072 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
21074 * config/rl78/rl78.md (movdf): New define expand.
21076 2018-02-19 Martin Liska <mliska@suse.cz>
21079 * doc/invoke.texi: Fix typo.
21080 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21082 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
21084 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21085 handle rs6000_single_float and rs6000_double_float specially for
21088 2018-02-16 Jeff Law <law@redhat.com>
21090 * config/rx/rx.c (add_pop_cfi_notes): New function.;
21091 (pop_regs): Use it.
21093 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21096 * ipa-inline.c (inline_small_functions): Fix a typo.
21098 2018-02-16 Nathan Sidwell <nathan@acm.org>
21100 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21102 2018-02-16 Carl Love <cel@us.ibm.com>
21104 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21105 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21106 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21107 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21108 expansion to P8V_BUILTIN_VEC_FLOAT2.
21110 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
21112 PR rtl-optimization/70023
21113 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21114 src_regno into account.
21116 2018-02-16 Carl Love <cel@us.ibm.com>
21118 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21119 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21120 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21121 * config/rs6000/rs6000.c: Remove case statements for
21122 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21123 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21124 and P9V_BUILTIN_VEC_VINSERT4B.
21125 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21126 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21127 * config/rs6000/vsx.md:
21128 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21131 2018-02-16 Carl Love <cel@us.ibm.com>
21133 * config/rs6000/altivec.h: Add builtin names vec_extract4b
21135 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21137 * config/rs6000/rs6000-c.c: Add the definitions for
21138 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21139 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21140 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21141 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
21142 definition for insert4b and define insn *insert3b_internal.
21143 * doc/extend.texi: Add documentation for vec_extract4b.
21145 2018-02-16 Nathan Sidwell <nathan@acm.org>
21147 * doc/extend.texi (Backwards Compatibility): Mention friend
21148 injection. Note for-scope is deprecated.
21149 * doc/invoke.texi (-ffriend-injection): Deprecate.
21151 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
21153 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21154 that moved to I2, also allow destinations that are a paradoxical
21155 subreg (instead of a normal reg).
21157 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
21160 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21163 2018-02-16 Richard Biener <rguenther@suse.de>
21165 PR tree-optimization/84037
21166 PR tree-optimization/84016
21168 * config/i386/i386.c (ix86_builtin_vectorization_cost):
21169 Adjust vec_construct for the fact we need additional higher latency
21170 128bit inserts for AVX256 and AVX512 vector builds.
21171 (ix86_add_stmt_cost): Scale vector construction cost for
21174 2018-02-16 Richard Biener <rguenther@suse.de>
21176 PR tree-optimization/84417
21177 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21178 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21179 (non_rewritable_lvalue_p): Likewise, use poly-ints.
21181 2018-02-16 Martin Liska <mliska@suse.cz>
21184 * internal-fn.def (ASAN_CHECK): Set proper flags.
21185 (ASAN_MARK): Likewise.
21187 2018-02-16 Julia Koval <julia.koval@intel.com>
21189 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21190 from PTA_CANNONLAKE.
21192 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21195 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21196 Use ++iter rather than iter++ for std::list iterators.
21197 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
21198 defer deleting them until all nodes in the forest are processed. Do
21199 free even leaf nodes. Change to_process into auto_vec.
21202 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21203 * vec.h (vec_default_construct): Use memset instead of placement new
21204 if BROKEN_VALUE_INITIALIZATION is defined.
21205 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21206 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21209 PR rtl-optimization/83723
21210 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21211 * lra.c (lra_substitute_pseudo): Likewise. If true, use
21212 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
21214 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21216 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21218 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
21220 PR rtl-optimization/81443
21221 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21222 from inner REGs to paradoxical SUBREGs.
21224 2018-02-16 Richard Biener <rguenther@suse.de>
21226 PR tree-optimization/84399
21227 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21228 For operands we can analyze at their definition make sure we can
21229 analyze them at each use as well.
21231 2018-02-16 Richard Biener <rguenther@suse.de>
21233 PR tree-optimization/84190
21234 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21235 volatile accesses if the decl isn't volatile.
21237 2018-02-15 Jason Merrill <jason@redhat.com>
21239 PR c++/84314 - ICE with templates and fastcall attribute.
21240 * attribs.c (build_type_attribute_qual_variant): Don't clobber
21241 TYPE_CANONICAL on an existing type.
21243 2018-02-15 Jakub Jelinek <jakub@redhat.com>
21245 PR tree-optimization/84383
21246 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21247 dstoff nor call operand_equal_p if dstbase is NULL.
21249 PR tree-optimization/84334
21250 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21251 also a CONSTANT_CLASS_P, punt.
21253 2018-02-14 Jim Wilson <jimw@sifive.com>
21255 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21256 first SMALL_OPERAND check. New local min_second_step. Move assert
21257 to where locals are set. Add TARGET_RVC support.
21258 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21260 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
21262 * doc/invoke.texi: Correct -Wformat-overflow code sample.
21264 2018-02-14 Martin Sebor <msebor@redhat.com>
21266 PR tree-optimization/83698
21267 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21268 arrays constrain the offset range to their bounds.
21269 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21270 (builtin_access::overlap): Avoid setting the size of overlap if it's
21272 (maybe_diag_overlap): Also consider arrays when deciding what values
21273 of offsets to include in diagnostics.
21275 2018-02-14 Martin Sebor <msebor@redhat.com>
21278 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21279 that correspond to the kind of a declaration.
21281 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
21284 * config/pa/pa.md: Load address of PIC label using the linkage table
21285 if the label is nonlocal.
21287 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
21289 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21290 warning message if user requests -maltivec=be.
21291 * doc/invoke.texi: Document deprecation of -maltivec=be.
21293 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
21296 * config/rs6000/rs6000-c.c: Update definitions for
21297 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21298 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21300 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21303 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21304 add _get_ssp intrinsics. Remove argument from
21305 __builtin_ia32_rdssp[d|q].
21306 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21307 * config/i386/i386-builtin.def: Remove argument from
21308 __builtin_ia32_rdssp[d|q].
21309 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21310 ix86_expand_special_args_builtin for _rdssp[d|q].
21311 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21312 Clear register before usage.
21313 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21314 Add documentation for new _get_ssp and _inc_ssp intrinsics.
21316 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
21318 PR tree-optimization/84357
21319 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21320 operand 1 of an ARRAY_REF too.
21322 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
21325 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21326 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21328 (set_of_reg): New struct.
21329 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21330 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21331 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21333 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21334 Split into bitclr, bitset, bitinvert patterns if appropriate.
21335 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21336 use rx_fuse_in_memory_bitop.
21337 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21338 to named insn, correct maximum insn length.
21340 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
21343 * machmode.def: Define a complex mode for PARTIAL_INT.
21344 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21346 * doc/rtl.texi: Document CSPImode.
21347 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21349 (msp430_hard_regno_nregs_with_padding): Likewise.
21351 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21354 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21356 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21358 PR rtl-optimization/84169
21359 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21360 we generated a parallel as new i3 and we split that to new i2 and i3
21361 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21362 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21363 those to i2, not i1. Partially rewrite this scan code.
21365 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21368 * stor-layout.c (place_field): For variable length fields, adjust
21369 offset_align afterwards not just based on the field's alignment,
21370 but also on the size.
21372 PR middle-end/84309
21373 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21374 of exps and logs in the use_exp2 case.
21376 2018-02-13 Jeff Law <law@redhat.com>
21378 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21379 entry for "vector".
21381 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21384 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21388 * common.opt (gas-loc-support, gas-locview-support): New.
21389 (ginline-points, ginternal-reset-location-views): New.
21390 * doc/invoke.texi: Document them. Use @itemx where intended.
21391 (gvariable-location-views): Adjust.
21392 * target.def (reset_location_view): New.
21393 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21394 (TARGET_RESET_LOCATION_VIEW): New.
21395 * doc/tm.texi: Rebuilt.
21396 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21397 (dwarf2out_default_as_locview_support): New.
21398 (output_asm_line_debug_info): Use option variables.
21399 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21400 (output_loc_list): Likewise.
21401 (add_high_low_attributes): Check option variables.
21402 Don't output entry view attribute in strict mode.
21403 (gen_inlined_subroutine_die): Check option variables.
21404 (dwarf2out_inline_entry): Likewise.
21405 (init_sections_and_labels): Likewise.
21406 (dwarf2out_early_finish): Likewise.
21407 (maybe_reset_location_view): New, from...
21408 (dwarf2out_var_location): ... here. Call it.
21409 * debug.h (dwarf2out_default_as_loc_support): Declare.
21410 (dwarf2out_default_as_locview_support): Declare.
21411 * hooks.c (hook_int_rtx_insn_0): New.
21412 * hooks.h (hook_int_rtx_insn_0): Declare.
21413 * toplev.c (process_options): Take -gas-loc-support and
21414 -gas-locview-support from dwarf2out. Enable
21415 -gvariable-location-views by default only with locview
21416 assembler support. Enable -ginternal-reset-location-views by
21417 default only if the target defines the corresponding hook.
21418 Enable -ginline-points by default if location views are
21419 enabled; force it disabled if statement frontiers are
21421 * tree-inline.c (expand_call_inline): Check option variables.
21422 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21424 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
21426 PR tree-optimization/84321
21427 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21428 handling. Also check whether the anti-range contains any values
21429 that satisfy the mask; switch to a VR_RANGE if not.
21431 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
21434 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21436 2018-02-13 Martin Jambor <mjambor@suse.cz>
21439 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21440 of call statements, also set location of a load to a temporary.
21442 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
21444 * config/rl78/rl78.c (add_vector_labels): New function.
21445 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21446 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21447 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21448 which checks that no arguments are passed.
21449 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21450 * doc/extend.texi: Documentation for the new attribute.
21452 2018-02-13 Andreas Schwab <schwab@suse.de>
21454 * config/riscv/linux.h (CPP_SPEC): Define.
21456 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21459 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21460 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21461 OPTION_MASK_ISA_AES as first argument to def_builtin_const
21462 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21463 instead of OPTION_MASK_ISA_PCLMUL as first argument to
21464 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21465 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21466 temporarily for AES and PCLMUL builtins.
21468 PR tree-optimization/84339
21469 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21470 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21473 PR middle-end/84309
21474 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21475 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21476 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21478 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21480 * omp-simd-clone.h: New file.
21481 * omp-simd-clone.c: Include omp-simd-clone.h.
21482 (expand_simd_clones): No longer static.
21483 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21484 cgraph.h and omp-simd-clone.h.
21485 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21486 (vect_recog_widen_shift_pattern): Formatting fix.
21487 (vect_pattern_recog_1): Don't check optab for calls.
21490 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21491 operands[2] into a REG before using gen_lowpart on it.
21493 2018-02-12 Jeff Law <law@redhat.com>
21496 * config/sh/sh.c (find_barrier): Consider a sibling call
21499 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21500 successfully back substituting a reg.
21502 2018-02-12 Richard Biener <rguenther@suse.de>
21504 PR tree-optimization/84037
21505 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21506 parameter, move visited init to caller.
21507 (vect_slp_analyze_operations): Separate cost from validity
21508 check, initialize visited once for all instances.
21509 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21511 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21513 (vect_model_promotion_demotion_cost): Likewise.
21514 (vectorizable_bswap): Guard cost modeling with !slp_node
21515 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21517 (vectorizable_call): Likewise.
21518 (vectorizable_conversion): Likewise.
21519 (vectorizable_assignment): Likewise.
21520 (vectorizable_shift): Likewise.
21521 (vectorizable_operation): Likewise.
21522 (vectorizable_store): Likewise.
21523 (vectorizable_load): Likewise.
21524 (vectorizable_condition): Likewise.
21525 (vectorizable_comparison): Likewise.
21527 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21530 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21531 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21532 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21534 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21536 PR middle-end/83665
21537 * params.def (inline-min-speedup): Increase from 8 to 15.
21538 (max-inline-insns-auto): Decrease from 40 to 30.
21539 * ipa-split.c (consider_split): Add some buffer for function to
21540 be considered inlining candidate.
21541 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21544 2018-02-12 Richard Biener <rguenther@suse.de>
21546 PR tree-optimization/84037
21547 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21548 matched stmts if we cannot swap the non-matched ones.
21550 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21552 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21553 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21554 _mm_maskz_scalef_round_ss): New intrinsics.
21555 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21556 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21557 __builtin_ia32_scalefss_round): Remove.
21558 (__builtin_ia32_scalefsd_mask_round,
21559 __builtin_ia32_scalefss_mask_round): New intrinsics.
21560 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21561 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21562 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21563 "<round_constraint>")): Changed to ...
21564 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21565 "<round_scalar_constraint>")): ... this.
21566 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21567 %0, %1, %2<round_op3>}"): Changed to ...
21568 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21569 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21570 %2<round_scalar_mask_op3>}"): ... this.
21571 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21573 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21575 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21576 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21577 (_mm_maskz_sqrt_round_ss): New intrinsics.
21578 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21579 (__builtin_ia32_sqrtsd_mask_round)
21580 (__builtin_ia32_sqrtss_mask_round): New builtins.
21581 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21582 (__builtin_ia32_sqrtss_round): Remove.
21583 (__builtin_ia32_sqrtsd_mask_round)
21584 (__builtin_ia32_sqrtss_mask_round): New builtins.
21585 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21586 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21587 ((match_operand:VF_128 1 "vector_operand"
21588 "xBm,<round_constraint>")): Changed to ...
21589 ((match_operand:VF_128 1 "vector_operand"
21590 "xBm,<round_scalar_constraint>")): ... this.
21591 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21592 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21593 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21594 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21595 %<iptr>1<round_scalar_mask_op3>}): ... this.
21596 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21597 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21599 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21602 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21603 Cast vec_cmpeq result to correct type.
21604 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21605 Cast vec_cmpgt result to correct type.
21607 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21609 * final.c (final_scan_insn_1): Renamed from...
21610 (final_scan_insn): ... this. New wrapper, to recover
21611 seen from the outermost call in recursive ones.
21612 * config/sparc/sparc.c (output_return): Drop seen from call.
21613 (output_sibcall): Likewise.
21614 * config/visium/visium.c (output_branch): Likewise.
21616 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21618 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21621 2018-02-10 Alan Modra <amodra@gmail.com>
21624 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21625 Specify LR as an input.
21627 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21630 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21631 remove_member_access_dummy_vars): New functions.
21632 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21633 lower_omp_1, execute_lower_omp): Use them.
21635 PR rtl-optimization/84308
21636 * shrink-wrap.c (spread_components): Release todo vector.
21638 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21640 PR rtl-optimization/57193
21641 * ira-color.c (struct allocno_color_data): Add member
21642 conflict_allocno_hard_prefs.
21643 (update_conflict_allocno_hard_prefs): New.
21644 (bucket_allocno_compare_func): Add a preference based on
21645 conflict_allocno_hard_prefs.
21646 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21647 (color_allocnos): Remove a dead code. Initiate
21648 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21650 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21653 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21654 constraint from =wa to wa. Avoid a subreg on the output operand,
21655 instead use a pseudo and subreg it in a move.
21656 (p9_xxbrd_<mode>): Changed to ...
21657 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21658 (p9_xxbrd_v2df): New expander.
21659 (p9_xxbrw_<mode>): Changed to ...
21660 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21661 (p9_xxbrw_v4sf): New expander.
21663 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21665 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21667 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21670 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21671 multiply in 32-bit mode.
21672 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21673 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21676 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21678 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21679 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21680 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21681 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21683 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21686 * dwarf2out.c (is_trivial_indirect_ref): New function.
21687 (dwarf2out_late_global_decl): Do not generate a location
21688 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21689 and that are not defined in the current unit.
21691 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21693 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21694 instead of a libcall for UNORDERED.
21696 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21699 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21700 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21702 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21705 * config/s390/s390.c (s390_set_current_function): Invoke
21706 s390_indirect_branch_settings also if fndecl didn't change.
21708 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21710 * config/rs6000/rs6000.md (blockage): Set length to zero.
21712 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21714 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21716 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21719 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21720 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21724 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21725 PARALLEL incoming that failed vt_get_decl_and_offset check.
21727 PR middle-end/84237
21728 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21729 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21731 (get_variable_section): For decls in named .bss* sections pass true as
21732 second argument to bss_initializer_p.
21734 2018-02-09 Marek Polacek <polacek@redhat.com>
21735 Jakub Jelinek <jakub@redhat.com>
21738 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21739 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21740 Sync some changes from cxx_fold_indirect_ref.
21742 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21744 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21746 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21747 (BLOCK_INLINE_ENTRY_LABEL): New.
21748 (dwarf2out_var_location): Disregard inline entry markers.
21749 (inline_entry_data): New struct.
21750 (inline_entry_data_hasher): New hashtable type.
21751 (inline_entry_data_hasher::hash): New.
21752 (inline_entry_data_hasher::equal): New.
21753 (inline_entry_data_table): New variable.
21754 (add_high_low_attributes): Add DW_AT_entry_pc and
21755 DW_AT_GNU_entry_view attributes if a pending entry is found
21756 in inline_entry_data_table. Add old entry_pc attribute only
21757 if debug nonbinding markers are disabled.
21758 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21759 markers are enabled.
21760 (block_within_block_p, dwarf2out_inline_entry): New.
21761 (dwarf2out_finish): Check that no entries remained in
21762 inline_entry_data_table.
21763 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21764 (final_scan_insn, notice_source_line): Likewise.
21765 (rest_of_clean_state): Skip inline entry markers.
21766 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21768 * gimple.c (gimple_build_debug_inline_entry): New.
21769 * gimple.h (enum gimple_debug_subcode): Add
21770 GIMPLE_DEBUG_INLINE_ENTRY.
21771 (gimple_build_debug_inline_entry): Declare.
21772 (gimple_debug_inline_entry_p): New.
21773 (gimple_debug_nonbind_marker_p): Adjust.
21774 * insn-notes.def (INLINE_ENTRY): New.
21775 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21776 inline entry marker notes.
21777 (print_insn): Likewise.
21778 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21779 (INSN_DEBUG_MARKER_KIND): Likewise.
21780 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21781 * tree-inline.c (expand_call_inline): Build and insert
21782 debug_inline_entry stmt.
21783 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21784 inline entry blocks early, if nonbind markers are enabled.
21785 (dump_scope_block): Dump fragment info.
21786 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21787 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21788 (gimple_build_debug_inline_entry): New.
21789 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21790 Enable/disable inline entry points too.
21791 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21792 (DEBUG_INSN): Describe inline entry markers.
21794 * common.opt (gvariable-location-views): New.
21795 (gvariable-location-views=incompat5): New.
21796 * config.in: Rebuilt.
21797 * configure: Rebuilt.
21798 * configure.ac: Test assembler for view support.
21799 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21800 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21801 * dwarf2out.c (var_loc_view): New typedef.
21802 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21803 (dwarf2out_locviews_in_attribute): New.
21804 (dwarf2out_locviews_in_loclist): New.
21805 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21806 (enum dw_line_info_opcode): Add LI_adv_address.
21807 (struct dw_line_info_table): Add view.
21808 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21809 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21810 (zero_view_p): New variable.
21811 (ZERO_VIEW_P): New macro.
21812 (output_asm_line_debug_info): New.
21813 (struct var_loc_node): Add view.
21814 (add_AT_view_list, AT_loc_list): New.
21815 (add_var_loc_to_decl): Add view param. Test it against last.
21816 (new_loc_list): Add view params. Record them.
21817 (AT_loc_list_ptr): Handle loc and view lists.
21818 (view_list_to_loc_list_val_node): New.
21819 (print_dw_val): Handle dw_val_class_view_list.
21820 (size_of_die): Likewise.
21821 (value_format): Likewise.
21822 (loc_list_has_views): New.
21823 (gen_llsym): Set vl_symbol too.
21824 (maybe_gen_llsym, skip_loc_list_entry): New.
21825 (dwarf2out_maybe_output_loclist_view_pair): New.
21826 (output_loc_list): Output view list or entries too.
21827 (output_view_list_offset): New.
21828 (output_die): Handle dw_val_class_view_list.
21829 (output_dwarf_version): New.
21830 (output_compilation_unit_header): Use it.
21831 (output_skeleton_debug_sections): Likewise.
21832 (output_rnglists, output_line_info): Likewise.
21833 (output_pubnames, output_aranges): Update version comments.
21834 (output_one_line_info_table): Output view numbers in asm comments.
21835 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21836 Call maybe_gen_llsym.
21837 (loc_list_from_tree_1): Adjust.
21838 (add_AT_location_description): Create view list attribute if
21839 needed, check it's absent otherwise.
21840 (convert_cfa_to_fb_loc_list): Adjust.
21841 (maybe_emit_file): Call output_asm_line_debug_info for test.
21842 (dwarf2out_var_location): Reset views as needed. Precompute
21843 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21844 attribute. Set view.
21845 (new_line_info_table): Reset next view.
21846 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21847 (dwarf2out_source_line): Likewise. Output view resets and labels to
21848 the assembler, or select appropriate line info opcodes.
21849 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21850 (optimize_string_length): Catch it. Adjust.
21851 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21852 dw_val_class_view_list, and remove it if no longer needed.
21853 (hash_loc_list): Hash view numbers.
21854 (loc_list_hasher::equal): Compare them.
21855 (optimize_location_lists): Check whether a view list symbol is
21856 needed, and whether the locview attribute is present, and
21857 whether they match. Remove the locview attribute if no longer
21859 (index_location_lists): Call skip_loc_list_entry for test.
21860 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21861 Use output_dwarf_version.
21862 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21863 (struct dw_val_node): Add val_view_list.
21864 * final.c (SEEN_NEXT_VIEW): New.
21865 (set_next_view_needed): New.
21866 (clear_next_view_needed): New.
21867 (maybe_output_next_view): New.
21868 (final_start_function): Rename to...
21869 (final_start_function_1): ... this. Take pointer to FIRST,
21870 add SEEN parameter. Emit param bindings in the initial view.
21871 (final_start_function): Reintroduce SEEN-less interface.
21872 (final): Rename to...
21873 (final_1): ... this. Take SEEN parameter. Output final pending
21874 next view at the end.
21875 (final): Reintroduce seen-less interface.
21876 (final_scan_insn): Output pending next view before switching
21877 sections or ending a block. Mark the next view as needed when
21878 outputting variable locations. Notify debug backend of section
21879 changes, and of location view changes.
21880 (rest_of_handle_final): Adjust.
21881 * toplev.c (process_options): Autodetect value for debug variable
21882 location views option. Warn on incompat5 without -gdwarf-5.
21883 * doc/invoke.texi (gvariable-location-views): New.
21884 (gvariable-location-views=incompat5): New.
21885 (gno-variable-location-views): New.
21887 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21889 PR tree-optimization/84136
21890 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21891 that the result of find_edge is non-NULL.
21893 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21896 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21897 storing integer register in SImode. Fix cost of 256 and 512
21898 byte aligned SSE register store.
21900 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21902 * config/i386/i386.c (ix86_multiplication_cost): Fix
21903 multiplication cost for TARGET_AVX512DQ.
21905 2018-02-08 Marek Polacek <polacek@redhat.com>
21907 PR tree-optimization/84238
21908 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21911 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21913 PR tree-optimization/84265
21914 * tree-vect-stmts.c (vectorizable_store): Don't treat
21915 VMAT_CONTIGUOUS accesses as grouped.
21916 (vectorizable_load): Likewise.
21918 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21920 PR tree-optimization/81635
21921 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21922 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21923 (test_round_for_mask): New functions.
21924 (wide_int_cc_tests): Call test_round_for_mask.
21925 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21926 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21927 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21928 range returned by get_range_info.
21930 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21933 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21934 * symtab.c: Include builtins.h
21935 (symtab_node::output_to_lto_symbol_table_p): Move here
21936 from lto-streamer-out.c:output_symbol_p.
21937 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21938 (output_symbol_p): Move all logic to symtab.c
21939 (produce_symtab): Update.
21941 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21943 * config/s390/s390-opts.h (enum indirect_branch): Define.
21944 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21945 (s390_indirect_branch_via_thunk)
21946 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21947 (enum s390_indirect_branch_type): Define.
21948 * config/s390/s390.c (struct s390_frame_layout, struct
21949 machine_function): Remove.
21950 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21951 (indirect_branch_table_label_no, indirect_branch_table_name):
21953 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21954 (enum s390_indirect_branch_option): Define.
21955 (s390_return_addr_from_memory): New function.
21956 (s390_handle_string_attribute): New function.
21957 (s390_attribute_table): Add new attribute handler.
21958 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21959 (s390_indirect_branch_via_thunk): New function.
21960 (s390_indirect_branch_via_inline_thunk): New function.
21961 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21962 sibling call optimization for non z10 compiles.
21963 (s390_emit_call): Force indirect branch target to be a single
21964 register. Add r1 clobber for non-z10 compiles.
21965 (s390_emit_epilogue): Emit return jump via return_use expander.
21966 (s390_reorg): Handle JUMP_INSNs as execute targets.
21967 (s390_option_override_internal): Perform validity checks for the
21968 new command line options.
21969 (s390_indirect_branch_attrvalue): New function.
21970 (s390_indirect_branch_settings): New function.
21971 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21972 (s390_output_indirect_thunk_function): New function.
21973 (s390_code_end): Implement target hook.
21974 (s390_case_values_threshold): Implement target hook.
21975 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21977 * config/s390/s390.h (struct s390_frame_layout)
21978 (struct machine_function): Move here from s390.c.
21979 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21980 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21981 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21982 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21983 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21984 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21985 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21986 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21987 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21988 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21989 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21990 (mnemonic attribute): Add values which aren't recognized
21992 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21993 pattern for branch conversion. Fix mnemonic attribute.
21994 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21995 indirect branch via thunk if requested.
21996 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21997 ("*indirect_jump"): Disable for branch conversion using out of
21999 ("indirect_jump_via_thunk<mode>_z10")
22000 ("indirect_jump_via_thunk<mode>")
22001 ("indirect_jump_via_inlinethunk<mode>_z10")
22002 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22003 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22004 ("casesi_jump_via_inlinethunk<mode>_z10")
22005 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22006 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22007 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22008 ("*indirect2_jump"): Disable for branch conversion.
22009 ("casesi_jump"): Turn into expander and expand patterns for branch
22011 ("return_use"): New expander.
22012 ("*return"): Emit return via thunk and rename it to ...
22013 ("*return<mode>"): ... this one.
22014 * config/s390/s390.opt: Add new options and and enum for the
22017 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
22019 * lra-constraints.c (match_reload): Unconditionally use
22020 gen_lowpart_SUBREG, rather than selecting between that
22021 and equivalent gen_rtx_SUBREG code.
22023 2018-02-08 Richard Biener <rguenther@suse.de>
22025 PR tree-optimization/84233
22026 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22027 changed flag instead of boguously re-using phi_inserted.
22029 2018-02-08 Martin Jambor <mjambor@suse.cz>
22031 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22032 static local variables.
22034 2018-02-08 Richard Biener <rguenther@suse.de>
22036 PR tree-optimization/84278
22037 * tree-vect-stmts.c (vectorizable_store): When looking for
22038 smaller vector types to perform grouped strided loads/stores
22039 make sure the mode is supported by the target.
22040 (vectorizable_load): Likewise.
22042 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
22044 * config/aarch64/aarch64.c (aarch64_components_for_bb):
22045 Increase LDP/STP opportunities by adding adjacent callee-saves.
22047 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
22049 PR rtl-optimization/84068
22050 PR rtl-optimization/83459
22051 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22053 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
22055 PR tree-optimization/84224
22056 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22057 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22058 non-zero arguments.
22060 2018-02-07 Iain Sandoe <iain@codesourcery.com>
22063 * config/rs6000/altivec.md (*restore_world): Remove LR use.
22064 * config/rs6000/predicates.md (restore_world_operation): Adjust op
22065 count, remove one USE.
22067 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
22069 * doc/install.texi (Configuration): Document the
22070 --with-long-double-format={ibm,ieee} PowerPC configuration
22074 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22075 Convert from define_expand to be define_insn_and_split. Rework
22076 float/double/_Float128 conversions to QI/HI/SImode to work with
22077 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
22078 conversions to QI/HImode types did a store and then a load to
22079 truncate the value. For conversions to VSX registers, don't split
22080 the insn, instead emit the code directly. Use the code iterator
22081 any_fix to combine signed and unsigned conversions.
22082 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22083 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22084 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22085 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22086 (fix_<mode>di2_hw): Likewise.
22087 (fixuns_<mode>di2_hw): Likewise.
22088 (fix_<mode>si2_hw): Likewise.
22089 (fixuns_<mode>si2_hw): Likewise.
22090 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22091 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22092 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22093 fix<uns>_trunc<SFDF:mode>si2_p8.
22094 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22095 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22096 (fix<uns>_<mode>_mem): Likewise.
22097 (fctiw<u>z_<mode>_mem): Likewise.
22098 (fix<uns>_<mode>_mem): Likewise.
22099 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22100 the register allocator from doing a direct move to the GPRs to do
22101 a store, and instead use the ISA 3.0 store byte/half-word from
22102 vector register instruction. For IEEE 128-bit floating point,
22103 also optimize stores of 32-bit ints.
22104 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22106 2018-02-07 Alan Hayward <alan.hayward@arm.com>
22108 * genextract.c (push_pathstr_operand): New function to support
22110 (walk_rtx): Call push_pathstr_operand.
22111 (print_path): Support [a-zA-Z].
22113 2018-02-07 Richard Biener <rguenther@suse.de>
22115 PR tree-optimization/84037
22116 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22117 (cse_and_gimplify_to_preheader): Declare.
22118 (vect_get_place_in_interleaving_chain): Likewise.
22119 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22121 (_loop_vec_info::~_loop_vec_info): Delete it.
22122 (cse_and_gimplify_to_preheader): New function.
22123 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22124 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22125 (vectorizable_load): Likewise. For grouped stores always base
22126 the IV on the first element.
22127 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22128 condition before gimplifying.
22130 2018-02-07 Jakub Jelinek <jakub@redhat.com>
22132 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22133 *DIV_EXPR and *MOD_EXPR.
22135 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
22138 * config/i386/i386.c (ix86_option_override_internal): Mask out
22139 the CF_SET bit when checking -fcf-protection.
22141 2018-02-07 Tom de Vries <tom@codesourcery.com>
22144 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22147 2018-02-07 Richard Biener <rguenther@suse.de>
22149 PR tree-optimization/84204
22150 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22153 PR tree-optimization/84205
22154 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22155 special-case isl_ast_op_zdiv_r.
22157 PR tree-optimization/84223
22158 * graphite-scop-detection.c (gather_bbs::before_dom_children):
22159 Only add conditions from within the region.
22160 (gather_bbs::after_dom_children): Adjust.
22162 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
22165 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22166 * config/avr/avr.md: Only post-reload split REG-REG moves if
22167 either register is GENERAL_REG_P.
22169 2018-02-07 Jakub Jelinek <jakub@redhat.com>
22171 PR tree-optimization/84235
22172 * tree-ssa-scopedtables.c
22173 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22174 if the subtraction is performed in floating point type where NaNs are
22175 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22176 build 1. Formatting fix.
22178 2018-02-06 Jakub Jelinek <jakub@redhat.com>
22181 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22182 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22183 and skip it regardless of bb boundaries. Use CALL_P macro,
22184 don't test INSN_P (insn) together with CALL_P or JUMP_P check
22185 unnecessarily, formatting fix.
22187 2018-02-06 Michael Collison <michael.collison@arm.com>
22189 * config/arm/thumb2.md:
22190 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22191 (*thumb_mov_notscc): Ditto.
22193 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
22196 * config/rs6000/rs6000.md (su code attribute): Use "u" for
22197 unsigned_fix, not "s".
22199 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22201 * configure.ac (gcc_fn_eh_frame_ro): New function.
22202 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22203 correct .eh_frame permissions.
22204 * configure: Regenerate.
22206 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
22208 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22209 irrelevant options.
22211 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22213 * config/rs6000/rs6000.c (rs6000_option_override_internal):
22214 Display warning message for -mno-speculate-indirect-jumps.
22216 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
22218 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22220 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22222 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
22224 PR tree-optimization/84225
22225 * tree-eh.c (find_trapping_overflow): Only call
22226 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22228 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22231 * config/i386/i386.c: Reimplement the check of possible options
22232 -mibt/-mshstk conbination. Change error messages.
22233 * doc/invoke.texi: Fix a typo: remove extra '='.
22235 2018-02-06 Marek Polacek <polacek@redhat.com>
22237 PR tree-optimization/84228
22238 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22240 2018-02-06 Tamar Christina <tamar.christina@arm.com>
22243 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22244 emitted arch directives.
22245 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22246 __ARM_FEATURE_COPROC before changing architectures.
22248 2018-02-06 Richard Biener <rguenther@suse.de>
22250 * config/i386/i386.c (print_reg): Fix typo.
22251 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22253 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
22255 * configure: Regenerate.
22257 2018-02-05 Martin Sebor <msebor@redhat.com>
22259 PR tree-optimization/83369
22260 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22263 2018-02-05 Martin Liska <mliska@suse.cz>
22265 * doc/invoke.texi: Cherry-pick upstream r323995.
22267 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
22269 * ira.c (ira_init_register_move_cost): Adjust comment.
22271 2018-02-05 Martin Liska <mliska@suse.cz>
22273 PR gcov-profile/84137
22274 * doc/gcov.texi: Fix typo in documentation.
22276 2018-02-05 Martin Liska <mliska@suse.cz>
22278 PR gcov-profile/83879
22279 * doc/gcov.texi: Document necessity of --dynamic-list-data when
22280 using dlopen functionality.
22282 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
22284 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22285 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22286 _mm_maskz_range_ss, _mm_mask_range_round_ss,
22287 _mm_maskz_range_round_ss): New intrinsics.
22288 (__builtin_ia32_rangesd128_round)
22289 (__builtin_ia32_rangess128_round): Remove.
22290 (__builtin_ia32_rangesd128_mask_round,
22291 __builtin_ia32_rangess128_mask_round): New builtins.
22292 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22293 __builtin_ia32_rangess128_round): Remove.
22294 (__builtin_ia32_rangesd128_mask_round,
22295 __builtin_ia32_rangess128_mask_round): New builtins.
22296 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22297 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22298 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22299 "<round_saeonly_constraint>")): Changed to ...
22300 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22301 "<round_saeonly_scalar_constraint>")): ... this.
22302 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22303 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22304 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22305 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22306 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22308 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
22310 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22312 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22313 Remove all values except native, 8540 and 8548.
22315 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
22317 * config/i386/i386.c (ix86_output_function_return): Pass
22318 INVALID_REGNUM, instead of -1, as invalid register number to
22319 indirect_thunk_name and output_indirect_thunk.
22321 2018-02-02 Julia Koval <julia.koval@intel.com>
22323 * config.gcc: Add -march=icelake.
22324 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22325 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22326 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22327 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22328 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22329 (processor_target_table): Add icelake.
22330 (ix86_option_override_internal): Handle new PTAs.
22331 (get_builtin_code_for_version): Handle icelake.
22332 (M_INTEL_COREI7_ICELAKE): New.
22333 (fold_builtin_cpu): Handle icelake.
22334 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22335 * doc/invoke.texi: Add -march=icelake.
22337 2018-02-02 Julia Koval <julia.koval@intel.com>
22339 * config/i386/i386.c (ix86_option_override_internal): Change flags type
22340 to wide_int_bitmask.
22341 * wide-int-bitmask.h: New.
22343 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22346 * config/i386/i386.md: Replace Pmode with word_mode in
22347 builtin_setjmp_setup and builtin_longjmp to support x32.
22349 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22353 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22355 (rs6000_supported_cpu_names): New static variable.
22356 (linux_cpu_translation_table): Likewise.
22357 (elf_platform) <cpu>: Define new static variable and use it.
22358 Translate kernel AT_PLATFORM name to canonical name if needed.
22359 Error if platform name is unknown.
22361 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22364 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22366 2018-02-01 Jeff Law <law@redhat.com>
22369 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22370 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22371 the scratch if RELEASE_VIA_POP is false.
22372 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22373 If we have to save a temporary register, decrement SIZE appropriately.
22374 Pass new arguments to release_scratch_register_on_entry.
22375 (ix86_adjust_stack_and_probe): Likewise.
22376 (ix86_emit_probe_stack_range): Pass new arguments to
22377 release_scratch_register_on_entry.
22379 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22381 PR rtl-optimization/84157
22382 * combine.c (change_zero_ext): Use REG_P predicate in
22383 front of HARD_REGISTER_P predicate.
22385 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22387 * config/avr/avr.c (avr_option_override): Move disabling of
22388 -fdelete-null-pointer-checks to...
22389 * common/config/avr/avr-common.c (avr_option_optimization_table):
22392 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22394 PR tree-optimization/81635
22395 * tree-data-ref.c (split_constant_offset_1): For types that
22396 wrap on overflow, try to use range info to prove that wrapping
22399 2018-02-01 Renlin Li <renlin.li@arm.com>
22402 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22403 TAILCALL_ADDR_REGS.
22404 (aarch64_register_move_cost): Likewise.
22405 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22406 TAILCALL_ADDR_REGS.
22407 (REG_CLASS_NAMES): Likewise.
22408 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22409 TAILCALL_ADDR_REGS. Remove IP registers.
22410 * config/aarch64/aarch64.md (Ucs): Update register constraint.
22412 2018-02-01 Richard Biener <rguenther@suse.de>
22414 * domwalk.h (dom_walker::dom_walker): Add additional constructor
22415 for specifying RPO order and allow NULL for that.
22416 * domwalk.c (dom_walker::dom_walker): Likewise.
22417 (dom_walker::walk): Handle NULL RPO order.
22418 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22420 (rewrite_update_dom_walker): Likewise.
22421 (mark_def_dom_walker): Likewise.
22423 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22425 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22426 (aarch64_maybe_expand_sve_subreg_move): Declare.
22427 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22428 * config/aarch64/predicates.md (aarch64_any_register_operand): New
22430 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22431 that are semantically a reverse operation.
22432 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22433 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22434 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22436 (aarch64_can_change_mode_class): For big-endian, forbid changes
22437 between two SVE modes if they have different element sizes.
22439 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22441 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22442 the TImode handling for big-endian targets.
22444 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22446 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22447 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
22449 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22450 Remove BSWAP handing for big-endian targets and use the form of
22451 LD1RQ appropariate for the mode.
22453 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22455 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22456 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22457 duplicated element.
22459 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22462 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22463 check for operands that need to go through aarch64_sve_reload_be.
22465 2018-02-01 Jakub Jelinek <jakub@redhat.com>
22467 PR tree-optimization/81661
22468 PR tree-optimization/84117
22469 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22470 * tree-eh.c: Include gimplify.h.
22471 (find_trapping_overflow, replace_trapping_overflow,
22472 rewrite_to_non_trapping_overflow): New functions.
22473 * tree-vect-loop.c: Include tree-eh.h.
22474 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22475 * tree-data-ref.c: Include tree-eh.h.
22476 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22478 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22480 PR rtl-optimization/84123
22481 * combine.c (change_zero_ext): Check if hard register satisfies
22482 can_change_dest_mode before calling gen_lowpart_SUBREG.
22484 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22487 * ira.c (ira_init_register_move_cost): Remove assert.
22489 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22491 PR rtl-optimization/84071
22492 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22493 * doc/tm.texi: Regenerate.
22495 2018-01-31 Richard Biener <rguenther@suse.de>
22497 PR tree-optimization/84132
22498 * tree-data-ref.c (analyze_miv_subscript): Properly
22499 check whether evolution_function_is_affine_multivariate_p
22500 before calling gcd_of_steps_may_divide_p.
22502 2018-01-31 Julia Koval <julia.koval@intel.com>
22505 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22506 * config/i386/i386.md (rdpid_rex64) New.
22507 (rdpid): Make 32bit only.
22509 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22512 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22513 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22515 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22518 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22520 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22522 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22524 PR rtl-optimization/84071
22525 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22526 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22528 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22530 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22531 (arc_attribute_table): Add 'aux' attribute.
22532 (arc_in_small_data_p): Consider aux like variables.
22533 (arc_is_aux_reg_p): New function.
22534 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22535 (arc_get_aux_arg): New function.
22536 (prepare_move_operands): Handle aux-register access.
22537 (arc_handle_aux_attribute): New function.
22538 * doc/extend.texi (ARC Variable attributes): Add subsection.
22540 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22542 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22543 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22544 (arc_attribute_table): Add 'uncached' attribute.
22545 (arc_print_operand): Print '.di' flag for uncached memory
22547 (arc_in_small_data_p): Do not consider for small data the uncached
22549 (arc_is_uncached_mem_p): New function.
22550 * config/arc/predicates.md (compact_store_memory_operand): Check
22551 for uncached memory accesses.
22552 (nonvol_nonimm_operand): Likewise.
22553 * doc/extend.texi (ARC Type Attribute): New subsection.
22555 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22558 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22559 falign-loops=): Add Optimization flag.
22561 2018-01-30 Jeff Law <law@redhat.com>
22564 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22565 INT_REGISTERS_SAVED. Check it prior to calling
22566 get_scratch_register_on_entry.
22567 (ix86_adjust_stack_and_probe): Similarly.
22568 (ix86_emit_probe_stack_range): Similarly.
22569 (ix86_expand_prologue): Corresponding changes.
22571 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22574 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22575 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22577 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22580 * lra-constraints.c (curr_insn_transform): Process AND in the
22583 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22585 PR rtl-optimization/83986
22586 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22587 dependence against last_pending_memory_flush in addition to
22588 pending_jump_insns.
22590 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22592 PR tree-optimization/81611
22593 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22596 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22599 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22602 2018-01-30 Richard Biener <rguenther@suse.de>
22603 Jakub Jelinek <jakub@redhat.com>
22605 PR tree-optimization/84111
22606 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22607 inner loops added during recursion, as they don't have up-to-date
22610 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22613 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22614 (can_inline_edge_by_limits_p): ... here.
22615 (can_early_inline_edge_p, check_callers,
22616 update_caller_keys, update_callee_keys, recursive_inlining,
22617 add_new_edges_to_heap, speculation_useful_p,
22618 inline_small_functions,
22619 inline_small_functions, flatten_function,
22620 inline_to_all_callers_1): Update.
22622 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22624 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22627 2018-01-30 Richard Biener <rguenther@suse.de>
22629 PR tree-optimization/83008
22630 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22631 invariant and constant vector uses in stmts when they need
22632 more than one stmt.
22634 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22637 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22638 * configure: Regenerate.
22640 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22642 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22644 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22645 Use gen_rtx_REG rather than gen_lowpart.
22647 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22649 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22650 rather than 0 when creating partial subregs.
22652 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22654 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22657 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22660 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22661 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22662 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22663 flags. This restores the settings used before the 2017-07-24.
22664 Turning off pre increment/decrement/modify allows IVOPTS to
22665 optimize DF/SF loops where the index is an int.
22667 2018-01-29 Richard Biener <rguenther@suse.de>
22668 Kelvin Nilsen <kelvin@gcc.gnu.org>
22671 * tree-vect-stmts.c (vectorizable_call): Don't call
22672 targetm.vectorize_builtin_md_vectorized_function if callee is
22675 2018-01-22 Carl Love <cel@us.ibm.com>
22677 * doc/extend.tex: Fix typo in second arg in
22678 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22680 2018-01-29 Richard Biener <rguenther@suse.de>
22682 PR tree-optimization/84086
22683 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22684 (flush_ssaname_freelist): When SSA names were released reset
22685 the SCEV hash table.
22687 2018-01-29 Richard Biener <rguenther@suse.de>
22689 PR tree-optimization/84057
22690 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22691 removed paths when removing edges.
22693 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22695 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22696 -mfunction-return=@var{choice}.
22698 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22700 PR diagnostic/84034
22701 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22702 Handle CR like TAB.
22703 (layout::print_source_line): Likewise.
22704 (test_get_line_width_without_trailing_whitespace): Add test cases.
22706 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22708 PR middle-end/84040
22709 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22712 2018-01-26 Jim Wilson <jimw@sifive.com>
22714 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22716 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22719 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22721 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22722 and CMP + SUB-immediate -> SUBS.
22724 2018-01-26 Martin Sebor <msebor@redhat.com>
22726 PR tree-optimization/83896
22727 * tree-ssa-strlen.c (get_string_len): Rename...
22728 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22729 Avoid assuming length is constant.
22730 (handle_char_store): Use HOST_WIDE_INT for string length.
22732 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22735 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22736 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22738 2018-01-26 Richard Biener <rguenther@suse.de>
22740 PR rtl-optimization/84003
22741 * dse.c (record_store): Only record redundant stores when
22742 the earlier store aliases at least all accesses the later one does.
22744 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22746 PR rtl-optimization/83985
22747 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22748 REG_CFA_RESTORE insns.
22749 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22750 REG_CFA_RESTORE insns here.
22753 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22754 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22756 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22758 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22759 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22760 (arc_init): Likewise.
22761 (arc_override_options): Likewise.
22762 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22764 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22766 * config/arc/arc.h (TARGET_DBNZ): Define.
22767 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22768 properly set the tune attribute.
22769 (dbnz): Use TARGET_DBNZ guard.
22770 * config/arc/arc.opt (mtune): Add core3 option.
22772 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22774 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22775 recognize new pic like addresses.
22776 (arc_delegitimize_address): Clean up.
22778 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22780 * config/arc/arc-arches.def: Option mrf16 valid for all
22782 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22783 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22784 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22785 * config/arc/arc-tables.opt: Regenerate.
22786 * config/arc/arc.c (arc_conditional_register_usage): Handle
22787 reduced register file case.
22788 (arc_file_start): Set must have build attributes.
22789 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22790 mrf16 option value.
22791 * config/arc/arc.opt (mrf16): Add new option.
22792 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22793 * config/arc/genmultilib.awk: Handle new mrf16 option.
22794 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22795 * config/arc/t-multilib: Regenerate.
22796 * doc/invoke.texi (ARC Options): Document mrf16 option.
22798 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22800 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22801 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22802 (arc_attribute_table): Add 'secure_call' attribute.
22803 (arc_print_operand): Print secure call operand.
22804 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22806 (arc_is_secure_call_p): New function. * config/arc/arc.md
22807 (call_i): Add support for sjli instruction.
22808 (call_value_i): Likewise.
22809 * config/arc/constraints.md (Csc): New constraint.
22811 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22812 John Eric Martin <John.Martin@emmicro-us.com>
22814 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22815 * config/arc/arc.c (_arc_jli_section): New struct.
22816 (arc_jli_section): New type.
22817 (rc_jli_sections): New static variable.
22818 (arc_handle_jli_attribute): New function.
22819 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22820 (arc_file_end): New function.
22821 (TARGET_ASM_FILE_END): Define.
22822 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22823 (arc_add_jli_section): New function.
22824 (jli_call_scan): Likewise.
22825 (arc_reorg): Call jli_call_scan.
22826 (arc_output_addsi): Remove 'S' from printing asm operand.
22827 (arc_is_jli_call_p): New function.
22828 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22830 (movhi_insn): Likewise.
22831 (movsi_insn): Likewise.
22832 (movsi_set_cc_insn): Likewise.
22833 (loadqi_update): Likewise.
22834 (load_zeroextendqisi_update): Likewise.
22835 (load_signextendqisi_update): Likewise.
22836 (loadhi_update): Likewise.
22837 (load_zeroextendhisi_update): Likewise.
22838 (load_signextendhisi_update): Likewise.
22839 (loadsi_update): Likewise.
22840 (loadsf_update): Likewise.
22841 (movsicc_insn): Likewise.
22842 (bset_insn): Likewise.
22843 (bxor_insn): Likewise.
22844 (bclr_insn): Likewise.
22845 (bmsk_insn): Likewise.
22846 (bicsi3_insn): Likewise.
22847 (cmpsi_cc_c_insn): Likewise.
22848 (movsi_ne): Likewise.
22849 (movsi_cond_exec): Likewise.
22850 (clrsbsi2): Likewise.
22851 (norm_f): Likewise.
22861 (call_i): Remove 'S' asm letter, add jli instruction.
22862 (call_value_i): Likewise.
22863 * config/arc/arc.op (mjli-always): New option.
22864 * config/arc/constraints.md (Cji): New constraint.
22865 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22867 (subsf3_fpx): Likewise.
22868 (mulsf3_fpx): Likewise.
22869 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22871 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22872 function attrbutes.
22873 * doc/invoke.texi (ARC): Document mjli-always option.
22875 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22877 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22878 avoid addition with 0 and use incw and decw where possible.
22880 2018-01-26 Richard Biener <rguenther@suse.de>
22882 PR tree-optimization/81082
22883 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22884 association if it requires casting to unsigned.
22885 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22886 from fold_plusminus_mult_expr to catch important cases late when
22887 range info is available.
22889 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22891 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22892 * configure.ac (hidden_linkonce): New test.
22893 * configure: Regenerate.
22894 * config.in: Regenerate.
22896 2018-01-26 Julia Koval <julia.koval@intel.com>
22898 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22899 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22900 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22901 _mm_mask_bitshuffle_epi64_mask): Fix type.
22902 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22903 USI_FTYPE_V4DI_V4DI_USI): Remove.
22904 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22905 __builtin_ia32_vpshufbitqmb256_mask,
22906 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22907 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22908 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22910 2018-01-26 Alan Modra <amodra@gmail.com>
22913 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22914 UNSPEC_VBPERMQ. Sort other unspecs.
22916 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22918 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22920 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22922 PR middle-end/83055
22923 * predict.c (drop_profile): Do not push/pop cfun; update also
22925 (handle_missing_profiles): Fix logic looking for zero profiles.
22927 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22929 PR middle-end/83977
22930 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22931 on functions with #pragma omp declare simd or functions with simd
22933 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22934 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22935 Remove trailing \n from warning_at calls.
22937 2018-01-25 Tom de Vries <tom@codesourcery.com>
22940 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22941 for neutered workers.
22943 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22946 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22947 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22949 2018-01-24 Jeff Law <law@redhat.com>
22952 * i386.c (get_probe_interval): Move to earlier point.
22953 (ix86_compute_frame_layout): If -fstack-clash-protection and
22954 the frame is larger than the probe interval, then use pushes
22955 to save registers rather than reg->mem moves.
22956 (ix86_expand_prologue): Remove conditional for int_registers_saved
22959 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22962 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22963 min/max for never referenced object.
22965 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22967 PR middle-end/83977
22968 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22970 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22971 attributes from DECL_ATTRIBUTES (decl) without affecting
22972 DECL_ATTRIBUTES (current_function_decl).
22973 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22974 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22976 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22978 PR tree-optimization/83979
22979 * fold-const.c (fold_comparison): Use constant_boolean_node
22980 instead of boolean_{true,false}_node.
22982 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22984 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22987 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22989 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22990 Simplify the clause that sets the length attribute.
22991 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22992 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22993 clause that sets the length attribute.
22994 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22996 2018-01-24 Tom de Vries <tom@codesourcery.com>
22999 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23000 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23001 Add strict parameter.
23002 (prevent_branch_around_nothing): Insert dummy insn between branch to
23003 label and label with no ptx insn inbetween.
23004 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23006 2018-01-24 Tom de Vries <tom@codesourcery.com>
23009 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23010 for neutered threads in warp.
23011 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23013 2018-01-24 Richard Biener <rguenther@suse.de>
23015 PR tree-optimization/83176
23016 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23019 2018-01-24 Richard Biener <rguenther@suse.de>
23021 PR tree-optimization/82819
23022 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23023 code generating pluses that are no-ops in the target precision.
23025 2018-01-24 Richard Biener <rguenther@suse.de>
23027 PR middle-end/84000
23028 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23030 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23032 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23033 to merge probabilities.
23034 * predict.c (probably_never_executed): Also mark as cold functions
23035 with global 0 profile and guessed local profile.
23036 * profile-count.c (profile_probability::combine_with_count): New
23038 * profile-count.h (profile_probability::operator*,
23039 profile_probability::operator*=, profile_probability::operator/,
23040 profile_probability::operator/=): Reduce precision to adjusted
23041 and set value to guessed on contradictory divisions.
23042 (profile_probability::combine_with_freq): Remove.
23043 (profile_probability::combine_wiht_count): Declare.
23044 (profile_count::force_nonzero):: Set to adjusted.
23045 (profile_count::probability_in):: Set quality to adjusted.
23046 * tree-ssa-tail-merge.c (replace_block_by): Use
23047 combine_with_count.
23049 2018-01-23 Andrew Waterman <andrew@sifive.com>
23050 Jim Wilson <jimw@sifive.com>
23052 * config/riscv/riscv.c (riscv_stack_boundary): New.
23053 (riscv_option_override): Set riscv_stack_boundary. Handle
23054 riscv_preferred_stack_boundary_arg.
23055 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23056 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23057 (STACK_BOUNDARY): Set to riscv_stack_boundary.
23058 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23059 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23060 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23062 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
23065 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23066 of struct ix86_frame.
23067 (ix86_expand_epilogue): Likewise. Add a local variable for
23068 the reg_save_offset field in struct ix86_frame.
23070 2018-01-23 Bin Cheng <bin.cheng@arm.com>
23072 PR tree-optimization/82604
23073 * tree-loop-distribution.c (enum partition_kind): New enum item
23074 PKIND_PARTIAL_MEMSET.
23075 (partition_builtin_p): Support above new enum item.
23076 (generate_code_for_partition): Ditto.
23077 (compute_access_range): Differentiate cases that equality can be
23078 proven at all loops, the innermost loops or no loops.
23079 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23080 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
23081 (finalize_partitions, distribute_loop): Don't fuse partition of
23082 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23083 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23084 parloop is enabled.
23086 2018-01-23 Martin Liska <mliska@suse.cz>
23088 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23089 order to ignore the predictor.
23090 (PRED_POLYMORPHIC_CALL): Likewise.
23091 (PRED_RECURSIVE_CALL): Likewise.
23093 2018-01-23 Martin Liska <mliska@suse.cz>
23095 * tree-profile.c (tree_profiling): Print function header to
23096 aware reader which function we are working on.
23097 * value-prof.c (gimple_find_values_to_profile): Do not print
23098 not interesting value histograms.
23100 2018-01-23 Martin Liska <mliska@suse.cz>
23102 * profile-count.h (enum profile_quality): Add
23103 profile_uninitialized as the first value. Do not number values
23104 as they are zero based.
23105 (profile_count::verify): Update sanity check.
23106 (profile_probability::verify): Likewise.
23108 2018-01-23 Nathan Sidwell <nathan@acm.org>
23110 * doc/invoke.texi (ffor-scope): Deprecate.
23112 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23114 PR tree-optimization/83510
23115 * domwalk.c (set_all_edges_as_executable): New function.
23116 (dom_walker::dom_walker): Convert bool param
23117 "skip_unreachable_blocks" to enum reachability. Move setup of
23118 edge flags to set_all_edges_as_executable and only do it when
23119 reachability is REACHABLE_BLOCKS.
23120 * domwalk.h (enum dom_walker::reachability): New enum.
23121 (dom_walker::dom_walker): Convert bool param
23122 "skip_unreachable_blocks" to enum reachability.
23123 (set_all_edges_as_executable): New decl.
23124 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
23125 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23127 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23128 but converting true to REACHABLE_BLOCKS.
23129 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23131 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23132 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23133 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23135 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23136 if check_all_array_refs will be called.
23138 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23140 * tree.c (selftest::test_location_wrappers): Add more test
23143 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23145 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23146 (selftest::test_bit_in_range): Likewise.
23148 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
23151 * doc/sourcebuild.texi (vect_float): Say that the selector
23152 only describes the situation when -funsafe-math-optimizations is on.
23153 (vect_float_strict): Document.
23155 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
23157 PR tree-optimization/83965
23158 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23159 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23160 instead of checking only for a reduction.
23161 (vect_recog_widen_sum_pattern): Likewise.
23163 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23165 * predict.c (probably_never_executed): Only use precise profile info.
23166 (compute_function_frequency): Skip after inlining hack since we now
23167 have quality checking.
23169 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23171 * profile-count.h (profile_probability::very_unlikely,
23172 profile_probability::unlikely, profile_probability::even): Set
23173 precision to guessed.
23175 2018-01-23 Richard Biener <rguenther@suse.de>
23177 PR tree-optimization/83963
23178 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23179 Properly terminate dominator walk when crossing the exit edge not
23180 when visiting its source block.
23182 2018-01-23 Jakub Jelinek <jakub@redhat.com>
23185 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23186 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23188 2018-01-22 Jakub Jelinek <jakub@redhat.com>
23190 PR tree-optimization/83957
23191 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
23192 semicolon after for body surrounded by braces.
23194 PR tree-optimization/83081
23195 * profile-count.h (profile_probability::split): New method.
23196 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23197 Use profile_probability::split.
23198 (do_compare_rtx_and_jump): Fix adjustment of probabilities
23199 when splitting a single conditional jump into 2.
23201 2018-01-22 David Malcolm <dmalcolm@redhat.com>
23203 PR tree-optimization/69452
23204 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23207 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23209 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23210 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23211 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23213 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23215 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23217 * config/rl78/rl78.md (movdi): New define_expand.
23218 * config/rl78/rl78.c (rl78_split_movdi): New function.
23220 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
23223 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23225 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23226 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23227 128-bit to produce an UNSPEC move to get the double word with the
23228 signbit and then a shift directly to do signbit.
23229 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23230 implementation with a new version that just does either a direct
23231 move or a regular move. Move memory interface to separate insns.
23232 Move insns so they are next to the expander.
23233 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23234 with signbit move. Split big and little endian case.
23235 (signbit<mode>2_dm_mem_le): Likewise.
23236 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23237 (signbit<mode>2_dm2): Likewise.
23239 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23241 * config/rl78/rl78.md (anddi3): New define_expand.
23243 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23245 * config/rl78/rl78.md (umindi3): New define_expand.
23247 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23249 * config/rl78/rl78.md (smindi3): New define_expand.
23251 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23253 * config/rl78/rl78.md (smaxdi3): New define_expand.
23255 2018-01-22 Carl Love <cel@us.ibm.com>
23257 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23258 LVX_V1TI): Add macro expansion.
23259 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23260 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23261 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23262 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23263 Change check to determine if the instruction is a byte reversing
23264 entry. Fix typo in comment.
23265 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23266 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23267 Add def_builtin calls for new builtins.
23268 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23269 Add define_insn expansion.
23271 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23273 * config/rl78/rl78.md (umaxdi3): New define_expand.
23275 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23277 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23278 for non-QImode registers.
23280 2018-01-22 Richard Biener <rguenther@suse.de>
23282 PR tree-optimization/83963
23283 * graphite-scop-detection.c (scop_detection::get_sese): Delay
23284 including the loop exit block.
23285 (scop_detection::merge_sese): Likewise.
23286 (scop_detection::add_scop): Do it here instead.
23288 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23290 * doc/sourcebuild.texi (arm_softfloat): Document.
23292 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
23295 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23296 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23297 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23299 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23300 David Edelsohn <dje.gcc@gmail.com>
23303 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23304 Change "crset eq" to "crset 2".
23305 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23306 (*call_indirect_aix<mode>_nospec): Likewise.
23307 (*call_value_indirect_aix<mode>_nospec): Likewise.
23308 (*call_indirect_elfv2<mode>_nospec): Likewise.
23309 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23310 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23311 change assembly output from . to $.
23312 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23313 (indirect_jump<mode>_nospec): Change assembly output from . to $.
23314 (*tablejump<mode>_internal1_nospec): Likewise.
23316 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
23319 * config/sh/sh_optimize_sett_clrt.cc:
23320 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23322 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
23324 PR tree-optimization/83940
23325 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23326 offset_dt to vect_constant_def rather than vect_unknown_def_type.
23327 (vect_check_load_store_mask): Add a mask_dt_out parameter and
23328 use it to pass back the definition type.
23329 (vect_check_store_rhs): Likewise rhs_dt_out.
23330 (vect_build_gather_load_calls): Add a mask_dt argument and use
23331 it instead of a call to vect_is_simple_use.
23332 (vectorizable_store): Update calls to vect_check_load_store_mask
23333 and vect_check_store_rhs. Use the dt returned by the latter instead
23334 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
23335 instead of calls to vect_is_simple_use. Pass the scalar rather
23336 than the vector operand to vect_is_simple_use when handling
23337 second and subsequent copies of an rhs value.
23338 (vectorizable_load): Update calls to vect_check_load_store_mask
23339 and vect_build_gather_load_calls. Use the cached mask_dt and
23340 gs_info.offset_dt instead of calls to vect_is_simple_use.
23342 2018-01-20 Jakub Jelinek <jakub@redhat.com>
23344 PR middle-end/83945
23345 * tree-emutls.c: Include gimplify.h.
23346 (lower_emutls_2): New function.
23347 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23348 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23349 it before further processing.
23352 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23353 UINTVAL (trueop1) instead of INTVAL (op1).
23355 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23359 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23360 INCOMING_FRAME_SP_OFFSET if not defined.
23361 (scan_trace): Add ENTRY argument. If true and
23362 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23363 emit a note to adjust the CFA offset.
23364 (create_cfi_notes): Adjust scan_trace callers.
23365 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23366 INCOMING_FRAME_SP_OFFSET in the CIE.
23367 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23368 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23370 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23371 * doc/tm.texi: Regenerated.
23373 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23375 PR rtl-optimization/83147
23376 * lra-constraints.c (remove_inheritance_pseudos): Use
23377 lra_substitute_pseudo_within_insn.
23379 2018-01-19 Tom de Vries <tom@codesourcery.com>
23380 Cesar Philippidis <cesar@codesourcery.com>
23383 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23385 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23388 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23389 spaces for function labels.
23391 2018-01-19 Martin Liska <mliska@suse.cz>
23393 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23394 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23395 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23396 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23397 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23398 (PRED_CONST_RETURN): Change from 69 to 65.
23399 (PRED_NULL_RETURN): Change from 91 to 71.
23400 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23401 (PRED_LOOP_GUARD): Change from 66 to 73.
23403 2018-01-19 Martin Liska <mliska@suse.cz>
23405 * predict.c (predict_insn_def): Add new assert.
23406 (struct branch_predictor): Change type to signed integer.
23407 (test_prediction_value_range): Amend test to cover
23408 PROB_UNINITIALIZED.
23409 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23410 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23411 (PRED_LOOP_ITERATIONS_MAX): Likewise.
23412 (PRED_LOOP_IV_COMPARE): Likewise.
23413 * predict.h (PROB_UNINITIALIZED): Define new constant.
23415 2018-01-19 Martin Liska <mliska@suse.cz>
23417 * predict.c (dump_prediction): Add new format for
23418 analyze_brprob.py script which is enabled with -details
23420 * profile-count.h (precise_p): New function.
23422 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23424 PR tree-optimization/83922
23425 * tree-vect-loop.c (vect_verify_full_masking): Return false if
23426 there are no statements that need masking.
23427 (vect_active_double_reduction_p): New function.
23428 (vect_analyze_loop_operations): Use it when handling phis that
23429 are not in the loop header.
23431 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23433 PR tree-optimization/83914
23434 * tree-vect-loop.c (vectorizable_induction): Don't convert
23435 init_expr or apply the peeling adjustment for inductions
23436 that are nested within the vectorized loop.
23438 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23440 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23443 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23447 * function.h (gimplify_parameters): Add gimple_seq * argument.
23448 * function.c: Include gimple.h and options.h.
23449 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23450 for the added local temporaries if needed.
23451 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23452 if there are any parameter cleanups, wrap whole body into a
23453 try/finally with the cleanups.
23455 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
23458 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23459 Use GET_MODE_CLASS for scalar floating point.
23461 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23465 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23466 Fix call of call_cgraph_insertion_hooks.
23468 2018-01-18 Martin Sebor <msebor@redhat.com>
23470 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23472 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23475 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23478 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23481 * common.opt: (-ffile-prefix-map): New option.
23482 * opts.c (common_handle_option): Defer it.
23483 * opts-global.c (handle_common_deferred_options): Handle it.
23484 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23485 * file-prefix-map.h: New file.
23486 (remap_debug_filename, add_debug_prefix_map): ...here.
23487 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23488 * final.c (debug_prefix_map, add_debug_prefix_map
23489 remap_debug_filename): Move to...
23490 * file-prefix-map.c: New file.
23491 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23492 generalize, get rid of alloca(), use strrchr() instead of strchr().
23493 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23494 Implement in terms of add_prefix_map().
23495 (remap_macro_filename, remap_debug_filename): Implement in term of
23497 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23498 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23499 * dbxout.c: Include file-prefix-map.h.
23500 * varasm.c: Likewise.
23501 * vmsdbgout.c: Likewise.
23502 * xcoffout.c: Likewise.
23503 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23504 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23505 * doc/invoke.texi (-ffile-prefix-map): Document.
23506 (-fdebug-prefix-map): Update description.
23508 2018-01-18 Martin Liska <mliska@suse.cz>
23510 * config/i386/i386.c (indirect_thunk_name): Document that also
23512 (output_indirect_thunk): Document why both instructions
23513 (pause and lfence) are generated.
23515 2018-01-18 Richard Biener <rguenther@suse.de>
23517 PR tree-optimization/83887
23518 * graphite-scop-detection.c
23519 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23520 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23521 (scop_detection::merge_sese): Re-implement with a flood-fill
23522 algorithm that properly finds a SESE region if it exists.
23524 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23527 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23528 pointer_diff optimizations use view_convert instead of convert.
23530 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23532 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23533 Generate different code for -mno-speculate-indirect-jumps.
23534 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23535 (*call_indirect_aix<mode>): Disable for
23536 -mno-speculate-indirect-jumps.
23537 (*call_indirect_aix<mode>_nospec): New define_insn.
23538 (*call_value_indirect_aix<mode>): Disable for
23539 -mno-speculate-indirect-jumps.
23540 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23541 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23542 -mno-speculate-indirect-jumps.
23543 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23545 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23547 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23548 long double type, set the flags for noting the default long double
23549 type, even if we don't pass or return a long double type.
23551 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23554 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23557 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23559 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23560 support for merge[hl].
23561 (fold_mergehl_helper): New helper function.
23562 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23563 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23564 (altivec_vmrglw_direct): Add xxmrglw insn.
23566 2018-01-17 Andrew Waterman <andrew@sifive.com>
23568 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23569 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23571 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23574 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23575 call the lto_location_cache before reading the
23576 DECL_SOURCE_LOCATION of the types.
23578 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23579 Richard Sandiford <richard.sandiford@linaro.org>
23581 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23582 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23583 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23584 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23585 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23587 * config/aarch64/constraints.md (aarch64_movti_operand):
23589 * config/aarch64/predicates.md (Uti): Add new constraint.
23591 2018-01-17 Carl Love <cel@us.ibm.com>
23593 * config/rs6000/vsx.md (define_expand xl_len_r,
23594 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23595 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23597 (define_expand, define_insn): Move the shift left from the
23598 define_insn to the define_expand for lxvl and stxvl instructions.
23599 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23600 and XL_LEN_R definitions to PURE.
23602 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23604 * config/i386/i386.c (indirect_thunk_name): Declare regno
23605 as unsigned int. Compare regno with INVALID_REGNUM.
23606 (output_indirect_thunk): Ditto.
23607 (output_indirect_thunk_function): Ditto.
23608 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23609 in the call to output_indirect_thunk_function.
23611 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23613 PR middle-end/83884
23614 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23615 rather than the size of inner_type to determine the stack slot size
23616 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23618 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23621 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23624 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23626 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23627 endian Linux systems to optionally enable multilibs for selecting
23628 the long double type if the user configured an explicit type.
23629 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23630 have no long double multilibs if not defined.
23631 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23632 warn if the user used -mabi={ieee,ibm}longdouble and we built
23633 multilibs for long double.
23634 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23635 appropriate multilib option.
23636 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23638 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23639 for building long double multilibs.
23640 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23642 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23644 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23647 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23649 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23652 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23655 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23658 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23660 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23661 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23663 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23665 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23666 different rtl trees depending on TARGET_64BIT.
23667 (rs6000_gen_lvx): Likewise.
23669 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23671 * config/visium/visium.md (nop): Tweak comment.
23672 (hazard_nop): Likewise.
23674 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23676 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23677 -mspeculate-indirect-jumps.
23678 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23679 for -mno-speculate-indirect-jumps.
23680 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23681 (*call_value_indirect_elfv2<mode>): Disable for
23682 -mno-speculate-indirect-jumps.
23683 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23684 (indirect_jump): Emit different RTL for
23685 -mno-speculate-indirect-jumps.
23686 (*indirect_jump<mode>): Disable for
23687 -mno-speculate-indirect-jumps.
23688 (*indirect_jump<mode>_nospec): New define_insn.
23689 (tablejump): Emit different RTL for
23690 -mno-speculate-indirect-jumps.
23691 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23692 (tablejumpsi_nospec): New define_expand.
23693 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23694 (tablejumpdi_nospec): New define_expand.
23695 (*tablejump<mode>_internal1): Disable for
23696 -mno-speculate-indirect-jumps.
23697 (*tablejump<mode>_internal1_nospec): New define_insn.
23698 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23701 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23703 * caller-save.c (insert_save): Drop unnecessary parameter. All
23706 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23707 Richard Biener <rguenth@suse.de>
23710 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23711 return early, inline manually is_gimple_sizepos. Make sure if we
23712 call gimplify_expr we don't end up with a gimple constant.
23713 * tree.c (variably_modified_type_p): Don't return true for
23714 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23715 * gimplify.h (is_gimple_sizepos): Remove.
23717 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23719 PR tree-optimization/83857
23720 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23721 vectorizable_live_operation for pure SLP statements.
23722 (vectorizable_live_operation): Handle PHIs.
23724 2018-01-16 Richard Biener <rguenther@suse.de>
23726 PR tree-optimization/83867
23727 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23728 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23730 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23733 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23734 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23735 If off is not INTEGER_CST, issue a may not be aligned warning
23736 rather than isn't aligned. Use isn%'t rather than isn't.
23737 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23739 <case MULT_EXPR>: Improve the case when bottom and one of the
23740 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23741 operand, in that case check if the other operand is multiple of
23742 bottom divided by the INTEGER_CST operand.
23744 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23747 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23748 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23749 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23750 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23751 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23752 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23753 (pa_function_arg_size): New function.
23755 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23757 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23758 in a separate statement.
23760 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23762 PR tree-optimization/83847
23763 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23764 group gathers and scatters.
23766 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23768 PR rtl-optimization/86620
23769 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23771 PR rtl-optimization/83213
23772 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23773 to last if both are JUMP_INSNs.
23775 PR tree-optimization/83843
23776 * gimple-ssa-store-merging.c
23777 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23778 store_immediate_info for bswap/nop orig_stores.
23780 2018-01-15 Andrew Waterman <andrew@sifive.com>
23782 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23784 <UDIV>: Increase cost if !TARGET_DIV.
23786 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23788 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23789 (define_attr "cr_logical_3op"): New.
23790 (cceq_ior_compare): Adjust.
23791 (cceq_ior_compare_complement): Adjust.
23792 (*cceq_rev_compare): Adjust.
23793 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23794 (is_cracked_insn): Adjust.
23795 (insn_must_be_first_in_group): Adjust.
23796 * config/rs6000/40x.md: Adjust.
23797 * config/rs6000/440.md: Adjust.
23798 * config/rs6000/476.md: Adjust.
23799 * config/rs6000/601.md: Adjust.
23800 * config/rs6000/603.md: Adjust.
23801 * config/rs6000/6xx.md: Adjust.
23802 * config/rs6000/7450.md: Adjust.
23803 * config/rs6000/7xx.md: Adjust.
23804 * config/rs6000/8540.md: Adjust.
23805 * config/rs6000/cell.md: Adjust.
23806 * config/rs6000/e300c2c3.md: Adjust.
23807 * config/rs6000/e500mc.md: Adjust.
23808 * config/rs6000/e500mc64.md: Adjust.
23809 * config/rs6000/e5500.md: Adjust.
23810 * config/rs6000/e6500.md: Adjust.
23811 * config/rs6000/mpc.md: Adjust.
23812 * config/rs6000/power4.md: Adjust.
23813 * config/rs6000/power5.md: Adjust.
23814 * config/rs6000/power6.md: Adjust.
23815 * config/rs6000/power7.md: Adjust.
23816 * config/rs6000/power8.md: Adjust.
23817 * config/rs6000/power9.md: Adjust.
23818 * config/rs6000/rs64.md: Adjust.
23819 * config/rs6000/titan.md: Adjust.
23821 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23823 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23824 ix86_indirect_branch_register logic.
23826 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23828 * config/i386/constraints.md (Bs): Update
23829 ix86_indirect_branch_register check. Don't check
23830 ix86_indirect_branch_register with GOT_memory_operand.
23832 * config/i386/predicates.md (GOT_memory_operand): Don't check
23833 ix86_indirect_branch_register here.
23834 (GOT32_symbol_operand): Likewise.
23836 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23838 * config/i386/predicates.md (constant_call_address_operand):
23839 Rewrite ix86_indirect_branch_register logic.
23840 (sibcall_insn_operand): Likewise.
23842 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23844 * config/i386/constraints.md (Bs): Replace
23845 ix86_indirect_branch_thunk_register with
23846 ix86_indirect_branch_register.
23848 * config/i386/i386.md (indirect_jump): Likewise.
23849 (tablejump): Likewise.
23850 (*sibcall_memory): Likewise.
23851 (*sibcall_value_memory): Likewise.
23852 Peepholes of indirect call and jump via memory: Likewise.
23853 * config/i386/i386.opt: Likewise.
23854 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23855 (GOT_memory_operand): Likewise.
23856 (call_insn_operand): Likewise.
23857 (sibcall_insn_operand): Likewise.
23858 (GOT32_symbol_operand): Likewise.
23860 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23862 PR middle-end/83837
23863 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23864 type rather than type addr's type points to.
23865 (expand_omp_atomic_mutex): Likewise.
23866 (expand_omp_atomic): Likewise.
23868 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23871 * config/i386/i386.c (output_indirect_thunk_function): Use
23872 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23873 for __x86_return_thunk.
23875 2018-01-15 Richard Biener <rguenther@suse.de>
23877 PR middle-end/83850
23878 * expmed.c (extract_bit_field_1): Fix typo.
23880 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23883 * config/arm/iterators.md (VF): New mode iterator.
23884 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23885 Remove integer-related logic from pattern.
23886 (neon_vabd<mode>_3): Likewise.
23888 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23890 PR middle-end/82694
23891 * common.opt (fstrict-overflow): No longer an alias.
23892 (fwrapv-pointer): New option.
23893 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23894 also for pointer types based on flag_wrapv_pointer.
23895 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23896 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23897 opts->x_flag_wrapv got set.
23898 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23899 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23900 POINTER_TYPE_OVERFLOW_UNDEFINED.
23901 * match.pd: Likewise in address comparison pattern.
23902 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23904 2018-01-15 Richard Biener <rguenther@suse.de>
23907 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23908 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23909 Reset type names to their identifier if their TYPE_DECL doesn't
23910 have linkage (and thus is used for ODR and devirt).
23911 (save_debug_info_for_decl): Remove.
23912 (save_debug_info_for_type): Likewise.
23913 (add_tree_to_fld_list): Adjust.
23914 * tree-pretty-print.c (dump_generic_node): Make dumping of
23915 type names more robust.
23917 2018-01-15 Richard Biener <rguenther@suse.de>
23919 * BASE-VER: Bump to 8.0.1.
23921 2018-01-14 Martin Sebor <msebor@redhat.com>
23924 * builtins.c (check_access): Avoid warning when the no-warning bit
23927 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23929 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23930 * ira-color (allocno_hard_regs_compare): Likewise.
23932 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23935 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23936 Use .pushsection/.popsection.
23938 2018-01-14 Martin Sebor <msebor@redhat.com>
23941 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23943 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23945 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23946 entry from extra_headers.
23947 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23948 extra_headers, make the list bitwise identical to the i?86-*-* one.
23950 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23952 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23953 -mcmodel=large with -mindirect-branch=thunk,
23954 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23955 -mfunction-return=thunk-extern.
23956 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23957 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23958 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23960 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23962 * config/i386/i386.c (print_reg): Print the name of the full
23963 integer register without '%'.
23964 (ix86_print_operand): Handle 'V'.
23965 * doc/extend.texi: Document 'V' modifier.
23967 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23969 * config/i386/constraints.md (Bs): Disallow memory operand for
23970 -mindirect-branch-register.
23972 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23973 (GOT_memory_operand): Likewise.
23974 (call_insn_operand): Likewise.
23975 (sibcall_insn_operand): Likewise.
23976 (GOT32_symbol_operand): Likewise.
23977 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23978 for -mindirect-branch-register.
23979 (tablejump): Likewise.
23980 (*sibcall_memory): Likewise.
23981 (*sibcall_value_memory): Likewise.
23982 Disallow peepholes of indirect call and jump via memory for
23983 -mindirect-branch-register.
23984 (*call_pop): Replace m with Bw.
23985 (*call_value_pop): Likewise.
23986 (*sibcall_pop_memory): Replace m with Bs.
23987 * config/i386/i386.opt (mindirect-branch-register): New option.
23988 * doc/invoke.texi: Document -mindirect-branch-register option.
23990 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23992 * config/i386/i386-protos.h (ix86_output_function_return): New.
23993 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23994 set function_return_type.
23995 (indirect_thunk_name): Add ret_p to indicate thunk for function
23997 (output_indirect_thunk_function): Pass false to
23998 indirect_thunk_name.
23999 (ix86_output_indirect_branch_via_reg): Likewise.
24000 (ix86_output_indirect_branch_via_push): Likewise.
24001 (output_indirect_thunk_function): Create alias for function
24002 return thunk if regno < 0.
24003 (ix86_output_function_return): New function.
24004 (ix86_handle_fndecl_attribute): Handle function_return.
24005 (ix86_attribute_table): Add function_return.
24006 * config/i386/i386.h (machine_function): Add
24007 function_return_type.
24008 * config/i386/i386.md (simple_return_internal): Use
24009 ix86_output_function_return.
24010 (simple_return_internal_long): Likewise.
24011 * config/i386/i386.opt (mfunction-return=): New option.
24012 (indirect_branch): Mention -mfunction-return=.
24013 * doc/extend.texi: Document function_return function attribute.
24014 * doc/invoke.texi: Document -mfunction-return= option.
24016 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24018 * config/i386/i386-opts.h (indirect_branch): New.
24019 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24020 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24021 with local indirect jump when converting indirect call and jump.
24022 (ix86_set_indirect_branch_type): New.
24023 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24024 (indirectlabelno): New.
24025 (indirect_thunk_needed): Likewise.
24026 (indirect_thunk_bnd_needed): Likewise.
24027 (indirect_thunks_used): Likewise.
24028 (indirect_thunks_bnd_used): Likewise.
24029 (INDIRECT_LABEL): Likewise.
24030 (indirect_thunk_name): Likewise.
24031 (output_indirect_thunk): Likewise.
24032 (output_indirect_thunk_function): Likewise.
24033 (ix86_output_indirect_branch_via_reg): Likewise.
24034 (ix86_output_indirect_branch_via_push): Likewise.
24035 (ix86_output_indirect_branch): Likewise.
24036 (ix86_output_indirect_jmp): Likewise.
24037 (ix86_code_end): Call output_indirect_thunk_function if needed.
24038 (ix86_output_call_insn): Call ix86_output_indirect_branch if
24040 (ix86_handle_fndecl_attribute): Handle indirect_branch.
24041 (ix86_attribute_table): Add indirect_branch.
24042 * config/i386/i386.h (machine_function): Add indirect_branch_type
24043 and has_local_indirect_jump.
24044 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24046 (tablejump): Likewise.
24047 (*indirect_jump): Use ix86_output_indirect_jmp.
24048 (*tablejump_1): Likewise.
24049 (simple_return_indirect_internal): Likewise.
24050 * config/i386/i386.opt (mindirect-branch=): New option.
24051 (indirect_branch): New.
24054 (thunk-inline): Likewise.
24055 (thunk-extern): Likewise.
24056 * doc/extend.texi: Document indirect_branch function attribute.
24057 * doc/invoke.texi: Document -mindirect-branch= option.
24059 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
24062 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24064 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
24066 * ipa-inline.c (want_inline_small_function_p): Return false if
24067 inlining has already failed with CIF_FINAL_ERROR.
24068 (update_caller_keys): Call want_inline_small_function_p before
24070 (update_callee_keys): Likewise.
24072 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
24074 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24076 (rs6000_quadword_masked_address_p): Likewise.
24077 (quad_aligned_load_p): Likewise.
24078 (quad_aligned_store_p): Likewise.
24079 (const_load_sequence_p): Add comment to describe the outer-most loop.
24080 (mimic_memory_attributes_and_flags): New function.
24081 (rs6000_gen_stvx): Likewise.
24082 (replace_swapped_aligned_store): Likewise.
24083 (rs6000_gen_lvx): Likewise.
24084 (replace_swapped_aligned_load): Likewise.
24085 (replace_swapped_load_constant): Capitalize argument name in
24086 comment describing this function.
24087 (rs6000_analyze_swaps): Add a third pass to search for vector loads
24088 and stores that access quad-word aligned addresses and replace
24089 with stvx or lvx instructions when appropriate.
24090 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24091 New function prototype.
24092 (rs6000_quadword_masked_address_p): Likewise.
24093 (rs6000_gen_lvx): Likewise.
24094 (rs6000_gen_stvx): Likewise.
24095 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24096 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24097 when memory address is aligned.
24098 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24099 this split to select lvx instruction when memory address is aligned.
24100 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24101 instruction when memory address is aligned.
24102 (*vsx_le_perm_load_v16qi): Likewise.
24103 (four unnamed splitters): Modify to select the stvx instruction
24104 when memory is aligned.
24106 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
24108 * predict.c (determine_unlikely_bbs): Handle correctly BBs
24109 which appears in the queue multiple times.
24111 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24112 Alan Hayward <alan.hayward@arm.com>
24113 David Sherwood <david.sherwood@arm.com>
24115 * tree-vectorizer.h (vec_lower_bound): New structure.
24116 (_loop_vec_info): Add check_nonzero and lower_bounds.
24117 (LOOP_VINFO_CHECK_NONZERO): New macro.
24118 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24119 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24120 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24121 fields. Make seg_len the distance travelled, not including the
24123 (dr_direction_indicator): Declare.
24124 (dr_zero_step_indicator): Likewise.
24125 (dr_known_forward_stride_p): Likewise.
24126 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24128 (runtime_alias_check_p): Allow runtime alias checks with
24130 (operator ==): Compare access_size and align.
24131 (prune_runtime_alias_test_list): Rework for new distinction between
24132 the access_size and seg_len.
24133 (create_intersect_range_checks_index): Likewise. Cope with polynomial
24135 (get_segment_min_max): New function.
24136 (create_intersect_range_checks): Use it.
24137 (dr_step_indicator): New function.
24138 (dr_direction_indicator): Likewise.
24139 (dr_zero_step_indicator): Likewise.
24140 (dr_known_forward_stride_p): Likewise.
24141 * tree-loop-distribution.c (data_ref_segment_size): Return
24142 DR_STEP * (niters - 1).
24143 (compute_alias_check_pairs): Update call to the dr_with_seg_len
24145 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24146 (vect_preserves_scalar_order_p): New function, split out from...
24147 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
24148 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24149 (vect_vfa_access_size): New function.
24150 (vect_vfa_align): Likewise.
24151 (vect_compile_time_alias): Take access_size_a and access_b arguments.
24152 (dump_lower_bound): New function.
24153 (vect_check_lower_bound): Likewise.
24154 (vect_small_gap_p): Likewise.
24155 (vectorizable_with_step_bound_p): Likewise.
24156 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24157 depencies if the vectorization factor is 1. Convert the checks
24158 for nonzero steps into checks on the bounds of DR_STEP. Try using
24159 a bunds check for variable steps if the minimum required step is
24160 relatively small. Update calls to the dr_with_seg_len
24161 constructor and to vect_compile_time_alias.
24162 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24164 (vect_loop_versioning): Call it.
24165 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24167 (vect_estimate_min_profitable_iters): Account for any bounds checks.
24169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24170 Alan Hayward <alan.hayward@arm.com>
24171 David Sherwood <david.sherwood@arm.com>
24173 * doc/sourcebuild.texi (vect_scatter_store): Document.
24174 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24176 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24178 * genopinit.c (main): Add supports_vec_scatter_store and
24179 supports_vec_scatter_store_cached to target_optabs.
24180 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24181 IFN_MASK_SCATTER_STORE.
24182 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24184 * internal-fn.h (internal_store_fn_p): Declare.
24185 (internal_fn_stored_value_index): Likewise.
24186 * internal-fn.c (scatter_store_direct): New macro.
24187 (expand_scatter_store_optab_fn): New function.
24188 (direct_scatter_store_optab_supported_p): New macro.
24189 (internal_store_fn_p): New function.
24190 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24191 IFN_MASK_SCATTER_STORE.
24192 (internal_fn_mask_index): Likewise.
24193 (internal_fn_stored_value_index): New function.
24194 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24195 for scatter stores.
24196 * optabs-query.h (supports_vec_scatter_store_p): Declare.
24197 * optabs-query.c (supports_vec_scatter_store_p): New function.
24198 * tree-vectorizer.h (vect_get_store_rhs): Declare.
24199 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24200 true for scatter stores.
24201 (vect_gather_scatter_fn_p): Handle scatter stores too.
24202 (vect_check_gather_scatter): Consider using scatter stores if
24203 supports_vec_scatter_store_p.
24204 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24205 scatter stores too.
24206 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24207 internal_fn_stored_value_index.
24208 (check_load_store_masking): Handle scatter stores too.
24209 (vect_get_store_rhs): Make public.
24210 (vectorizable_call): Use internal_store_fn_p.
24211 (vectorizable_store): Handle scatter store internal functions.
24212 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24213 when deciding whether the end of the group has been reached.
24214 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24215 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24216 (mask_scatter_store<mode>): New insns.
24218 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24219 Alan Hayward <alan.hayward@arm.com>
24220 David Sherwood <david.sherwood@arm.com>
24222 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24223 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24224 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24226 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24227 Use vect_truncate_gather_scatter_offset if we can't treat the
24228 operation as a normal gather load or scatter store.
24229 (get_group_load_store_type): Take the gather_scatter_info
24230 as argument. Try using a gather load or scatter store for
24231 single-element groups.
24232 (get_load_store_type): Update calls to get_group_load_store_type
24233 and vect_use_strided_gather_scatters_p.
24235 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24236 Alan Hayward <alan.hayward@arm.com>
24237 David Sherwood <david.sherwood@arm.com>
24239 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24240 optional tree argument.
24241 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24243 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24244 but continue to use the current value as a fallback.
24245 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24246 to compare the updates.
24247 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24248 (get_load_store_type): Use it when handling a strided access.
24249 (vect_get_strided_load_store_ops): New function.
24250 (vect_get_data_ptr_increment): Likewise.
24251 (vectorizable_load): Handle strided gather loads. Always pass
24252 a step to vect_create_data_ref_ptr and bump_vector_ptr.
24254 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24255 Alan Hayward <alan.hayward@arm.com>
24256 David Sherwood <david.sherwood@arm.com>
24258 * doc/md.texi (gather_load@var{m}): Document.
24259 (mask_gather_load@var{m}): Likewise.
24260 * genopinit.c (main): Add supports_vec_gather_load and
24261 supports_vec_gather_load_cached to target_optabs.
24262 * optabs-tree.c (init_tree_optimization_optabs): Use
24263 ggc_cleared_alloc to allocate target_optabs.
24264 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24265 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24267 * internal-fn.h (internal_load_fn_p): Declare.
24268 (internal_gather_scatter_fn_p): Likewise.
24269 (internal_fn_mask_index): Likewise.
24270 (internal_gather_scatter_fn_supported_p): Likewise.
24271 * internal-fn.c (gather_load_direct): New macro.
24272 (expand_gather_load_optab_fn): New function.
24273 (direct_gather_load_optab_supported_p): New macro.
24274 (direct_internal_fn_optab): New function.
24275 (internal_load_fn_p): Likewise.
24276 (internal_gather_scatter_fn_p): Likewise.
24277 (internal_fn_mask_index): Likewise.
24278 (internal_gather_scatter_fn_supported_p): Likewise.
24279 * optabs-query.c (supports_at_least_one_mode_p): New function.
24280 (supports_vec_gather_load_p): Likewise.
24281 * optabs-query.h (supports_vec_gather_load_p): Declare.
24282 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24283 and memory_type field.
24284 (NUM_PATTERNS): Bump to 15.
24285 * tree-vect-data-refs.c: Include internal-fn.h.
24286 (vect_gather_scatter_fn_p): New function.
24287 (vect_describe_gather_scatter_call): Likewise.
24288 (vect_check_gather_scatter): Try using internal functions for
24289 gather loads. Recognize existing calls to a gather load function.
24290 (vect_analyze_data_refs): Consider using gather loads if
24291 supports_vec_gather_load_p.
24292 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24293 (vect_get_gather_scatter_offset_type): Likewise.
24294 (vect_convert_mask_for_vectype): Likewise.
24295 (vect_add_conversion_to_patterm): Likewise.
24296 (vect_try_gather_scatter_pattern): Likewise.
24297 (vect_recog_gather_scatter_pattern): New pattern recognizer.
24298 (vect_vect_recog_func_ptrs): Add it.
24299 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24300 internal_fn_mask_index and internal_gather_scatter_fn_p.
24301 (check_load_store_masking): Take the gather_scatter_info as an
24302 argument and handle gather loads.
24303 (vect_get_gather_scatter_ops): New function.
24304 (vectorizable_call): Check internal_load_fn_p.
24305 (vectorizable_load): Likewise. Handle gather load internal
24307 (vectorizable_store): Update call to check_load_store_masking.
24308 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24309 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24310 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24311 (aarch64_gather_scale_operand_d): New predicates.
24312 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24313 (mask_gather_load<mode>): New insns.
24315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24316 Alan Hayward <alan.hayward@arm.com>
24317 David Sherwood <david.sherwood@arm.com>
24319 * optabs.def (fold_left_plus_optab): New optab.
24320 * doc/md.texi (fold_left_plus_@var{m}): Document.
24321 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24322 * internal-fn.c (fold_left_direct): Define.
24323 (expand_fold_left_optab_fn): Likewise.
24324 (direct_fold_left_optab_supported_p): Likewise.
24325 * fold-const-call.c (fold_const_fold_left): New function.
24326 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24327 * tree-parloops.c (valid_reduction_p): New function.
24328 (gather_scalar_reductions): Use it.
24329 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24330 (vect_finish_replace_stmt): Declare.
24331 * tree-vect-loop.c (fold_left_reduction_fn): New function.
24332 (needs_fold_left_reduction_p): New function, split out from...
24333 (vect_is_simple_reduction): ...here. Accept reductions that
24334 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24335 (vect_force_simple_reduction): Also store the reduction type in
24336 the assignment's STMT_VINFO_REDUC_TYPE.
24337 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24338 (merge_with_identity): New function.
24339 (vect_expand_fold_left): Likewise.
24340 (vectorize_fold_left_reduction): Likewise.
24341 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
24342 scalar phi in place for it. Check for target support and reject
24343 cases that would reassociate the operation. Defer the transform
24344 phase to vectorize_fold_left_reduction.
24345 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24346 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24347 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24349 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24351 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24352 call to ifc_temp_var.
24354 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24355 Alan Hayward <alan.hayward@arm.com>
24356 David Sherwood <david.sherwood@arm.com>
24358 * target.def (legitimize_address_displacement): Take the original
24359 offset as a poly_int.
24360 * targhooks.h (default_legitimize_address_displacement): Update
24362 * targhooks.c (default_legitimize_address_displacement): Likewise.
24363 * doc/tm.texi: Regenerate.
24364 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24365 as an argument, moving assert of ad->disp == ad->disp_term to...
24366 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24367 Try calling targetm.legitimize_address_displacement before expanding
24368 the address rather than afterwards, and adjust for the new interface.
24369 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24370 Match the new hook interface. Handle SVE addresses.
24371 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24372 new hook interface.
24374 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24376 * Makefile.in (OBJS): Add early-remat.o.
24377 * target.def (select_early_remat_modes): New hook.
24378 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24379 * doc/tm.texi: Regenerate.
24380 * targhooks.h (default_select_early_remat_modes): Declare.
24381 * targhooks.c (default_select_early_remat_modes): New function.
24382 * timevar.def (TV_EARLY_REMAT): New timevar.
24383 * passes.def (pass_early_remat): New pass.
24384 * tree-pass.h (make_pass_early_remat): Declare.
24385 * early-remat.c: New file.
24386 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24388 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24390 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24391 Alan Hayward <alan.hayward@arm.com>
24392 David Sherwood <david.sherwood@arm.com>
24394 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24395 vfm1 with a bound_epilog parameter.
24396 (vect_do_peeling): Update calls accordingly, and move the prologue
24397 call earlier in the function. Treat the base bound_epilog as 0 for
24398 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24399 this base when peeling for gaps.
24400 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24401 with fully-masked loops.
24402 (vect_estimate_min_profitable_iters): Handle the single peeled
24403 iteration in that case.
24405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24406 Alan Hayward <alan.hayward@arm.com>
24407 David Sherwood <david.sherwood@arm.com>
24409 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24410 single-element interleaving even if the size is not a power of 2.
24411 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24412 accesses for single-element interleaving if the group size is
24415 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24416 Alan Hayward <alan.hayward@arm.com>
24417 David Sherwood <david.sherwood@arm.com>
24419 * doc/md.texi (fold_extract_last_@var{m}): Document.
24420 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24421 * optabs.def (fold_extract_last_optab): New optab.
24422 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24423 * internal-fn.c (fold_extract_direct): New macro.
24424 (expand_fold_extract_optab_fn): Likewise.
24425 (direct_fold_extract_optab_supported_p): Likewise.
24426 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24427 * tree-vect-loop.c (vect_model_reduction_cost): Handle
24428 EXTRACT_LAST_REDUCTION.
24429 (get_initial_def_for_reduction): Do not create an initial vector
24430 for EXTRACT_LAST_REDUCTION reductions.
24431 (vectorizable_reduction): Leave the scalar phi in place for
24432 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
24433 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
24434 epilogue code for EXTRACT_LAST_REDUCTION and defer the
24435 transform phase to vectorizable_condition.
24436 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24438 (vect_finish_stmt_generation): ...here.
24439 (vect_finish_replace_stmt): New function.
24440 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24441 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24443 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24445 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24446 Alan Hayward <alan.hayward@arm.com>
24447 David Sherwood <david.sherwood@arm.com>
24449 * doc/md.texi (extract_last_@var{m}): Document.
24450 * optabs.def (extract_last_optab): New optab.
24451 * internal-fn.def (EXTRACT_LAST): New internal function.
24452 * internal-fn.c (cond_unary_direct): New macro.
24453 (expand_cond_unary_optab_fn): Likewise.
24454 (direct_cond_unary_optab_supported_p): Likewise.
24455 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24456 loops using EXTRACT_LAST.
24457 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24458 (extract_last_<mode>): ...this optab.
24459 (vec_extract<mode><Vel>): Update accordingly.
24461 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24462 Alan Hayward <alan.hayward@arm.com>
24463 David Sherwood <david.sherwood@arm.com>
24465 * target.def (empty_mask_is_expensive): New hook.
24466 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24467 * doc/tm.texi: Regenerate.
24468 * targhooks.h (default_empty_mask_is_expensive): Declare.
24469 * targhooks.c (default_empty_mask_is_expensive): New function.
24470 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24471 if the target says that empty masks are expensive.
24472 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24474 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24476 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24477 Alan Hayward <alan.hayward@arm.com>
24478 David Sherwood <david.sherwood@arm.com>
24480 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24481 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24482 (vect_use_loop_mask_for_alignment_p): New function.
24483 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24484 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24485 niters_skip argument. Make sure that the first niters_skip elements
24486 of the first iteration are inactive.
24487 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24488 Update call to vect_set_loop_masks_directly.
24489 (get_misalign_in_elems): New function, split out from...
24490 (vect_gen_prolog_loop_niters): ...here.
24491 (vect_update_init_of_dr): Take a code argument that specifies whether
24492 the adjustment should be added or subtracted.
24493 (vect_update_init_of_drs): Likewise.
24494 (vect_prepare_for_masked_peels): New function.
24495 (vect_do_peeling): Skip prologue peeling if we're using a mask
24496 instead. Update call to vect_update_inits_of_drs.
24497 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24499 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24500 alignment. Do not include the number of peeled iterations in
24501 the minimum threshold in that case.
24502 (vectorizable_induction): Adjust the start value down by
24503 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24504 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24505 Take the number of skipped iterations into account when calculating
24507 * tree-vect-stmts.c (vect_gen_while_not): New function.
24509 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24510 Alan Hayward <alan.hayward@arm.com>
24511 David Sherwood <david.sherwood@arm.com>
24513 * doc/sourcebuild.texi (vect_fully_masked): Document.
24514 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24515 default value to 0.
24516 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24518 (vect_analyze_loop_2): ...here. Don't check the vectorization
24519 factor against the number of loop iterations if the loop is
24522 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24523 Alan Hayward <alan.hayward@arm.com>
24524 David Sherwood <david.sherwood@arm.com>
24526 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24527 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24528 (dump_groups): Update accordingly.
24529 (iv_use::mem_type): New member variable.
24530 (address_p): New function.
24531 (record_use): Add a mem_type argument and initialize the new
24533 (record_group_use): Add a mem_type argument. Use address_p.
24534 Remove obsolete null checks of base_object. Update call to record_use.
24535 (find_interesting_uses_op): Update call to record_group_use.
24536 (find_interesting_uses_cond): Likewise.
24537 (find_interesting_uses_address): Likewise.
24538 (get_mem_type_for_internal_fn): New function.
24539 (find_address_like_use): Likewise.
24540 (find_interesting_uses_stmt): Try find_address_like_use before
24541 calling find_interesting_uses_op.
24542 (addr_offset_valid_p): Use the iv mem_type field as the type
24543 of the addressed memory.
24544 (add_autoinc_candidates): Likewise.
24545 (get_address_cost): Likewise.
24546 (split_small_address_groups_p): Use address_p.
24547 (split_address_groups): Likewise.
24548 (add_iv_candidate_for_use): Likewise.
24549 (autoinc_possible_for_pair): Likewise.
24550 (rewrite_groups): Likewise.
24551 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24552 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24553 (get_alias_ptr_type_for_ptr_address): New function.
24554 (rewrite_use_address): Rewrite address uses in calls that were
24555 identified by find_address_like_use.
24557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24558 Alan Hayward <alan.hayward@arm.com>
24559 David Sherwood <david.sherwood@arm.com>
24561 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24563 * gimple-expr.h (is_gimple_addressable: Likewise.
24564 * gimple-expr.c (is_gimple_address): Likewise.
24565 * internal-fn.c (expand_call_mem_ref): New function.
24566 (expand_mask_load_optab_fn): Use it.
24567 (expand_mask_store_optab_fn): Likewise.
24569 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24570 Alan Hayward <alan.hayward@arm.com>
24571 David Sherwood <david.sherwood@arm.com>
24573 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24574 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24575 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24576 (cond_umax@var{mode}): Document.
24577 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24578 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24579 (cond_umin_optab, cond_umax_optab): New optabs.
24580 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24581 (COND_IOR, COND_XOR): New internal functions.
24582 * internal-fn.h (get_conditional_internal_fn): Declare.
24583 * internal-fn.c (cond_binary_direct): New macro.
24584 (expand_cond_binary_optab_fn): Likewise.
24585 (direct_cond_binary_optab_supported_p): Likewise.
24586 (get_conditional_internal_fn): New function.
24587 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24588 Cope with reduction statements that are vectorized as calls rather
24590 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24591 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24592 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24593 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24594 (UNSPEC_COND_EOR): New unspecs.
24595 (optab): Add mappings for them.
24596 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24597 (sve_int_op, sve_fp_op): New int attributes.
24599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24600 Alan Hayward <alan.hayward@arm.com>
24601 David Sherwood <david.sherwood@arm.com>
24603 * optabs.def (while_ult_optab): New optab.
24604 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24605 * internal-fn.def (WHILE_ULT): New internal function.
24606 * internal-fn.h (direct_internal_fn_supported_p): New override
24607 that takes two types as argument.
24608 * internal-fn.c (while_direct): New macro.
24609 (expand_while_optab_fn): New function.
24610 (convert_optab_supported_p): Likewise.
24611 (direct_while_optab_supported_p): New macro.
24612 * wide-int.h (wi::udiv_ceil): New function.
24613 * tree-vectorizer.h (rgroup_masks): New structure.
24614 (vec_loop_masks): New typedef.
24615 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24616 and fully_masked_p.
24617 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24618 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24619 (vect_max_vf): New function.
24620 (slpeel_make_loop_iterate_ntimes): Delete.
24621 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24622 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24623 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24624 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24625 internal-fn.h, stor-layout.h and optabs-query.h.
24626 (vect_set_loop_mask): New function.
24627 (add_preheader_seq): Likewise.
24628 (add_header_seq): Likewise.
24629 (interleave_supported_p): Likewise.
24630 (vect_maybe_permute_loop_masks): Likewise.
24631 (vect_set_loop_masks_directly): Likewise.
24632 (vect_set_loop_condition_masked): Likewise.
24633 (vect_set_loop_condition_unmasked): New function, split out from
24634 slpeel_make_loop_iterate_ntimes.
24635 (slpeel_make_loop_iterate_ntimes): Rename to..
24636 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24637 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24638 (vect_do_peeling): Update call accordingly.
24639 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24641 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24642 mask_compare_type, can_fully_mask_p and fully_masked_p.
24643 (release_vec_loop_masks): New function.
24644 (_loop_vec_info): Use it to free the loop masks.
24645 (can_produce_all_loop_masks_p): New function.
24646 (vect_get_max_nscalars_per_iter): Likewise.
24647 (vect_verify_full_masking): Likewise.
24648 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24649 retries, and free the mask rgroups before retrying. Check loop-wide
24650 reasons for disallowing fully-masked loops. Make the final decision
24651 about whether use a fully-masked loop or not.
24652 (vect_estimate_min_profitable_iters): Do not assume that peeling
24653 for the number of iterations will be needed for fully-masked loops.
24654 (vectorizable_reduction): Disable fully-masked loops.
24655 (vectorizable_live_operation): Likewise.
24656 (vect_halve_mask_nunits): New function.
24657 (vect_double_mask_nunits): Likewise.
24658 (vect_record_loop_mask): Likewise.
24659 (vect_get_loop_mask): Likewise.
24660 (vect_transform_loop): Handle the case in which the final loop
24661 iteration might handle a partial vector. Call vect_set_loop_condition
24662 instead of slpeel_make_loop_iterate_ntimes.
24663 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24664 (check_load_store_masking): New function.
24665 (prepare_load_store_mask): Likewise.
24666 (vectorizable_store): Handle fully-masked loops.
24667 (vectorizable_load): Likewise.
24668 (supportable_widening_operation): Use vect_halve_mask_nunits for
24670 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24671 (vect_gen_while): New function.
24672 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24673 (aarch64_uqdec<mode>): New insn.
24675 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24676 Alan Hayward <alan.hayward@arm.com>
24677 David Sherwood <david.sherwood@arm.com>
24679 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24680 (reduc_xor_scal_optab): New optabs.
24681 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24682 (reduc_xor_scal_@var{m}): Document.
24683 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24684 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24685 internal functions.
24686 * fold-const-call.c (fold_const_call): Handle them.
24687 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24688 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24689 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24690 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24691 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24692 (UNSPEC_XORV): New unspecs.
24693 (optab): Add entries for them.
24694 (BITWISEV): New int iterator.
24695 (bit_reduc_op): New int attributes.
24697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24698 Alan Hayward <alan.hayward@arm.com>
24699 David Sherwood <david.sherwood@arm.com>
24701 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24702 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24703 * optabs.def (vec_shl_insert_optab): New optab.
24704 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24705 (duplicate_and_interleave): Likewise.
24706 * tree-vect-loop.c: Include internal-fn.h.
24707 (neutral_op_for_slp_reduction): New function, split out from
24708 get_initial_defs_for_reduction.
24709 (get_initial_def_for_reduction): Handle option 2 for variable-length
24710 vectors by loading the neutral value into a vector and then shifting
24711 the initial value into element 0.
24712 (get_initial_defs_for_reduction): Replace the code argument with
24713 the neutral value calculated by neutral_op_for_slp_reduction.
24714 Use gimple_build_vector for constant-length vectors.
24715 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24716 but the first group_size elements have a neutral value.
24717 Use duplicate_and_interleave otherwise.
24718 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24719 Update call to get_initial_defs_for_reduction. Handle SLP
24720 reductions for variable-length vectors by creating one vector
24721 result for each scalar result, with the elements associated
24722 with other scalar results stubbed out with the neutral value.
24723 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24724 Require IFN_VEC_SHL_INSERT for double reductions on
24725 variable-length vectors, or SLP reductions that have
24726 a neutral value. Require can_duplicate_and_interleave_p
24727 support for variable-length unchained SLP reductions if there
24728 is no neutral value, such as for MIN/MAX reductions. Also require
24729 the number of vector elements to be a multiple of the number of
24730 SLP statements when doing variable-length unchained SLP reductions.
24731 Update call to vect_create_epilog_for_reduction.
24732 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24733 and remove initial values.
24734 (duplicate_and_interleave): Make public.
24735 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24736 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24738 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24739 Alan Hayward <alan.hayward@arm.com>
24740 David Sherwood <david.sherwood@arm.com>
24742 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24743 (can_duplicate_and_interleave_p): New function.
24744 (vect_get_and_check_slp_defs): Take the vector of statements
24745 rather than just the current one. Remove excess parentheses.
24746 Restriction rejectinon of vect_constant_def and vect_external_def
24747 for variable-length vectors to boolean types, or types for which
24748 can_duplicate_and_interleave_p is false.
24749 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24750 (duplicate_and_interleave): New function.
24751 (vect_get_constant_vectors): Use gimple_build_vector for
24752 constant-length vectors and suitable variable-length constant
24753 vectors. Use duplicate_and_interleave for other variable-length
24754 vectors. Don't defer the update when inserting new statements.
24756 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24757 Alan Hayward <alan.hayward@arm.com>
24758 David Sherwood <david.sherwood@arm.com>
24760 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24761 min_profitable_iters doesn't go negative.
24763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24764 Alan Hayward <alan.hayward@arm.com>
24765 David Sherwood <david.sherwood@arm.com>
24767 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24768 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24769 * optabs.def (vec_mask_load_lanes_optab): New optab.
24770 (vec_mask_store_lanes_optab): Likewise.
24771 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24772 (MASK_STORE_LANES): Likewise.
24773 * internal-fn.c (mask_load_lanes_direct): New macro.
24774 (mask_store_lanes_direct): Likewise.
24775 (expand_mask_load_optab_fn): Handle masked operations.
24776 (expand_mask_load_lanes_optab_fn): New macro.
24777 (expand_mask_store_optab_fn): Handle masked operations.
24778 (expand_mask_store_lanes_optab_fn): New macro.
24779 (direct_mask_load_lanes_optab_supported_p): Likewise.
24780 (direct_mask_store_lanes_optab_supported_p): Likewise.
24781 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24783 (vect_load_lanes_supported): Likewise.
24784 * tree-vect-data-refs.c (strip_conversion): New function.
24785 (can_group_stmts_p): Likewise.
24786 (vect_analyze_data_ref_accesses): Use it instead of checking
24787 for a pair of assignments.
24788 (vect_store_lanes_supported): Take a masked_p parameter.
24789 (vect_load_lanes_supported): Likewise.
24790 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24791 vect_store_lanes_supported and vect_load_lanes_supported.
24792 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24793 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24794 parameter. Don't allow gaps for masked accesses.
24795 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24796 and vect_load_lanes_supported.
24797 (get_load_store_type): Take a masked_p parameter and update
24798 call to get_group_load_store_type.
24799 (vectorizable_store): Update call to get_load_store_type.
24800 Handle IFN_MASK_STORE_LANES.
24801 (vectorizable_load): Update call to get_load_store_type.
24802 Handle IFN_MASK_LOAD_LANES.
24804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24805 Alan Hayward <alan.hayward@arm.com>
24806 David Sherwood <david.sherwood@arm.com>
24808 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24810 * config/aarch64/aarch64-protos.h
24811 (aarch64_sve_struct_memory_operand_p): Declare.
24812 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24813 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24814 (VPRED, vpred): Handle SVE structure modes.
24815 * config/aarch64/constraints.md (Utx): New constraint.
24816 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24817 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24818 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24819 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24820 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24821 structure modes. Split into pieces after RA.
24822 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24823 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24825 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24826 SVE structure modes.
24827 (aarch64_classify_address): Likewise.
24828 (sizetochar): Move earlier in file.
24829 (aarch64_print_operand): Handle SVE register lists.
24830 (aarch64_array_mode): New function.
24831 (aarch64_sve_struct_memory_operand_p): Likewise.
24832 (TARGET_ARRAY_MODE): Redefine.
24834 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24835 Alan Hayward <alan.hayward@arm.com>
24836 David Sherwood <david.sherwood@arm.com>
24838 * target.def (array_mode): New target hook.
24839 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24840 * doc/tm.texi: Regenerate.
24841 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24842 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24843 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24844 targetm.array_mode.
24845 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24848 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24849 Alan Hayward <alan.hayward@arm.com>
24850 David Sherwood <david.sherwood@arm.com>
24852 * fold-const.c (fold_binary_loc): Check the argument types
24853 rather than the result type when testing for a vector operation.
24855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24857 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24858 * doc/tm.texi: Regenerate.
24860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24861 Alan Hayward <alan.hayward@arm.com>
24862 David Sherwood <david.sherwood@arm.com>
24864 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24865 (sve): Document new AArch64 extension.
24866 * doc/md.texi (w): Extend the description of the AArch64
24867 constraint to include SVE vectors.
24868 (Upl, Upa): Document new AArch64 predicate constraints.
24869 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24871 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24872 (msve-vector-bits=): New option.
24873 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24874 SVE when these are disabled.
24875 (sve): New extension.
24876 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24877 modes. Adjust their number of units based on aarch64_sve_vg.
24878 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24879 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24880 aarch64_addr_query_type.
24881 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24882 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24883 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24884 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24885 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24886 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24887 (aarch64_simd_imm_zero_p): Delete.
24888 (aarch64_check_zero_based_sve_index_immediate): Declare.
24889 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24890 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24891 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24892 (aarch64_sve_float_mul_immediate_p): Likewise.
24893 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24894 rather than an rtx.
24895 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24896 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24897 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24898 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24899 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24900 (aarch64_regmode_natural_size): Likewise.
24901 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24902 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24904 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24905 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24906 for VG and the SVE predicate registers.
24907 (V_ALIASES): Add a "z"-prefixed alias.
24908 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24909 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24910 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24911 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24912 (REG_CLASS_NAMES): Add entries for them.
24913 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24914 and the predicate registers.
24915 (aarch64_sve_vg): Declare.
24916 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24917 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24918 (REGMODE_NATURAL_SIZE): Define.
24919 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24921 * config/aarch64/aarch64.c: Include cfgrtl.h.
24922 (simd_immediate_info): Add a constructor for series vectors,
24923 and an associated step field.
24924 (aarch64_sve_vg): New variable.
24925 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24926 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24927 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24928 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24929 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24930 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24931 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24932 (aarch64_get_mask_mode): New functions.
24933 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24934 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24935 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24936 predicate modes and predicate registers. Explicitly restrict
24937 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24938 to store a vector mode if it is recognized by
24939 aarch64_classify_vector_mode.
24940 (aarch64_regmode_natural_size): New function.
24941 (aarch64_hard_regno_caller_save_mode): Return the original mode
24943 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24944 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24945 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24946 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24948 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24949 does not overlap dest if the function is frame-related. Handle
24951 (aarch64_split_add_offset): New function.
24952 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24953 them aarch64_add_offset.
24954 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24955 and update call to aarch64_sub_sp.
24956 (aarch64_add_cfa_expression): New function.
24957 (aarch64_expand_prologue): Pass extra temporary registers to the
24958 functions above. Handle the case in which we need to emit new
24959 DW_CFA_expressions for registers that were originally saved
24960 relative to the stack pointer, but now have to be expressed
24961 relative to the frame pointer.
24962 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24964 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24965 IP0 and IP1 values for SVE frames.
24966 (aarch64_expand_vec_series): New function.
24967 (aarch64_expand_sve_widened_duplicate): Likewise.
24968 (aarch64_expand_sve_const_vector): Likewise.
24969 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24970 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24971 into the register, rather than emitting a SET directly.
24972 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24973 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24974 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24975 (offset_9bit_signed_scaled_p): New functions.
24976 (aarch64_replicate_bitmask_imm): New function.
24977 (aarch64_bitmask_imm): Use it.
24978 (aarch64_cannot_force_const_mem): Reject expressions involving
24979 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24980 (aarch64_classify_index): Handle SVE indices, by requiring
24981 a plain register index with a scale that matches the element size.
24982 (aarch64_classify_address): Handle SVE addresses. Assert that
24983 the mode of the address is VOIDmode or an integer mode.
24984 Update call to aarch64_classify_symbol.
24985 (aarch64_classify_symbolic_expression): Update call to
24986 aarch64_classify_symbol.
24987 (aarch64_const_vec_all_in_range_p): New function.
24988 (aarch64_print_vector_float_operand): Likewise.
24989 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24990 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24991 and the FP immediates 1.0 and 0.5.
24992 (aarch64_print_address_internal): Handle SVE addresses.
24993 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24994 (aarch64_regno_regclass): Handle predicate registers.
24995 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24997 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24998 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24999 (aarch64_convert_sve_vector_bits): New function.
25000 (aarch64_override_options): Use it to handle -msve-vector-bits=.
25001 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25002 rather than an rtx.
25003 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25004 Handle SVE vector and predicate modes. Accept VL-based constants
25005 that need only one temporary register, and VL offsets that require
25006 no temporary registers.
25007 (aarch64_conditional_register_usage): Mark the predicate registers
25008 as fixed if SVE isn't available.
25009 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25010 Return true for SVE vector and predicate modes.
25011 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25012 rather than an unsigned int. Handle SVE modes.
25013 (aarch64_preferred_simd_mode): Update call accordingly. Handle
25015 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25017 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25018 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25019 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25020 (aarch64_sve_float_mul_immediate_p): New functions.
25021 (aarch64_sve_valid_immediate): New function.
25022 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25023 Explicitly reject structure modes. Check for INDEX constants.
25024 Handle PTRUE and PFALSE constants.
25025 (aarch64_check_zero_based_sve_index_immediate): New function.
25026 (aarch64_simd_imm_zero_p): Delete.
25027 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25028 vector modes. Accept constants in the range of CNT[BHWD].
25029 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25030 ask for an Advanced SIMD mode.
25031 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25032 (aarch64_simd_vector_alignment): Handle SVE predicates.
25033 (aarch64_vectorize_preferred_vector_alignment): New function.
25034 (aarch64_simd_vector_alignment_reachable): Use it instead of
25036 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25037 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25039 (MAX_VECT_LEN): Delete.
25040 (expand_vec_perm_d): Add a vec_flags field.
25041 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25042 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25043 (aarch64_evpc_ext): Don't apply a big-endian lane correction
25045 (aarch64_evpc_rev): Rename to...
25046 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
25047 (aarch64_evpc_rev_global): New function.
25048 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25049 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25051 (aarch64_evpc_sve_tbl): New function.
25052 (aarch64_expand_vec_perm_const_1): Update after rename of
25053 aarch64_evpc_rev. Handle SVE permutes too, trying
25054 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25055 than aarch64_evpc_tbl.
25056 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25057 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25058 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25059 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25060 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25061 (aarch64_expand_sve_vcond): New functions.
25062 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25063 of aarch64_vector_mode_p.
25064 (aarch64_dwarf_poly_indeterminate_value): New function.
25065 (aarch64_compute_pressure_classes): Likewise.
25066 (aarch64_can_change_mode_class): Likewise.
25067 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25068 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25069 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25070 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25071 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25072 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25073 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25074 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25076 (Dn, Dl, Dr): Accept const as well as const_vector.
25077 (Dz): Likewise. Compare against CONST0_RTX.
25078 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25079 of "vector" where appropriate.
25080 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25081 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25082 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25083 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25084 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25085 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25086 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25087 (v_int_equiv): Extend to SVE modes.
25088 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25090 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25091 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25092 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25093 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25094 (SVE_COND_FP_CMP): New int iterators.
25095 (perm_hilo): Handle the new unpack unspecs.
25096 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25098 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25099 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25100 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25101 (aarch64_equality_operator, aarch64_constant_vector_operand)
25102 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25103 (aarch64_sve_nonimmediate_operand): Likewise.
25104 (aarch64_sve_general_operand): Likewise.
25105 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25106 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25107 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25108 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25109 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25110 (aarch64_sve_float_arith_immediate): Likewise.
25111 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25112 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25113 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25114 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25115 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25116 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25117 (aarch64_sve_float_arith_operand): Likewise.
25118 (aarch64_sve_float_arith_with_sub_operand): Likewise.
25119 (aarch64_sve_float_mul_operand): Likewise.
25120 (aarch64_sve_vec_perm_operand): Likewise.
25121 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25122 (aarch64_mov_operand): Accept const_poly_int and const_vector.
25123 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25124 as well as const_vector.
25125 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25126 in file. Use CONST0_RTX and CONSTM1_RTX.
25127 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
25128 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25129 Use aarch64_simd_imm_zero.
25130 * config/aarch64/aarch64-sve.md: New file.
25131 * config/aarch64/aarch64.md: Include it.
25132 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25133 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25134 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25135 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25136 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25137 (sve): New attribute.
25138 (enabled): Disable instructions with the sve attribute unless
25140 (movqi, movhi): Pass CONST_POLY_INT operaneds through
25141 aarch64_expand_mov_immediate.
25142 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25143 CNT[BHSD] immediates.
25144 (movti): Split CONST_POLY_INT moves into two halves.
25145 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25146 Split additions that need a temporary here if the destination
25147 is the stack pointer.
25148 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25149 (*add<mode>3_poly_1): New instruction.
25150 (set_clobber_cc): New expander.
25152 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25154 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25155 parameter and use it instead of GET_MODE_SIZE (innermode). Use
25156 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25157 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25158 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
25159 Change innermode from fixed_mode_size to machine_mode.
25160 (simplify_subreg): Update call accordingly. Handle a constant-sized
25161 subreg of a variable-length CONST_VECTOR.
25163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25164 Alan Hayward <alan.hayward@arm.com>
25165 David Sherwood <david.sherwood@arm.com>
25167 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25168 (add_offset_to_base): New function, split out from...
25169 (create_mem_ref): ...here. When handling a scale other than 1,
25170 check first whether the address is valid without the offset.
25171 Add it into the base if so, leaving the index and scale as-is.
25173 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25176 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25177 fold_for_warn before checking if arg2 is INTEGER_CST.
25179 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
25181 * config/rs6000/predicates.md (load_multiple_operation): Delete.
25182 (store_multiple_operation): Delete.
25183 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25184 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25185 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25186 guarded by TARGET_STRING.
25187 (rs6000_output_load_multiple): Delete.
25188 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25189 OPTION_MASK_STRING / TARGET_STRING handling.
25190 (print_operand) <'N', 'O'>: Add comment that these are unused now.
25191 (const rs6000_opt_masks) <"string">: Change mask to 0.
25192 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25193 (MASK_STRING): Delete.
25194 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25196 (load_multiple): Delete.
25203 (store_multiple): Delete.
25210 (movmemsi_8reg): Delete.
25211 (corresponding unnamed define_insn): Delete.
25212 (movmemsi_6reg): Delete.
25213 (corresponding unnamed define_insn): Delete.
25214 (movmemsi_4reg): Delete.
25215 (corresponding unnamed define_insn): Delete.
25216 (movmemsi_2reg): Delete.
25217 (corresponding unnamed define_insn): Delete.
25218 (movmemsi_1reg): Delete.
25219 (corresponding unnamed define_insn): Delete.
25220 * config/rs6000/rs6000.opt (mno-string): New.
25221 (mstring): Replace by deprecation warning stub.
25222 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25224 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25226 * regrename.c (regrename_do_replace): If replacing the same
25227 reg multiple times, try to reuse last created gen_raw_REG.
25230 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25231 main to workaround a bug in GDB.
25233 2018-01-12 Tom de Vries <tom@codesourcery.com>
25236 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25238 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
25240 PR rtl-optimization/80481
25241 * ira-color.c (get_cap_member): New function.
25242 (allocnos_conflict_by_live_ranges_p): Use it.
25243 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25244 (setup_slot_coalesced_allocno_live_ranges): Ditto.
25246 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
25249 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25250 (*saddl_se_1): Ditto.
25251 (*ssubsi_1): Ditto.
25252 (*ssubl_se_1): Ditto.
25254 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25256 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25257 rather than wi::to_widest for DR_INITs.
25258 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25259 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25260 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25262 (vect_analyze_group_access_1): Note that here.
25264 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25266 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25267 polynomial type sizes.
25269 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25271 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25272 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25273 (gimple_add_tmp_var): Likewise.
25275 2018-01-12 Martin Liska <mliska@suse.cz>
25277 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25278 (gimple_alloc_sizes): Likewise.
25279 (dump_gimple_statistics): Use PRIu64 in printf format.
25280 * gimple.h: Change uint64_t to int.
25282 2018-01-12 Martin Liska <mliska@suse.cz>
25284 * tree-core.h: Use uint64_t instead of int.
25285 * tree.c (tree_node_counts): Likewise.
25286 (tree_node_sizes): Likewise.
25287 (dump_tree_statistics): Use PRIu64 in printf format.
25289 2018-01-12 Martin Liska <mliska@suse.cz>
25291 * Makefile.in: As qsort_chk is implemented in vec.c, add
25292 vec.o to linkage of gencfn-macros.
25293 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25294 passing the info to record_node_allocation_statistics.
25295 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25297 * ggc-common.c (struct ggc_usage): Add operator== and use
25298 it in operator< and compare function.
25299 * mem-stats.h (struct mem_usage): Likewise.
25300 * vec.c (struct vec_usage): Remove operator< and compare
25301 function. Can be simply inherited.
25303 2018-01-12 Martin Jambor <mjambor@suse.cz>
25306 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25307 * tree-ssa-math-opts.c: Include domwalk.h.
25308 (convert_mult_to_fma_1): New function.
25309 (fma_transformation_info): New type.
25310 (fma_deferring_state): Likewise.
25311 (cancel_fma_deferring): New function.
25312 (result_of_phi): Likewise.
25313 (last_fma_candidate_feeds_initial_phi): Likewise.
25314 (convert_mult_to_fma): Added deferring logic, split actual
25315 transformation to convert_mult_to_fma_1.
25316 (math_opts_dom_walker): New type.
25317 (math_opts_dom_walker::after_dom_children): New method, body moved
25318 here from pass_optimize_widening_mul::execute, added deferring logic
25320 (pass_optimize_widening_mul::execute): Moved most of code to
25321 math_opts_dom_walker::after_dom_children.
25322 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25323 * config/i386/i386.c (ix86_option_override_internal): Added
25324 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25326 2018-01-12 Richard Biener <rguenther@suse.de>
25329 * dwarf2out.c (gen_variable_die): Do not reset old_die for
25330 inline instance vars.
25332 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
25335 * config/rx/rx.c (rx_is_restricted_memory_address):
25336 Handle SUBREG case.
25338 2018-01-12 Richard Biener <rguenther@suse.de>
25340 PR tree-optimization/80846
25341 * target.def (split_reduction): New target hook.
25342 * targhooks.c (default_split_reduction): New function.
25343 * targhooks.h (default_split_reduction): Declare.
25344 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25345 target requests first reduce vectors by combining low and high
25347 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25348 (get_vectype_for_scalar_type_and_size): Export.
25349 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25350 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25351 * doc/tm.texi: Regenerate.
25352 * config/i386/i386.c (ix86_split_reduction): Implement
25353 TARGET_VECTORIZE_SPLIT_REDUCTION.
25355 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25358 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25359 in PIC mode except for TARGET_VXWORKS_RTP.
25360 * config/sparc/sparc.c: Include cfgrtl.h.
25361 (TARGET_INIT_PIC_REG): Define.
25362 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25363 (sparc_pic_register_p): New predicate.
25364 (sparc_legitimate_address_p): Use it.
25365 (sparc_legitimize_pic_address): Likewise.
25366 (sparc_delegitimize_address): Likewise.
25367 (sparc_mode_dependent_address_p): Likewise.
25368 (gen_load_pcrel_sym): Remove 4th parameter.
25369 (load_got_register): Adjust call to above. Remove obsolete stuff.
25370 (sparc_expand_prologue): Do not call load_got_register here.
25371 (sparc_flat_expand_prologue): Likewise.
25372 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25373 (sparc_use_pseudo_pic_reg): New function.
25374 (sparc_init_pic_reg): Likewise.
25375 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25376 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25378 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25380 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25381 Add item for branch_cost.
25383 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25385 PR rtl-optimization/83565
25386 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25387 not extend the result to a larger mode for rotate operations.
25388 (num_sign_bit_copies1): Likewise.
25390 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25393 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25395 Use values-Xc.o for -pedantic.
25396 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25398 2018-01-12 Martin Liska <mliska@suse.cz>
25401 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25403 (possible_polymorphic_call_targets): Use it.
25404 (ipa_devirt): Likewise.
25406 2018-01-12 Martin Liska <mliska@suse.cz>
25408 * profile-count.h (enum profile_quality): Use 0 as invalid
25409 enum value of profile_quality.
25411 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
25413 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25414 -mext-string options.
25416 2018-01-12 Richard Biener <rguenther@suse.de>
25418 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25419 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25420 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25422 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25424 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
25426 * configure.ac (--with-long-double-format): Add support for the
25427 configuration option to change the default long double format on
25429 * config.gcc (powerpc*-linux*-*): Likewise.
25430 * configure: Regenerate.
25431 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25432 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25433 used without modification.
25435 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25437 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25438 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25439 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25440 MISC_BUILTIN_SPEC_BARRIER.
25441 (rs6000_init_builtins): Likewise.
25442 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25444 (speculation_barrier): New define_insn.
25445 * doc/extend.texi: Document __builtin_speculation_barrier.
25447 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25450 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25451 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25452 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25454 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
25455 integral modes instead of "ss" and "sd".
25456 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25457 vectors with 32-bit and 64-bit elements.
25458 (vecdupssescalarmodesuffix): New mode attribute.
25459 (vec_dup<mode>): Use it.
25461 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
25464 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25465 frame if argument is passed on stack.
25467 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25470 * ree.c (combine_reaching_defs): Optimize also
25471 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25472 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25474 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25476 PR middle-end/83189
25477 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25479 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25481 PR middle-end/83718
25482 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25483 after they are computed.
25485 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25487 PR tree-optimization/83695
25488 * gimple-loop-linterchange.cc
25489 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25490 reset cached scev information after interchange.
25491 (pass_linterchange::execute): Remove call to scev_reset_htab.
25493 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25495 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25496 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25497 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25498 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25499 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25500 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25501 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25502 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25503 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25504 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25505 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25506 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25507 (V_lane_reg): Likewise.
25508 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25510 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25511 (vfmal_lane_low<mode>_intrinsic,
25512 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25513 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25514 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25515 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25516 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25517 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25519 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25521 * config/arm/arm-cpus.in (fp16fml): New feature.
25522 (ALL_SIMD): Add fp16fml.
25523 (armv8.2-a): Add fp16fml as an option.
25524 (armv8.3-a): Likewise.
25525 (armv8.4-a): Add fp16fml as part of fp16.
25526 * config/arm/arm.h (TARGET_FP16FML): Define.
25527 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25529 * config/arm/arm-modes.def (V2HF): Define.
25530 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25531 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25532 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25533 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25534 vfmsl_low, vfmsl_high): New set of builtins.
25535 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25536 (vfml_op): New code attribute.
25537 (VFMLHALVES): New int iterator.
25538 (VFML, VFMLSEL): New mode attributes.
25539 (V_reg): Define mapping for V2HF.
25540 (V_hi, V_lo): New mode attributes.
25541 (VF_constraint): Likewise.
25542 (vfml_half, vfml_half_selector): New int attributes.
25543 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25545 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25546 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25548 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25549 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25550 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25551 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25553 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25554 Document new effective target and option set.
25556 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25558 * config/arm/arm-cpus.in (armv8_4): New feature.
25559 (ARMv8_4a): New fgroup.
25560 (armv8.4-a): New arch.
25561 * config/arm/arm-tables.opt: Regenerate.
25562 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25563 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25564 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25565 Add matching rules for -march=armv8.4-a and extensions.
25566 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25568 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25571 * config/rx/rx.md (BW): New mode attribute.
25572 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25574 2018-01-11 Richard Biener <rguenther@suse.de>
25576 PR tree-optimization/83435
25577 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25578 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25579 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25581 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25582 Alan Hayward <alan.hayward@arm.com>
25583 David Sherwood <david.sherwood@arm.com>
25585 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25587 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25588 (aarch64_print_address_internal): Use it to check for a zero offset.
25590 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25591 Alan Hayward <alan.hayward@arm.com>
25592 David Sherwood <david.sherwood@arm.com>
25594 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25595 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25596 Return a poly_int64 rather than a HOST_WIDE_INT.
25597 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25598 rather than a HOST_WIDE_INT.
25599 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25600 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25601 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25602 final_offset from HOST_WIDE_INT to poly_int64.
25603 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25604 to_constant when getting the number of units in an Advanced SIMD
25606 (aarch64_builtin_vectorized_function): Check for a constant number
25608 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25610 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25611 attribute instead of GET_MODE_NUNITS.
25612 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25613 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25614 GET_MODE_SIZE for fixed-size registers.
25615 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25616 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25617 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25618 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25619 (aarch64_print_operand, aarch64_print_address_internal)
25620 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25621 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25622 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25623 Handle polynomial GET_MODE_SIZE.
25624 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25625 wider than SImode without modification.
25626 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25627 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25628 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25629 passing and returning SVE modes.
25630 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25631 rather than GEN_INT.
25632 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25633 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25634 (aarch64_allocate_and_probe_stack_space): Likewise.
25635 (aarch64_layout_frame): Cope with polynomial offsets.
25636 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25637 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25638 polynomial offsets.
25639 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25640 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25641 poly_int64 rather than a HOST_WIDE_INT.
25642 (aarch64_get_separate_components, aarch64_process_components)
25643 (aarch64_expand_prologue, aarch64_expand_epilogue)
25644 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25645 (aarch64_anchor_offset): New function, split out from...
25646 (aarch64_legitimize_address): ...here.
25647 (aarch64_builtin_vectorization_cost): Handle polynomial
25648 TYPE_VECTOR_SUBPARTS.
25649 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25651 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25652 number of elements from the PARALLEL rather than the mode.
25653 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25654 rather than GET_MODE_BITSIZE.
25655 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25656 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25657 (aarch64_expand_vec_perm_const_1): Handle polynomial
25658 d->perm.length () and d->perm elements.
25659 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25660 Apply to_constant to d->perm elements.
25661 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25662 polynomial CONST_VECTOR_NUNITS.
25663 (aarch64_move_pointer): Take amount as a poly_int64 rather
25665 (aarch64_progress_pointer): Avoid temporary variable.
25666 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25667 the mode attribute instead of GET_MODE.
25669 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25670 Alan Hayward <alan.hayward@arm.com>
25671 David Sherwood <david.sherwood@arm.com>
25673 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25674 x exists before using it.
25675 (aarch64_add_constant_internal): Rename to...
25676 (aarch64_add_offset_1): ...this. Replace regnum with separate
25677 src and dest rtxes. Handle the case in which they're different,
25678 including when the offset is zero. Replace scratchreg with an rtx.
25679 Use 2 additions if there is no spare register into which we can
25680 move a 16-bit constant.
25681 (aarch64_add_constant): Delete.
25682 (aarch64_add_offset): Replace reg with separate src and dest
25683 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25684 Use aarch64_add_offset_1.
25685 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25686 an rtx rather than an int. Take the delta as a poly_int64
25687 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25688 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25689 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25690 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25691 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25692 and aarch64_add_sp.
25693 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25694 aarch64_add_constant.
25696 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25698 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25699 Use scalar_float_mode.
25701 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25703 * config/aarch64/aarch64-simd.md
25704 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25705 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25706 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25707 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25708 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25709 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25710 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25711 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25712 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25713 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25715 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25718 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25719 targ_options->x_arm_arch_string is non NULL.
25721 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25723 * config/aarch64/aarch64.h
25724 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25726 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25729 * expmed.c (emit_store_flag_force): Swap if const op0
25730 and change VOIDmode to mode of op0.
25732 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25734 PR rtl-optimization/83761
25735 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25736 than bytes to mode_for_size.
25738 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25740 PR middle-end/83189
25741 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25742 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25745 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25747 PR middle-end/83575
25748 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25749 when in layout mode.
25750 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25751 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25754 2018-01-10 Michael Collison <michael.collison@arm.com>
25756 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25757 * config/aarch64/aarch64-option-extension.def: Add
25758 AARCH64_OPT_EXTENSION of 'fp16fml'.
25759 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25760 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25761 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25762 * config/aarch64/constraints.md (Ui7): New constraint.
25763 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25764 (VFMLA_SEL_W): Ditto.
25767 (VFMLA16_LOW): New int iterator.
25768 (VFMLA16_HIGH): Ditto.
25769 (UNSPEC_FMLAL): New unspec.
25770 (UNSPEC_FMLSL): Ditto.
25771 (UNSPEC_FMLAL2): Ditto.
25772 (UNSPEC_FMLSL2): Ditto.
25773 (f16mac): New code attribute.
25774 * config/aarch64/aarch64-simd-builtins.def
25775 (aarch64_fmlal_lowv2sf): Ditto.
25776 (aarch64_fmlsl_lowv2sf): Ditto.
25777 (aarch64_fmlalq_lowv4sf): Ditto.
25778 (aarch64_fmlslq_lowv4sf): Ditto.
25779 (aarch64_fmlal_highv2sf): Ditto.
25780 (aarch64_fmlsl_highv2sf): Ditto.
25781 (aarch64_fmlalq_highv4sf): Ditto.
25782 (aarch64_fmlslq_highv4sf): Ditto.
25783 (aarch64_fmlal_lane_lowv2sf): Ditto.
25784 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25785 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25786 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25787 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25788 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25789 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25790 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25791 (aarch64_fmlal_lane_highv2sf): Ditto.
25792 (aarch64_fmlsl_lane_highv2sf): Ditto.
25793 (aarch64_fmlal_laneq_highv2sf): Ditto.
25794 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25795 (aarch64_fmlalq_lane_highv4sf): Ditto.
25796 (aarch64_fmlsl_lane_highv4sf): Ditto.
25797 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25798 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25799 * config/aarch64/aarch64-simd.md:
25800 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25801 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25802 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25803 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25804 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25805 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25806 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25807 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25808 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25809 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25810 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25811 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25812 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25813 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25814 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25815 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25816 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25817 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25818 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25819 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25820 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25821 (vfmlsl_low_u32): Ditto.
25822 (vfmlalq_low_u32): Ditto.
25823 (vfmlslq_low_u32): Ditto.
25824 (vfmlal_high_u32): Ditto.
25825 (vfmlsl_high_u32): Ditto.
25826 (vfmlalq_high_u32): Ditto.
25827 (vfmlslq_high_u32): Ditto.
25828 (vfmlal_lane_low_u32): Ditto.
25829 (vfmlsl_lane_low_u32): Ditto.
25830 (vfmlal_laneq_low_u32): Ditto.
25831 (vfmlsl_laneq_low_u32): Ditto.
25832 (vfmlalq_lane_low_u32): Ditto.
25833 (vfmlslq_lane_low_u32): Ditto.
25834 (vfmlalq_laneq_low_u32): Ditto.
25835 (vfmlslq_laneq_low_u32): Ditto.
25836 (vfmlal_lane_high_u32): Ditto.
25837 (vfmlsl_lane_high_u32): Ditto.
25838 (vfmlal_laneq_high_u32): Ditto.
25839 (vfmlsl_laneq_high_u32): Ditto.
25840 (vfmlalq_lane_high_u32): Ditto.
25841 (vfmlslq_lane_high_u32): Ditto.
25842 (vfmlalq_laneq_high_u32): Ditto.
25843 (vfmlslq_laneq_high_u32): Ditto.
25844 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25845 (AARCH64_FL_FOR_ARCH8_4): New.
25846 (AARCH64_ISA_F16FML): New ISA flag.
25847 (TARGET_F16FML): New feature flag for fp16fml.
25848 (doc/invoke.texi): Document new fp16fml option.
25850 2018-01-10 Michael Collison <michael.collison@arm.com>
25852 * config/aarch64/aarch64-builtins.c:
25853 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25854 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25855 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25856 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25857 (AARCH64_ISA_SHA3): New ISA flag.
25858 (TARGET_SHA3): New feature flag for sha3.
25859 * config/aarch64/iterators.md (sha512_op): New int attribute.
25860 (CRYPTO_SHA512): New int iterator.
25861 (UNSPEC_SHA512H): New unspec.
25862 (UNSPEC_SHA512H2): Ditto.
25863 (UNSPEC_SHA512SU0): Ditto.
25864 (UNSPEC_SHA512SU1): Ditto.
25865 * config/aarch64/aarch64-simd-builtins.def
25866 (aarch64_crypto_sha512hqv2di): New builtin.
25867 (aarch64_crypto_sha512h2qv2di): Ditto.
25868 (aarch64_crypto_sha512su0qv2di): Ditto.
25869 (aarch64_crypto_sha512su1qv2di): Ditto.
25870 (aarch64_eor3qv8hi): Ditto.
25871 (aarch64_rax1qv2di): Ditto.
25872 (aarch64_xarqv2di): Ditto.
25873 (aarch64_bcaxqv8hi): Ditto.
25874 * config/aarch64/aarch64-simd.md:
25875 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25876 (aarch64_crypto_sha512su0qv2di): Ditto.
25877 (aarch64_crypto_sha512su1qv2di): Ditto.
25878 (aarch64_eor3qv8hi): Ditto.
25879 (aarch64_rax1qv2di): Ditto.
25880 (aarch64_xarqv2di): Ditto.
25881 (aarch64_bcaxqv8hi): Ditto.
25882 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25883 (vsha512h2q_u64): Ditto.
25884 (vsha512su0q_u64): Ditto.
25885 (vsha512su1q_u64): Ditto.
25886 (veor3q_u16): Ditto.
25887 (vrax1q_u64): Ditto.
25888 (vxarq_u64): Ditto.
25889 (vbcaxq_u16): Ditto.
25890 * config/arm/types.md (crypto_sha512): New type attribute.
25891 (crypto_sha3): Ditto.
25892 (doc/invoke.texi): Document new sha3 option.
25894 2018-01-10 Michael Collison <michael.collison@arm.com>
25896 * config/aarch64/aarch64-builtins.c:
25897 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25898 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25899 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25900 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25901 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25902 (AARCH64_ISA_SM4): New ISA flag.
25903 (TARGET_SM4): New feature flag for sm4.
25904 * config/aarch64/aarch64-simd-builtins.def
25905 (aarch64_sm3ss1qv4si): Ditto.
25906 (aarch64_sm3tt1aq4si): Ditto.
25907 (aarch64_sm3tt1bq4si): Ditto.
25908 (aarch64_sm3tt2aq4si): Ditto.
25909 (aarch64_sm3tt2bq4si): Ditto.
25910 (aarch64_sm3partw1qv4si): Ditto.
25911 (aarch64_sm3partw2qv4si): Ditto.
25912 (aarch64_sm4eqv4si): Ditto.
25913 (aarch64_sm4ekeyqv4si): Ditto.
25914 * config/aarch64/aarch64-simd.md:
25915 (aarch64_sm3ss1qv4si): Ditto.
25916 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25917 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25918 (aarch64_sm4eqv4si): Ditto.
25919 (aarch64_sm4ekeyqv4si): Ditto.
25920 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25921 (sm3part_op): Ditto.
25922 (CRYPTO_SM3TT): Ditto.
25923 (CRYPTO_SM3PART): Ditto.
25924 (UNSPEC_SM3SS1): New unspec.
25925 (UNSPEC_SM3TT1A): Ditto.
25926 (UNSPEC_SM3TT1B): Ditto.
25927 (UNSPEC_SM3TT2A): Ditto.
25928 (UNSPEC_SM3TT2B): Ditto.
25929 (UNSPEC_SM3PARTW1): Ditto.
25930 (UNSPEC_SM3PARTW2): Ditto.
25931 (UNSPEC_SM4E): Ditto.
25932 (UNSPEC_SM4EKEY): Ditto.
25933 * config/aarch64/constraints.md (Ui2): New constraint.
25934 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25935 * config/arm/types.md (crypto_sm3): New type attribute.
25936 (crypto_sm4): Ditto.
25937 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25938 (vsm3tt1aq_u32): Ditto.
25939 (vsm3tt1bq_u32): Ditto.
25940 (vsm3tt2aq_u32): Ditto.
25941 (vsm3tt2bq_u32): Ditto.
25942 (vsm3partw1q_u32): Ditto.
25943 (vsm3partw2q_u32): Ditto.
25944 (vsm4eq_u32): Ditto.
25945 (vsm4ekeyq_u32): Ditto.
25946 (doc/invoke.texi): Document new sm4 option.
25948 2018-01-10 Michael Collison <michael.collison@arm.com>
25950 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25951 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25952 (AARCH64_FL_FOR_ARCH8_4): New.
25953 (AARCH64_FL_V8_4): New flag.
25954 (doc/invoke.texi): Document new armv8.4-a option.
25956 2018-01-10 Michael Collison <michael.collison@arm.com>
25958 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25959 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25960 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25961 * config/aarch64/aarch64-option-extension.def: Add
25962 AARCH64_OPT_EXTENSION of 'sha2'.
25963 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25964 (crypto): Disable sha2 and aes if crypto disabled.
25965 (crypto): Enable aes and sha2 if enabled.
25966 (simd): Disable sha2 and aes if simd disabled.
25967 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25969 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25970 (TARGET_SHA2): New feature flag for sha2.
25971 (TARGET_AES): New feature flag for aes.
25972 * config/aarch64/aarch64-simd.md:
25973 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25974 conditional on TARGET_AES.
25975 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25976 (aarch64_crypto_sha1hsi): Make pattern conditional
25978 (aarch64_crypto_sha1hv4si): Ditto.
25979 (aarch64_be_crypto_sha1hv4si): Ditto.
25980 (aarch64_crypto_sha1su1v4si): Ditto.
25981 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25982 (aarch64_crypto_sha1su0v4si): Ditto.
25983 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25984 (aarch64_crypto_sha256su0v4si): Ditto.
25985 (aarch64_crypto_sha256su1v4si): Ditto.
25986 (doc/invoke.texi): Document new aes and sha2 options.
25988 2018-01-10 Martin Sebor <msebor@redhat.com>
25990 PR tree-optimization/83781
25991 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25994 2018-01-11 Martin Sebor <msebor@gmail.com>
25995 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25997 PR tree-optimization/83501
25998 PR tree-optimization/81703
26000 * tree-ssa-strlen.c (get_string_cst): Rename...
26001 (get_string_len): ...to this. Handle global constants.
26002 (handle_char_store): Adjust.
26004 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
26005 Jim Wilson <jimw@sifive.com>
26007 * config/riscv/riscv-protos.h (riscv_output_return): New.
26008 * config/riscv/riscv.c (struct machine_function): New naked_p field.
26009 (riscv_attribute_table, riscv_output_return),
26010 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26011 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26012 (riscv_compute_frame_info): Only compute frame->mask if not a naked
26014 (riscv_expand_prologue): Add early return for naked function.
26015 (riscv_expand_epilogue): Likewise.
26016 (riscv_function_ok_for_sibcall): Return false for naked function.
26017 (riscv_set_current_function): New.
26018 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26019 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26020 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26021 * doc/extend.texi (RISC-V Function Attributes): New.
26023 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
26025 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26026 check for 128-bit long double before checking TCmode.
26027 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26028 128-bit long doubles before checking TFmode or TCmode.
26029 (FLOAT128_IBM_P): Likewise.
26031 2018-01-10 Martin Sebor <msebor@redhat.com>
26033 PR tree-optimization/83671
26034 * builtins.c (c_strlen): Unconditionally return zero for the empty
26036 Use -Warray-bounds for warnings.
26037 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26038 for non-constant array indices with COMPONENT_REF, arrays of
26039 arrays, and pointers to arrays.
26040 (gimple_fold_builtin_strlen): Determine and set length range for
26041 non-constant character arrays.
26043 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
26045 PR middle-end/81897
26046 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26049 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
26051 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26053 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
26056 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26057 VECTOR_MEM_ALTIVEC_OR_VSX_P.
26058 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26059 indexed_or_indirect_operand predicate.
26060 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26061 (*vsx_le_perm_load_v8hi): Likewise.
26062 (*vsx_le_perm_load_v16qi): Likewise.
26063 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26064 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26065 (*vsx_le_perm_store_v8hi): Likewise.
26066 (*vsx_le_perm_store_v16qi): Likewise.
26067 (eight unnamed splitters): Likewise.
26069 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
26071 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26072 * config/rs6000/emmintrin.h: Likewise.
26073 * config/rs6000/mmintrin.h: Likewise.
26074 * config/rs6000/xmmintrin.h: Likewise.
26076 2018-01-10 David Malcolm <dmalcolm@redhat.com>
26079 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26081 * tree.c (tree_nop_conversion): Return true for location wrapper
26083 (maybe_wrap_with_location): New function.
26084 (selftest::check_strip_nops): New function.
26085 (selftest::test_location_wrappers): New function.
26086 (selftest::tree_c_tests): Call it.
26087 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26088 (maybe_wrap_with_location): New decl.
26089 (EXPR_LOCATION_WRAPPER_P): New macro.
26090 (location_wrapper_p): New inline function.
26091 (tree_strip_any_location_wrapper): New inline function.
26093 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
26096 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26097 stack_realign_offset for the largest alignment of stack slot
26099 (ix86_find_max_used_stack_alignment): New function.
26100 (ix86_finalize_stack_frame_flags): Use it. Set
26101 max_used_stack_alignment if we don't realign stack.
26102 * config/i386/i386.h (machine_function): Add
26103 max_used_stack_alignment.
26105 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
26107 * config/arm/arm.opt (-mbranch-cost): New option.
26108 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26111 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
26114 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26115 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26117 2018-01-10 Richard Biener <rguenther@suse.de>
26120 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26121 early out so it also covers the case where we have a non-NULL
26124 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
26126 PR tree-optimization/83753
26127 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26128 for non-strided grouped accesses if the number of elements is 1.
26130 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26133 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26134 * i386.h (TARGET_USE_GATHER): Define.
26135 * x86-tune.def (X86_TUNE_USE_GATHER): New.
26137 2018-01-10 Martin Liska <mliska@suse.cz>
26140 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26141 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26143 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26144 CLEANUP_NO_PARTITIONING is not set.
26146 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
26148 * doc/rtl.texi: Remove documentation of (const ...) wrappers
26149 for vectors, as a partial revert of r254296.
26150 * rtl.h (const_vec_p): Delete.
26151 (const_vec_duplicate_p): Don't test for vector CONSTs.
26152 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26153 * expmed.c (make_tree): Likewise.
26156 * common.md (E, F): Use CONSTANT_P instead of checking for
26158 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26159 checking for CONST_VECTOR.
26161 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26163 PR middle-end/83575
26164 * predict.c (force_edge_cold): Handle in more sane way edges
26165 with no prediction.
26167 2018-01-09 Carl Love <cel@us.ibm.com>
26169 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26171 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26172 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26173 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26174 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
26175 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26176 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
26177 * config/rs6000/rs6000-protos.h: Add extern defition for
26178 rs6000_generate_float2_double_code.
26179 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26181 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26182 (float2_v2df): Add define_expand.
26184 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
26187 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26188 op_mode in the force_to_mode call.
26190 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26192 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26193 instead of checking each element individually.
26194 (aarch64_evpc_uzp): Likewise.
26195 (aarch64_evpc_zip): Likewise.
26196 (aarch64_evpc_ext): Likewise.
26197 (aarch64_evpc_rev): Likewise.
26198 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26199 instead of checking each element individually. Return true without
26201 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26202 whether all selected elements come from the same input, instead of
26203 checking each element individually. Remove calls to gen_rtx_REG,
26204 start_sequence and end_sequence and instead assert that no rtl is
26207 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26209 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26210 order of HIGH and CONST checks.
26212 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26214 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26215 if the destination isn't an SSA_NAME.
26217 2018-01-09 Richard Biener <rguenther@suse.de>
26219 PR tree-optimization/83668
26220 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26222 (canonicalize_loop_form): ... here, renamed from ...
26223 (canonicalize_loop_closed_ssa_form): ... this and amended to
26224 swap successor edges for loop exit blocks to make us use
26225 the RPO order we need for initial schedule generation.
26227 2018-01-09 Joseph Myers <joseph@codesourcery.com>
26229 PR tree-optimization/64811
26230 * match.pd: When optimizing comparisons with Inf, avoid
26231 introducing or losing exceptions from comparisons with NaN.
26233 2018-01-09 Martin Liska <mliska@suse.cz>
26236 * asan.c (shadow_mem_size): Add gcc_assert.
26238 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
26240 Don't save registers in main().
26243 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26244 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26245 * config/avr/avr.c (avr_set_current_function): Don't error if
26246 naked, OS_task or OS_main are specified at the same time.
26247 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26249 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26251 * common/config/avr/avr-common.c (avr_option_optimization_table):
26252 Switch on -mmain-is-OS_task for optimizing compilations.
26254 2018-01-09 Richard Biener <rguenther@suse.de>
26256 PR tree-optimization/83572
26257 * graphite.c: Include cfganal.h.
26258 (graphite_transform_loops): Connect infinite loops to exit
26259 and remove fake edges at the end.
26261 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26263 * ipa-inline.c (edge_badness): Revert accidental checkin.
26265 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26268 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26269 symbols; not inline clones.
26271 2018-01-09 Jakub Jelinek <jakub@redhat.com>
26274 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26275 hard registers. Formatting fixes.
26277 PR preprocessor/83722
26278 * gcc.c (try_generate_repro): Pass
26279 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26280 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26283 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
26284 Kito Cheng <kito.cheng@gmail.com>
26286 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26287 (riscv_leaf_function_p): Delete.
26288 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26290 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26292 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26294 (do_ifelse): New function.
26295 (do_isel): New function.
26296 (do_sub3): New function.
26297 (do_add3): New function.
26298 (do_load_mask_compare): New function.
26299 (do_overlap_load_compare): New function.
26300 (expand_compare_loop): New function.
26301 (expand_block_compare): Call expand_compare_loop() when appropriate.
26302 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26303 option description.
26304 (-mblock-compare-inline-loop-limit): New option.
26306 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26309 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26310 Reverse order of second and third operands in first alternative.
26311 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26312 of first and second elements in UNSPEC_VPERMR vector.
26313 (altivec_expand_vec_perm_le): Likewise.
26315 2018-01-08 Jeff Law <law@redhat.com>
26317 PR rtl-optimizatin/81308
26318 * tree-switch-conversion.c (cfg_altered): New file scoped static.
26319 (process_switch): If group_case_labels makes a change, then set
26321 (pass_convert_switch::execute): If a switch is converted, then
26322 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
26324 PR rtl-optimization/81308
26325 * recog.c (split_all_insns): Conditionally cleanup the CFG after
26328 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
26330 PR target/83663 - Revert r255946
26331 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26332 generation for cases where splatting a value is not useful.
26333 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26334 across a vec_duplicate and a paradoxical subreg forming a vector
26335 mode to a vec_concat.
26337 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26339 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26340 -march=armv8.3-a variants.
26341 * config/arm/t-multilib: Likewise.
26342 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
26344 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26346 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26348 (cceq_ior_compare_complement): Give it a name so I can use it, and
26349 change boolean_or_operator predicate to boolean_operator so it can
26350 be used to generate a crand.
26351 (eqne): New code iterator.
26352 (bd/bd_neg): New code_attrs.
26353 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26354 a single define_insn.
26355 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26356 decrement (bdnzt/bdnzf/bdzt/bdzf).
26357 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26358 with the new names of the branch decrement patterns, and added the
26359 names of the branch decrement conditional patterns.
26361 2018-01-08 Richard Biener <rguenther@suse.de>
26363 PR tree-optimization/83563
26364 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26367 2018-01-08 Richard Biener <rguenther@suse.de>
26369 PR middle-end/83713
26370 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26372 2018-01-08 Richard Biener <rguenther@suse.de>
26374 PR tree-optimization/83685
26375 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26376 references to abnormals.
26378 2018-01-08 Richard Biener <rguenther@suse.de>
26381 * dwarf2out.c (output_indirect_strings): Handle empty
26382 skeleton_debug_str_hash.
26383 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26385 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26387 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26388 (emit_store_direct): Likewise.
26389 (arc_trampoline_adjust_address): Likewise.
26390 (arc_asm_trampoline_template): New function.
26391 (arc_initialize_trampoline): Use asm_trampoline_template.
26392 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26393 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26394 * config/arc/arc.md (flush_icache): Delete pattern.
26396 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26398 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26399 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26402 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26405 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26406 by not USED_FOR_TARGET.
26407 (make_pass_resolve_sw_modes): Likewise.
26409 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26411 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26414 2018-01-08 Richard Biener <rguenther@suse.de>
26416 PR middle-end/83580
26417 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26419 2018-01-08 Richard Biener <rguenther@suse.de>
26421 PR middle-end/83517
26422 * match.pd ((t * 2) / 2) -> t): Add missing :c.
26424 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
26426 PR middle-end/81897
26427 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26428 basic blocks with a small number of successors.
26429 (convert_control_dep_chain_into_preds): Improve handling of
26431 (dump_predicates): Split apart into...
26432 (dump_pred_chain): ...here...
26433 (dump_pred_info): ...and here.
26434 (can_one_predicate_be_invalidated_p): Add debugging printfs.
26435 (can_chain_union_be_invalidated_p): Improve check for invalidation
26437 (uninit_uses_cannot_happen): Avoid unnecessary if
26438 convert_control_dep_chain_into_preds yielded nothing.
26440 2018-01-06 Martin Sebor <msebor@redhat.com>
26442 PR tree-optimization/83640
26443 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26444 subtracting negative offset from size.
26445 (builtin_access::overlap): Adjust offset bounds of the access to fall
26446 within the size of the object if possible.
26448 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
26450 PR rtl-optimization/83699
26451 * expmed.c (extract_bit_field_1): Restrict the vector usage of
26452 extract_bit_field_as_subreg to cases in which the extracted
26453 value is also a vector.
26455 * lra-constraints.c (process_alt_operands): Test for the equivalence
26456 substitutions when detecting a possible reload cycle.
26458 2018-01-06 Jakub Jelinek <jakub@redhat.com>
26461 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26462 by default if flag_selective_schedling{,2}. Formatting fixes.
26464 PR rtl-optimization/83682
26465 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26466 if it has non-VECTOR_MODE element mode.
26467 (vec_duplicate_p): Likewise.
26469 PR middle-end/83694
26470 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26471 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26473 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26476 * config/i386/i386-builtin.def
26477 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26478 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26479 Require also OPTION_MASK_ISA_AVX512F in addition to
26480 OPTION_MASK_ISA_GFNI.
26481 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26482 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26483 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26484 to OPTION_MASK_ISA_GFNI.
26485 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26486 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26487 OPTION_MASK_ISA_AVX512BW.
26488 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26489 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26490 addition to OPTION_MASK_ISA_GFNI.
26491 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26492 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26493 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26494 to OPTION_MASK_ISA_GFNI.
26495 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26496 a requirement for all ISAs rather than any of them with a few
26498 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26500 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26501 bitmasks to be enabled with 3 exceptions, instead of requiring any
26502 enabled ISA with lots of exceptions.
26503 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26504 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26505 Change avx512bw in isa attribute to avx512f.
26506 * config/i386/sgxintrin.h: Add license boilerplate.
26507 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26508 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26509 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26510 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26512 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26513 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26514 temporarily sse2 rather than sse if not enabled already.
26517 * config/i386/sse.md (VI248_VLBW): Rename to ...
26518 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26519 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26520 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26521 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26522 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26523 mode iterator instead of VI248_VLBW.
26525 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26527 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26528 (record_modified): Skip clobbers; add debug output.
26529 (param_change_prob): Use sreal frequencies.
26531 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26533 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26534 punt for user-aligned variables.
26536 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26538 * tree-chrec.c (chrec_contains_symbols): Return true for
26541 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26544 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26545 of (x|y) == x for BICS pattern.
26547 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26549 PR tree-optimization/83605
26550 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26551 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26554 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26556 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26557 * config/epiphany/rtems.h: New file.
26559 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26560 Uros Bizjak <ubizjak@gmail.com>
26563 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26564 QIreg_operand instead of register_operand predicate.
26565 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26566 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26567 comments instead of -fmitigate[-_]rop.
26569 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26572 * cgraphunit.c (symbol_table::compile): Switch to text_section
26573 before calling assembly_start debug hook.
26574 * run-rtl-passes.c (run_rtl_passes): Likewise.
26577 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26579 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26580 range_int_cst_p rather than !symbolic_range_p before calling
26581 extract_range_from_multiplicative_op_1.
26583 2018-01-04 Jeff Law <law@redhat.com>
26585 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26586 redundant test in assertion.
26588 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26590 * doc/rtl.texi: Document machine_mode wrapper classes.
26592 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26594 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26595 using tree_to_uhwi.
26597 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26599 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26600 the VEC_PERM_EXPR fold to fail.
26602 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26605 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26606 to switched_sections.
26608 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26611 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26612 test for d.testing.
26614 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26617 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26618 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26620 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26623 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26624 is BLKmode and bitpos not zero or mode change is needed.
26626 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26629 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26632 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26635 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26636 instead of MULT rtx. Update all corresponding splitters.
26637 (*saddl_se): Ditto.
26638 (*ssub<modesuffix>): Ditto.
26639 (*ssubl_se): Ditto.
26640 (*cmp_sadd_di): Update split patterns.
26641 (*cmp_sadd_si): Ditto.
26642 (*cmp_sadd_sidi): Ditto.
26643 (*cmp_ssub_di): Ditto.
26644 (*cmp_ssub_si): Ditto.
26645 (*cmp_ssub_sidi): Ditto.
26646 * config/alpha/predicates.md (const23_operand): New predicate.
26647 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26648 Look for ASHIFT, not MULT inner operand.
26649 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26651 2018-01-04 Martin Liska <mliska@suse.cz>
26653 PR gcov-profile/83669
26654 * gcov.c (output_intermediate_file): Add version to intermediate
26656 * doc/gcov.texi: Document new field 'version' in intermediate
26657 file format. Fix location of '-k' option of gcov command.
26659 2018-01-04 Martin Liska <mliska@suse.cz>
26662 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26664 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26666 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26668 2018-01-03 Martin Sebor <msebor@redhat.com>
26670 PR tree-optimization/83655
26671 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26672 checking calls with invalid arguments.
26674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26676 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26677 (vectorizable_mask_load_store): Delete.
26678 (vectorizable_call): Return false for masked loads and stores.
26679 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26680 instead of gimple_assign_rhs1.
26681 (vectorizable_load): Handle IFN_MASK_LOAD.
26682 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26686 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26688 (vectorizable_mask_load_store): ...here.
26689 (vectorizable_load): ...and here.
26691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26693 * tree-vect-stmts.c (vect_build_all_ones_mask)
26694 (vect_build_zero_merge_argument): New functions, split out from...
26695 (vectorizable_load): ...here.
26697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26699 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26701 (vectorizable_mask_load_store): ...here.
26702 (vectorizable_store): ...and here.
26704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26706 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26708 (vectorizable_mask_load_store): ...here.
26710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26712 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26713 (vect_model_store_cost): Take a vec_load_store_type instead of a
26715 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26716 (vect_model_store_cost): Take a vec_load_store_type instead of a
26718 (vectorizable_mask_load_store): Update accordingly.
26719 (vectorizable_store): Likewise.
26720 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26724 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26725 IFN_MASK_LOAD calls here rather than...
26726 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26728 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26729 Alan Hayward <alan.hayward@arm.com>
26730 David Sherwood <david.sherwood@arm.com>
26732 * expmed.c (extract_bit_field_1): For vector extracts,
26733 fall back to extract_bit_field_as_subreg if vec_extract
26736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26737 Alan Hayward <alan.hayward@arm.com>
26738 David Sherwood <david.sherwood@arm.com>
26740 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26741 they are variable or constant sized.
26742 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26743 slots for constant-sized data.
26745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26746 Alan Hayward <alan.hayward@arm.com>
26747 David Sherwood <david.sherwood@arm.com>
26749 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26750 handling COND_EXPRs with boolean comparisons, try to find a better
26751 basis for the mask type than the boolean itself.
26753 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26755 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26756 is calculated and how it can be overridden.
26757 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26758 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26760 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
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 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26768 Remove the mode argument.
26769 (aarch64_simd_valid_immediate): Remove the mode and inverse
26771 * config/aarch64/iterators.md (bitsize): New iterator.
26772 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26773 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26774 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26775 aarch64_simd_valid_immediate.
26776 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26777 (aarch64_reg_or_bic_imm): Likewise.
26778 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26779 with an insn_type enum and msl with a modifier_type enum.
26780 Replace element_width with a scalar_mode. Change the shift
26781 to unsigned int. Add constructors for scalar_float_mode and
26782 scalar_int_mode elements.
26783 (aarch64_vect_float_const_representable_p): Delete.
26784 (aarch64_can_const_movi_rtx_p)
26785 (aarch64_simd_scalar_immediate_valid_for_move)
26786 (aarch64_simd_make_constant): Update call to
26787 aarch64_simd_valid_immediate.
26788 (aarch64_advsimd_valid_immediate_hs): New function.
26789 (aarch64_advsimd_valid_immediate): Likewise.
26790 (aarch64_simd_valid_immediate): Remove mode and inverse
26791 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26792 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26793 and aarch64_float_const_representable_p on the result.
26794 (aarch64_output_simd_mov_immediate): Remove mode argument.
26795 Update call to aarch64_simd_valid_immediate and use of
26796 simd_immediate_info.
26797 (aarch64_output_scalar_simd_mov_immediate): Update call
26800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26801 Alan Hayward <alan.hayward@arm.com>
26802 David Sherwood <david.sherwood@arm.com>
26804 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26805 (mode_nunits): Likewise CONST_MODE_NUNITS.
26806 * machmode.def (ADJUST_NUNITS): Document.
26807 * genmodes.c (mode_data::need_nunits_adj): New field.
26808 (blank_mode): Update accordingly.
26809 (adj_nunits): New variable.
26810 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26812 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26813 listed in adj_nunits.
26814 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26815 listed in adj_nunits. Don't emit case statements for such modes.
26816 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26817 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26818 nothing if adj_nunits is nonnull.
26819 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26820 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26821 (emit_mode_fbit): Update use of print_maybe_const_decl.
26822 (emit_move_size): Likewise. Treat the array as non-const
26824 (emit_mode_adjustments): Handle adj_nunits.
26826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26828 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26829 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26830 (VECTOR_MODES): Use it.
26831 (make_vector_modes): Take the prefix as an argument.
26833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26834 Alan Hayward <alan.hayward@arm.com>
26835 David Sherwood <david.sherwood@arm.com>
26837 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26838 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26839 for MODE_VECTOR_BOOL.
26840 * machmode.def (VECTOR_BOOL_MODE): Document.
26841 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26842 (make_vector_bool_mode): New function.
26843 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26845 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26846 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26848 * stor-layout.c (int_mode_for_mode): Likewise.
26849 * tree.c (build_vector_type_for_mode): Likewise.
26850 * varasm.c (output_constant_pool_2): Likewise.
26851 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26852 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26853 for MODE_VECTOR_BOOL.
26854 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26855 of mode class checks.
26856 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26857 instead of a list of mode class checks.
26858 (expand_vector_scalar_condition): Likewise.
26859 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26862 Alan Hayward <alan.hayward@arm.com>
26863 David Sherwood <david.sherwood@arm.com>
26865 * machmode.h (mode_size): Change from unsigned short to
26867 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26868 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26869 or if measurement_type is not polynomial.
26870 (fixed_size_mode::includes_p): Check for constant-sized modes.
26871 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26872 return a poly_uint16 rather than an unsigned short.
26873 (emit_mode_size): Change the type of mode_size from unsigned short
26874 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26875 (emit_mode_adjustments): Cope with polynomial vector sizes.
26876 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26878 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26880 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26881 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26882 * caller-save.c (setup_save_areas): Likewise.
26883 (replace_reg_with_saved_mem): Likewise.
26884 * calls.c (emit_library_call_value_1): Likewise.
26885 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26886 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26887 (gen_lowpart_for_combine): Likewise.
26888 * convert.c (convert_to_integer_1): Likewise.
26889 * cse.c (equiv_constant, cse_insn): Likewise.
26890 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26891 (cselib_subst_to_values): Likewise.
26892 * dce.c (word_dce_process_block): Likewise.
26893 * df-problems.c (df_word_lr_mark_ref): Likewise.
26894 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26895 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26896 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26897 (rtl_for_decl_location): Likewise.
26898 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26899 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26900 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26901 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26902 (expand_expr_real_1): Likewise.
26903 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26904 (pad_below): Likewise.
26905 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26906 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26907 * ira.c (get_subreg_tracking_sizes): Likewise.
26908 * ira-build.c (ira_create_allocno_objects): Likewise.
26909 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26910 (ira_sort_regnos_for_alter_reg): Likewise.
26911 * ira-costs.c (record_operand_costs): Likewise.
26912 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26913 (resolve_simple_move): Likewise.
26914 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26915 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26916 (lra_constraints): Likewise.
26917 (CONST_POOL_OK_P): Reject variable-sized modes.
26918 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26919 (add_pseudo_to_slot, lra_spill): Likewise.
26920 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26921 * optabs-query.c (get_best_extraction_insn): Likewise.
26922 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26923 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26924 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26925 * recog.c (offsettable_address_addr_space_p): Likewise.
26926 * regcprop.c (maybe_mode_change): Likewise.
26927 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26928 * regrename.c (build_def_use): Likewise.
26929 * regstat.c (dump_reg_info): Likewise.
26930 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26931 (find_reloads, find_reloads_subreg_address): Likewise.
26932 * reload1.c (eliminate_regs_1): Likewise.
26933 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26934 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26935 (simplify_binary_operation_1, simplify_subreg): Likewise.
26936 * targhooks.c (default_function_arg_padding): Likewise.
26937 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26938 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26939 (verify_gimple_assign_ternary): Likewise.
26940 * tree-inline.c (estimate_move_cost): Likewise.
26941 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26942 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26943 (get_address_cost_ainc): Likewise.
26944 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26945 (vect_supportable_dr_alignment): Likewise.
26946 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26947 (vectorizable_reduction): Likewise.
26948 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26949 (vectorizable_operation, vectorizable_load): Likewise.
26950 * tree.c (build_same_sized_truth_vector_type): Likewise.
26951 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26952 * var-tracking.c (emit_note_insn_var_location): Likewise.
26953 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26954 (ADDR_VEC_ALIGN): Likewise.
26956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26957 Alan Hayward <alan.hayward@arm.com>
26958 David Sherwood <david.sherwood@arm.com>
26960 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26962 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26963 or if measurement_type is polynomial.
26964 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26965 * combine.c (make_extraction): Likewise.
26966 * dse.c (find_shift_sequence): Likewise.
26967 * dwarf2out.c (mem_loc_descriptor): Likewise.
26968 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26969 (extract_bit_field, extract_low_bits): Likewise.
26970 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26971 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26972 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26973 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26974 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26975 * reload.c (find_reloads): Likewise.
26976 * reload1.c (alter_reg): Likewise.
26977 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26978 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26979 * tree-if-conv.c (predicate_mem_writes): Likewise.
26980 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26981 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26982 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26983 * valtrack.c (dead_debug_insert_temp): Likewise.
26984 * varasm.c (mergeable_constant_section): Likewise.
26985 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26988 Alan Hayward <alan.hayward@arm.com>
26989 David Sherwood <david.sherwood@arm.com>
26991 * expr.c (expand_assignment): Cope with polynomial mode sizes
26992 when assigning to a CONCAT.
26994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26995 Alan Hayward <alan.hayward@arm.com>
26996 David Sherwood <david.sherwood@arm.com>
26998 * machmode.h (mode_precision): Change from unsigned short to
27000 (mode_to_precision): Return a poly_uint16 rather than an unsigned
27002 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27003 or if measurement_type is not polynomial.
27004 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
27005 in which the mode is already known to be a scalar_int_mode.
27006 * genmodes.c (emit_mode_precision): Change the type of mode_precision
27007 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
27009 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27010 for GET_MODE_PRECISION.
27011 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27012 for GET_MODE_PRECISION.
27013 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27015 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27016 (expand_field_assignment, make_extraction): Likewise.
27017 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27018 (get_last_value): Likewise.
27019 * convert.c (convert_to_integer_1): Likewise.
27020 * cse.c (cse_insn): Likewise.
27021 * expr.c (expand_expr_real_1): Likewise.
27022 * lra-constraints.c (simplify_operand_subreg): Likewise.
27023 * optabs-query.c (can_atomic_load_p): Likewise.
27024 * optabs.c (expand_atomic_load): Likewise.
27025 (expand_atomic_store): Likewise.
27026 * ree.c (combine_reaching_defs): Likewise.
27027 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27028 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27029 * tree.h (type_has_mode_precision_p): Likewise.
27030 * ubsan.c (instrument_si_overflow): Likewise.
27032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27033 Alan Hayward <alan.hayward@arm.com>
27034 David Sherwood <david.sherwood@arm.com>
27036 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27037 polynomial numbers of units.
27038 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27039 (valid_vector_subparts_p): New function.
27040 (build_vector_type): Remove temporary shim and take the number
27041 of units as a poly_uint64 rather than an int.
27042 (build_opaque_vector_type): Take the number of units as a
27043 poly_uint64 rather than an int.
27044 * tree.c (build_vector_from_ctor): Handle polynomial
27045 TYPE_VECTOR_SUBPARTS.
27046 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27047 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27048 (build_vector_from_val): If the number of units is variable,
27049 use build_vec_duplicate_cst for constant operands and
27050 VEC_DUPLICATE_EXPR otherwise.
27051 (make_vector_type): Remove temporary is_constant ().
27052 (build_vector_type, build_opaque_vector_type): Take the number of
27053 units as a poly_uint64 rather than an int.
27054 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27056 * cfgexpand.c (expand_debug_expr): Likewise.
27057 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27058 (store_constructor, expand_expr_real_1): Likewise.
27059 (const_scalar_mask_from_tree): Likewise.
27060 * fold-const-call.c (fold_const_reduction): Likewise.
27061 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27062 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27063 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27064 (fold_relational_const): Likewise.
27065 (native_interpret_vector): Likewise. Change the size from an
27066 int to an unsigned int.
27067 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27068 TYPE_VECTOR_SUBPARTS.
27069 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27070 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27071 duplicating a non-constant operand into a variable-length vector.
27072 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27073 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27074 * ipa-icf.c (sem_variable::equals): Likewise.
27075 * match.pd: Likewise.
27076 * omp-simd-clone.c (simd_clone_subparts): Likewise.
27077 * print-tree.c (print_node): Likewise.
27078 * stor-layout.c (layout_type): Likewise.
27079 * targhooks.c (default_builtin_vectorization_cost): Likewise.
27080 * tree-cfg.c (verify_gimple_comparison): Likewise.
27081 (verify_gimple_assign_binary): Likewise.
27082 (verify_gimple_assign_ternary): Likewise.
27083 (verify_gimple_assign_single): Likewise.
27084 * tree-pretty-print.c (dump_generic_node): Likewise.
27085 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27086 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27087 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27088 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27089 (vect_shift_permute_load_chain): Likewise.
27090 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27091 (expand_vector_condition, optimize_vector_constructor): Likewise.
27092 (lower_vec_perm, get_compute_type): Likewise.
27093 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27094 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27095 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27096 (vect_recog_mask_conversion_pattern): Likewise.
27097 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27098 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27099 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27100 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27101 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27102 (vectorizable_shift, vectorizable_operation, vectorizable_store)
27103 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27104 (supportable_widening_operation): Likewise.
27105 (supportable_narrowing_operation): Likewise.
27106 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27108 * varasm.c (output_constant): Likewise.
27110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27111 Alan Hayward <alan.hayward@arm.com>
27112 David Sherwood <david.sherwood@arm.com>
27114 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27115 so that both the length == 3 and length != 3 cases set up their
27116 own permute vectors. Add comments explaining why we know the
27117 number of elements is constant.
27118 (vect_permute_load_chain): Likewise.
27120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27121 Alan Hayward <alan.hayward@arm.com>
27122 David Sherwood <david.sherwood@arm.com>
27124 * machmode.h (mode_nunits): Change from unsigned char to
27126 (ONLY_FIXED_SIZE_MODES): New macro.
27127 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27128 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27129 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27131 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27132 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27133 or if measurement_type is not polynomial.
27134 * genmodes.c (ZERO_COEFFS): New macro.
27135 (emit_mode_nunits_inline): Make mode_nunits_inline return a
27137 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27138 Use ZERO_COEFFS when emitting initializers.
27139 * data-streamer.h (bp_pack_poly_value): New function.
27140 (bp_unpack_poly_value): Likewise.
27141 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27142 for GET_MODE_NUNITS.
27143 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27144 for GET_MODE_NUNITS.
27145 * tree.c (make_vector_type): Remove temporary shim and make
27146 the real function take the number of units as a poly_uint64
27147 rather than an int.
27148 (build_vector_type_for_mode): Handle polynomial nunits.
27149 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27150 * emit-rtl.c (const_vec_series_p_1): Likewise.
27151 (gen_rtx_CONST_VECTOR): Likewise.
27152 * fold-const.c (test_vec_duplicate_folding): Likewise.
27153 * genrecog.c (validate_pattern): Likewise.
27154 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27155 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27156 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27157 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27158 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27159 * rtlanal.c (subreg_get_info): Likewise.
27160 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27161 (vect_grouped_load_supported): Likewise.
27162 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27163 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27164 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27165 (simplify_const_unary_operation, simplify_binary_operation_1)
27166 (simplify_const_binary_operation, simplify_ternary_operation)
27167 (test_vector_ops_duplicate, test_vector_ops): Likewise.
27168 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27169 instead of CONST_VECTOR_NUNITS.
27170 * varasm.c (output_constant_pool_2): Likewise.
27171 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27172 explicit-encoded elements in the XVEC for variable-length vectors.
27174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27176 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27179 Alan Hayward <alan.hayward@arm.com>
27180 David Sherwood <david.sherwood@arm.com>
27182 * coretypes.h (fixed_size_mode): Declare.
27183 (fixed_size_mode_pod): New typedef.
27184 * builtins.h (target_builtins::x_apply_args_mode)
27185 (target_builtins::x_apply_result_mode): Change type to
27186 fixed_size_mode_pod.
27187 * builtins.c (apply_args_size, apply_result_size, result_vector)
27188 (expand_builtin_apply_args_1, expand_builtin_apply)
27189 (expand_builtin_return): Update accordingly.
27191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27193 * cse.c (hash_rtx_cb): Hash only the encoded elements.
27194 * cselib.c (cselib_hash_rtx): Likewise.
27195 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27196 CONST_VECTOR encoding.
27198 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27199 Jeff Law <law@redhat.com>
27202 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27203 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27204 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27205 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27208 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27209 explicitly probe *sp in a noreturn function if there were any callee
27210 register saves or frame pointer is needed.
27212 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27215 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27216 BLKmode for ternary, binary or unary expressions.
27219 * var-tracking.c (delete_vta_debug_insn): New inline function.
27220 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27221 insns from get_insns () to NULL instead of each bb separately.
27222 Use delete_vta_debug_insn. No longer static.
27223 (vt_debug_insns_local, variable_tracking_main_1): Adjust
27224 delete_vta_debug_insns callers.
27225 * rtl.h (delete_vta_debug_insns): Declare.
27226 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27227 instead of variable_tracking_main.
27229 2018-01-03 Martin Sebor <msebor@redhat.com>
27231 PR tree-optimization/83603
27232 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27233 arguments past the endof the argument list in functions declared
27234 without a prototype.
27235 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27236 Avoid checking when arguments are null.
27238 2018-01-03 Martin Sebor <msebor@redhat.com>
27241 * doc/extend.texi (attribute const): Fix a typo.
27242 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27243 issuing -Wsuggest-attribute for void functions.
27245 2018-01-03 Martin Sebor <msebor@redhat.com>
27247 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27248 offset_int::from instead of wide_int::to_shwi.
27249 (maybe_diag_overlap): Remove assertion.
27250 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27251 * gimple-ssa-sprintf.c (format_directive): Same.
27252 (parse_directive): Same.
27253 (sprintf_dom_walker::compute_format_length): Same.
27254 (try_substitute_return_value): Same.
27256 2018-01-03 Jeff Law <law@redhat.com>
27258 PR middle-end/83654
27259 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27260 non-constant residual for zero at runtime and avoid probing in
27261 that case. Reorganize code for trailing problem to mirror handling
27264 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27266 PR tree-optimization/83501
27267 * tree-ssa-strlen.c (get_string_cst): New.
27268 (handle_char_store): Call get_string_cst.
27270 2018-01-03 Martin Liska <mliska@suse.cz>
27272 PR tree-optimization/83593
27273 * tree-ssa-strlen.c: Include tree-cfg.h.
27274 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27275 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27276 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27278 (strlen_dom_walker::before_dom_children): Call
27279 gimple_purge_dead_eh_edges. Dump tranformation with details
27281 (strlen_dom_walker::before_dom_children): Update call by adding
27282 new argument cleanup_eh.
27283 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27285 2018-01-03 Martin Liska <mliska@suse.cz>
27288 * cif-code.def (VARIADIC_THUNK): New enum value.
27289 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27292 2018-01-03 Jan Beulich <jbeulich@suse.com>
27294 * sse.md (mov<mode>_internal): Tighten condition for when to use
27295 vmovdqu<ssescalarsize> for TI and OI modes.
27297 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27299 Update copyright years.
27301 2018-01-03 Martin Liska <mliska@suse.cz>
27304 * ipa-visibility.c (function_and_variable_visibility): Skip
27305 functions with noipa attribure.
27307 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27309 * gcc.c (process_command): Update copyright notice dates.
27310 * gcov-dump.c (print_version): Ditto.
27311 * gcov.c (print_version): Ditto.
27312 * gcov-tool.c (print_version): Ditto.
27313 * gengtype.c (create_file): Ditto.
27314 * doc/cpp.texi: Bump @copying's copyright year.
27315 * doc/cppinternals.texi: Ditto.
27316 * doc/gcc.texi: Ditto.
27317 * doc/gccint.texi: Ditto.
27318 * doc/gcov.texi: Ditto.
27319 * doc/install.texi: Ditto.
27320 * doc/invoke.texi: Ditto.
27322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27324 * vector-builder.h (vector_builder::m_full_nelts): Change from
27325 unsigned int to poly_uint64.
27326 (vector_builder::full_nelts): Update prototype accordingly.
27327 (vector_builder::new_vector): Likewise.
27328 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27329 (vector_builder::operator ==): Likewise.
27330 (vector_builder::finalize): Likewise.
27331 * int-vector-builder.h (int_vector_builder::int_vector_builder):
27332 Take the number of elements as a poly_uint64 rather than an
27334 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27335 from unsigned int to poly_uint64.
27336 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27337 (vec_perm_indices::new_vector): Likewise.
27338 (vec_perm_indices::length): Likewise.
27339 (vec_perm_indices::nelts_per_input): Likewise.
27340 (vec_perm_indices::input_nelts): Likewise.
27341 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27342 number of elements per input as a poly_uint64 rather than an
27343 unsigned int. Use the original encoding for variable-length
27344 vectors, rather than clamping each individual element.
27345 For the second and subsequent elements in each pattern,
27346 clamp the step and base before clamping their sum.
27347 (vec_perm_indices::series_p): Handle polynomial element counts.
27348 (vec_perm_indices::all_in_range_p): Likewise.
27349 (vec_perm_indices_to_tree): Likewise.
27350 (vec_perm_indices_to_rtx): Likewise.
27351 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27352 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27353 (tree_vector_builder::new_binary_operation): Handle polynomial
27354 element counts. Return false if we need to know the number
27355 of elements at compile time.
27356 * fold-const.c (fold_vec_perm): Punt if the number of elements
27357 isn't known at compile time.
27359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27361 * vec-perm-indices.h (vec_perm_builder): Change element type
27362 from HOST_WIDE_INT to poly_int64.
27363 (vec_perm_indices::element_type): Update accordingly.
27364 (vec_perm_indices::clamp): Handle polynomial element_types.
27365 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27366 (vec_perm_indices::all_in_range_p): Likewise.
27367 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27369 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27370 polynomial vec_perm_indices element types.
27371 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27372 * fold-const.c (fold_vec_perm): Likewise.
27373 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27374 * tree-vect-generic.c (lower_vec_perm): Likewise.
27375 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27376 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27377 element type to HOST_WIDE_INT.
27379 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27380 Alan Hayward <alan.hayward@arm.com>
27381 David Sherwood <david.sherwood@arm.com>
27383 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27384 rather than an int. Use plus_constant.
27385 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27386 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27389 Alan Hayward <alan.hayward@arm.com>
27390 David Sherwood <david.sherwood@arm.com>
27392 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27393 a HOST_WIDE_INT to a poly_int64.
27395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27396 Alan Hayward <alan.hayward@arm.com>
27397 David Sherwood <david.sherwood@arm.com>
27399 * calls.c (load_register_parameters): Cope with polynomial
27400 mode sizes. Require a constant size for BLKmode parameters
27401 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27402 forces a parameter to be padded at the lsb end in order to
27403 fill a complete number of words, require the parameter size
27404 to be ordered wrt UNITS_PER_WORD.
27406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27407 Alan Hayward <alan.hayward@arm.com>
27408 David Sherwood <david.sherwood@arm.com>
27410 * reload1.c (spill_stack_slot_width): Change element type
27411 from unsigned int to poly_uint64_pod.
27412 (alter_reg): Treat mode sizes as polynomial.
27414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27415 Alan Hayward <alan.hayward@arm.com>
27416 David Sherwood <david.sherwood@arm.com>
27418 * reload.c (complex_word_subreg_p): New function.
27419 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
27426 operands whose sizes aren't ordered.
27427 (match_reload): Refer to this check here.
27429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27430 Alan Hayward <alan.hayward@arm.com>
27431 David Sherwood <david.sherwood@arm.com>
27433 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27434 that the mode size is in the set {1, 2, 4, 8, 16}.
27436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27437 Alan Hayward <alan.hayward@arm.com>
27438 David Sherwood <david.sherwood@arm.com>
27440 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27441 Use plus_constant instead of gen_rtx_PLUS.
27443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27444 Alan Hayward <alan.hayward@arm.com>
27445 David Sherwood <david.sherwood@arm.com>
27447 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27448 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27449 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27450 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27451 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27452 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27453 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27454 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27455 * config/i386/i386.c (ix86_push_rounding): ...this new function.
27456 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27458 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27459 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27460 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27461 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27462 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27463 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27464 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27465 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27466 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27467 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27469 * expr.c (emit_move_resolve_push): Treat the input and result
27470 of PUSH_ROUNDING as a poly_int64.
27471 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27472 (emit_push_insn): Likewise.
27473 * lra-eliminations.c (mark_not_eliminable): Likewise.
27474 * recog.c (push_operand): Likewise.
27475 * reload1.c (elimination_effects): Likewise.
27476 * rtlanal.c (nonzero_bits1): Likewise.
27477 * calls.c (store_one_arg): Likewise. Require the padding to be
27478 known at compile time.
27480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27481 Alan Hayward <alan.hayward@arm.com>
27482 David Sherwood <david.sherwood@arm.com>
27484 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27485 Use plus_constant instead of gen_rtx_PLUS.
27487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27488 Alan Hayward <alan.hayward@arm.com>
27489 David Sherwood <david.sherwood@arm.com>
27491 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27492 rather than an int.
27494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27495 Alan Hayward <alan.hayward@arm.com>
27496 David Sherwood <david.sherwood@arm.com>
27498 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27499 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27500 via stack temporaries. Treat the mode size as polynomial too.
27502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27503 Alan Hayward <alan.hayward@arm.com>
27504 David Sherwood <david.sherwood@arm.com>
27506 * expr.c (expand_expr_real_2): When handling conversions involving
27507 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27508 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27509 as a poly_uint64 too.
27511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27512 Alan Hayward <alan.hayward@arm.com>
27513 David Sherwood <david.sherwood@arm.com>
27515 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27518 Alan Hayward <alan.hayward@arm.com>
27519 David Sherwood <david.sherwood@arm.com>
27521 * combine.c (can_change_dest_mode): Handle polynomial
27522 REGMODE_NATURAL_SIZE.
27523 * expmed.c (store_bit_field_1): Likewise.
27524 * expr.c (store_constructor): Likewise.
27525 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27526 and polynomial REGMODE_NATURAL_SIZE.
27527 (gen_lowpart_common): Likewise.
27528 * reginfo.c (record_subregs_of_mode): Likewise.
27529 * rtlanal.c (read_modify_subreg_p): Likewise.
27531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27532 Alan Hayward <alan.hayward@arm.com>
27533 David Sherwood <david.sherwood@arm.com>
27535 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27536 numbers of elements.
27538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27539 Alan Hayward <alan.hayward@arm.com>
27540 David Sherwood <david.sherwood@arm.com>
27542 * match.pd: Cope with polynomial numbers of vector elements.
27544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27545 Alan Hayward <alan.hayward@arm.com>
27546 David Sherwood <david.sherwood@arm.com>
27548 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27549 in a POINTER_PLUS_EXPR.
27551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27552 Alan Hayward <alan.hayward@arm.com>
27553 David Sherwood <david.sherwood@arm.com>
27555 * omp-simd-clone.c (simd_clone_subparts): New function.
27556 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27557 (ipa_simd_modify_function_body): Likewise.
27559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27560 Alan Hayward <alan.hayward@arm.com>
27561 David Sherwood <david.sherwood@arm.com>
27563 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27564 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27565 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27566 (expand_vector_condition, vector_element): Likewise.
27567 (subparts_gt): New function.
27568 (get_compute_type): Use subparts_gt.
27569 (count_type_subparts): Delete.
27570 (expand_vector_operations_1): Use subparts_gt instead of
27571 count_type_subparts.
27573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27574 Alan Hayward <alan.hayward@arm.com>
27575 David Sherwood <david.sherwood@arm.com>
27577 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27578 (vect_compile_time_alias): ...this new function. Do the calculation
27579 on poly_ints rather than trees.
27580 (vect_prune_runtime_alias_test_list): Update call accordingly.
27582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27583 Alan Hayward <alan.hayward@arm.com>
27584 David Sherwood <david.sherwood@arm.com>
27586 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27588 (vect_schedule_slp_instance): Likewise.
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 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27595 constant and extern definitions for variable-length vectors.
27596 (vect_get_constant_vectors): Note that the number of units
27597 is known to be constant.
27599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27600 Alan Hayward <alan.hayward@arm.com>
27601 David Sherwood <david.sherwood@arm.com>
27603 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27604 of units as polynomial. Choose between WIDE and NARROW based
27607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27608 Alan Hayward <alan.hayward@arm.com>
27609 David Sherwood <david.sherwood@arm.com>
27611 * tree-vect-stmts.c (simd_clone_subparts): New function.
27612 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27615 Alan Hayward <alan.hayward@arm.com>
27616 David Sherwood <david.sherwood@arm.com>
27618 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27619 vectors as polynomial. Use build_index_vector for
27620 IFN_GOMP_SIMD_LANE.
27622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27623 Alan Hayward <alan.hayward@arm.com>
27624 David Sherwood <david.sherwood@arm.com>
27626 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27627 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27628 for variable-length vectors.
27629 (vectorizable_mask_load_store): Treat the number of units as
27630 polynomial, asserting that it is constant if the condition has
27631 already been enforced.
27632 (vectorizable_store, vectorizable_load): Likewise.
27634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27635 Alan Hayward <alan.hayward@arm.com>
27636 David Sherwood <david.sherwood@arm.com>
27638 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27639 of units as polynomial. Punt if we can't tell at compile time
27640 which vector contains the final result.
27642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27643 Alan Hayward <alan.hayward@arm.com>
27644 David Sherwood <david.sherwood@arm.com>
27646 * tree-vect-loop.c (vectorizable_induction): Treat the number
27647 of units as polynomial. Punt on SLP inductions. Use an integer
27648 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27649 cast of such a series for variable-length floating-point
27652 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27653 Alan Hayward <alan.hayward@arm.com>
27654 David Sherwood <david.sherwood@arm.com>
27656 * tree.h (build_index_vector): Declare.
27657 * tree.c (build_index_vector): New function.
27658 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27659 of units as polynomial, forcibly converting it to a constant if
27660 vectorizable_reduction has already enforced the condition.
27661 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27662 to create a {1,2,3,...} vector.
27663 (vectorizable_reduction): Treat the number of units as polynomial.
27664 Choose vectype_in based on the largest scalar element size rather
27665 than the smallest number of units. Enforce the restrictions
27668 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27669 Alan Hayward <alan.hayward@arm.com>
27670 David Sherwood <david.sherwood@arm.com>
27672 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27673 number of units as polynomial.
27675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27676 Alan Hayward <alan.hayward@arm.com>
27677 David Sherwood <david.sherwood@arm.com>
27679 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27680 * target.def (autovectorize_vector_sizes): Return the vector sizes
27681 by pointer, using vector_sizes rather than a bitmask.
27682 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27683 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27684 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27686 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27687 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27688 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27689 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27690 * omp-general.c (omp_max_vf): Likewise.
27691 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27692 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27693 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27694 * tree-vect-slp.c (vect_slp_bb): Likewise.
27695 * doc/tm.texi: Regenerate.
27696 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27698 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27699 the vector size as a poly_uint64 rather than an unsigned int.
27700 (current_vector_size): Change from an unsigned int to a poly_uint64.
27701 (get_vectype_for_scalar_type): Update accordingly.
27702 * tree.h (build_truth_vector_type): Take the size and number of
27703 units as a poly_uint64 rather than an unsigned int.
27704 (build_vector_type): Add a temporary overload that takes
27705 the number of units as a poly_uint64 rather than an unsigned int.
27706 * tree.c (make_vector_type): Likewise.
27707 (build_truth_vector_type): Take the number of units as a poly_uint64
27708 rather than an unsigned int.
27710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27711 Alan Hayward <alan.hayward@arm.com>
27712 David Sherwood <david.sherwood@arm.com>
27714 * target.def (get_mask_mode): Take the number of units and length
27715 as poly_uint64s rather than unsigned ints.
27716 * targhooks.h (default_get_mask_mode): Update accordingly.
27717 * targhooks.c (default_get_mask_mode): Likewise.
27718 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27719 * doc/tm.texi: Regenerate.
27721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27722 Alan Hayward <alan.hayward@arm.com>
27723 David Sherwood <david.sherwood@arm.com>
27725 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27726 * omp-general.c (omp_max_vf): Likewise.
27727 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27728 (expand_omp_simd): Handle polynomial safelen.
27729 * omp-low.c (omplow_simd_context): Add a default constructor.
27730 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27731 (lower_rec_simd_input_clauses): Update accordingly.
27732 (lower_rec_input_clauses): Likewise.
27734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27735 Alan Hayward <alan.hayward@arm.com>
27736 David Sherwood <david.sherwood@arm.com>
27738 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27739 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27740 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27741 (vect_analyze_slp_cost): Likewise.
27742 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27743 (vect_model_load_cost): Likewise.
27745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27746 Alan Hayward <alan.hayward@arm.com>
27747 David Sherwood <david.sherwood@arm.com>
27749 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27750 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27751 from an unsigned int * to a poly_uint64_pod *.
27752 (calculate_unrolling_factor): New function.
27753 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27756 Alan Hayward <alan.hayward@arm.com>
27757 David Sherwood <david.sherwood@arm.com>
27759 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27760 from an unsigned int to a poly_uint64.
27761 (_loop_vec_info::slp_unrolling_factor): Likewise.
27762 (_loop_vec_info::vectorization_factor): Change from an int
27764 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27765 (vect_get_num_vectors): New function.
27766 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27767 (vect_get_num_copies): Use vect_get_num_vectors.
27768 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27769 to an unsigned int *.
27770 (vect_analyze_data_refs): Change min_vf from an int * to a
27772 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27773 than an unsigned HOST_WIDE_INT.
27774 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27775 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27776 to an unsigned int *.
27777 (vect_analyze_data_ref_dependences): Likewise.
27778 (vect_compute_data_ref_alignment): Handle polynomial vf.
27779 (vect_enhance_data_refs_alignment): Likewise.
27780 (vect_prune_runtime_alias_test_list): Likewise.
27781 (vect_shift_permute_load_chain): Likewise.
27782 (vect_supportable_dr_alignment): Likewise.
27783 (dependence_distance_ge_vf): Take the vectorization factor as a
27784 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27785 (vect_analyze_data_refs): Change min_vf from an int * to a
27787 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27788 vfm1 as a poly_uint64 rather than an int. Make the same change
27789 for the returned bound_scalar.
27790 (vect_gen_vector_loop_niters): Handle polynomial vf.
27791 (vect_do_peeling): Likewise. Update call to
27792 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27793 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27795 * tree-vect-loop.c (vect_determine_vectorization_factor)
27796 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27797 (vect_get_known_peeling_cost): Likewise.
27798 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27799 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27800 (vect_transform_loop): Likewise. Use the lowest possible VF when
27801 updating the upper bounds of the loop.
27802 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27803 rather than an int.
27804 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27805 polynomial unroll factors.
27806 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27807 (vect_make_slp_decision): Likewise.
27808 (vect_supported_load_permutation_p): Likewise, and polynomial
27810 (vect_analyze_slp_cost): Handle polynomial vf.
27811 (vect_slp_analyze_node_operations): Likewise.
27812 (vect_slp_analyze_bb_1): Likewise.
27813 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27814 than an unsigned HOST_WIDE_INT.
27815 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27816 (vectorizable_load): Handle polynomial vf.
27817 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27819 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27822 Alan Hayward <alan.hayward@arm.com>
27823 David Sherwood <david.sherwood@arm.com>
27825 * match.pd: Handle bit operations involving three constants
27826 and try to fold one pair.
27828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27830 * tree-vect-loop-manip.c: Include gimple-fold.h.
27831 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27832 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27833 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27834 Add a path that uses a step of VF instead of 1, but disable it
27836 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27837 and niters_no_overflow parameters. Update calls to
27838 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27839 Create a new SSA name if the latter choses to use a ste other
27840 than zero, and return it via niters_vector_mult_vf_var.
27841 * tree-vect-loop.c (vect_transform_loop): Update calls to
27842 vect_do_peeling, vect_gen_vector_loop_niters and
27843 slpeel_make_loop_iterate_ntimes.
27844 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27845 (vect_gen_vector_loop_niters): Update declarations after above changes.
27847 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27849 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27850 128-bit round to integer instructions.
27851 (ceil<mode>2): Likewise.
27852 (btrunc<mode>2): Likewise.
27853 (round<mode>2): Likewise.
27855 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27857 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27858 unaligned VSX load/store on P8/P9.
27859 (expand_block_clear): Allow the use of unaligned VSX
27860 load/store on P8/P9.
27862 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27864 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27866 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27867 swap associated with both a load and a store.
27869 2018-01-02 Andrew Waterman <andrew@sifive.com>
27871 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27872 * config/riscv/riscv.md (clear_cache): Use it.
27874 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27876 * web.c: Remove out-of-date comment.
27878 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27880 * expr.c (fixup_args_size_notes): Check that any existing
27881 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27882 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27883 (emit_single_push_insn): ...here.
27885 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27887 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27888 (const_vector_encoded_nelts): New function.
27889 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27890 (const_vector_int_elt, const_vector_elt): Declare.
27891 * emit-rtl.c (const_vector_int_elt_1): New function.
27892 (const_vector_elt): Likewise.
27893 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27894 of CONST_VECTOR_ELT.
27896 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27898 * expr.c: Include rtx-vector-builder.h.
27899 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27900 directly on the tree encoding.
27901 (const_vector_from_tree): Likewise.
27902 * optabs.c: Include rtx-vector-builder.h.
27903 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27904 sequence of "u" values.
27905 * vec-perm-indices.c: Include rtx-vector-builder.h.
27906 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27907 directly on the vec_perm_indices encoding.
27909 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27911 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27912 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27913 * rtx-vector-builder.h: New file.
27914 * rtx-vector-builder.c: Likewise.
27915 * rtl.h (rtx_def::u2): Add a const_vector field.
27916 (CONST_VECTOR_NPATTERNS): New macro.
27917 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27918 (CONST_VECTOR_DUPLICATE_P): Likewise.
27919 (CONST_VECTOR_STEPPED_P): Likewise.
27920 (CONST_VECTOR_ENCODED_ELT): Likewise.
27921 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27922 (unwrap_const_vec_duplicate): Likewise.
27923 (const_vec_series_p): Check for a non-duplicated vector encoding.
27924 Say that the function only returns true for integer vectors.
27925 * emit-rtl.c: Include rtx-vector-builder.h.
27926 (gen_const_vec_duplicate_1): Delete.
27927 (gen_const_vector): Call gen_const_vec_duplicate instead of
27928 gen_const_vec_duplicate_1.
27929 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27930 (gen_const_vec_duplicate): Use rtx_vector_builder.
27931 (gen_const_vec_series): Likewise.
27932 (gen_rtx_CONST_VECTOR): Likewise.
27933 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27934 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27935 Build a new vector rather than modifying a CONST_VECTOR in-place.
27936 (handle_special_swappables): Update call accordingly.
27937 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27938 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27939 Build a new vector rather than modifying a CONST_VECTOR in-place.
27940 (handle_special_swappables): Update call accordingly.
27942 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27944 * simplify-rtx.c (simplify_const_binary_operation): Use
27945 CONST_VECTOR_ELT instead of XVECEXP.
27947 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27949 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27950 the selector elements to be different from the data elements
27951 if the selector is a VECTOR_CST.
27952 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27953 ssizetype for the selector.
27955 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27957 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27958 before testing each element individually.
27959 * tree-vect-generic.c (lower_vec_perm): Likewise.
27961 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27963 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27964 * selftest-run-tests.c (selftest::run_tests): Call it.
27965 * vector-builder.h (vector_builder::operator ==): New function.
27966 (vector_builder::operator !=): Likewise.
27967 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27968 (vec_perm_indices::all_from_input_p): New function.
27969 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27970 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27971 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27972 instead of reading the VECTOR_CST directly. Detect whether both
27973 vector inputs are the same before constructing the vec_perm_indices,
27974 and update the number of inputs argument accordingly. Use the
27975 utility functions added above. Only construct sel2 if we need to.
27977 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27979 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27980 the broadcast of the low byte.
27981 (expand_mult_highpart): Use an explicit encoding for the permutes.
27982 * optabs-query.c (can_mult_highpart_p): Likewise.
27983 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27984 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27985 (vectorizable_bswap): Likewise.
27986 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27987 explicit encoding for the power-of-2 permutes.
27988 (vect_permute_store_chain): Likewise.
27989 (vect_grouped_load_supported): Likewise.
27990 (vect_permute_load_chain): Likewise.
27992 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27994 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27995 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27996 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27997 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27998 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27999 (vect_gen_perm_mask_any): Likewise.
28001 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28003 * int-vector-builder.h: New file.
28004 * vec-perm-indices.h: Include int-vector-builder.h.
28005 (vec_perm_indices): Redefine as an int_vector_builder.
28006 (auto_vec_perm_indices): Delete.
28007 (vec_perm_builder): Redefine as a stand-alone class.
28008 (vec_perm_indices::vec_perm_indices): New function.
28009 (vec_perm_indices::clamp): Likewise.
28010 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28011 (vec_perm_indices::new_vector): New function.
28012 (vec_perm_indices::new_expanded_vector): Update for new
28013 vec_perm_indices class.
28014 (vec_perm_indices::rotate_inputs): New function.
28015 (vec_perm_indices::all_in_range_p): Operate directly on the
28016 encoded form, without computing elided elements.
28017 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28018 encoding. Update for new vec_perm_indices class.
28019 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28020 the given vec_perm_builder.
28021 (expand_vec_perm_var): Update vec_perm_builder constructor.
28022 (expand_mult_highpart): Use vec_perm_builder instead of
28023 auto_vec_perm_indices.
28024 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28025 vec_perm_indices instead of auto_vec_perm_indices. Use a single
28026 or double series encoding as appropriate.
28027 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28028 vec_perm_indices instead of auto_vec_perm_indices.
28029 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28030 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28031 (vect_permute_store_chain): Likewise.
28032 (vect_grouped_load_supported): Likewise.
28033 (vect_permute_load_chain): Likewise.
28034 (vect_shift_permute_load_chain): Likewise.
28035 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28036 (vect_transform_slp_perm_load): Likewise.
28037 (vect_schedule_slp_instance): Likewise.
28038 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28039 (vectorizable_mask_load_store): Likewise.
28040 (vectorizable_bswap): Likewise.
28041 (vectorizable_store): Likewise.
28042 (vectorizable_load): Likewise.
28043 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28044 vec_perm_indices instead of auto_vec_perm_indices. Use
28045 tree_to_vec_perm_builder to read the vector from a tree.
28046 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28047 vec_perm_builder instead of a vec_perm_indices.
28048 (have_whole_vector_shift): Use vec_perm_builder and
28049 vec_perm_indices instead of auto_vec_perm_indices. Leave the
28050 truncation to calc_vec_perm_mask_for_shift.
28051 (vect_create_epilog_for_reduction): Likewise.
28052 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28053 from auto_vec_perm_indices to vec_perm_indices.
28054 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28055 instead of changing individual elements.
28056 (aarch64_vectorize_vec_perm_const): Use new_vector to install
28057 the vector in d.perm.
28058 * config/arm/arm.c (expand_vec_perm_d::perm): Change
28059 from auto_vec_perm_indices to vec_perm_indices.
28060 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28061 instead of changing individual elements.
28062 (arm_vectorize_vec_perm_const): Use new_vector to install
28063 the vector in d.perm.
28064 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28065 Update vec_perm_builder constructor.
28066 (rs6000_expand_interleave): Likewise.
28067 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28068 (rs6000_expand_interleave): Likewise.
28070 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28072 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28073 to qimode could truncate the indices.
28074 * optabs.c (expand_vec_perm_var): Likewise.
28076 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28078 * Makefile.in (OBJS): Add vec-perm-indices.o.
28079 * vec-perm-indices.h: New file.
28080 * vec-perm-indices.c: Likewise.
28081 * target.h (vec_perm_indices): Replace with a forward class
28083 (auto_vec_perm_indices): Move to vec-perm-indices.h.
28084 * optabs.h: Include vec-perm-indices.h.
28085 (expand_vec_perm): Delete.
28086 (selector_fits_mode_p, expand_vec_perm_var): Declare.
28087 (expand_vec_perm_const): Declare.
28088 * target.def (vec_perm_const_ok): Replace with...
28089 (vec_perm_const): ...this new hook.
28090 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28091 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28092 * doc/tm.texi: Regenerate.
28093 * optabs.def (vec_perm_const): Delete.
28094 * doc/md.texi (vec_perm_const): Likewise.
28095 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28096 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28097 expand_vec_perm for constant permutation vectors. Assert that
28098 the mode of variable permutation vectors is the integer equivalent
28099 of the mode that is being permuted.
28100 * optabs-query.h (selector_fits_mode_p): Declare.
28101 * optabs-query.c: Include vec-perm-indices.h.
28102 (selector_fits_mode_p): New function.
28103 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28104 is defined, instead of checking whether the vec_perm_const_optab
28105 exists. Use targetm.vectorize.vec_perm_const instead of
28106 targetm.vectorize.vec_perm_const_ok. Check whether the indices
28107 fit in the vector mode before using a variable permute.
28108 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28109 vec_perm_indices instead of an rtx.
28110 (expand_vec_perm): Replace with...
28111 (expand_vec_perm_const): ...this new function. Take the selector
28112 as a vec_perm_indices rather than an rtx. Also take the mode of
28113 the selector. Update call to shift_amt_for_vec_perm_mask.
28114 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28115 Use vec_perm_indices::new_expanded_vector to expand the original
28116 selector into bytes. Check whether the indices fit in the vector
28117 mode before using a variable permute.
28118 (expand_vec_perm_var): Make global.
28119 (expand_mult_highpart): Use expand_vec_perm_const.
28120 * fold-const.c: Includes vec-perm-indices.h.
28121 * tree-ssa-forwprop.c: Likewise.
28122 * tree-vect-data-refs.c: Likewise.
28123 * tree-vect-generic.c: Likewise.
28124 * tree-vect-loop.c: Likewise.
28125 * tree-vect-slp.c: Likewise.
28126 * tree-vect-stmts.c: Likewise.
28127 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28129 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28130 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28131 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28132 (aarch64_vectorize_vec_perm_const): ...this new function.
28133 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28134 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28135 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28136 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28137 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28138 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28139 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28141 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
28142 check for NEON modes.
28143 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28144 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28145 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28146 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28148 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
28149 the old VEC_PERM_CONST conditions.
28150 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28151 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28152 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28153 (ia64_vectorize_vec_perm_const_ok): Merge into...
28154 (ia64_vectorize_vec_perm_const): ...this new function.
28155 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28156 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28157 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28158 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28159 * config/mips/mips.c (mips_expand_vec_perm_const)
28160 (mips_vectorize_vec_perm_const_ok): Merge into...
28161 (mips_vectorize_vec_perm_const): ...this new function.
28162 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28163 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28164 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28165 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28166 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28167 (rs6000_expand_vec_perm_const): Delete.
28168 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28170 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28171 (altivec_expand_vec_perm_const_le): Take each operand individually.
28172 Operate on constant selectors rather than rtxes.
28173 (altivec_expand_vec_perm_const): Likewise. Update call to
28174 altivec_expand_vec_perm_const_le.
28175 (rs6000_expand_vec_perm_const): Delete.
28176 (rs6000_vectorize_vec_perm_const_ok): Delete.
28177 (rs6000_vectorize_vec_perm_const): New function.
28178 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28179 an element count and rtx array.
28180 (rs6000_expand_extract_even): Update call accordingly.
28181 (rs6000_expand_interleave): Likewise.
28182 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28183 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28184 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28185 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28186 (rs6000_expand_vec_perm_const): Delete.
28187 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28188 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28189 (altivec_expand_vec_perm_const_le): Take each operand individually.
28190 Operate on constant selectors rather than rtxes.
28191 (altivec_expand_vec_perm_const): Likewise. Update call to
28192 altivec_expand_vec_perm_const_le.
28193 (rs6000_expand_vec_perm_const): Delete.
28194 (rs6000_vectorize_vec_perm_const_ok): Delete.
28195 (rs6000_vectorize_vec_perm_const): New function. Remove stray
28196 reference to the SPE evmerge intructions.
28197 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28198 an element count and rtx array.
28199 (rs6000_expand_extract_even): Update call accordingly.
28200 (rs6000_expand_interleave): Likewise.
28201 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28202 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28204 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28206 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28208 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28209 vector mode and that that mode matches the mode of the data
28211 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28212 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
28213 directly using expand_vec_perm_1 when forcing selectors into
28215 (expand_vec_perm_var): New function, split out from expand_vec_perm.
28217 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28219 * optabs-query.h (can_vec_perm_p): Delete.
28220 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28221 * optabs-query.c (can_vec_perm_p): Split into...
28222 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28223 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28224 particular selector is valid.
28225 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28226 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28227 (vect_grouped_load_supported): Likewise.
28228 (vect_shift_permute_load_chain): Likewise.
28229 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28230 (vect_transform_slp_perm_load): Likewise.
28231 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28232 (vectorizable_bswap): Likewise.
28233 (vect_gen_perm_mask_checked): Likewise.
28234 * fold-const.c (fold_ternary_loc): Likewise. Don't take
28235 implementations of variable permutation vectors into account
28236 when deciding which selector to use.
28237 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28238 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28239 with a false third argument.
28240 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28241 to test whether the constant selector is valid and can_vec_perm_var_p
28242 to test whether a variable selector is valid.
28244 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28246 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28247 * optabs-query.c (can_vec_perm_p): Likewise.
28248 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28249 instead of vec_perm_indices.
28250 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28251 (vect_gen_perm_mask_checked): Likewise,
28252 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28253 (vect_gen_perm_mask_checked): Likewise,
28255 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28257 * optabs-query.h (qimode_for_vec_perm): Declare.
28258 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28259 (qimode_for_vec_perm): ...this new function.
28260 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28262 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28264 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28265 does not have a conditional at the top.
28267 2018-01-02 Richard Biener <rguenther@suse.de>
28269 * ipa-inline.c (big_speedup_p): Fix expression.
28271 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28274 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28277 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28281 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28282 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28283 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28284 cond_taken_branch_cost 3->4.
28286 2018-01-01 Jakub Jelinek <jakub@redhat.com>
28288 PR tree-optimization/83581
28289 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28290 TODO_cleanup_cfg if any changes have been made.
28292 PR middle-end/83608
28293 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28294 convert_modes if target mode has the right side, but different mode
28297 PR middle-end/83609
28298 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28299 last argument when extracting from CONCAT. If either from_real or
28300 from_imag is NULL, use expansion through memory. If result is not
28301 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28302 the parts directly to inner mode, if even that fails, use expansion
28305 PR middle-end/83623
28306 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28307 check for bswap in mode rather than HImode and use that in expand_unop
28310 Copyright (C) 2018 Free Software Foundation, Inc.
28312 Copying and distribution of this file, with or without modification,
28313 are permitted in any medium without royalty provided the copyright
28314 notice and this notice are preserved.