1 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
3 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4 Set JUMP_LABEL to the jump insn.
5 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
6 Predict emitted jump and add label to jump insn.
8 2018-10-18 David Malcolm <dmalcolm@redhat.com>
10 PR tree-optimization/87562
11 * input.c (get_substring_ranges_for_loc): Use
12 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
13 getting the linemap for the endpoint. Verify that it's either
14 in the same linemap as the start point's spelling location, or
15 at least in the same file.
17 2018-10-18 Richard Biener <rguenther@suse.de>
19 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
20 feed width-specific load/store costs through ix86_vec_cost.
21 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
23 (bdver_cost): Likewise.
24 (znver1_cost): Likewise.
25 (btver1_cost): Likewise.
26 (btver2_cost): Likewise.
28 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
30 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
31 to simplify subreg of vec_merge.
33 2018-10-18 Richard Biener <rguenther@suse.de>
35 * config/i386/i386.c: Fix costing of vector FMA.
37 2018-10-18 Richard Biener <rguenther@suse.de>
39 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
41 (ix86_builtin_vectorization_cost): For vec_construct properly
42 cost insertion into SSE regs.
43 (...): Adjust calls to ix86_vec_cost.
45 2018-10-18 Richard Biener <rguenther@suse.de>
49 2018-02-07 Richard Biener <rguenther@suse.de>
51 PR tree-optimization/84204
52 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
55 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
58 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
60 (test_vector_ops_duplicate): Add test for a scalar subreg of a
61 VEC_MERGE of a VEC_DUPLICATE.
63 2018-10-17 Joseph Myers <joseph@codesourcery.com>
65 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
66 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
67 * doc/standards.texi (C Language): Document C2X.
68 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
69 (rl78_option_override): Handle "GNU C2X" language name.
71 2018-10-17 Joseph Myers <joseph@codesourcery.com>
73 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
74 Document C17 as published in 2018.
76 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
79 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
80 bail out if both sides do not have the same storage order.
82 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
84 * bitmap.c (bitmap_head::dump): New.
85 * bitmap.h (bitmap_head): Add dump().
86 * gimple-ssa-evrp-analyze.c
87 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
88 (evrp_range_analyzer::set_ssa_range_info): Same.
89 (evrp_range_analyzer::record_ranges_from_phis): Same.
90 (evrp_range_analyzer::record_ranges_from_stmt): Same.
91 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
92 * gimple-ssa-sprintf.c (get_int_range): Same.
93 (format_integer): Same.
94 (sprintf_dom_walker::handle_gimple_call): Same.
95 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
96 (ipcp_vr_lattice::top_p): Same.
97 (ipcp_vr_lattice::bottom_p): Same.
98 (ipcp_vr_lattice::set_to_bottom): Same.
99 (ipa_vr_operation_and_type_effects): Same.
100 (propagate_vr_across_jump_function): Same.
101 (ipcp_store_vr_results): Same.
102 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
103 (ipa_print_node_jump_functions_for_edge): Same.
104 (ipa_get_value_range): Same.
105 (ipa_compute_jump_functions_for_edge): Same.
106 (ipa_write_jump_function): Same.
107 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
108 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
110 * vr-values.c (set_value_range_to_nonnegative): Same.
111 (set_value_range_to_truthvalue): Same.
112 (vr_values::get_value_range): Same.
113 (vr_values::set_defs_to_varying): Same.
114 (vr_values::update_value_range): Same.
115 (symbolic_range_based_on_p): Same.
116 (vr_values::op_with_boolean_value_range_p): Same.
117 (vr_values::extract_range_for_var_from_comparison_expr): Same.
118 (vr_values::extract_range_from_ssa_name): Same.
119 (vr_values::extract_range_from_binary_expr): Same.
120 (vr_values::extract_range_from_unary_expr): Same.
121 (vr_values::extract_range_from_cond_expr): Same.
122 (vr_values::extract_range_from_comparison): Same.
123 (vr_values::check_for_binary_op_overflow): Same.
124 (vr_values::extract_range_basic): Same.
125 (vr_values::extract_range_from_assignment): Same.
126 (compare_ranges): Same.
127 (compare_range_with_value): Same.
128 (vr_values::adjust_range_with_scev): Same.
129 (vrp_valueize): Same.
130 (vrp_valueize_1): Same.
131 (vr_values::get_vr_for_comparison): Same.
132 (vr_values::compare_name_with_value): Same.
133 (vr_values::compare_names): Same.
134 (vr_values::vrp_evaluate_conditional): Same.
135 (find_case_label_ranges): Same.
136 (vr_values::vrp_visit_switch_stmt): Same.
137 (vr_values::extract_range_from_phi_node): Same.
138 (vr_values::simplify_div_or_mod_using_ranges): Same.
139 (vr_values::simplify_bit_ops_using_ranges): Same.
140 (test_for_singularity): Same.
141 (range_fits_type_p): Same.
142 (vr_values::simplify_cond_using_ranges_1): Same.
143 (vr_values::simplify_switch_using_ranges): Same.
144 (vr_values::simplify_float_conversion_using_ranges): Same.
145 (vr_values::two_valued_val_range_p): Same.
146 (vr_values::add_equivalence): Move to value_range::equiv_add.
147 * vr-values.h (vr_values::add_equivalence): Remove.
148 (VR_INITIALIZER): Remove.
149 * tree-vrp.c (value_range::set): New.
150 (value_range::equiv_add): New.
151 (value_range::value_range): New.
152 (value_range::deep_copy): New.
153 (value_range::check): New.
154 (value_range::equal_p): New.
155 (value_range::ignore_equivs_equal_p): New.
156 (value_range::operator==): New.
157 (value_range::operator!=): New.
158 (value_range::symbolic_p): New.
159 (value_range::numeric_p): New.
160 (value_range::set_undefined): New.
161 (value_range::set_varying): New.
162 (value_range::may_contain_p): New.
163 (value_range::equiv_clear): New.
164 (value_range::singleton_p): New.
165 (value_range::intersect): New.
166 (value_range::dump): New.
167 (value_range::set_and_canonicalize): New.
168 (set_value_range): Adjust for value_range API.
169 (set_value_range_to_undefined): Same.
170 (set_value_range_to_varying): Same.
171 (set_and_canonicalize_value_range): Same.
172 (set_value_range_to_nonnull): Same.
173 (set_value_range_to_null): Same.
174 (range_is_null): Same.
175 (range_is_nonnull): Same.
176 (range_int_cst_p): Same.
177 (range_int_cst_singleton_p): Same.
178 (symbolic_range_p): Same.
179 (range_includes_zero_p): Same.
180 (value_range_constant_singleton): Same.
181 (vrp_set_zero_nonzero_bits): Same.
182 (ranges_from_anti_range): Same.
183 (extract_range_into_wide_ints): Same.
184 (extract_range_from_multiplicative_op): Same.
185 (set_value_range_with_overflow): Same.
186 (extract_range_from_binary_expr_1): Same.
187 (extract_range_from_unary_expr): Same.
188 (dump_value_range): Same.
189 (debug_value_range): Same.
190 (vrp_prop::check_array_ref): Same.
191 (vrp_prop::check_mem_ref): Same.
192 (vrp_prop::vrp_initialize): Same.
193 (vrp_prop::visit_stmt): Same.
194 (intersect_ranges): Same.
195 (vrp_prop::visit_phi): Same.
196 (vrp_prop::vrp_finalize): Same.
197 (determine_value_range_1): Same.
198 (determine_value_range): Same.
199 (vrp_intersect_ranges_1): Rename to...
200 (vrp_intersect_1): this.
201 (vrp_intersect_ranges): Rename to...
202 (value_range::intersect_helper): ...this.
203 (vrp_meet_1): Rename to...
204 (value_range::union_helper): ...this.
205 (vrp_meet): Rename to...
206 (value_range::union_): ...this.
207 (copy_value_range): Remove.
208 * tree-vrp.h (struct value_range): Rewrite into a proper class.
209 (value_range::vrtype): New.
210 (value_range::type): New.
211 (value_range::equiv): New.
212 (value_range::min): New.
213 (value_range::max): New.
214 (value_range::varying_p): New.
215 (value_range::undefined_p): New.
216 (value_range::null_p): New.
217 (value_range::equiv_add): New.
218 (copy_value_range): Remove.
220 2018-10-17 David Malcolm <dmalcolm@redhat.com>
222 * Makefile.in (SELFTEST_TARGETS): New.
223 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
224 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
225 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
227 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
228 (selftest-c++-gdb, selftest-c++-valgrind): Move to
230 * configure: Regenerate.
231 * configure.ac (selftest_languages): New.
233 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
235 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
236 overflow wraps argument.
237 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
238 wide_int_range_multiplicative_op.
239 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
240 overflow wraps argument.
241 (wide_int_range_multiplicative_op): Same.
242 (wide_int_range_lshift): Same.
243 (wide_int_range_div): Same.
244 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
245 (wide_int_range_lshift): Same.
246 (wide_int_range_div): Same.
248 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
250 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
251 use sign as argument.
252 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
253 wide_int_range_shift_undefined_p.
255 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
257 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
259 (@despeculate_copy<ALLI_TI:mode>): ... This.
260 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
263 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
265 * config.gcc: Obsolete *-*-solaris2.10*.
266 * doc/install.texi (Specific, *-*-solaris2*): Document it.
268 2018-10-12 Jeff Law <law@redhat.com>
270 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
271 reg + sym +- const_int addressing modes.
273 2018-10-15 David Malcolm <dmalcolm@redhat.com>
275 * common.opt (fdiagnostics-minimum-margin-width=): New option.
276 * diagnostic-show-locus.c (layout::layout): Apply the minimum
278 (layout::start_annotation_line): Only print up to 3 of the
279 margin character, to avoid touching the left-hand side.
280 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
281 minimum margin width, as set by test_diagnostic_context's ctor.
282 (selftest::test_fixit_insert_containing_newline): Likewise.
283 (selftest::test_fixit_insert_containing_newline_2): Likewise.
284 (selftest::test_line_numbers_multiline_range): Clear
286 * diagnostic.c (diagnostic_initialize): Initialize
288 * diagnostic.h (struct diagnostic_context): Add field
290 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
291 * opts.c (common_handle_option): Handle
292 OPT_fdiagnostics_minimum_margin_width_.
293 * selftest-diagnostic.c
294 (selftest::test_diagnostic_context::test_diagnostic_context):
295 Initialize min_margin_width to 6.
296 * toplev.c (general_init): Initialize global_dc->min_margin_width.
298 2018-10-15 David Malcolm <dmalcolm@redhat.com>
300 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
301 Fix usage of "error_at_rich_loc" in the comment.
303 2018-10-15 Renlin Li <renlin.li@arm.com>
306 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
307 if-conversioned loop when it contains ifn with types not
308 supported by backend.
309 * internal-fn.c (expand_direct_optab_fn): Add an assert.
310 (direct_internal_fn_supported_p): New helper function.
311 * internal-fn.h (direct_internal_fn_supported_p): Declare.
313 2018-10-15 Jakub Jelinek <jakub@redhat.com>
316 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
317 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
318 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
320 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
322 PR tree-optimization/87022
323 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
324 bits in dist vector rather than the first one.
326 2018-10-15 Richard Biener <rguenther@suse.de>
329 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
330 (visit_loadstore): When a used restrict tag escaped verify that
331 the points-to solution of "other" pointers do not include
333 (compute_dependence_clique): If a used restrict tag escaped
334 communicated that down to visit_loadstore.
336 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
338 * config/s390/s390.c (s390_expand_vec_init): Force vector element
339 into reg if it isn't a general operand.
341 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
344 * config/i386/sse.md (*vec_dupv2di): Add register source to
347 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
350 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
351 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
352 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
353 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
355 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
357 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
358 (notice_args_size): Set it in the current trace if no insn that can
359 throw internally has been seen yet.
360 (connect_traces): When connecting args_size between traces, allow the
361 incoming values not to match if there is an insn setting it before the
362 first insn that can throw internally; in that case, force the creation
363 of a CFI note on this latter insn.
365 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
367 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
368 the base class, because using the injected-class-name was not clearly
369 specified until DR 176.
371 2018-10-12 Paul Koning <ni1d@arrl.net>
373 * config/pdp11/pdp11.md (doloop_end): New expander.
374 (doloop_end_insn): renamed from "doloop_end".
375 (addqi3): New pattern.
376 (subqi3): New pattern.
377 * config/pdp11/predicates.md (incdec_operand): New predicate.
379 2018-10-12 Yury Gribov <tetra2005@gmail.com>
382 * real.c (format_helper::can_represent_integral_type_p): New function
383 * real.h (format_helper::can_represent_integral_type_p): Ditto.
384 * match.pd: New pattern.
386 2018-10-12 Alexandre Oliva <oliva@adacore.com>
388 * configure.ac: Introduce --enable-large-address-aware
389 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
390 * doc/install.texi: Document it.
391 * configure, config.in: Rebuilt.
392 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
393 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
394 (LINK_SPEC): Insert it.
395 * config/i386/mingw-264.h: Likewise.
397 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
399 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
401 PR rtl-optimization/87600
402 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
404 2018-10-12 Paul Koning <ni1d@arrl.net>
406 * doc/md.texi (doloop_end): Document that the pattern code may
407 need to check operand mode.
409 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
411 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
412 to zero-extend between int and floating-point registers.
413 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
414 ldp into floating-point registers. Add type and arch attributes.
415 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
416 Use f_loads for type attribute.
418 2018-10-11 Martin Sebor <msebor@redhat.com>
420 * doc/extend.texi (attribute packed): Correct typos.
422 2018-10-11 Martin Sebor <msebor@redhat.com>
424 * doc/extend.texi (attribute flatten): Mention interaction with
427 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
430 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
431 Set new_decl virtual flag to zero.
433 2018-10-11 Martin Sebor <msebor@redhat.com>
436 * doc/extend.texi (attribute format_arg): Discuss using multiple
437 attributes on a single function.
439 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
441 PR tree-optimization/86829
442 * match.pd (sin (atan (x))): New simplification rules.
443 (cos (atan (x))): Likewise.
444 * real.c (build_sinatan_real): New function.
445 * real.h (build_sinatan_real): Prototype.
447 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
449 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
451 (fold_mergeeo_helper): New helper function.
452 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
453 intrinsics. Correct some whitespace indentation issues.
455 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
458 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
459 Use HOST_WIDE_INT_1U for shift.
461 2018-10-11 Doug Rupp <rupp@adacore.com>
462 Olivier Hainque <hainque@adacore.com>
464 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
465 Pass --relax to the linker for RTPs.
466 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
468 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
469 Jan Hubicka <jh@suse.cz>
470 Martin Jambor <mjambor@suse.cz>
472 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
473 the same elements are repeated rather than printing all of them.
474 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
476 * read-rtl-function.c (test_loading_repeat): New function.
477 (read_rtl_function_c_tests): Call test_loading_repeat.
478 * rtl-tests.c (test_dumping_repeat): New function.
479 (rtl_tests_c_tests): Call test_dumping_repeat.
481 2018-10-11 Richard Biener <rguenther@suse.de>
483 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
484 bdver?_cost): Unify to ...
485 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
486 * config/i386/i386.c (processor_cost_table): Adjust.
488 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
491 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
492 the thunk when expanding to GIMPLE.
494 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
496 * varasm.c (mergeable_string_section): Don't try to move zero-length
497 strings to the merge section.
499 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
502 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
504 2018-10-10 Jakub Jelinek <jakub@redhat.com>
507 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
510 2018-10-10 Richard Biener <rguenther@suse.de>
512 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
513 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
514 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
515 and recursing and pattern terminating the recursion on SSE
516 vector width using ix86_expand_reduc.
517 (reduc_sminmax_scal_<mode>): Split into part reducing to half
518 width and recursing and SSE2 vector variant doing the final
519 reduction with ix86_expand_reduc.
520 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
521 with terminating the recursion at AVX level, splitting that
524 2018-10-09 David Malcolm <dmalcolm@redhat.com>
526 * genmatch.c (error_cb): Rename to...
527 (diagnostic_cb): ...this, converting int params to enums.
528 (fatal_at): Update for renaming.
529 (warning_at): Likewise.
531 * input.c (selftest::ebcdic_execution_charset::apply):
532 Update for renaming of...
533 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
535 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
536 converting level and reason to enums.
537 (class selftest::lexer_error_sink): Rename to...
538 (class selftest::lexer_test_options): ...this, renaming field
539 "m_errors" to "m_diagnostics".
540 (selftest::lexer_test_options::apply): Update for renaming of...
541 (selftest::lexer_test_options::on_error): ...this, renaming to...
542 (selftest::lexer_test_options::on_diagnostic): ...this
543 converting level and reason to enums.
544 (selftest::test_lexer_string_locations_raw_string_unterminated):
545 Update for renamings.
546 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
549 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
551 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
552 * config/rs6000/pmmintrin.h: New file.
554 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
556 PR tree-optimization/86659
557 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
559 2018-10-09 Richard Biener <rguenther@suse.de>
561 PR tree-optimization/63155
562 * tree-ssa-structalias.c: Include tree-ssa.h.
563 (get_constraint_for_ssa_var): For undefs return nothing_id.
564 (find_func_aliases): Cleanup PHI handling.
566 2018-10-09 Richard Biener <rguenther@suse.de>
568 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
571 2018-10-09 Martin Liska <mliska@suse.cz>
573 * asan.c (asan_emit_stack_protection): If a stack variable
574 is located in a same file as current function, then emit
575 line info into variable definition string.
577 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
579 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
582 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
584 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
587 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
589 PR tree-optimization/86659
590 * gimple-match.h (struct gimple_match_op): Add reverse field.
591 (gimple_match_op::set_op): New overloaded method.
592 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
593 the REF_REVERSE_STORAGE_ORDER flag on the value.
594 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
595 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
597 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
600 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
601 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
603 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
606 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
607 Defined with __builtin_ia32_vfmaddsubpd512_mask.
609 2018-10-08 Richard Biener <rguenther@suse.de>
611 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
612 cost the same as AVX128 ones.
614 2018-10-08 Paul Koning <ni1d@arrl.net>
616 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
617 (expand_block_move): New function.
618 * config/pdp11/pdp11.c (output_block_move): Remove.
619 (expand_block_move): New function.
620 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
621 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
622 (*movmemhi1): Remove.
624 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
626 * config/s390/2827.md: Increase latencies for some FP instructions.
628 2018-10-08 Richard Biener <rguenther@suse.de>
630 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
632 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
633 * tree-vectorizer.h (dump_stmt_cost): Adjust.
634 (add_stmt_cost): Dump return value of the hook.
636 2018-10-08 Richard Biener <rguenther@suse.de>
638 PR tree-optimization/63155
639 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
640 (ssa_propagation_engine::ssa_propagate): Remove redundant
643 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
645 PR rtl-optimization/86939
646 PR rtl-optimization/87479
647 * ira.h (non_conflicting_reg_copy_p): New prototype.
648 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
649 (make_hard_regno_dead): Don't add conflicts for register
650 ignore_reg_for_conflicts.
651 (make_object_dead): Likewise.
652 (non_conflicting_reg_copy_p): New function.
653 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
654 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
655 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
656 (make_hard_regno_dead): Don't add conflicts for register
657 ignore_reg_for_conflicts. Remove special conflict handling of
658 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
659 check_pic_pseudo_p and update callers.
660 (mark_pseudo_dead): Don't add conflicts for register
661 ignore_reg_for_conflicts.
662 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
664 2018-10-05 Andrew Waterman <andrew@sifive.com>
665 Jim Wilson <jimw@sifive.com>
667 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
668 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
669 new pattern using HONOR_SNANS that emits one extra instruction.
671 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
673 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
674 patterns): Merge SI and DI patterns to a GPR pattern.
675 (unnamed define_insn and define_split for record form of that): Merge
676 to a single define_insn_and_split pattern.
678 2018-10-05 David Malcolm <dmalcolm@redhat.com>
681 * input.c (expand_location_to_spelling_point): Add param "aspect"
682 and use rather than hardcoding LOCATION_ASPECT_CARET.
683 (get_substring_ranges_for_loc): Handle the case of a single token
684 within a macro expansion.
685 * input.h (expand_location_to_spelling_point): Add "aspect" param,
686 defaulting to LOCATION_ASPECT_CARET.
688 2018-10-05 Paul Koning <ni1d@arrl.net>
690 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
691 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
692 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
693 (pdp11_guard_type): New function.
695 2018-10-05 Paul Koning <ni1d@arrl.net>
697 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
698 * config/pdp11/pdp11.opt (mfloat32): Remove.
700 * doc/invoke.texi (pdp11 -mfloat32): Remove:
701 (pdp11 -mfloat64): Remove.
703 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
705 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
706 (*cmp<mode>_cc_i387): Ditto.
707 (*cmpu<mode>_cc_i387): Ditto.
708 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
709 * config/i386/i386.c (ix86_expand_fp_compare): Remove
711 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
712 Emit x86_sahf_1 pattern.
713 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
714 (ix86_expand_carry_flag_compare): Ditto.
716 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
718 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
719 to reg_or_0_operand. Add "C" constraint.
720 (*cmpxf_cc_i387): Ditto.
721 (*cmp<mode>_i387): Change operand 2 predicate
722 to nonimm_or_0_operand. Add "C" constraint.
723 (*cmp<mode>_cc_i387): Ditto.
724 (*cmp<mode>_0_i387): Remove insn pattern.
725 (*cmp<mode>_0_cc_i387): Ditto.
727 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
729 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
730 * config/i386/predicates.md (nonimm_or_0_operand): Rename
731 from vector_move_operand. Update all uses.
733 2018-10-05 Martin Sebor <msebor@redhat.com>
735 PR tree-optimization/87490
736 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
739 2018-10-05 Richard Biener <rguenther@suse.de>
741 PR tree-optimization/63155
742 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
743 vertical space in dumpfiles.
744 * tree-ssa-propagate.h
745 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
746 * tree-ssa-propagate.c (cfg_blocks_back): New global.
747 (ssa_edge_worklist_back): Likewise.
748 (curr_order): Likewise.
749 (cfg_blocks_get): Remove abstraction.
750 (cfg_blocks_add): Likewise.
751 (cfg_blocks_empty_p): Likewise.
752 (add_ssa_edge): Add to current or next worklist based on
754 (add_control_edge): Likewise.
755 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
757 (ssa_propagation_engine::ssa_propagate): ... here. Unify
758 iteration from CFG and SSA edge worklist so we process
759 everything in RPO order, prioritizing forward progress
761 (ssa_prop_init): Allocate new worklists, do not dump
763 (ssa_prop_fini): Free new worklists.
765 2018-10-05 Richard Biener <rguenther@suse.de>
767 * tree-core.h (tree_block::abstract_flag): Remove.
768 (tree_block::block_num): Make full 32bits.
769 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
770 * tree.h (BLOCK_ABSTRACT): Remove.
771 * dwarf2out.c (gen_lexical_block_die): Remove dead code
772 resulting from BLOCK_ABSTRACT being always false.
773 (gen_inlined_subroutine_die): Likewise.
774 (gen_block_die): Likewise.
775 * tree.c (block_ultimate_origin): Likewise.
776 * tree-pretty-print.c (dump_block_node): Remove code dealing
778 * tree-ssa-live.c (dump_scope_block): Likewise.
779 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
780 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
782 2018-10-05 Richard Biener <rguenther@suse.de>
784 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
785 is asked for initialize mode to the component mode of the
788 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
791 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
793 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
795 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
798 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
800 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
801 to be DImode. When using mffscrn, force the operand to a register.
803 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
805 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
806 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
807 X87MODEF mode iterator.
808 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
809 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
810 X87MODEF mode iterator.
812 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
814 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
817 2018-10-04 David Malcolm <dmalcolm@redhat.com>
819 * Makefile.in (OBJS): Add opt-problem.o.
820 * dump-context.h: Include "selftest.h.
821 (selftest::temp_dump_context): New forward decl.
822 (class dump_context): Make friend of class
823 selftest::temp_dump_context.
824 (dump_context::dump_loc_immediate): New decl.
825 (class dump_pretty_printer): Move here from dumpfile.c.
826 (class temp_dump_context): Move to namespace selftest.
827 (temp_dump_context::temp_dump_context): Add param
828 "forcibly_enable_dumping".
829 (selftest::verify_dumped_text):
830 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
831 (selftest::verify_item):
832 (ASSERT_IS_TEXT): Move here from dumpfile.c.
833 (ASSERT_IS_TREE): Likewise.
834 (ASSERT_IS_GIMPLE): Likewise.
835 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
837 (dump_context::dump_loc_immediate): ...this new function.
838 (class dump_pretty_printer): Move to dump-context.h.
839 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
840 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
841 (temp_dump_context::temp_dump_context): Move to "selftest"
842 namespace. Add param "forcibly_enable_dumping", and use it to
843 conditionalize the use of m_pp;
844 (selftest::verify_dumped_text): Make non-static.
845 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
846 (selftest::verify_item): Make non-static.
847 (ASSERT_IS_TEXT): Move to dump-context.h.
848 (ASSERT_IS_TREE): Likewise.
849 (ASSERT_IS_GIMPLE): Likewise.
850 (selftest::test_capture_of_dump_calls): Pass "true" for new
851 param of temp_dump_context.
852 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
853 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
855 * opt-problem.cc: New file.
856 * opt-problem.h: New file.
857 * optinfo-emit-json.cc
858 (selftest::test_building_json_from_dump_calls): Pass "true" for
859 new param of temp_dump_context.
860 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
861 (optinfo::emit_for_opt_problem): New function.
862 (optinfo::emit): Clarity which emit_item is used.
863 * optinfo.h (optinfo::get_dump_location): New accessor.
864 (optinfo::emit_for_opt_problem): New decl.
865 (optinfo::emit): Make const.
866 * selftest-run-tests.c (selftest::run_tests): Call
867 selftest::opt_problem_cc_tests.
868 * selftest.h (selftest::opt_problem_cc_tests): New decl.
869 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
870 bool to opt_result, converting fprintf messages to
871 opt_result::failure_at calls. Add "stmt" param for use by the
873 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
874 (runtime_alias_check_p): Convert return type from bool to
875 opt_result, converting dump_printf calls to
876 opt_result::failure_at, using the statement DDR_A for their
878 (find_data_references_in_stmt): Convert return type from bool to
879 opt_result, converting "return false" to opt_result::failure_at
881 * tree-data-ref.h: Include "opt-problem.h".
882 (dr_analyze_innermost): Convert return type from bool to opt_result,
883 and add a const gimple * param.
884 (find_data_references_in_stmt): Convert return type from bool to
886 (runtime_alias_check_p): Likewise.
887 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
888 dr_analyze_innermost.
889 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
890 Convert return type from bool to opt_result, adding a message for
891 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
892 (vect_analyze_data_ref_dependence): Convert return type from bool
893 to opt_result. Change sense of return type from "false"
894 effectively meaning "no problems" to "false" meaning a problem,
895 so that "return false" becomes "return opt_result::success".
896 Convert "return true" calls to opt_result::failure_at, using
897 the location of statement A rather than vect_location.
898 (vect_analyze_data_ref_dependences): Convert return type from bool
900 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
901 calls to opt_result::failure_at, using the stmt location rather
903 (vect_verify_datarefs_alignment): Convert return type from bool
905 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
906 into multiple more-tightly-scoped copies.
907 (vect_analyze_data_refs_alignment): Convert return type from bool
909 (vect_analyze_data_ref_accesses): Likewise, converting a
910 "return false" to a "return opt_result::failure_at", adding a
912 (vect_prune_runtime_alias_test_list): Convert return type from
913 bool to opt_result, converting dump_printf_loc to
914 opt_result::failure_at. Add a %G to show the pertinent statement,
915 and use the stmt's location rather than vect_location.
916 (vect_find_stmt_data_reference): Convert return type from
917 bool to opt_result, converting dump_printf_loc to
918 opt_result::failure_at, using stmt's location.
919 (vect_analyze_data_refs): Convert return type from bool to
920 opt_result. Convert "return false" to "return
921 opt_result::failure_at", adding messages as needed.
922 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
923 type from bool to opt_result.
924 (vect_determine_vf_for_stmt): Likewise.
925 (vect_determine_vectorization_factor): Likewise, converting
926 dump_printf_loc to opt_result::failure_at, using location of phi
927 rather than vect_location.
928 (vect_analyze_loop_form_1): Convert return type from bool to
929 opt_result, converting dump_printf_loc calls, retaining the use of
931 (vect_analyze_loop_form): Convert return type from loop_vec_info
932 to opt_loop_vec_info.
933 (vect_analyze_loop_operations): Convert return type from bool to
934 opt_result, converting dump_printf_loc calls, using the location
935 of phi/stmt rather than vect_location where available. Convert
936 various "return false" to "return opt_result::failure_at" with
937 "unsupported phi" messages.
938 (vect_get_datarefs_in_loop): Convert return type from bool to
939 opt_result. Add a message for the
940 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
941 (vect_analyze_loop_2): Convert return type from bool to
942 opt_result. Ensure "ok" is set to a opt_result::failure_at before
943 each "goto again;", adding new messages where needed.
944 Add "unsupported grouped {store|load}" messages.
945 (vect_analyze_loop): Convert return type from loop_vec_info to
947 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
949 * tree-vect-stmts.c (process_use): Likewise, converting
950 dump_printf_loc call and using stmt location, rather than
952 (vect_mark_stmts_to_be_vectorized): Likeise.
953 (vect_analyze_stmt): Likewise, adding a %G.
954 (vect_get_vector_types_for_stmt): Convert return type from bool to
955 opt_result, converting dump_printf_loc calls and using stmt
956 location, rather than vect_location.
957 (vect_get_mask_type_for_stmt): Convert return type from tree to
958 opt_tree, converting dump_printf_loc calls and using stmt location.
959 * tree-vectorizer.c: Include "opt-problem.h.
960 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
961 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
962 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
963 enabled, use it to report at the top level "couldn't vectorize
964 loop" followed by the problem.
965 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
966 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
968 (vect_analyze_stmt): Likewise.
969 (vect_get_vector_types_for_stmt): Likewise.
970 (tree vect_get_mask_type_for_stmt): Likewise.
971 (vect_analyze_data_ref_dependences): Likewise.
972 (vect_enhance_data_refs_alignment): Likewise.
973 (vect_analyze_data_refs_alignment): Likewise.
974 (vect_verify_datarefs_alignment): Likewise.
975 (vect_analyze_data_ref_accesses): Likewise.
976 (vect_prune_runtime_alias_test_list): Likewise.
977 (vect_find_stmt_data_reference): Likewise.
978 (vect_analyze_data_refs): Likewise.
979 (vect_analyze_loop): Convert return type from loop_vec_info to
981 (vect_analyze_loop_form): Likewise.
982 (vect_analyze_slp): Convert return type from bool to opt_result.
984 2018-10-04 David Malcolm <dmalcolm@redhat.com>
986 * doc/invoke.texi (-fopt-info): Document new "internals"
988 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
989 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
991 (optinfo_verbosity_options): Add "internals".
992 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
993 (dump_context::apply_dump_filter_p): New member function.
994 (dump_context::dump_loc): Use apply_dump_filter_p rather than
995 explicitly masking the dump_kind.
996 (dump_context::begin_scope): Increment the scope depth first. Use
997 apply_dump_filter_p rather than explicitly masking the dump_kind.
998 (dump_context::emit_item): Use apply_dump_filter_p rather than
999 explicitly masking the dump_kind.
1000 (dump_dec): Likewise.
1001 (dump_hex): Likewise.
1002 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
1003 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
1004 (opt_info_switch_p): Update handling of default
1005 MSG_OPTIMIZED_LOCATIONS to cope with default of
1006 MSG_PRIORITY_USER_FACING.
1007 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
1008 masking the dump_kind.
1009 (selftest::test_capture_of_dump_calls): Update test_dump_context
1010 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
1011 than MSG_ALL. Generalize scope test to be run at all four
1012 combinations of with/without MSG_PRIORITY_USER_FACING and
1013 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
1014 for each of the two values.
1015 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
1016 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
1017 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
1018 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
1019 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
1020 with MSG_PRIORITY_*.
1021 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
1022 dump messages as MSG_PRIORITY_USER_FACING.
1023 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
1024 about the interaction with MSG_PRIORITY_*.
1026 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1028 * varasm.c (output_constant): Add new parameter merge_strings.
1029 Make strings properly zero terminated in merge string sections.
1030 (mergeable_string_section): Don't fail if the last char is non-zero.
1031 (assemble_variable_contents): Handle merge string sections.
1032 (assemble_variable): Likewise.
1033 (assemble_constant_contents): Likewise.
1034 (output_constant_def_contents): Likewise.
1035 (output_constructor_array_range,
1036 output_constructor_regular_field): Adjust call to output_constant.
1037 (output_object_block): Adjust call to assemble_constant_contents
1038 and assemble_variable_contents.
1040 2018-10-04 Martin Liska <mliska@suse.cz>
1043 * cgraphunit.c (process_function_and_variable_attributes):
1044 Warn about a function with alias attribute and a body.
1046 2018-10-04 Martin Liska <mliska@suse.cz>
1049 * multiple_target.c (redirect_to_specific_clone): New function.
1050 (ipa_target_clone): Use it.
1051 * tree-inline.c: Fix comment.
1053 2018-10-04 David Malcolm <dmalcolm@redhat.com>
1055 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
1057 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
1058 (gcc::dump_manager::register_pass): New member function, adapted
1059 from loop body in gcc::pass_manager::register_pass, adding a
1060 call to update_dfi_for_opt_info.
1061 (gcc::dump_manager::opt_info_enable_passes): Store the
1062 -fopt-info options into the new fields. Move the loop
1064 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
1066 * dumpfile.h (struct opt_pass): New forward decl.
1067 (gcc::dump_manager::register_pass): New decl.
1068 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
1069 (class gcc::dump_manager): Add fields "m_optgroup_flags",
1070 "m_optinfo_flags", and "m_optinfo_filename".
1071 * passes.c (gcc::pass_manager::register_pass): Move all of the
1072 dump-handling code to gcc::dump_manager::register_pass.
1074 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
1076 PR rtl-optimization/87466
1077 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
1078 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
1079 * doc/tm.texi: Regenerate.
1080 * ira-lives.c (process_bb_node_lives): Use the new target hook.
1081 * lra-lives.c (process_bb_lives): Likewise.
1082 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1085 2018-10-04 Tamar Christina <tamar.christina@arm.com>
1087 * params.c (add_params): Fix initialization.
1089 2018-10-04 Martin Liska <mliska@suse.cz>
1091 PR gcov-profile/84107
1092 * tree-profile.c (init_ic_make_global_vars):
1093 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1094 Come up with new ic_tuple* variables. Emit
1095 __gcov_indirect_call{,_topn} variables.
1096 (gimple_gen_ic_profiler): Access the variable
1098 (gimple_gen_ic_func_profiler): Access
1099 __gcov_indirect_call.callee field.
1100 (gimple_init_gcov_profiler): Use ptr_type_node.
1101 * value-prof.c (gimple_ic): Use ptr_type_node.
1103 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1105 PR tree-optimization/85787
1106 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1107 into this function and add support for detecting multiple phis.
1108 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1110 2018-10-04 Martin Liska <mliska@suse.cz>
1113 * ipa-inline.c (inline_to_all_callers_1):
1114 Call ultimate_alias_target for node being inlined.
1116 2018-10-03 Jeff Law <law@redhat.com>
1118 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1120 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1121 * tree.h (get_typenode_from_name): Prototype.
1123 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
1125 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1126 Change operand 2 predicate to nonimmediate_operand.
1127 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1129 2018-10-03 Martin Sebor <msebor@redhat.com>
1130 Jeff Law <law@redhat.com>
1132 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1134 (get_string_length): Detect unterminated arrays.
1135 (format_string): Same.
1136 (format_directive): Warn about unterminated arrays.
1137 (handle_gimple_call): Mark statements with no_warning as needed.
1139 2018-10-03 Jim Wilson <jimw@sifive.com>
1141 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1142 also define __riscv_abi_rve. Delete trailing white space.
1144 2018-10-03 Paul Koning <ni1d@arrl.net>
1146 Enable LRA register allocator for PDP11.
1147 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1150 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1151 * config/pdp11/pdp11.opt (-mlra): New option.
1152 * doc/invoke.texi (PDP-11 Options): Document -mlra.
1154 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
1156 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1157 (*<absneg:code>extend<mode>xf2): Ditto.
1159 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
1161 PR tree-optimization/87415
1162 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1165 2018-10-02 Jeff Law <law@redhat.com>
1167 * gimple-fold.c (get_range_strlen): Only set *nonstr when
1168 an unterminated string is discovered. Bubble up range
1169 even for unterminated strings.
1170 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1171 indicates the string was not terminated via NONSTR.
1173 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
1175 * tree-vrp.c (extract_range_from_unary_expr): Special case all
1176 pointer conversions.
1177 Do not do anything special for anti-ranges.
1179 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
1181 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1182 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1184 2018-10-03 Martin Liska <mliska@suse.cz>
1186 PR gcov-profile/86109
1187 * coverage.c (coverage_begin_function): Do not
1188 mark lambdas as artificial.
1189 * tree-core.h (struct GTY): Remove tm_clone_flag
1190 and introduce new lambda_function.
1191 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1193 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1196 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1197 P8_VECTOR and VSX are enabled.
1199 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
1201 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1202 0x3907 as CPU model number.
1204 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
1206 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1207 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1208 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1209 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1210 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1211 * config/s390/s390.md: Likewise. Rename also the cpu attribute
1212 value from arch12 to z14.
1214 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
1216 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1218 (isinf<mode>2): Ditto.
1220 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
1222 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1223 before emitting fxam. Perform calculations in XFmode.
1225 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
1227 * match.pd (((X /[ex] A) +- B) * A): New transformation.
1229 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
1232 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1233 * tree.c (signed_or_unsigned_type_for): Handle complex.
1235 2018-10-02 Jeff Law <law@redhat.com>
1237 * gimple-fold.c (get_range_strlen): Remove dead code.
1239 2018-10-02 Martin Sebor <msebor@redhat.com>
1240 Jeff Law <law@redhat.com>
1242 * builtins.c (unterminated_array): Add new arguments.
1243 If argument is not terminated, bubble up size and exact
1245 (expand_builtin_strnlen): Detect, avoid expanding
1246 and diagnose unterminated arrays.
1247 (c_strlen): Fill in offset of start of unterminated strings.
1248 * builtins.h (unterminated_array): Update prototype.
1250 2018-10-02 Richard Biener <rguenther@suse.de>
1252 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1253 of haddv4df, first reduce to SSE width and exploit the fact
1254 that we only need element zero with the reduction result.
1255 (reduc_plus_scal_v2df): Likewise.
1257 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1259 * dojump.h (do_jump): Delete.
1260 (do_jump_1): Likewise.
1261 (split_comparison): Move around.
1262 * dojump.c (do_jump): Make static.
1263 (do_jump_1): Likewise.
1264 (jumpifnot): Move around.
1265 (jumpifnot_1): Likewise.
1267 (jumpif_1): Likewise.
1268 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1270 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1272 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1273 insns in the delay slot and add_insn_after for the jump insn.
1275 2018-10-02 Richard Biener <rguenther@suse.de>
1277 * tree-inline.c (expand_call_inline): Use the location of
1278 the callee declaration for the inline-entry marker.
1279 * final.c (notice_source_line): Remove special-casing of
1280 NOTE_INSN_INLINE_ENTRY.
1282 2018-10-01 Carl Love <cel@us.ibm.com>
1285 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1286 (__builtin_mtfsb0): New.
1287 (__builtin_mtfsb1): New.
1288 ( __builtin_set_fpscr_rn): New.
1289 (__builtin_set_fpscr_drn): New.
1290 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1291 (rs6000_expand_set_fpscr_rn_builtin): Add.
1292 (rs6000_expand_set_fpscr_drn_builtin): Add.
1293 (rs6000_expand_builtin): Add case statement entries for
1294 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1295 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1296 RS6000_BUILTIN_MFFSL.
1297 (rs6000_init_builtins): Add ftype initialization and def_builtin
1298 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1299 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1300 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1301 rs6000_mffscdrn): Add define_insn.
1302 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1303 * doc/extend.texi: Add documentation for the builtins.
1305 2018-10-01 Richard Biener <rguenther@suse.de>
1307 PR tree-optimization/87465
1308 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1309 causing branch miscounts.
1311 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1313 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1314 aarch64_option_default_param): New.
1315 (params.h): Include.
1316 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1317 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1318 stack-clash protection validation code.
1320 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1322 * params.c (validate_param): New.
1323 (add_params): Use it.
1324 (set_param_value): Refactor param validation into validate_param.
1325 (diagnostic.h): Include.
1326 * diagnostic.h (diagnostic_ready_p): New.
1328 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1330 * params.c (set_param_value):
1331 Add index of parameter being validated.
1332 * common/common-target.def (option_validate_param): New.
1333 * common/common-targhooks.h (default_option_validate_param): New.
1334 * common/common-targhooks.c (default_option_validate_param): New.
1335 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1336 * doc/tm.texi: Regenerate.
1338 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1341 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1342 Add validation for stack-clash parameters and set defaults.
1344 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1347 * configure.ac: Add stack-clash-protection-guard-size.
1348 * doc/install.texi: Document it.
1349 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1350 * params.def: Update comment for guard-size.
1351 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1352 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1353 * configure: Regenerate.
1355 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1358 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1359 STACK_DYNAMIC_OFFSET): New.
1360 * config/aarch64/aarch64.c (aarch64_layout_frame):
1361 Update outgoing args size.
1362 (aarch64_stack_clash_protection_alloca_probe_range,
1363 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1365 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1368 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1370 * target.def (stack_clash_protection_alloca_probe_range): New.
1371 (stack_clash_protection_final_dynamic_probe): Remove.
1372 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1373 (default_stack_clash_protection_final_dynamic_probe): Remove.
1374 * targhooks.c: Likewise.
1375 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1376 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1377 * doc/tm.texi: Regenerate.
1379 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1382 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1383 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1384 aarch64_clamp_to_uimm12_shift): New.
1385 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1386 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1388 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1391 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1393 2018-10-01 Jeff Law <law@redhat.com>
1394 Richard Sandiford <richard.sandiford@linaro.org>
1395 Tamar Christina <tamar.christina@arm.com>
1398 * config/aarch64/aarch64.md
1399 (probe_stack_range): Add k (SP) constraint.
1400 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1401 STACK_CLASH_MAX_UNROLL_PAGES): New.
1402 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1403 stack probes for stack clash.
1404 (aarch64_allocate_and_probe_stack_space): New.
1405 (aarch64_expand_prologue): Use it.
1406 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1407 (aarch64_sub_sp): Add emit_move_imm optional param.
1409 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
1411 PR tree-optimization/87261
1412 * match.pd: Remove trailing whitespace.
1413 Add (x & y) | ~(x | y) -> ~(x ^ y),
1414 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1416 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1418 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1420 (ashlsi3_insn): Update instruction constraints.
1421 (ashrsi3_insn): Likewise.
1422 (rotrsi3): Likewise.
1423 (add_shift): Likewise.
1424 * config/arc/constraints.md (Csz): New 32 bit constraint. It
1425 avoids placing in the limm field small constants which, otherwise,
1426 could end into a small instruction.
1428 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1430 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1431 destination register is not odd-even.
1432 (umaddsidi4_split): Likewise.
1434 2018-10-01 Richard Biener <rguenther@suse.de>
1436 * tree-inline.c (expand_call_inline): Store origin of fn
1437 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1438 * tree.c (block_ultimate_origin): Simplify and do some
1441 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1443 * config/i386/mmx.md (EMMS): New int iterator.
1444 (emms): New int attribute.
1445 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1446 EMMS int iterator. Explicitly declare clobbers.
1447 (mmx_emms): Remove expander.
1449 * config/i386/predicates.md (emms_operation): Remove predicate.
1450 (vzeroall_pattern): New predicate.
1451 (vzeroupper_pattern): Rename from vzeroupper_operation.
1452 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1453 vzeroupper_pattern and vzeroall_pattern predicates.
1455 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1457 PR rtl-optimization/86939
1458 * ira-lives.c (make_hard_regno_born): Rename from this...
1459 (make_hard_regno_live): ... to this. Remove update to conflict
1460 information. Update function comment.
1461 (make_hard_regno_dead): Add conflict information update. Update
1463 (make_object_born): Rename from this...
1464 (make_object_live): ... to this. Remove update to conflict information.
1465 Update function comment.
1466 (make_object_dead): Add conflict information update. Update function
1468 (mark_pseudo_regno_live): Call make_object_live.
1469 (mark_pseudo_regno_subword_live): Likewise.
1470 (mark_hard_reg_dead): Update function comment.
1471 (mark_hard_reg_live): Call make_hard_regno_live.
1472 (process_bb_node_lives): Likewise.
1473 * lra-lives.c (make_hard_regno_born): Rename from this...
1474 (make_hard_regno_live): ... to this. Remove update to conflict
1475 information. Remove now uneeded check_pic_pseudo_p argument.
1476 Update function comment.
1477 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1478 to conflict information. Update function comment.
1479 (mark_pseudo_live): Remove update to conflict information. Update
1481 (mark_pseudo_dead): Add conflict information update.
1482 (mark_regno_live): Call make_hard_regno_live.
1483 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1484 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1486 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1489 * config/i386/i386.c (construct_container): Use TImode for
1490 BLKmode values in 2 integer registers.
1492 2018-09-29 Jeff Law <law@redhat.com>
1494 * builtins.c (unterminated_array): Pass in c_strlen_data * to
1495 c_strlen rather than just a tree *.
1496 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1497 Update recursive calls appropriately. If caller did not provide a
1498 suitable data pointer, create a local one. When a non-terminated
1499 string is discovered, bubble up information about the string via the
1500 c_strlen_data object.
1501 * builtins.h (c_strlen): Update prototype.
1502 (c_strlen_data): New structure.
1503 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1504 For a type 2 call, if c_strlen indicates a non-terminated string
1505 use the length of the non-terminated string.
1506 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1508 2018-09-29 Jakub Jelinek <jakub@redhat.com>
1511 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1512 __m512d type for __A argument rather than __m512.
1514 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
1516 * match.pd (simple_comparison): Don't optimize if either operand is
1517 a function pointer when target needs function pointer canonicalization.
1519 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1521 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1522 power5 .. power9 to remove indirection.
1523 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1524 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1525 ASM_CPU_476_SPEC): Delete.
1526 (ASM_CPU_SPEC): Adjust.
1527 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1528 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1530 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1532 * config.in: Delete HAVE_AS_DCI.
1533 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1534 * config/rs6000/rs6000.h: Ditto.
1535 * configure.ac: Delete HAVE_AS_DCI.
1536 * configure: Regenerate.
1538 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1540 * config.in (HAVE_AS_LWSYNC): Delete.
1541 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1542 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1544 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1545 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1547 * configure.ac: Delete HAVE_AS_LWSYNC.
1548 * configure: Regenerate.
1550 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1551 Pierre-Marie de Rodat <derodat@adacore.com>
1553 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1554 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1555 (cgraph_node::create_thunk): Add indirect_offset parameter.
1556 (thunk_adjust): Likewise.
1557 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1558 and initialize the corresponding field with it.
1559 (cgraph_node::dump): Dump indirect_offset field.
1560 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1561 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1562 (thunk_adjust): Add indirect_offset parameter and deal with it.
1563 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1564 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1565 or if the thunk is external or local. Fix formatting. Do not chain
1566 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1567 if any, in the GIMPLE representation.
1568 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1569 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1570 (input_node): Read indirect_offset field.
1571 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1572 call to thunk_adjust.
1573 * tree-nested.c (struct nesting_info): Add thunk_p field.
1574 (create_nesting_tree): Set it.
1575 (convert_all_function_calls): Copy static chain from targets to thunks.
1576 (finalize_nesting_tree_1): Return early for thunks.
1577 (unnest_nesting_tree_1): Do not finalize thunks.
1578 (gimplify_all_functions): Do not gimplify thunks.
1580 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1582 * opt-suggestions.c (option_proposer::build_option_suggestions):
1583 Release "option_values".
1585 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1587 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1588 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1589 * dumpfile.c (kind_as_string): New function.
1590 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1591 kind_as_string to vary the prefix based on dump_kind.
1592 (selftest::test_capture_of_dump_calls): Update for above.
1594 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1596 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1597 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1599 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1601 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1602 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1603 INVALID_REGNUM instead of FPSR_REG.
1604 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1605 * config/i386/i386.md: Update comment of FP compares.
1606 (fldenv): Do not clobber FPSR_REG.
1608 2018-09-28 Richard Biener <rguenther@suse.de>
1610 * tree.h (BLOCK_ORIGIN): New.
1611 * omp-expand.c (grid_expand_target_grid_body): Assign
1612 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1613 * tree-inline.c (remap_block): Likewise.
1614 * auto-profile.c (get_function_decl_from_block): Simplify
1615 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1616 * langhooks.c (lhd_print_error_function): Likewise.
1617 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1619 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1620 * tree.c (block_nonartificial_location): Likewise.
1621 (block_ultimate_origin): Likewise.
1622 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1623 no longer needed LTO case.
1625 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1626 Jan Hubicka <jh@suse.cz>
1627 Martin Jambor <mjambor@suse.cz>
1629 * simplify-rtx.c (simplify_merge_mask): New function.
1630 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1631 same masks are used in op1 or op2.
1632 (test_vec_merge): New function.
1633 (test_vector_ops): Call test_vec_merge.
1635 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1637 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1638 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1639 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1640 (cypress_costs): Set it.
1641 (supersparc_costs): Likewise.
1642 (hypersparc_costs): Likewise.
1643 (leon_cost): Likewise.
1644 (leon3_costs): Likewise.
1645 (sparclet_costs): Likewise.
1646 (ultrasparc_costs): Likewise.
1647 (ultrasparc_costs): Likewise.
1648 (niagara_costs): Likewise.
1649 (niagara2_costs): Likewise.
1650 (niagara3_costs): Likewise.
1651 (niagara4_costs): Likewise.
1652 (niagara7_costs): Likewise.
1653 (m8_costs): Likewise.
1654 (TARGET_CAN_FOLLOW_JUMP): Define.
1655 (pass_work_around_errata::gate): Minor tweak.
1656 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1657 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1658 Automaitcally clear MASK_FSMULD mask for V7 processors.
1659 (sparc_can_follow_jump): New static function.
1660 (output_ubranch): Deal with CROSSING_JUMP_P.
1661 (sparc_use_sched_lookahead): Rewrite using switch statement.
1662 (sparc_issue_rate): Reorder.
1663 (sparc_branch_cost): New function.
1665 2018-09-27 Martin Sebor <msebor@redhat.com>
1667 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1668 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1669 (int_fits_type_p): Same.
1671 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1673 * config/i386/i386.md (FPCR_REG): Remove.
1674 (UNSPEC_FLDCW): Remove.
1675 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1676 (x86_fldcw_1): Remove insn pattern.
1677 (fnstenv): Do not clobber FPCR_REG.
1679 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1680 (CALL_USED_REGISTERS): Ditto.
1681 (REG_ALLOC_ORDER): Ditto.
1682 (REG_CLASS_CONTENTS): Ditto.
1683 (HI_REGISTER_NAMES): Ditto.
1684 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1685 of numerical constants.
1686 * config/i386/i386.c (regclass_map): Remove fpsr register.
1687 (dbx_register_map): Ditto.
1688 (dbx64_register_map): Ditto.
1689 (svr4_dbx_register_map): Ditto.
1690 (print_reg): Do not handle FPCR_REG.
1692 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1695 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1696 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1697 Delete, always treat as true.
1698 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1699 Ditto. Simplify remaining code.
1700 * config/powerpcspe/powerpcspe.h: Ditto.
1701 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1702 Simplify remaining code.
1703 (rs6000_expand_builtin): Ditto.
1704 * config/rs6000/rs6000.h: Ditto.
1705 * configure.ac: Ditto.
1706 * configure: Regenerate.
1708 2018-09-27 Martin Liska <mliska@suse.cz>
1710 * coverage.c (get_coverage_counts): Revert the formatting
1711 of missing profile opt info.
1713 2018-09-27 Richard Biener <rguenther@suse.de>
1717 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1718 block as we do not output that.
1719 (gen_inlined_subroutine_die): Elide the originally outermost
1720 block, matching what we do for concrete instances.
1721 (decls_for_scope): Add parameter specifying whether to recurse
1724 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1725 Tom de Vries <tom@codesourcery.com>
1729 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1730 STORE_FLAG_VALUE == 1.
1732 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1734 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1735 constant definitions.
1736 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1737 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1738 ("speculation_barrier"): New expander definition.
1740 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1742 PR gcov-profile/86957
1743 * common.opt: New warning option -Wmissing-profile.
1744 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1745 * doc/invoke.texi: Document -Wmissing-profile.
1747 2018-09-26 Jim Wilson <jimw@sifive.com>
1749 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1750 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1752 2018-09-26 Martin Sebor <msebor@redhat.com>
1754 * tree.c (zerop): Change return type to bool.
1755 (integer_zerop, integer_onep, integer_each_onep): Same.
1756 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1757 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1758 (real_onep, real_minus_onep, chain_index): Same.
1759 (print_type_hash_statistics, type_list_equal): Same.
1760 * tree.h (zerop): Same.
1761 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1762 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1763 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1764 (real_onep, real_minus_onep, chain_index): Same.
1765 (print_type_hash_statistics, type_list_equal): Same.
1767 2018-09-26 Jim Wilson <jimw@sifive.com>
1769 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1771 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1774 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1775 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1778 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1780 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1782 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1784 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1785 and FP_SECOND_SSE_REGS.
1786 (REG_CLASS_NAMES): Ditto.
1787 (REG_CLASS_CONTENTS): Ditto.
1788 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1789 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1790 (ix86_preferred_output_reload_class): Ditto.
1791 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1792 clobber constraint to "=&f".
1793 (fix_truncdi_i387): Ditto.
1794 (lrintxfdi2): Ditto.
1795 (fistdi2_<rounding>): Ditto.
1796 (fpremxf4_i387): Change "=u" constraint to "=f".
1797 (fprem1xf4_i387): Ditto.
1799 (fptanxf4_i387): Ditto.
1800 (fxtractxf3_i387): Ditto.
1801 (fscalexf4_i387): Ditto.
1802 (atan2xf3): Change "u" constraint to "f".
1803 (fyl2xxf3_i387): Ditto.
1804 (fyl2xp1xf3_i387): Ditto.
1806 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1809 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1810 for removed I387_MASK_PM entity.
1813 2018-09-26 Jeff Law <law@redhat.com>
1815 2018-09-26 Alexey Neyman <stilor@att.net>
1817 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1818 headers are no longer pulled in by <isl/val.h>.
1820 2018-09-26 Richard Biener <rguenther@suse.de>
1823 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1824 or concrete instance DIE to the tree. Create abstract origin
1825 attributes also for concrete instances.
1827 2018-09-26 Alexey Neyman <stilor@att.net>
1829 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1830 headers are no longer pulled in by <isl/val.h>.
1832 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1834 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1835 Use new helper functions.
1836 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1837 Use new helper functions.
1838 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1839 aarch_mm_needs_release): New declarations.
1840 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1841 aarch_mm_needs_release): New.
1843 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1845 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1846 (arm32_output_mi_thunk): Deal with long calls.
1848 2018-09-26 Richard Biener <rguenther@suse.de>
1852 * tree-inline.c (expand_call_inline): When the location
1853 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1854 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1855 the inserted BLOCK to make inlined_function_outer_scope_p
1857 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1858 coords for reserved locations.
1860 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1862 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1863 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1864 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1865 (*sibcall_nonlocal_sysv<mode>): Ditto.
1866 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1867 (<bd>_<mode>): Ditto.
1868 (<bd>tf_<mode>): Ditto.
1870 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1872 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1873 control string as a list of templates instead of as C code.
1874 (*altivec_movti): Ditto.
1875 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1877 2018-09-25 Jim Wilson <jimw@sifive.com>
1879 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1880 when target symbol is weak.
1882 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1885 * builtins.c (unterminated_array): Simplify.
1886 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1887 where pointer arithmetic is safe.
1889 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1892 * config/rs6000/altivec.md (altivec_vspltb): Use
1893 const_0_to_15_operand instead of u5bit_cint_operand.
1894 (*altivec_vspltb_internal): Ditto.
1895 (altivec_vspltb_direct): Ditto.
1896 (altivec_vsplth): Use const_0_to_7_operand instead of
1898 (*altivec_vsplth_internal): Ditto.
1899 (altivec_vsplth_direct): Ditto.
1900 (altivec_vspltw): Use const_0_to_3_operand instead of
1902 (*altivec_vspltw_internal): Ditto.
1903 (altivec_vspltw_direct): Ditto.
1904 (altivec_vspltsf): Ditto.
1905 (*altivec_vspltsf_internal): Ditto.
1906 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1907 various splats with the proper size immediate. Reorder the various
1908 cases by ascending size of immediate, and put all such together.
1910 2018-09-25 Richard Biener <rguenther@suse.de>
1913 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1915 (maybe_create_die_with_external_ref): Do not create
1916 DW_TAG_imported_unit here.
1917 (add_abstract_origin_attribute): Handle external BLOCK refs.
1918 (dwarf2out_abstract_function): Simplify LTO case.
1919 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1920 rather than using maybe_create_die_with_external_ref.
1922 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1925 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1926 (frndintxf2_mask_pm_i387): Ditto.
1927 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1928 Enable for !flag_trapping_math.
1929 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1930 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1931 Change operand 1 predicate to nonimmediate_operand.
1932 (attr "i387_cw"): Remove mask_pm.
1933 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1934 (enum ix86_entity): Remove I387_MASK_PM.
1935 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1936 handle I387_MASK_PM.
1937 (ix86_mode_needed): Ditto.
1938 (ix86_mode_after): Ditto.
1939 (ix86_mode_entry): Ditto.
1940 (ix86_mode_exit): Ditto.
1941 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1943 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1945 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1946 to_update_switch_stmts to vNULL instead of calling create on them
1949 2018-09-25 Richard Biener <rguenther@suse.de>
1951 PR tree-optimization/87402
1952 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1953 (visit_phi): Re-instantiate handling of supposed to be VARYING
1954 but non-VARYING backedge value.
1956 2018-09-25 Richard Biener <rguenther@suse.de>
1959 * dwarf2out.c (struct sym_off_pair): New.
1960 (external_die_map): New global.
1961 (lookup_decl_die): When in LTO create DIEs lazily from the
1963 (lookup_block_die): New function, create DIEs lazily in LTO.
1964 (equate_block_to_die): New function.
1965 (dwarf2out_die_ref_for_decl): During WPA get the association
1966 from the external DIE map.
1967 (dwarf2out_register_external_die): Record mapping into the
1969 (maybe_create_die_with_external_ref): New function split out from
1970 DIE generation part of old dwarf2out_register_external_die.
1971 (add_abstract_origin_attribute): Do not return the DIE. When
1972 in LTO reference externals directly.
1973 (dwarf2out_abstract_function): When in LTO ignore calls for
1974 decls with external DIEs (already present abstract instances).
1975 (gen_call_site_die): Adjust.
1976 (add_high_low_attributes): Likewise.
1977 (gen_lexical_block_die): Likewise.
1978 (gen_inlined_subroutine_die): Likewie.
1979 (gen_block_die): Likewise.
1980 (dwarf2out_inline_entry): Likewise.
1981 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1984 2018-09-25 Martin Liska <mliska@suse.cz>
1986 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1987 integers and not by a float value.
1989 2018-09-25 Martin Liska <mliska@suse.cz>
1992 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1994 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1995 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1996 * godump.c (go_format_type): Remove extra parenthesis.
1998 2018-09-25 Martin Liska <mliska@suse.cz>
2000 * alias.c (set_dest_equal_p): Remove unused function.
2001 * config/i386/i386.c (def_builtin_pure2): Likewise.
2002 * diagnostic-show-locus.c (class layout): Remove
2004 (layout::layout): Likewise here.
2005 * dump-context.h (class temp_dump_context): Likewise.
2006 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
2007 (add_AT_loclistsptr): Likewise.
2008 (add_AT_offset): Likewise.
2009 (get_AT_hi_pc): Likewise.
2010 (is_comdat_die): Likewise.
2011 (type_is_enum): Likewise.
2012 (ceiling): Likewise.
2013 (add_AT_vms_delta): Likewise.
2014 (is_class_die): Likewise.
2015 * edit-context.c (class line_event): Remove unused field.
2016 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
2018 * ipa-cp.c (ipa_get_vr_lat): Likewise.
2019 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
2020 (ok_for_base_p_nonstrict): Likewise.
2021 * tree-chrec.c (is_not_constant_evolution): Likewise.
2022 (chrec_fold_poly_cst): Likewise.
2023 * tree-if-conv.c (has_pred_critical_p): Likewise.
2024 * tree-ssa-coalesce.c (print_exprs): Likewise.
2025 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
2026 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
2027 * tree-vrp.c (value_ranges_intersect_p): Likewise.
2028 (value_range_nonnegative_p): Likewise.
2030 2018-09-25 Martin Liska <mliska@suse.cz>
2032 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2033 Do not handle "GNU Pascal".
2034 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2036 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
2037 from documentation. Likewise.
2038 * dbxout.c (dbxout_range_type): Likewise.
2039 * doc/cpp.texi: Likewise.
2040 * doc/extend.texi: Likewise.
2041 * doc/frontends.texi: Likewise.
2042 * doc/invoke.texi: Remove Pascal entry.
2043 * tree.def (CLEANUP_POINT_EXPR): Likewise.
2044 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2046 2018-09-25 Martin Liska <mliska@suse.cz>
2049 * doc/invoke.texi: Document all parameters and remove default
2052 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
2055 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
2056 contains HOST_WIDE_INTs when computing its size.
2058 2018-09-24 Jim Wilson <jimw@sifive.com>
2061 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
2063 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2065 2018-09-24 Andrew Pinski <apinski@marvell.com>
2067 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2068 access prev before checking it for NULLness in the
2069 AARCH64_FUSE_CMP_BRANCH case.
2071 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
2074 * config/i386/i386.c (rest_of_insert_endbranch): Set
2075 endbr_queued_at_entrance to true and don't insert ENDBR if
2076 x86_function_profiler will be called.
2077 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2079 * config/i386/i386.h (machine_function): Add
2080 endbr_queued_at_entrance.
2082 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
2084 * genattrtab.c (mk_attr_alt): Use alternative_mask.
2085 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2087 (check_attr_test): Use alternative_mask.
2088 (get_attr_value): Likewise.
2089 (compute_alternative_mask): Use alternative_mask and XWINT.
2090 (make_alternative_compare): Use alternative_mask.
2091 (attr_alt_subset_p): Use XWINT.
2092 (attr_alt_subset_of_compl_p): Likewise.
2093 (attr_alt_intersection): Use alternative_mask and XWINT.
2094 (attr_alt_union): Likewise.
2095 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2096 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2097 (simplify_test_exp): Use alternative_mask and XWINT.
2098 (write_test_expr): Use alternative_mask and XWINT, adjust bit
2099 number calculation to support 64 bits. Generate code that
2100 checks 64-bit masks.
2101 (main): Use alternative_mask.
2102 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2104 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
2107 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2108 RETURN+USE when returning via %r14.
2110 2018-09-24 Martin Liska <mliska@suse.cz>
2112 * gcov.c (output_lines): Print colorization legend
2113 for both flag_use_colors and flag_use_hotness_colors.
2116 2018-09-24 Martin Liska <mliska@suse.cz>
2118 * coverage.c (get_coverage_counts): Use warning_at
2119 with current_function_decl location. Use %qD in warning
2122 2018-09-24 Martin Liska <mliska@suse.cz>
2124 * memory-block.h (memory_block_pool::release): Annotate with
2125 valgrind that the memory is not accessible.
2127 2018-09-24 Martin Liska <mliska@suse.cz>
2130 * asan.c: Make asan_handled_variables extern.
2132 * cfgexpand.c (expand_stack_vars): Make sure
2133 a representative is unpoison if another
2134 variable in the partition is handled by
2135 use-after-scope sanitization.
2137 2018-09-24 Richard Biener <rguenther@suse.de>
2139 PR tree-optimization/63155
2140 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2141 the worklist when the edge of the respective argument isn't
2144 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2146 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2147 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2148 (MASK_CLASS_P): Update for rename.
2149 (MAYBE_MASK_CLASS_P): Ditto.
2150 (REG_CLASS_NAMES): Update.
2151 (REG_CLASS_CONTENT): Update.
2152 * config/i386/i386.c (regclass_map): Update for MASK_REG
2153 and ALL_MASK_REGS rename.
2154 * config/i386/constraints.md (Yk): Update for rename.
2157 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2159 * config/i386/i386.h (enum reg_class): Remove
2160 EVEX_SSE_REGS and MOD4_SSE_REGS.
2161 (REG_CLASS_NAMES): Update.
2162 (REG_CLASS_CONTENT): Update.
2163 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2164 registers as ALL_SSE_REGS.
2165 (ix86_additional_allocno_class_p): Remove.
2166 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2167 (ix86_register_priority): Lower priority of EVEX SSE registers.
2168 Use IN_RANGE macro where appropriate.
2169 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2170 AVX-5124VNNIW checks.
2171 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2172 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2173 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2174 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2175 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2176 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2177 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2178 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2179 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2180 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2181 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2182 * config/i386/constraints.md (Yh): Remove.
2184 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
2186 * config/i386/i386.c (regclass_map): Declare integer REX registers
2189 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
2191 * doc/service.texi (Service): Switch the fsf.org link to https.
2193 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
2196 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2197 Define to speculation_safe_value_not_needed.
2199 2018-09-21 Florian Weimer <fweimer@redhat.com>
2202 * doc/extend.texi (Common Function Attributes): Mention that
2203 noreturn suppresses tail call optimization.
2205 2018-09-21 Jeff Law <law@redhat.com>
2207 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2208 vr_values::cleanup_edges_and_switches.
2209 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2211 (identify_jump_threads): Remove EDGE_IGNORE handling.
2212 (execute_vrp): Move handling of to_remove_edges and
2213 to_update_switch_stmts into vr_values class member functions.
2214 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2215 (to_update_switch_stmts): Likewise.
2216 * vr-values.c: Include cfghooks.h.
2217 (vr_values::vr_values): Initialize to_remove_edges and
2218 to_update_switch_stmts.
2219 (vr_values::~vr_values): Verify to_remove_edges and
2220 to_update_switch_stmts are empty.
2221 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2222 (vr_values::cleanup_edges_and_switches): New member function.
2223 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2224 function. Add new data members.
2226 2018-09-21 David Malcolm <dmalcolm@redhat.com>
2228 PR tree-optimization/87309
2229 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2230 calls with pflags and alt_flags.
2231 (selftest::test_capture_of_dump_calls): Add test of interaction of
2232 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2234 2018-09-21 Olivier Hainque <hainque@adacore.com>
2236 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2238 2018-09-21 Olivier Hainque <hainque@adacore.com>
2240 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2242 2018-09-21 Olivier Hainque <hainque@adacore.com>
2244 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2245 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2246 (VXWORKS_LIBS_RTP): Minor reordering.
2248 2018-09-21 Olivier Hainque <hainque@adacore.com>
2250 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2251 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2253 2018-09-21 Olivier Hainque <hainque@adacore.com>
2255 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2256 (PTRDIFF_TYPE): Likewise.
2258 2018-09-21 Olivier Hainque <hainque@adacore.com>
2260 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2261 triplet, similar to support for VxWorks7.
2262 * config/vxworks-dummy.h: Provide a default definition
2263 of TARGET_VXWORKS64 to 0.
2265 2018-09-21 Olivier Hainque <hainque@adacore.com>
2267 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2268 * config/vxworks-dummy.h: here.
2270 2018-09-21 Olivier Hainque <hainque@adacore.com>
2272 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2274 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
2275 Bo Zhou <zbo.zhou@hisilicon.com>
2277 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2278 * config/aarch64/aarch64-tune.md: Regenerated.
2279 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2280 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2281 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2283 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
2284 Julian Brown <julian@codesourcery.com>
2286 * builtins.c (get_builtin_sync_mem): Handle address spaces.
2288 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2290 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2291 if the call takes a static chain.
2293 2018-09-21 Martin Liska <mliska@suse.cz>
2295 * auto-profile.c (autofdo_source_profile::read): Do not
2297 (read_profile): Do not add working sets.
2298 (read_autofdo_file): Remove sum_all.
2299 (afdo_callsite_hot_enough_for_early_inline): Remove const
2301 * coverage.c (struct counts_entry): Remove gcov_summary.
2302 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2303 do not support GCOV_TAG_PROGRAM_SUMMARY.
2304 (get_coverage_counts): Remove summary and expected
2306 * coverage.h (get_coverage_counts): Likewise.
2307 * doc/gcov-dump.texi: Remove -w option.
2308 * gcov-dump.c (dump_working_sets): Remove.
2309 (main): Do not support '-w' option.
2310 (print_usage): Likewise.
2311 (tag_summary): Likewise.
2312 * gcov-io.c (gcov_write_summary): Do not dump
2314 (gcov_read_summary): Likewise.
2315 (gcov_histo_index): Remove.
2316 (gcov_histogram_merge): Likewise.
2317 (compute_working_sets): Likewise.
2318 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2320 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2321 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2322 (GCOV_HISTOGRAM_SIZE): Remove.
2323 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2324 (struct gcov_summary): Simplify rapidly just
2325 to runs and sum_max fields.
2326 (gcov_histo_index): Remove.
2327 (NUM_GCOV_WORKING_SETS): Likewise.
2328 (compute_working_sets): Likewise.
2329 * gcov-tool.c (print_overlap_usage_message): Remove
2330 trailing empty line.
2331 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2332 (output_lines): Remove program related line.
2333 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2334 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2336 (input_profile_summary): Do not read it.
2337 (merge_profile_summaries): And do not merge it.
2338 (input_symtab): Do not call removed function.
2339 * modulo-sched.c (sms_schedule): Do not print sum_max.
2340 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2341 removed when histogram method was invented.
2342 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2344 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2346 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2347 and dump selected value.
2348 * profile.c (add_working_set): Remove.
2349 (get_working_sets): Likewise.
2350 (find_working_set): Likewise.
2351 (get_exec_counts): Do not work with working sets.
2352 (read_profile_edge_counts): Do not inform as sum_max is removed.
2353 (compute_branch_probabilities): Likewise.
2354 (compute_value_histograms): Remove argument for call of
2355 get_coverage_counts.
2356 * profile.h: Do not make gcov_summary const.
2358 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
2360 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2362 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2364 PR tree-optimization/86990
2365 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2366 Check that the entire merged store group is made of constants only for
2369 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
2371 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2372 (VTABLE_VERIFICATION_SPEC): Likewise.
2373 (SANITIZER_EARLY_SPEC): Likewise.
2374 (SANITIZER_SPEC): Likewise.
2375 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2376 * doc/invoke.texi (Link Options): Document -r.
2378 2018-09-20 Richard Biener <rguenther@suse.de>
2381 * gimplify.c (gimplify_expr): Retain alignment of
2382 addressable lvalue in dereference.
2384 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
2387 * configure.ac: Check for .loc is_stmt support.
2388 * configure, config.in: Rebuilt.
2389 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2392 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2394 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2395 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2398 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2400 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2402 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2405 2018-09-20 Marek Polacek <polacek@redhat.com>
2407 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2409 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2411 PR tree-optimization/87288
2412 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2413 into account when determining PEELING_FOR_NITERS.
2415 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2417 PR tree-optimization/86877
2418 * tree-vect-loop.c (vect_analyze_loop_2): Call
2419 vect_verify_datarefs_alignment.
2421 2018-09-19 Marek Polacek <polacek@redhat.com>
2423 * doc/invoke.texi: Document -Wclass-conversion.
2425 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2427 * config/pa/pa.c (pa_adjust_priority): Delete.
2428 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2430 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2431 (atomic_storehi): Likewise.
2432 (atomic_storesi): Likewise.
2433 (atomic_loaddi): Restore compare and swap exchange loop code.
2435 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2437 PR rtl-optimization/86902
2438 * combine.c (try_combine): When changing the CC mode used, don't change
2439 an unrelated mode in other_insn to that new CC mode.
2441 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2443 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2444 with %T in place of calls to dump_generic_expr.
2445 (prune_runtime_alias_test_list): Likewise.
2446 (create_runtime_alias_checks): Likewise.
2447 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2448 (vect_analyze_data_ref_dependence): Likewise.
2449 (vect_slp_analyze_data_ref_dependence): Likewise.
2450 (vect_record_base_alignment): Likewise. Use %G in place of call
2451 to dump_gimple_stmt.
2452 (vect_compute_data_ref_alignment): Likewise.
2453 (verify_data_ref_alignment): Likewise.
2454 (vect_find_same_alignment_drs): Likewise.
2455 (vect_analyze_group_access_1): Likewise.
2456 (vect_analyze_data_ref_accesses): Likewise.
2457 (dependence_distance_ge_vf): Likewise.
2458 (dump_lower_bound): Likewise.
2459 (vect_prune_runtime_alias_test_list): Likewise.
2460 (vect_find_stmt_data_reference): Likewise.
2461 (vect_analyze_data_refs): Likewise.
2462 (vect_create_addr_base_for_vector_ref): Likewise.
2463 (vect_create_data_ref_ptr): Likewise.
2464 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2465 (vect_can_advance_ivs_p): Likewise.
2466 (vect_update_ivs_after_vectorizer): Likewise.
2467 (vect_gen_prolog_loop_niters): Likewise.
2468 (vect_prepare_for_masked_peels): Likewise.
2469 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2470 (vect_determine_vectorization_factor): Likewise.
2471 (vect_is_simple_iv_evolution): Likewise.
2472 (vect_analyze_scalar_cycles_1): Likewise.
2473 (vect_analyze_loop_operations): Likewise.
2474 (report_vect_op): Likewise.
2475 (vect_is_slp_reduction): Likewise.
2476 (check_reduction_path): Likewise.
2477 (vect_is_simple_reduction): Likewise.
2478 (vect_create_epilog_for_reduction): Likewise.
2479 (vect_finalize_reduction:): Likewise.
2480 (vectorizable_induction): Likewise.
2481 (vect_transform_loop_stmt): Likewise.
2482 (vect_transform_loop): Likewise.
2483 (optimize_mask_stores): Likewise.
2484 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2485 (vect_split_statement): Likewise.
2486 (vect_recog_over_widening_pattern): Likewise.
2487 (vect_recog_average_pattern): Likewise.
2488 (vect_determine_min_output_precision_1): Likewise.
2489 (vect_determine_precisions_from_range): Likewise.
2490 (vect_determine_precisions_from_users): Likewise.
2491 (vect_mark_pattern_stmts): Likewise.
2492 (vect_pattern_recog_1): Likewise.
2493 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2494 (vect_record_max_nunits): Likewise.
2495 (vect_build_slp_tree_1): Likewise.
2496 (vect_build_slp_tree_2): Likewise.
2497 (vect_print_slp_tree): Likewise.
2498 (vect_analyze_slp_instance): Likewise.
2499 (vect_detect_hybrid_slp_stmts): Likewise.
2500 (vect_detect_hybrid_slp_1): Likewise.
2501 (vect_slp_analyze_operations): Likewise.
2502 (vect_slp_analyze_bb_1): Likewise.
2503 (vect_transform_slp_perm_load): Likewise.
2504 (vect_schedule_slp_instance): Likewise.
2505 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2506 (vect_mark_stmts_to_be_vectorized): Likewise.
2507 (vect_init_vector_1): Likewise.
2508 (vect_get_vec_def_for_operand): Likewise.
2509 (vect_finish_stmt_generation_1): Likewise.
2510 (vect_check_load_store_mask): Likewise.
2511 (vectorizable_call): Likewise.
2512 (vectorizable_conversion): Likewise.
2513 (vectorizable_operation): Likewise.
2514 (vectorizable_load): Likewise.
2515 (vect_analyze_stmt): Likewise.
2516 (vect_is_simple_use): Likewise.
2517 (vect_get_vector_types_for_stmt): Likewise.
2518 (vect_get_mask_type_for_stmt): Likewise.
2519 * tree-vectorizer.c (increase_alignment): Likewise.
2521 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
2523 * doc/rtl.texi: Adjust vec_select description.
2524 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2525 non-constant selectors.
2527 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
2529 * config/aarch64/aarch64-protos.h
2530 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2531 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2532 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2533 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2534 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2535 (AARCH64_FL_PROFILE): Move index so flags are ordered.
2536 (AARCH64_ISA_RCPC8_4): New flag.
2537 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2538 to aarch64_offset_9bit_signed_unscaled_p.
2539 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2541 * config/aarch64/constraints.md (Ust): New constraint.
2542 * config/aarch64/predicates.md.
2543 (aarch64_9bit_offset_memory_operand): New predicate.
2544 (aarch64_rcpc_memory_operand): New predicate.
2546 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
2548 PR rtl-optimization/87361
2549 * rtlanal.c (nonzero_bits1): Revert accidental change.
2551 2018-09-19 Richard Biener <rguenther@suse.de>
2553 PR tree-optimization/87349
2554 PR tree-optimization/87342
2555 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2557 2018-09-18 Marek Polacek <polacek@redhat.com>
2559 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2560 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2562 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2564 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2566 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2568 PR rtl-optimization/86882
2569 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2571 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2573 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2574 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2576 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2579 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2581 2018-09-18 Richard Biener <rguenther@suse.de>
2584 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2585 (compute_samebase_partition_bases): Likewise.
2586 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2587 (gimple_can_coalesce_p): Simplify.
2589 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2591 Handle a library implementation of ffs calling __builtin_ffs.
2592 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2593 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2596 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2598 * diagnostic-show-locus.c (class layout_range): Add field
2600 (layout_range::layout_range): Add "original_idx" param and use it
2601 to initialize new field.
2602 (make_range): Use 0 for original_idx.
2603 (layout::layout): Pass in index to calls to
2604 maybe_add_location_range.
2605 (layout::maybe_add_location_range): Add param "original_idx" and
2606 pass it on to layout_range.
2607 (layout::print_any_labels): Pass on range->m_original_idx to
2609 (gcc_rich_location::add_location_if_nearby): Use 0 for
2611 * gcc-rich-location.h (text_range_label::get_text): Update for new
2613 (range_label_for_type_mismatch::get_text): Likewise.
2615 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2617 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2619 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2621 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2622 format_string_diagnostic_t.
2623 (fmtwarn_n): Likewise.
2624 * substring-locations.c
2625 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2626 (format_warning_n_va): Convert to...
2627 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2628 (format_warning_va): Convert to...
2629 (format_string_diagnostic_t::emit_warning_va): ...this.
2630 (format_warning_at_substring): Convert to...
2631 (format_string_diagnostic_t::emit_warning): ...this.
2632 (format_warning_at_substring_n): Convert to...
2633 (format_string_diagnostic_t::emit_warning_n): ...this.
2634 * substring-locations.h (class format_string_diagnostic_t): New
2636 (format_warning_va): Convert to
2637 format_string_diagnostic_t::emit_warning_va.
2638 (format_warning_n_va): Convert to
2639 format_string_diagnostic_t::emit_warning_n_va.
2640 (format_warning_at_substring): Convert to
2641 format_string_diagnostic_t::emit_warning.
2642 (format_warning_at_substring_n): Convert to
2643 format_string_diagnostic_t::emit_warning_n.
2645 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2646 Bernd Schmidt <bernds_cb1@t-online.de>
2648 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2651 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2653 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2654 operand 0 predicate to nonimmediate operand.
2655 (rint<mode>2_frndint): Remove insn pattern.
2656 (rint<mode>2): Change operand 1 predicate to general_operand.
2657 Extend operand 1 to XFmode and generate rintxf2 insn.
2658 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2659 Do not use X87MODEF mode macro.
2660 (frndintxf2_<rounding>_i387): Rename from
2661 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2662 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2663 to XFmode and generate significandxf3 insn.
2665 2018-09-17 Richard Biener <rguenther@suse.de>
2667 PR tree-optimization/87328
2668 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2669 visiting unexecutable backedges when not iterating.
2670 (do_rpo_vn): Mark all edges not executable even when not
2673 2018-09-17 Martin Jambor <mjambor@suse.cz>
2676 * doc/invoke.texi (Warning Options): Likewise.
2678 2018-09-17 Richard Biener <rguenther@suse.de>
2680 PR tree-optimization/87301
2681 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2682 clean EH info from leftover copy assignments.
2684 2018-09-17 Martin Liska <mliska@suse.cz>
2686 PR gcov-profile/85871
2687 * gcov.c (output_intermediate_file): Fix out of bounds
2690 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2692 * config/arc/arc.c: Object attributes for core4 not reflected
2694 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2697 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2699 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2701 2018-09-17 Martin Liska <mliska@suse.cz>
2703 * doc/gcov.texi: Document new option --use-hotness-colors.
2704 * gcov.c (struct source_info): Declare new field.
2705 (source_info::source_info): Set default for maximum_count.
2706 (print_usage): Add new -q option.
2707 (process_args): Process it.
2708 (accumulate_line_info): Save src->maximum_count.
2709 (output_line_beginning): Make color line number if
2710 flag_use_hotness_colors is set.
2711 (output_line_details): Pass default argument value.
2712 (output_lines): Pass src->maximum_count.
2714 2018-09-17 Martin Liska <mliska@suse.cz>
2716 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2717 Use processor_names table.
2718 * config/i386/i386.c (ix86_default_align): Use
2719 processor_cost_table for alignment values.
2720 (ix86_option_override_internal): Use processor_names.
2721 (ix86_function_specific_print): Likewise.
2722 * config/i386/i386.h (struct processor_costs):
2723 Add alignment values.
2724 (struct ptt): Remove and replace with const char *.
2725 * config/i386/x86-tune-costs.h (struct processor_costs):
2726 Declare default alignments for all costs.
2728 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2730 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2731 symbolics or VR_VARYING ranges for ABS_EXPR.
2732 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2733 when range will wrap.
2735 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2738 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2739 before and after a JUMP_TABLE_DATA.
2741 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2744 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2745 when one operand is a function pointer. Use POINTER_TYPE_P and
2746 FUNC_OR_METHOD_TYPE_P.
2747 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2748 * fold-const.c (build_range_check): Likewise.
2749 * match.pd (simple_comparison): Likewise.
2751 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2754 * spellcheck.c (get_edit_distance_cutoff): New function.
2755 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2756 (selftest::test_get_edit_distance_one_way): ...this.
2757 (selftest::test_get_edit_distance_unit): Rename to...
2758 (selftest::test_get_edit_distance_both_ways): ...this.
2759 (selftest::test_edit_distances): Move tests to this new function,
2760 and test some more pairs of strings. Update for above renaming.
2761 (selftest::get_old_cutoff): New function.
2762 (selftest::test_get_edit_distance_cutoff): New function.
2763 (selftest::assert_suggested_for): New function.
2764 (ASSERT_SUGGESTED_FOR): New macro.
2765 (selftest::assert_not_suggested_for): New function.
2766 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2767 (selftest::test_suggestions): New function.
2768 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2769 tests to selftest::test_edit_distances and call it. Add calls to
2770 selftest::test_get_edit_distance_cutoff and
2771 selftest::test_suggestions.
2772 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2773 (best_match::consider): Replace hard-coded cutoff calculation with
2775 (best_match::get_cutoff): New declaration.
2776 (best_match::get_best_meaningful_candidate): Likewise.
2778 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2780 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2782 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2785 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2787 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2788 terminated string literal.
2790 2018-09-14 Martin Sebor <msebor@redhat.com>
2792 * builtins.c (unterminated_array): Handle ARRAY_REF.
2793 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2794 * builtins.h (unterminated_array): Declare extern.
2795 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2797 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2800 2018-09-14 Martin Sebor <msebor@redhat.com>
2801 Jeff Law <law@redhat.com>
2803 * builtins.c (unterminated_array): New.
2804 (expand_builtin_strcpy): Adjust.
2805 (expand_builtin_strcpy_args): Detect unterminated arrays.
2806 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2807 unterminated arrays.
2808 * gimple-fold.h (get_maxval_strlen): Add argument.
2809 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2811 * gimple-fold.c (get_range_strlen): Add argument.
2812 (get_maxval_strlen): Adjust.
2813 * gimple-fold.h (get_range_strlen): Add argument.
2815 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2817 * config/i386/movdirintrin.h: Fix copyright year.
2819 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2821 * reg-stack.c: Include regs.h.
2822 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2823 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2824 FIRST_STACK_REG, not DFmode.
2825 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2826 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2827 (change stack): Default register mode to the reg_raw_mode of
2828 FIRST_STACK_REG, not DFmode.
2829 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2830 (*swapxf): Rename from swapxf.
2832 2018-09-14 Carl Love <cel@us.ibm.com>
2834 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2835 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2837 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2840 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2843 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2846 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2848 2018-09-14 Jason Merrill <jason@redhat.com>
2850 Fix --enable-gather-detailed-mem-stats.
2851 * hash-table.c (hash_table_usage): Change from variable to function.
2852 * hash-table.h: Adjust.
2853 * Makefile.in: Add missing dependencies on hash-table.h.
2855 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2857 PR tree-optimization/87259
2859 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2860 execute_cse_reciprocals_1 has tried transforming.
2862 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2864 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2865 VR_VARYING for PLUS/MINUS_EXPR.
2867 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2869 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2872 2018-09-14 Richard Biener <rguenther@suse.de>
2875 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2876 bits for the merged partition.
2878 2018-09-13 Martin Sebor <msebor@redhat.com>
2879 Bernd Edlinger <bernd.edlinger@hotmail.de>
2881 * builtins.h (c_srlen): Add argument.
2882 * builtins.c (warn_string_no_nul): New function.
2883 (c_strlen): Add argument and use it. Update recursive calls.
2884 Pass DECL argument to string_constant to get info on non
2885 terminated strings. Update *NONSTR as needed.
2886 (fold_builtin_strlen): Add argument to calls to c_strlen.
2887 Warn for unterminated arrays.
2888 (warn_string_no_null): Add prototype.
2889 * expr.c (string_constant): Update arguments. Update recursive
2890 calls appropriately. Detect missing NUL terminator and outermost
2891 declaration its missing in.
2892 Improve checks for arrays with nonzero lower bound or elements
2893 that are not a single byte. Simplify offset computation.
2894 Simplify checks for non-NUL terminated strings.
2895 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2896 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2898 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2900 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2902 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2903 argument. Fix range checks.
2904 * fold-const.h (c_getstr): Adjust protoype.
2905 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2906 string is constant but contains no NUL byte.
2908 * expr.c (string_constant): Adjust function comment.
2909 Remove bogus check for zero termination.
2911 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2913 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2914 (get_constant_size): Don't make STRING_CSTs larger than they are.
2915 (check_string_literal): New check function for STRING_CSTs.
2916 (output_constant): Use it.
2918 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2921 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2923 2018-09-13 Richard Biener <rguenther@suse.de>
2925 PR tree-optimization/87263
2926 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2927 (struct unwind_state): Add max_rpo field.
2928 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2929 Compute max_rpo, the max RPO number a block can be backwards reached
2930 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2931 separating it from the iterating mode.
2933 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2935 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2936 (rfs_decision): New scheduling decision.
2938 2018-09-13 Richard Biener <rguenther@suse.de>
2941 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2942 (vn_nary_op_insert_pieces_predicated): Do not write useless
2943 valid_dominated_by_p entry outside of the allocated storage.
2945 2018-09-13 Omar Sandoval <osandov@osandov.com>
2946 Tom de Vries <tdevries@suse.de>
2949 * dwarf2out.c (is_c): New function.
2950 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2952 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2955 * config/aarch64/aarch64.md (*aarch64_bfxil):
2957 * config/aarch64/constraints.md (Ulc): Define.
2958 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2960 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2963 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2965 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2966 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2967 aarch64_layout_frame call.
2968 (aarch64_expand_epilogue): Likewise.
2969 (aarch64_initial_elimination_offset): Likewise.
2970 (aarch64_get_separate_components): Likewise.
2971 (aarch64_use_return_insn_p): Likewise.
2972 (aarch64_layout_frame): Remove unneeded check.
2974 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2976 * configure.ac: Only append
2977 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2978 gcc_config_arguments if it was never reconfigured or last reconfigure
2979 was with different arguments.
2980 * configure: Regenerated.
2982 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2983 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2986 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2987 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2989 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2991 PR tree-optimization/87287
2992 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2993 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2994 * match.pd (X % C == 0): ... here. New optimization.
2996 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2999 * expr.h (maybe_optimize_mod_cmp): Declare.
3000 * expr.c (mod_inv): New function.
3001 (maybe_optimize_mod_cmp): New function.
3002 (do_store_flag): Use it.
3003 * cfgexpand.c (expand_gimple_cond): Likewise.
3005 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
3006 Julian Brown <julian@codesourcery.com>
3009 * gimplify.c (gimplify_scan_omp_clauses): Set
3010 target_firstprivatize_array_bases in OpenACC parallel and kernels
3011 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
3012 OpenACC data regions.
3014 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
3016 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
3017 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
3019 2018-09-12 Richard Biener <rguenther@suse.de>
3021 PR tree-optimization/87280
3022 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
3023 edge but unreachable target.
3024 (do_rpo_vn): For conservatively handling a PHI only mark
3025 the backedge executable but not the block reachable.
3027 2018-09-12 Richard Biener <rguenther@suse.de>
3029 PR tree-optimization/87266
3030 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
3033 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
3035 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3037 ("trunc<BFP:mode><DFP_ALL:mode>2")
3038 ("trunc<DFP_ALL:mode><BFP:mode>2")
3039 ("extend<BFP:mode><DFP_ALL:mode>2")
3040 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3041 according to the target operand type.
3043 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3044 Andreas Krebbel <krebbel@linux.ibm.com>
3046 PR tree-optimization/86844
3047 * gimple-ssa-store-merging.c
3048 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
3049 there are any overlapping stores in between them, make sure they are
3050 also coalesced or we give up completely.
3052 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3055 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3056 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
3058 2018-09-12 Tom de Vries <tdevries@suse.de>
3060 * common.opt (gdescribe-dies): Add option.
3061 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
3062 attribute for artifical and nameless decls.
3063 (dwarf2out_register_external_die): Add description attribute to
3064 external reference die.
3065 (add_desc_attribute): New functions.
3066 (gen_subprogram_die): Add description attribute to
3067 DW_TAG_call_site_parameter.
3068 * tree-pretty-print.c (print_generic_expr_to_str): New function.
3069 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
3070 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
3072 (@item -gdescribe-dies): Add.
3074 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
3076 * tree-vrp.c (vrp_shift_undefined_p): Remove.
3077 (extract_range_from_binary_expr_1: Call
3078 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
3079 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3082 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
3084 * gimple-ssa-warn-alloca.c
3085 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3086 field for ALLOCA_BOUND_*_LARGE.
3088 2018-09-11 Nathan Sidwell <nathan@acm.org>
3090 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3092 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3094 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3095 for clobbers. Remove obsolete comment.
3097 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3099 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3100 mpxchk, mpxld and mpxst types.
3101 (define_attr length_immediate): Remove all processing of mpx types.
3102 (define_attr prefix_0f): Ditto.
3103 (define_attr memory): Ditto.
3105 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
3107 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3108 (log<mode>2): Change operand 1 predicate to general_operand.
3109 Extend operand 1 to XFmode and generate logxf3 insn.
3110 (log10<mode>2): Change operand 1 predicate to general_operand.
3111 Extend operand 1 to XFmode and generate log10xf3 insn.
3112 (log2<mode>2): Change operand 1 predicate to general_operand.
3113 Extend operand 1 to XFmode and generate log2xf3 insn.
3114 (fyl2xp1_extend<mode>xf3_i387): Remove.
3115 (log1p<mode>2): Change operand 1 predicate to general_operand.
3116 Extend operand 1 to XFmode and generate log1pxf3 insn.
3117 (fxtract_extend<mode>xf3_i387): Remove.
3118 (logb<mode>2): Change operand 1 predicate to general_operand.
3119 Extend operand 1 to XFmode and generate logbxf3 insn.
3120 (ilogb<mode>2): Change operand 1 predicate to general_operand.
3121 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3122 (significand<mode>2): Change operand 1 predicate to general_operand.
3123 Extend operand 1 to XFmode and generate significandxf3 insn.
3125 2018-09-11 Nathan Sidwell <nathan@acm.org>
3127 * gcc.c (perror_with_name, pfatal_with_name): Delete.
3128 (load_specs): Use fatal_error.
3129 (DELETE_IF_ORDINARY, process_command): Use error.
3130 (execute, run_attempt): Use fatal_error.
3132 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
3134 * diagnostic-core.h (sorry_at): New prototype.
3135 * diagnostic.c (sorry_at): New function.
3137 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
3139 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3140 by zero as VR_UNDEFINED.
3142 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
3144 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3145 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3146 (<sincos>mode2): New expander.
3147 (sincos_extend<mode>xf3_i387): Remove insn pattern.
3148 (sincos -> sin, cos splitters): Remove splitter patterns.
3149 (sincos<mode>3): Change operand 2 predicate to general_operand.
3150 Extend operand 2 to XFmode and generate sincosxf3 insn.
3151 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3152 Change operand 3 predicate to const1_operand.
3153 (fptan_extend<mode>xf4_i387): Remove insn pattern.
3154 (tanxf2): Update operands in the call to fptanxf4_i387.
3155 (tan<mode>2): Change operand 1 predicate to general_operand.
3156 Extend operand 1 to XFmode and generate tanxf3 insn.
3157 (atan2xf3): Rename from *fpatanxf3_i387.
3158 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3159 (atan2xf3): Remove expander.
3160 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
3161 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3162 (atan<mode>2): Change operand 1 predicate to general_operand.
3163 Extend operand 1 to XFmode and generate atanxf3 insn.
3165 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
3167 * config/i386/i386.md (x87/SSE constant load splitter): Use
3168 memory_operand instead of nonimmediate_operand for input operand
3171 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
3173 * config/i386/i386.md (float partial SSE register stall splitter): Move
3174 splitter near its instruction pattern.
3175 (float_extend partial SSE register stall splitter): Ditto.
3176 (float_truncate partial SSE register stall splitter): Ditto.
3178 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
3181 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3182 to speculation_safe_value_not_needed.
3185 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3186 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3187 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3188 leaf_function_p, instead use has_hard_reg_initial_val.
3190 2018-09-09 Nathan Sidwell <nathan@acm.org>
3192 * gcc.h (pfatal_with_name): Don't declare here.
3193 * gcc.c (pfatal_with_name): Make static.
3195 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
3197 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3200 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
3202 PR rtl-optimization/85458
3203 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3204 priority hook to reduce the priority of EXPR.
3206 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
3208 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3209 DImode for x87 on 32bit targets. Conditionally disable x87 modes
3210 with X87_ENABLE_FLOAT. Remove preparation code.
3211 (*float<SWI48:mode><MODEF:mode>2): Rename from
3212 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
3213 math using "enabled" attribute.
3214 (*floatdi<MODEF:mode>2_i387): Rename from
3215 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
3216 enable for 32bit targets only.
3217 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3219 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3220 as operand 1 predicate. Rewrite as define_insn_and_split.
3221 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3223 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
3225 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3226 to fallthru to FLOAT case.
3228 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3231 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3232 around folding of vec_sl to handle out of range shift values.
3234 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
3236 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3237 Update callers to gen_fix_trunc<mode>_i387_fisttp
3238 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3239 nonimmediate_operand.
3240 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3241 and corresponding splitters.
3242 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3243 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3244 (fix_truncdi_i387_with_temp): Remove insn pattern
3245 and corresponding splitters.
3246 (fix_trunc<mode>_i387): Change operand 0 predicate to
3247 nonimmediate_operand.
3248 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3249 and corresponding splitters.
3250 (*fistdi2_1): Remove.
3252 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3253 (lrintxfdi2): Remove expander. Reimplement as define_insn.
3254 (*fist<mode>2_1): Remove.
3255 (fist<mode>2): Ditto.
3256 (fist<mode>2_with_temp): Remove insn pattern and corresponding
3258 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
3259 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3260 (fistdi2_<rounding>): Change operand 0 predicate to
3261 nonimmediate_operand.
3262 (fistdi2_<rounding>_with_temp): Remove insn pattern
3263 and corresponding splitters.
3264 (fist<mode>2_<rounding>): Change operand 0 predicate to
3265 nonimmediate_operand.
3266 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3267 and corresponding splitters.
3269 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3271 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3273 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3276 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3278 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3279 early gimple folding of vec_splat().
3280 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3281 * gimple-fold.h: Add an extern define for tree_vec_extract().
3283 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3285 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3286 wrappers around TREE_TYPE comparisons.
3288 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3291 * config/s390/predicates.md: Add nonsym_memory_operand.
3292 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3293 contains a SYMBOL_REF, load it into an intermediate pseudo.
3294 (s390_emit_compare_and_swap): Legitimize operand.
3295 * config/s390/s390.md: Use the new nonsym_memory_operand
3296 with UNSPECV_CAS patterns.
3298 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3301 * config/s390/s390-passes.def: New file.
3302 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3304 (make_pass_s390_early_mach): Add declaration.
3305 * config/s390/s390.c (make_pass_s390_early_mach):
3306 (s390_option_override): Remove dynamic registration.
3307 * config/s390/t-s390: Add s390-passes.def.
3309 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3311 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3312 Remove UNSPEC_LTREL_BASE check.
3313 (annotate_constant_pool_refs): Likewise.
3314 (find_constant_pool_ref): Likewise.
3315 (find_ltrel_base): Removed.
3316 (replace_ltrel_base): Removed.
3317 (s390_mainpool_finish): Remove replace_ltrel_base call.
3318 (s390_chunkify_start): Remove pending LTREL_BASE logic.
3319 (s390_chunkify_finish): Remove replace_ltrel_base call.
3320 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3322 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
3325 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3326 to speculation_safe_value_not_needed.
3328 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
3329 Bernd Schmidt <bernds_cb1@t-online.de>
3331 * config/nvptx/nvptx-opts.h: New file.
3332 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3333 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3335 (TARGET_SM35): New macro.
3336 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3338 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3340 (misa=): New option.
3341 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3343 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
3345 * config/i386/i386.md (truncdfsf2): Remove expander.
3346 (truncdfsf2_with_temp): Ditto.
3347 (truncxf<mode>2): Ditto.
3348 (*truncdfsf_fast_mixed): Remove insn pattern.
3349 (*truncdfsf_fast_i387): Ditto.
3350 (*truncdfsf_mixed): Ditto.
3351 (*truncdfsf_i387): Ditto.
3352 (*truncdfsf2_i387_1): Ditto.
3353 (*truncxfsf2_mixed): Ditto.
3354 (*truncxfdf2_mixed): Ditto.
3355 (*truncxf<mode>2_i387_noop): Ditto. Update callers
3356 to call gen_truncxf<mode>2 instead.
3357 (*truncxf<mode>2_i387): Remove.
3358 (reg->reg splitters): Remove splitter pattern.
3359 (reg->mem splitters): Ditto.
3361 (truncdfsf2): New insn pattern.
3362 (truncxf<mode>2): Ditto.
3364 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3366 * tree-ssa-math-opts.c (is_mult_by): New function.
3367 (is_square_of): Use the above.
3368 (optimize_recip_sqrt): New function.
3369 (pass_cse_reciprocals::execute): Use the above.
3371 2018-09-05 Richard Biener <rguenther@suse.de>
3374 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3375 to zero-init the emplaced vec.
3377 2018-09-05 Martin Liska <mliska@suse.cz>
3379 PR tree-optimization/87205
3380 * tree-switch-conversion.c (pass_lower_switch::execute):
3381 Group cases for switch statements.
3383 2018-09-05 Richard Biener <rguenther@suse.de>
3385 PR tree-optimization/87217
3386 * tree-ssa-sccvn.c (vuse_valueize): New.
3387 (vn_reference_lookup_pieces): Use it.
3388 (vn_reference_lookup): Likewise.
3390 2018-09-05 Nathan Sidwell <nathan@acm.org>
3393 * stor-layout.c (place_field): Scan forwards to check last
3394 bitfield when ms_bitfield_placement is in effect.
3396 2018-09-05 Richard Biener <rguenther@suse.de>
3399 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3402 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
3403 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3405 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3406 * config.gcc (extra_objs): Build it.
3407 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3409 * config/aarch64/aarch64-passes.def
3410 (pass_tag_collision_avoidance): New pass.
3411 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3412 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3413 (aarch64_classify_address): Remove static qualifier.
3414 (aarch64_address_info, aarch64_address_type): Move to...
3415 * config/aarch64/aarch64-protos.h: ... here.
3416 (make_pass_tag_collision_avoidance): New function.
3417 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3420 2018-09-05 Martin Liska <mliska@suse.cz>
3422 * doc/gcov.texi: Update documentation of humar
3424 * gcov.c (format_count): Print one decimal place, it provides
3425 more fine number of situations like '1G' vs. '1.4G'.
3427 2018-09-05 Martin Liska <mliska@suse.cz>
3430 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3431 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3432 to generate a MASK value.
3434 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3437 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3438 if frame pointer isn't used.
3439 (compute_frame_pointer_to_fb_displacement): Likewise.
3441 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3444 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3445 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3446 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3447 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3448 and OPTION_MASK_ISA_XSAVEC_UNSET.
3450 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3452 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3453 XOR operations in NAND case.
3455 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3457 * wide-int-range.cc (wide_int_range_convert): New.
3458 * wide-int-range.h (wide_int_range_convert): New.
3459 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3460 code into wide_int_range_convert.
3461 (extract_range_into_wide_ints): Do not munge anti range constants
3462 into the entire domain. Just return the range back.
3464 2018-09-04 Martin Liska <mliska@suse.cz>
3466 * genmatch.c (output_line_directive): Add new argument
3468 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3470 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3472 * doc/invoke.texi (Option Summary): Add whitespace.
3474 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3476 2018-09-04 Richard Biener <rguenther@suse.de>
3478 PR tree-optimization/87211
3479 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3480 backedge value we're supposed to treat as VARYING also number
3481 the PHI to VARYING in case it got a different value-number already.
3483 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3485 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3486 (extract_range_from_binary_expr_1): Do not call
3487 vrp_can_optimize_bit_op.
3488 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3490 (wide_int_range_get_mask_and_bounds): New.
3491 (wide_int_range_optimize_bit_op): New.
3492 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3493 (wide_int_range_bit_and): Same.
3494 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3495 (wide_int_range_optimize_bit_op): New.
3496 (wide_int_range_get_mask_and_bounds): New.
3498 2018-09-04 Richard Biener <rguenther@suse.de>
3500 PR tree-optimization/87176
3501 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3502 variable. When value-numbering a virtual PHI node make sure
3503 to not value-number to the backedge value.
3505 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3507 * doc/extend.texi (Long Long, Hex Floats): Document support for
3508 long long and hex floats in more recent versions of ISO C++.
3510 2018-09-03 Richard Biener <rguenther@suse.de>
3512 PR tree-optimization/87177
3513 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3516 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3518 * bb-reorder.c (edge_order): Convert to C-qsort-style
3519 tri-state comparator.
3520 (reorder_basic_blocks_simple): Change std::stable_sort to
3523 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3525 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3526 tri-state comparator.
3527 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3529 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3531 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
3532 (mergesort): ... here as maximum count for using netsort.
3533 (gcc_qsort): Set nlim to 3 if stable sort is requested.
3534 (gcc_stablesort): New.
3535 * system.h (gcc_stablesort): Declare.
3537 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3539 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3540 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
3541 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
3543 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
3545 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3546 lxsdx and stxsdx alternatives.
3547 (*mov<mode>_hardfloat64): Ditto.
3548 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3550 2018-09-03 Richard Biener <rguenther@suse.de>
3552 PR tree-optimization/87200
3553 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3556 2018-09-03 Martin Liska <mliska@suse.cz>
3558 PR tree-optimization/87201
3559 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3560 Fix parenthesis in an expression.
3562 2018-09-03 Richard Biener <rguenther@suse.de>
3564 PR tree-optimization/87197
3565 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3566 visited. CSE the VN_INFO hashtable lookup.
3568 PR tree-optimization/87169
3569 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3570 iterating make sure there's no extra backedges from irreducible
3571 regions feeding the header. Mark the destination block
3574 2018-09-03 Martin Liska <mliska@suse.cz>
3577 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3578 * common/common-targhooks.c (default_get_valid_option_values):
3580 * common/common-targhooks.h (default_get_valid_option_values):
3582 * common/config/i386/i386-common.c: Move processor_target_table
3584 (ix86_get_valid_option_values): New function.
3585 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3586 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3587 (PTA_*): Move all defined masks into i386-common.c.
3588 (ix86_function_specific_restore): Use new processor_cost_table.
3589 * config/i386/i386.h (struct ptt): Moved from i386.c.
3590 (struct pta): Likewise.
3591 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3592 * doc/tm.texi.in: Likewise.
3593 * opt-suggestions.c (option_proposer::suggest_option):
3594 Pass prefix to build_option_suggestions.
3595 (option_proposer::get_completions): Likewise.
3596 (option_proposer::build_option_suggestions): Use the new target
3598 * opts.c (struct option_help_tuple): New struct.
3599 (print_filtered_help): Use the new target hook.
3601 2018-09-03 Martin Liska <mliska@suse.cz>
3604 * predict.c (set_even_probabilities): Add likely_edges
3605 argument and handle cases where we have precisely one
3607 (combine_predictions_for_bb): Catch also likely_edges.
3608 (tree_predict_by_opcode): Handle gswitch statements.
3609 * tree-cfg.h (find_case_label_for_value): New declaration.
3610 (find_taken_edge_switch_expr): Likewise.
3611 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3612 Find pivot in decision tree based on probabily, not by number of
3615 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3617 * doc/standards.texi (Standards): Update Objective-C reference.
3619 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3621 * doc/install.texi (Prerequisites): Update link for MPC.
3623 2018-09-01 Michael Matz <matz@suse.de>
3625 PR tree-optimization/87074
3626 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3627 PHIs for outer-loop uses.
3629 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3631 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3632 * doc/invoke.texi (C Dialect Options): Ditto.
3634 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3636 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3638 2018-08-31 Richard Biener <rguenther@suse.de>
3640 PR tree-optimization/87168
3641 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3642 (rpo_elim::eliminate_avail): When OP was not visited it must
3645 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3647 * tree-vrp.c (copy_value_range): Convert param "from" from
3648 "value_range *" to "const value_range *".
3649 (range_is_null): Likewise for param "vr".
3650 (range_int_cst_p): Likewise.
3651 (range_int_cst_singleton_p): Likewise.
3652 (symbolic_range_p): Likewise.
3653 (value_ranges_intersect_p): Likewise for both params.
3654 (value_range_nonnegative_p): Likewise for param "vr".
3655 (value_range_constant_singleton): Likewise.
3656 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3657 (extract_range_into_wide_ints): Likewise for param "vr".
3658 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3660 (vrp_can_optimize_bit_op): Likewise.
3661 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3663 (extract_range_from_unary_expr): Likewise.
3664 (debug_value_range): Likewise for param "vr".
3665 (value_range::dump): Add "const" qualifier.
3666 (vrp_prop::check_array_ref): Convert local "vr" from
3667 "value_range *" to "const value_range *".
3668 (vrp_prop::check_mem_ref): Likewise.
3669 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3670 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3671 (vrp_intersect_ranges): Likewise.
3672 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3673 (vrp_prop::vrp_finalize): Likewise.
3674 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3675 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3676 (extract_range_from_unary_expr): Likewise.
3677 (value_range_constant_singleton): Likewise.
3678 (symbolic_range_p): Likewise.
3679 (copy_value_range): Likewise.
3680 (extract_range_from_binary_expr_1): Likewise.
3681 (range_int_cst_p): Likewise.
3682 (vrp_set_zero_nonzero_bits): Likewise.
3683 (range_int_cst_singleton_p): Likewise.
3685 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3687 * config/aarch64/arm_neon.h (vabsd_s64): New.
3688 (vnegd_s64): Likewise.
3690 2018-08-31 Martin Jambor <mjambor@suse.cz>
3692 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3694 2018-08-31 Martin Liska <mliska@suse.cz>
3696 * ipa-icf.c (sem_item::add_type): Use
3697 sem_item::m_type_hash_cache.
3698 * ipa-icf.h: Move the cache from sem_item_optimizer
3701 2018-08-31 Nathan Sidwell <nathan@acm.org>
3703 * doc/extend.texi (Backwards Compatibility): Remove implicit
3704 extern C leeway of () being (...).
3706 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3708 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3710 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3714 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3716 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3719 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3720 gen_int_mode. Formatting fixes.
3722 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3724 * target.def (custom_function_descriptors): Improve documentation.
3725 * doc/tm.texi.in (Trampolines): Expand discussion of function
3726 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3727 beginning of the section.
3728 * doc/tm.texi: Regenerated.
3730 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3732 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3733 base class in the initializer list. This is a workaround for
3734 building with older GCC.
3735 (class auto_bb_flag): Likewise.
3737 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3739 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3740 (altivec_vcmpequ<VI_char>_p): Remove star.
3741 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3743 (expand_strncmp_vec_sequence): New function.
3744 (emit_final_str_compare_vec): New function.
3745 (expand_strn_compare): Add support for vector strncmp.
3746 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3747 length specification to bytes.
3748 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3749 (vcmpnezb_p): New pattern.
3750 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3751 for option -mstring-compare-inline-limit.
3753 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3755 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3756 (PTA_SKYLAKE): Add PTA_AES.
3757 (PTA_GOLDMONT): Likewise.
3759 2018-08-29 Jan Hubicka <jh@suse.cz>
3762 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3763 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3765 2018-08-29 Jan Hubicka <jh@suse.cz>
3767 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3769 (hash_tree): Do not visit TYPE_STUB_DECL.
3770 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3771 stream TYPE_STUB_DECL.
3772 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3773 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3774 after free_lang_data.
3775 (type_in_anonymous_namespace_p): Likewise.
3777 2018-08-29 Jan Hubicka <jh@suse.cz>
3779 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3780 comment that it has to be even number.
3781 (class sreal): Change m_sig type to int32_t.
3782 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3783 int64_t for temporary calculations.
3784 (sreal_verify_basics): Drop one bit from minimum and maximum.
3786 2018-08-30 Richard Biener <rguenther@suse.de>
3788 PR tree-optimization/87147
3789 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3790 (visit_phi): When the degenerate result is from the backedge and
3791 we didn't visit its definition yet drop to VARYING.
3792 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3794 2018-08-29 Jan Hubicka <jh@suse.cz>
3796 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3798 (hash_tree): Likewise.
3800 2018-08-29 Jan Hubicka <jh@suse.cz>
3802 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3803 and TYPE_NEXT_REF_TO.
3805 2018-08-29 Jan Hubicka <jh@suse.cz>
3807 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3808 comment that it has to be even number.
3809 (class sreal): Change m_sig type to int32_t.
3810 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3811 int64_t for temporary calculations.
3812 (sreal_verify_basics): Drop one bit from minimum and maximum.
3814 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3816 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3818 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3821 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3822 if to_add is negative.
3824 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3827 * builtins.c (c_strlen): Improve range checks.
3829 2018-08-29 Martin Sebor <msebor@redhat.com>
3830 Jeff Law <law@redhat.com>
3832 PR tree-optimization/86714
3833 PR tree-optimization/86711
3834 * builtins.c (c_strlen): Add arguments to call to string_constant.
3835 * expr.c (string_constant): Add argument. Detect missing nul
3836 terminator and outermost declaration it's missing in.
3837 * expr.h (string_constant): Add argument.
3838 * fold-const.c (read_from_constant_string): Add arguments to call to
3840 (c_getstr): Likewise.
3841 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3843 * tree-ssa-strlen.c (get_stridx): Likewise.
3845 2018-08-29 Jan Hubicka <jh@suse.cz>
3847 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3848 Do not stream DECL_VINDEX.
3849 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3850 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3851 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3853 2018-08-29 Richard Biener <rguenther@suse.de>
3855 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3856 virtual operands that are not default defs to honor region
3858 (rpo_vn_valueize): Remove ineffective code here.
3860 2018-08-29 Richard Biener <rguenther@suse.de>
3862 PR tree-optimization/87132
3863 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3864 when skipping defs reachable over backedges.
3866 2018-08-29 Richard Biener <rguenther@suse.de>
3868 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3869 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3870 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3871 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3872 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3873 (vn_reference_lookup_3): Remove use of const_parms.
3874 (free_rpo_vn): Do not free const_parms.
3875 (do_rpo_vn): Do not call init_const_parms.
3876 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3877 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3878 (call_may_clobber_ref_p_1): Likewise.
3880 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3883 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3885 (-ftree-scev-cprop): Document.
3887 2018-08-29 Jan Hubicka <jh@suse.cz>
3889 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3891 (sreal constructor): Update.
3892 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3893 sreal:operator/): Update.
3895 2018-08-29 Martin Liska <mliska@suse.cz>
3897 * tree-switch-conversion.c (switch_conversion::expand):
3898 Strenghten assumption about gswitch statements.
3900 2018-08-29 Richard Biener <rguenther@suse.de>
3902 PR tree-optimization/87117
3903 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3904 re-value-number released SSA VDEFs.
3906 2018-08-29 Richard Biener <rguenther@suse.de>
3908 PR tree-optimization/87126
3909 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3911 2018-08-28 Jim Wilson <jimw@sifive.com>
3913 * config/riscv/pic.md: Rewrite.
3914 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3916 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3917 (SOFTF, default_load, softload, softstore): New.
3919 2018-08-28 Jeff Law <law@redhat.com>
3921 * fold-const.c (fold_binary_loc): Remove recently added assert.
3923 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3925 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3926 to OP parmeter of generated function.
3928 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3930 PR tree-optimization/87009
3931 * match.pd: Add boolean optimizations.
3933 2018-08-28 Martin Sebor <msebor@redhat.com>
3936 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3937 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3938 (pass_walloca::gate): Use it.
3939 (alloca_call_type): Same.
3940 (pass_walloca::execute): Same.
3941 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3943 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3945 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3946 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3949 2018-08-28 Richard Biener <rguenther@suse.de>
3951 PR tree-optimization/87124
3952 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3953 constants before looking up avail.
3955 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3958 * calls.c (maybe_warn_nonstring_arg): Punt early if
3959 warn_stringop_overflow is zero. Don't call get_range_strlen
3960 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3961 Swap comparison operands to have constants on rhs. Only use
3962 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3963 increment lenrng[0].
3965 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3967 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3968 use of tree_to_shwi. Remove duplicated test for the size being
3969 a whole number of bytes.
3971 2018-08-28 Richard Biener <rguenther@suse.de>
3973 PR tree-optimization/87117
3974 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3975 Handle removed stmt without LHS (GIMPLE_NOP).
3977 2018-08-28 Richard Biener <rguenther@suse.de>
3979 PR tree-optimization/87117
3980 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3981 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3983 2018-08-28 Richard Biener <rguenther@suse.de>
3985 PR tree-optimization/87117
3986 * tree-ssa-pre.c (compute_avail): Do not make expressions
3987 with predicated values available.
3988 (get_expr_value_id): Assert we do not run into predicated value
3991 2018-08-28 Richard Biener <rguenther@suse.de>
3993 PR tree-optimization/87117
3994 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3995 get virtual operands.
3996 (get_expr_operands): Handle STRING_CST like other decls.
3998 2018-08-28 Martin Liska <mliska@suse.cz>
4000 * tree.h: Update documentation of fndecl_built_in_p
4004 2018-08-27 Jeff Law <law@redhat.com>
4005 PR tree-optimization/87110
4006 * tree-ssa-dse.c (compute_trims): Handle non-constant
4009 2018-08-27 Martin Sebor <msebor@redhat.com>
4011 PR tree-optimization/86914
4012 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
4014 2018-08-27 Martin Sebor <msebor@redhat.com>
4016 PR tree-optimization/87112
4017 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
4018 the type of the bound argument.
4020 2018-08-27 Jeff Law <law@redhat.com>
4022 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
4023 type does not have a TYPE_SIZE_UNIT.
4025 2018-08-27 Steve Ellcey <sellcey@cavium.com>
4027 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
4028 with include of backend.h.
4030 2018-08-27 Richard Biener <rguenther@suse.de>
4032 PR tree-optimization/86927
4033 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
4034 use const cond reduction code.
4036 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
4038 PR tree-optimization/85758
4039 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
4041 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4044 * diagnostic-show-locus.c (class layout_range): Update for
4045 conversion of show_caret_p to a tri-state.
4046 (layout_range::layout_range): Likewise.
4047 (make_range): Likewise.
4048 (layout::maybe_add_location_range): Likewise.
4049 (layout::should_print_annotation_line_p): Don't show annotation
4050 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
4051 (layout::get_state_at_point): Update for conversion of
4052 show_caret_p to a tri-state. Bail out early for
4053 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
4054 underlining or source colorization.
4055 (gcc_rich_location::add_location_if_nearby): Update for conversion
4056 of show_caret_p to a tri-state.
4057 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
4058 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
4060 (selftest::test_one_liner_labels): Likewise.
4061 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
4062 conversion of show_caret_p to a tri-state.
4063 * pretty-print.c (text_info::set_location): Likewise.
4064 * pretty-print.h (text_info::set_location): Likewise.
4065 * substring-locations.c (format_warning_n_va): Likewise.
4066 * tree-diagnostic.c (default_tree_printer): Likewise.
4067 * tree-pretty-print.c (newline_and_indent): Likewise.
4069 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4072 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
4073 line above for line-insertion fix-it hints.
4074 (selftest::test_fixit_insert_containing_newline): Update the
4075 expected results, and add a test with line-numbering enabled.
4077 2018-08-27 Martin Liska <mliska@suse.cz>
4080 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4081 params with DECL_HAS_VALUE_EXPR_P.
4083 2018-08-27 Martin Liska <mliska@suse.cz>
4085 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4086 selected expansion strategy.
4088 2018-08-27 Martin Liska <mliska@suse.cz>
4090 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4091 * builtins.c (is_builtin_fn): Likewise.
4092 * attribs.c (diag_attr_exclusions): Use new function
4093 fndecl_built_in_p and remove check for FUNCTION_DECL if
4095 (builtin_mathfn_code): Likewise.
4096 (fold_builtin_expect): Likewise.
4097 (fold_call_expr): Likewise.
4098 (fold_builtin_call_array): Likewise.
4099 (fold_call_stmt): Likewise.
4100 (set_builtin_user_assembler_name): Likewise.
4101 (is_simple_builtin): Likewise.
4102 * calls.c (gimple_alloca_call_p): Likewise.
4103 (maybe_warn_nonstring_arg): Likewise.
4104 * cfgexpand.c (expand_call_stmt): Likewise.
4105 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4106 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4107 (cgraph_node::verify_node): Likewise.
4108 * cgraphclones.c (build_function_decl_skip_args): Likewise.
4109 (cgraph_node::create_clone): Likewise.
4110 * config/arm/arm.c (arm_insert_attributes): Likewise.
4111 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4112 * dse.c (scan_insn): Likewise.
4113 * expr.c (expand_expr_real_1): Likewise.
4114 * fold-const.c (operand_equal_p): Likewise.
4115 (fold_binary_loc): Likewise.
4116 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4117 * gimple-low.c (lower_stmt): Likewise.
4118 * gimple-pretty-print.c (dump_gimple_call): Likewise.
4119 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4121 * gimple.c (gimple_build_call_from_tree): Likewise.
4122 (gimple_call_builtin_p): Likewise.
4123 (gimple_call_combined_fn): Likewise.
4124 * gimplify.c (gimplify_call_expr): Likewise.
4125 (gimple_boolify): Likewise.
4126 (gimplify_modify_expr): Likewise.
4127 (gimplify_addr_expr): Likewise.
4128 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4129 * ipa-cp.c (determine_versionability): Likewise.
4130 * ipa-fnsummary.c (compute_fn_summary): Likewise.
4131 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4132 * ipa-split.c (visit_bb): Likewise.
4133 (split_function): Likewise.
4134 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4135 * lto-cgraph.c (input_node): Likewise.
4136 * lto-streamer-out.c (write_symbol): Likewise.
4137 * omp-low.c (setjmp_or_longjmp_p): Likewise.
4138 (lower_omp_1): Likewise.
4139 * predict.c (strip_predict_hints): Likewise.
4140 * print-tree.c (print_node): Likewise.
4141 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4142 * trans-mem.c (is_tm_irrevocable): Likewise.
4143 (is_tm_load): Likewise.
4144 (is_tm_simple_load): Likewise.
4145 (is_tm_store): Likewise.
4146 (is_tm_simple_store): Likewise.
4147 (is_tm_abort): Likewise.
4148 (tm_region_init_1): Likewise.
4149 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4150 * tree-cfg.c (verify_gimple_call): Likewise.
4151 (move_stmt_r): Likewise.
4152 (stmt_can_terminate_bb_p): Likewise.
4153 * tree-eh.c (lower_eh_constructs_2): Likewise.
4154 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4155 * tree-inline.c (remap_gimple_stmt): Likewise.
4156 (copy_bb): Likewise.
4157 (estimate_num_insns): Likewise.
4158 (fold_marked_statements): Likewise.
4159 * tree-sra.c (scan_function): Likewise.
4160 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4161 (optimize_stack_restore): Likewise.
4162 (pass_fold_builtins::execute): Likewise.
4163 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4164 (mark_all_reaching_defs_necessary_1): Likewise.
4165 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4166 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4167 (pass_forwprop::execute): Likewise.
4168 * tree-ssa-loop-im.c (stmt_cost): Likewise.
4169 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4170 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4171 * tree-ssa-strlen.c (get_string_length): Likewise.
4172 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4173 (find_func_aliases_for_call): Likewise.
4174 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4175 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4176 * tree-tailcall.c (find_tail_calls): Likewise.
4177 * tree.c (need_assembler_name_p): Likewise.
4178 (free_lang_data_in_decl): Likewise.
4179 (get_call_combined_fn): Likewise.
4180 * ubsan.c (is_ubsan_builtin_p): Likewise.
4181 * varasm.c (incorporeal_function_p): Likewise.
4182 * tree.h (DECL_BUILT_IN): Remove and replace with
4184 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4185 (fndecl_built_in_p): New.
4187 2018-08-27 Martin Liska <mliska@suse.cz>
4189 PR tree-optimization/86847
4190 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4191 Dump also subtree probability.
4192 (switch_decision_tree::do_jump_if_equal): New function.
4193 (switch_decision_tree::emit_case_nodes): Handle special
4194 situations in balanced tree that can be emitted much simpler.
4195 Fix calculation of probabilities that happen in tree expansion.
4196 * tree-switch-conversion.h (struct cluster): Add
4198 (struct simple_cluster): Likewise.
4199 (struct case_tree_node): Add new function has_child.
4200 (do_jump_if_equal): New.
4202 2018-08-27 Martin Liska <mliska@suse.cz>
4204 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4205 Add new argument to bit_test_cluster constructor.
4206 (bit_test_cluster::emit): Set bits really number of values
4208 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4209 probability argument.
4210 * tree-switch-conversion.h (struct bit_test_cluster):
4211 Add m_handles_entire_switch.
4213 2018-08-27 Martin Liska <mliska@suse.cz>
4215 PR tree-optimization/86702
4216 * tree-switch-conversion.c (jump_table_cluster::emit):
4217 Make probabilities even for values in jump table
4218 according to number of cases handled.
4219 (switch_decision_tree::compute_cases_per_edge): Pass
4220 argument to reset_out_edges_aux function.
4221 (switch_decision_tree::analyze_switch_statement): Likewise.
4222 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4225 2018-08-27 Martin Liska <mliska@suse.cz>
4227 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4228 cfun argument explicitly.
4229 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4230 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4231 function gimple_switch_default_bb.
4232 (convert_switch_statements):
4234 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4235 * stmt.c (label_to_block_fn): Use label_to_block and pass
4236 cfun argument explicitly and use gimple_switch_label_bb.
4237 (expand_case): Likewise.
4238 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4239 cfun argument explicitly. Likewise.
4240 (make_edges_bb): Likewise.
4241 (make_cond_expr_edges): Likewise.
4242 (get_cases_for_edge): Likewise.
4243 (make_gimple_switch_edges): Likewise.
4244 (label_to_block_fn): Likewise.
4245 (label_to_block): Likewise.
4246 (make_goto_expr_edges): Likewise.
4247 (make_gimple_asm_edges): Likewise.
4248 (main_block_label): Likewise.
4249 (group_case_labels_stmt): Likewise.
4250 (find_taken_edge_computed_goto): Likewise.
4251 (find_taken_edge_switch_expr): Likewise.
4252 (gimple_verify_flow_info): Likewise.
4253 (gimple_redirect_edge_and_branch): Likewise.
4254 (gimple_switch_label_bb): New function.
4255 (gimple_switch_default_bb): Likewise.
4256 (gimple_switch_edge): Likewise.
4257 (gimple_switch_default_edge): Likewise.
4258 * tree-cfg.h (label_to_block_fn): Remove and replace ...
4259 (label_to_block): ... with this.
4260 (gimple_switch_label_bb): New.
4261 (gimple_switch_default_bb): Likewise.
4262 (gimple_switch_edge): Likewise.
4263 (gimple_switch_default_edge): Likewise.
4264 * tree-cfgcleanup.c (convert_single_case_switch): Use
4265 new gimple functions and pass new argument to label_to_block.
4266 (cleanup_control_flow_bb):
4267 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4268 cfun argument explicitly.
4269 (make_eh_edges): Likewise.
4270 (redirect_eh_dispatch_edge): Likewise.
4271 (lower_resx): Likewise.
4272 (lower_eh_dispatch): Likewise.
4273 (maybe_remove_unreachable_handlers): Likewise.
4274 (unsplit_eh): Likewise.
4275 (cleanup_empty_eh): Likewise.
4276 (verify_eh_edges): Likewise.
4277 (verify_eh_dispatch_edge): Likewise.
4278 * tree-ssa-dom.c (record_edge_info): Likewise.
4279 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4280 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4281 (thread_through_normal_block): Likewise.
4282 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4283 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4284 * tree-switch-conversion.c (switch_conversion::collect): Use new
4286 (switch_conversion::check_final_bb): Likewise.
4287 (switch_conversion::gather_default_values): Pass new argument
4289 (switch_conversion::build_constructors): Likewise.
4290 (switch_decision_tree::compute_cases_per_edge): Use new
4291 gimple_switch_edge function.
4292 (switch_decision_tree::analyze_switch_statement): Pass new argument
4294 (switch_decision_tree::try_switch_expansion): Use
4295 gimple_switch_default_edge.
4296 * tree-vrp.c (find_switch_asserts): Pass new argument
4298 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4299 (vr_values::simplify_switch_using_ranges): Likewise.
4301 2018-08-27 Richard Biener <rguenther@suse.de>
4303 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4304 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4306 * tree-ssa-sccvn.h (struct vn_pval): New structure.
4307 (struct vn_nary_op_s): Add unwind_to member. Add
4308 predicated_values flag and put result into a union together
4309 with a linked list of vn_pval.
4310 (struct vn_ssa_aux): Add name member to make maintaining
4311 a map of SSA name to vn_ssa_aux possible. Remove no longer
4312 needed info, dfsnum, low, visited, on_sccstack, use_processed
4313 and range_info_anti_range_p members.
4314 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4315 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4317 (vn_valueize): New global.
4318 (vn_context_bb): Likewise.
4319 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4320 VN_INFO_PTR_INFO): Remove.
4321 * tree-ssa-sccvn.c: ... (rewrite)
4322 (pass_fre::execute): For -O2+ initialize loops and run
4323 RPO VN in optimistic mode (iterating). For -O1 and -Og
4324 run RPO VN in non-optimistic mode.
4325 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4326 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4327 * doc/invoke.texi (sccvn-max-scc-size): Remove.
4328 (rpo-vn-max-loop-depth): Document.
4329 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4330 when valuezing the VUSE signals we walked out of the region.
4331 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4332 (phi_translate): Set VN context block to use for availability
4334 (compute_avail): Likewise.
4335 (pre_valueize): New function.
4336 (pass_pre::execute): Adjust to the RPO VN API.
4338 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4339 (propagate_constants_for_unrolling): Remove.
4340 (tree_unroll_loops_completely): Perform value-numbering
4341 on the unrolled bodies loop parent.
4343 2018-08-27 Richard Biener <rguenther@suse.de>
4345 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4346 for partial antic compute.
4348 2018-08-27 Jakub Jelinek <jakub@redhat.com>
4350 PR rtl-optimization/87065
4351 * combine.c (simplify_if_then_else): Formatting fix.
4352 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4354 (known_cond): Don't return const_true_rtx for vector modes. Use
4355 CONST0_RTX instead of const0_rtx. Formatting fixes.
4357 2018-08-27 Martin Liska <mliska@suse.cz>
4359 PR gcov-profile/87069
4360 * gcov.c (process_file): Record files already processed
4361 and warn about a file being processed multiple times.
4363 2018-08-27 Martin Liska <mliska@suse.cz>
4366 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4367 Set default values for x_aarch64_*_string strings.
4368 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4369 prefix. For -mabi do not print '=ABI' in help and use
4370 <option_value> format for -msve-vector-bits and -moverride
4373 2018-08-26 Jeff Law <law@redhat.com>
4375 * config/mips/frame-header-opt.c: Include "backend.h" rather than
4378 2018-08-26 Marek Polacek <polacek@redhat.com>
4380 PR c++/87029, Implement -Wredundant-move.
4381 * doc/invoke.texi: Document -Wredundant-move.
4383 2018-08-25 Martin Sebor <msebor@redhat.com>
4385 PR tree-optimization/87059
4386 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4387 to the same type as the other.
4388 * fold-const.c (fold_binary_loc): Assert expectation.
4390 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
4392 * config/darwin.c (machopic_legitimize_pic_address): Clean up
4393 extraneous parentheses, dead code section and formatting.
4395 2018-08-24 David Malcolm <dmalcolm@redhat.com>
4398 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4399 wide enough for jumps in the line-numbering to be visible.
4400 (layout::print_gap_in_line_numbering): New member function.
4401 (layout::calculate_line_spans): When using line numbering, merge
4402 line spans that are only 1 line apart.
4403 (diagnostic_show_locus): When printing line numbers, show gaps in
4404 line numbering directly, rather than printing headers.
4405 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4406 line-numbering with multiple line spans.
4407 (selftest::test_fixit_insert_containing_newline_2): Add test of
4408 line-numbering, in which the spans are close enough to be merged.
4410 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4412 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4413 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
4414 * tree-vrp.c (range_is_nonnull): Remove.
4415 (range_includes_zero_p): Accept value_range instead of min/max.
4416 (extract_range_from_binary_expr_1): Do not early bail on
4418 Use range_includes_zero_p instead of range_is_nonnull.
4419 (extract_range_from_unary_expr): Use range_includes_zero_p instead
4420 of range_is_nonnull.
4421 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
4422 special case VR_ANTI_RANGE.
4423 (vrp_finalize): Same.
4424 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4426 (range_is_nonnull): Remove.
4427 * vr-values.c (vrp_stmt_computes_nonzero): Use
4428 range_includes_zero_p instead of range_is_nonnull.
4429 (extract_range_basic): Pass value_range to range_includes_zero_p
4430 instead of range_is_nonnull.
4432 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4434 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4435 * emit-rtl.h (rtl_data): Remove return_bnd.
4436 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4437 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4438 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4439 (POINTER_BOUNDS_MODE): Remove definition.
4440 (make_pointer_bounds_mode): Remove.
4441 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4442 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4443 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4444 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4445 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4446 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4447 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4449 * config/i386/i386-modes.def (BND32, BND64): Remove.
4450 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4451 (dbx64_register_map): Ditto.
4452 (svr4_dbx_register_map): Ditto.
4453 (indirect_thunk_bnd_needed): Remove.
4454 (indirect_thunks_bnd_used): Ditto.
4455 (indirect_return_bnd_needed): Ditto.
4456 (indirect_return_via_cx_bnd): Ditto.
4457 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4458 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4459 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4460 (output_indirect_thunk_function): Remove handling of
4461 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4462 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4463 (ix86_save_reg): Remove handling of crtl->return_bnd.
4464 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4465 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4466 and UNSPEC_BNDLX_ADDR.
4467 (ix86_output_indirect_branch_via_reg): Remove handling of
4468 indirect_thunk_prefix_bnd.
4469 (ix86_output_indirect_branch_via_push): Ditto.
4470 (ix86_output_function_return): Ditto.
4471 (ix86_output_indirect_function_return): Ditto.
4472 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4473 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4474 (CALL_USED_REGISTERS): Ditto.
4475 (REG_ALLOC_ORDER): Update for removal of bound registers.
4476 (HI_REGISTER_NAMES): Ditto.
4477 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4478 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4479 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4480 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4481 (FIRST_PSEUDO_REG): Update.
4482 (BND): Remove mode iterator.
4483 * config/i386/predicates.md (bnd_mem_operator): Remove.
4485 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4487 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4490 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4492 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4493 the case in which the permute needs only a single element and
4494 repeats for every vector of the result. Extend that case to
4495 handle variable-length vectors.
4496 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4498 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
4501 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4502 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4504 2018-08-24 Richard Biener <rguenther@suse.de>
4506 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4507 bb_flags_allocated members.
4508 (auto_flag): New RAII class for allocating flags.
4509 (auto_edge_flag): New RAII class for allocating edge flags.
4510 (auto_bb_flag): New RAII class for allocating bb flags.
4511 * cfgloop.c (verify_loop_structure): Allocate temporary edge
4513 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4514 in favor of temporarily allocated BB flag.
4515 * hsa-brig.c: Re-order includes.
4516 * hsa-dump.c: Likewise.
4517 * hsa-regalloc.c: Likewise.
4518 * print-rtl.c: Likewise.
4519 * profile-count.c: Likewise.
4521 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
4524 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4527 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4530 * wide-int-range.cc (wide_int_range_div): Do not ignore result
4531 from wide_int_range_multiplicative_op.
4533 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4535 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4538 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
4540 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4543 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
4545 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4546 full GENERIC expression used for replacement.
4548 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
4550 * tree-vrp.c (abs_extent_range): Remove.
4551 (extract_range_into_wide_ints): Pass wide ints by reference.
4552 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4553 Pass wide ints by reference in all calls to
4554 extract_range_into_wide_ints.
4555 * wide-int-range.cc (wide_int_range_div): New.
4556 * wide-int-range.h (wide_int_range_div): New.
4557 (wide_int_range_includes_zero_p): New.
4558 (wide_int_range_zero_p): New.
4560 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4562 * config/aarch64/aarch64.md (arches): New enum.
4563 (arch): New enum attr.
4564 (arch_enabled): New attr.
4565 (enabled): Now uses arch_enabled only.
4566 (simd, sve, fp16): Removed attribute.
4567 (fp): Attr now defined in terms of 'arch'.
4568 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4569 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4570 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4571 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4572 attributes into 'arch'.
4573 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4574 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4575 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4576 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4577 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4578 'simd' attribute into 'arch'.
4579 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4580 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4581 Convert use of 'fp' attribute to 'arch'.
4582 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4583 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4585 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4586 (different modes) Merge 'fp' and 'simd' into 'arch'.
4587 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4590 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4592 PR rtl-optimization/87026
4593 * expmed.c (canonicalize_comparison): If we can no longer create
4594 pseudoregisters, don't.
4596 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4599 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4601 * config/arm/arm.c (speculation_barrier_libfunc): New static
4603 (arm_init_libfuncs): Initialize it.
4604 (arm_emit_speculation_barrier): New function.
4605 * config/arm/arm.md (speculation_barrier): Call
4606 arm_emit_speculation_barrier for architectures that do not have
4608 (speculation_barrier_insn): Only match on Armv7 or later.
4610 2018-08-23 Richard Biener <rguenther@suse.de>
4613 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4616 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4618 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4619 of single-vector TBLs.
4620 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4623 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4626 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4627 aarch64_evpc_tbl guard.
4629 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4631 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4634 2018-08-22 Martin Sebor <msebor@redhat.com>
4637 * tree-pretty-print.c (pretty_print_string): Add argument.
4638 (dump_generic_node): Call to pretty_print_string with string size.
4640 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4642 PR rtl-optimization/86771
4643 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4644 of two SETs into those two SETs, one to be placed at i2, if that SETs
4645 destination is modified between i2 and i3.
4647 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4649 PR tree-optimization/86725
4650 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4652 (vect_analyze_scalar_cycles_1): Check it.
4654 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4656 PR tree-optimization/86725
4657 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4658 an outer loop phi as a double reduction, make sure that the
4659 single user of the phi result is an inner loop phi.
4661 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4663 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4664 grouped stores with gaps to a strided group.
4666 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4668 * tree-vect-stmts.c (get_group_load_store_type)
4669 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4670 first statement in a group.
4672 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4674 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4675 the sequence used in gcc/gcc.c.
4677 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4680 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4683 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4685 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4686 Darwin10-specific unwinder-shim.
4687 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4688 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4689 New to cater for Darwin10 Rosetta.
4691 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4693 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4694 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4696 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4701 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4702 (dwarf2out_switch_text_section): Generate a local label for the
4703 second function sub-section and apply it as the second FDE start
4705 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4706 second sub-section start.
4708 2018-08-22 Richard Biener <rguenther@suse.de>
4710 PR tree-optimization/86988
4711 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4713 2018-08-22 Richard Biener <rguenther@suse.de>
4715 PR tree-optimization/86945
4716 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4718 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4720 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4721 a comment about how uses of r2 for .sdata2 come about.
4723 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4725 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4727 2018-08-21 Marek Polacek <polacek@redhat.com>
4729 PR c++/86981, Implement -Wpessimizing-move.
4730 * doc/invoke.texi: Document -Wpessimizing-move.
4732 2018-08-21 Jan Hubicka <jh@suse.cz>
4734 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4735 * tree.h (is_redundant_typedef): Remove.
4736 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4738 2018-08-21 Jan Hubicka <jh@suse.cz>
4740 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4743 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4745 * expmed.c (extract_low_bits): Reject invalid subregs early.
4747 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4750 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4753 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4755 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4756 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4757 * config/vxworks.c: Likewise.
4759 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4761 * config/vxworks.c: Set targetm.have_ctors_dtors
4762 if HAVE_INITFINI_ARRAY_SUPPORT.
4763 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4764 if HAVE_INITFINI_ARRAY_SUPPORT.
4766 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4768 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4769 default search path for VxWorks < 7.
4771 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4773 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4774 (get_format_string): Refer to c_getstr.
4776 2018-08-21 Tom de Vries <tdevries@suse.de>
4778 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4779 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4780 (debuginfo_early_stop): Declare.
4781 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4782 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4783 (debuginfo_early_stop): New function.
4784 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4785 and debuginfo_early_stop.
4786 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4787 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4788 (general_init): Call debuginfo_early_init.
4789 (finalize): Call debuginfo_fini.
4790 (do_compile): Call debuginfo_init.
4791 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4793 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4795 2018-08-21 Tom de Vries <tdevries@suse.de>
4797 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4798 flag_dump_noaddr and flag_dump_unnumbered.
4800 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4802 * wide-int-range.cc (wide_int_range_abs): New.
4803 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4804 * wide-int-range.h (wide_int_range_abs): New.
4805 (wide_int_range_min_max): New.
4806 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4807 case to call wide_int_range_abs.
4808 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4809 (extract_range_from_abs_expr): Delete.
4811 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4814 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4815 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4818 2018-08-20 Nathan Sidwell <nathan@acm.org>
4819 Jeff Law <law@redhat.com>
4821 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4822 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4824 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4827 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4828 (decl_attributes): Likewise.
4829 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4831 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4832 * diagnostic-core.h (class auto_diagnostic_group): New class.
4833 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4834 (diagnostic_report_diagnostic): Handle the first diagnostics within
4836 (emit_diagnostic): Add auto_diagnostic_group instance.
4838 (inform_n): Likewise.
4839 (warning): Likewise.
4840 (warning_at): Likewise.
4841 (warning_n): Likewise.
4842 (pedwarn): Likewise.
4843 (permerror): Likewise.
4845 (error_n): Likewise.
4846 (error_at): Likewise.
4848 (fatal_error): Likewise.
4849 (internal_error): Likewise.
4850 (internal_error_no_backtrace): Likewise.
4851 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4852 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4853 * diagnostic.h (struct diagnostic_context): Add fields
4854 "diagnostic_group_nesting_depth",
4855 "diagnostic_group_emission_count", "begin_group_cb",
4857 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4858 Add auto_diagnostic_group instance(s).
4859 (find_explicit_erroneous_behavior): Likewise.
4860 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4861 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4862 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4863 (gimplify_va_arg_expr): Likewise.
4864 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4865 (HSA_SORRY_AT): Likewise.
4866 * ipa-devirt.c (compare_virtual_tables): Likewise.
4867 (warn_odr): Likewise.
4868 * multiple_target.c (expand_target_clones): Likewise.
4869 * opts-common.c (cmdline_handle_error): Likewise.
4870 * reginfo.c (globalize_reg): Likewise.
4871 * substring-locations.c (format_warning_n_va): Likewise.
4872 * tree-inline.c (expand_call_inline): Likewise.
4873 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4874 * tree-ssa-loop-niter.c
4875 (do_warn_aggressive_loop_optimizations): Likewise.
4876 * tree-ssa-uninit.c (warn_uninit): Likewise.
4877 * tree.c (warn_deprecated_use): Likewise.
4879 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4882 * config/i386/i386.md (eh_return): Always update EH return
4883 address in word_mode.
4885 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4887 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4888 TARGET_SPLIT_COMPLEX_ARG is defined.
4890 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4892 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4894 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4897 * expr.c (expand_assignment): Assert that bitpos is positive.
4898 (store_field): Likewise
4899 (expand_expr_real_1): Make sure that bitpos is positive.
4900 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4903 2018-08-20 Nathan Sidwell <nathan@acm.org>
4905 * Makefile.in (CPP_ID_DATA_H): Delete.
4906 (CPP_INTERNAL_H): Don't add it.
4907 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4908 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4910 2018-08-20 Richard Biener <rguenther@suse.de>
4912 PR tree-optimization/78655
4913 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4914 pointer + offset nonnull if either operand is nonnull work.
4916 2018-08-20 Tom de Vries <tdevries@suse.de>
4918 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4919 unless the referenced die describes the added property using
4920 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4921 Otherwise, add a DW_AT_location to the referenced die.
4923 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4926 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4927 register_operand when calling ix86_set_reg_reg_cost.
4928 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4929 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4930 predicate and to 1 otherwise.
4932 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4934 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4935 emit a diagnostic that it is not supported and reset the option.
4936 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4937 supported and consume the option. (ASM_FINAL_SPEC): New.
4939 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4941 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4944 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4946 C-SKY port: Documentation
4948 * doc/extend.texi (C-SKY Function Attributes): New section.
4949 * doc/invoke.texi (Option Summary): Add C-SKY options.
4950 (C-SKY Options): New section.
4951 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4953 2018-08-17 Jojo <jijie_rong@c-sky.com>
4954 Huibin Wang <huibin_wang@c-sky.com>
4955 Sandra Loosemore <sandra@codesourcery.com>
4956 Chung-Lin Tang <cltang@codesourcery.com>
4958 C-SKY port: Backend implementation
4960 * config/csky/*: New.
4961 * common/config/csky/*: New.
4963 2018-08-17 Jojo <jijie_rong@c-sky.com>
4964 Huibin Wang <huibin_wang@c-sky.com>
4965 Sandra Loosemore <sandra@codesourcery.com>
4966 Chung-Lin Tang <cltang@codesourcery.com>
4967 Andrew Jenner <andrew@codesourcery.com>
4969 C-SKY port: Configury
4971 * config.gcc (csky-*-*): New.
4972 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4973 * configure: Regenerated.
4975 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4977 * dump-context.h: Include "dumpfile.h".
4978 (dump_context::dump_printf_va): Convert final param from va_list
4979 to va_list *. Convert from ATTRIBUTE_PRINTF to
4980 ATTRIBUTE_GCC_DUMP_PRINTF.
4981 (dump_context::dump_printf_loc_va): Likewise.
4982 * dumpfile.c: Include "stringpool.h".
4983 (make_item_for_dump_printf_va): Delete.
4984 (make_item_for_dump_printf): Delete.
4985 (class dump_pretty_printer): New class.
4986 (dump_pretty_printer::dump_pretty_printer): New ctor.
4987 (dump_pretty_printer::emit_items): New member function.
4988 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4990 (dump_pretty_printer::emit_item): New member function.
4991 (dump_pretty_printer::stash_item): New member function.
4992 (dump_pretty_printer::format_decoder_cb): New member function.
4993 (dump_pretty_printer::decode_format): New member function.
4994 (dump_context::dump_printf_va): Reimplement in terms of
4995 dump_pretty_printer.
4996 (dump_context::dump_printf_loc_va): Convert final param from va_list
4998 (dump_context::begin_scope): Reimplement call to
4999 make_item_for_dump_printf.
5000 (dump_printf): Update for change to dump_printf_va.
5001 (dump_printf_loc): Likewise.
5002 (selftest::test_capture_of_dump_calls): Convert "stmt" from
5003 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
5004 with %T, %E, and %G.
5005 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
5006 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
5007 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
5008 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
5009 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
5010 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
5011 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
5012 within a dump_printf_loc call to "%wu".
5013 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
5014 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
5015 missing space after "=".
5016 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
5017 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
5018 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
5019 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
5020 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
5021 duplicate "vectorized" from message.
5023 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
5025 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
5026 polyNxK_t element's TYPE_STRING_FLAG.
5028 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
5030 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
5031 (they were unnamed before). Fix comments.
5033 2018-08-17 Nathan Sidwell <nathan@acm.org>
5035 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
5037 2018-08-17 Richard Biener <rguenther@suse.de>
5039 PR tree-optimization/86841
5040 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
5042 2018-08-17 Martin Liska <mliska@suse.cz>
5044 * common.opt: Remove Warn, Init and Report for options with
5045 Ignore/Deprecated flag. Warning is done automatically for
5047 * config/i386/i386.opt: Likewise.
5048 * config/ia64/ia64.opt: Likewise.
5049 * config/rs6000/rs6000.opt: Likewise.
5050 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
5051 Remove usage of flag_check_pointer_bounds.
5052 * lto-wrapper.c (merge_and_complain): Do not handle
5053 OPT_fcheck_pointer_bounds.
5054 (append_compiler_options): Likewise.
5055 * opt-functions.awk: Do not handle Deprecated.
5056 * optc-gen.awk: Check that Var, Report and Init are not
5057 used for an option with Ignore/Deprecated flag.
5058 * opts-common.c (decode_cmdline_option): Do not report
5060 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
5062 * opts.h (struct cl_option): Remove cl_deprecated flag.
5063 (CL_ERR_DEPRECATED): Remove error enum value.
5065 2018-08-17 Richard Biener <rguenther@suse.de>
5068 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
5069 across a va-arg-pack using call adjust its return value accordingly.
5071 2018-08-16 Martin Sebor <msebor@redhat.com>
5073 PR tree-optimization/86853
5074 * gimple-ssa-sprintf.c (struct format_result): Rename member.
5075 (struct fmtresult): Add member and initialize it in ctors.
5076 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
5077 (format_string): Handle %S the same as %ls. Set MAYFAIL.
5078 (format_directive): Set POSUNDER4K when MAYFAIL is set.
5079 (parse_directive): Handle %C same as %c.
5080 (sprintf_dom_walker::compute_format_length): Adjust.
5081 (is_call_safe): Adjust.
5083 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5085 * builtins.c (c_strlen): Add new parameter eltsize. Use it
5086 for determining how to count the elements.
5087 * builtins.h (c_strlen): Adjust prototype.
5088 * expr.c (string_constant): Add new parameter mem_size.
5089 Set *mem_size appropriately.
5090 * expr.h (string_constant): Adjust protoype.
5091 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5092 * gimple-fold.h (get_range_strlen): Adjust prototype.
5093 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5094 (format_string): Call get_string_length with eltsize.
5096 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5098 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5099 to emit the span, rather than setting it as the prefix.
5101 2018-08-16 David Malcolm <dmalcolm@redhat.com>
5103 * diagnostic-show-locus.c (layout::start_annotation_line): Add
5104 "margin_char" parameter, defaulting to space. Use it in place
5105 of pp_space for the initial part of the margin.
5106 (layout::print_leading_fixits): Use '+' when filling the margin
5107 of line-insertion fix-it hints.
5109 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5111 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5114 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5116 * config/rs6000/altivec.md: Don't set length attribute to the default
5118 * config/rs6000/darwin.md: Ditto.
5119 * config/rs6000/dfp.md: Ditto.
5120 * config/rs6000/htm.md: Ditto.
5121 * config/rs6000/rs6000.md: Ditto.
5122 * config/rs6000/sync.md: Ditto.
5123 * config/rs6000/vsx.md: Ditto.
5125 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5127 * config/rs6000/altivec.md: Don't set length attribute to the default
5128 value, for branch instructions.
5129 * config/rs6000/darwin.md: Ditto.
5130 * config/rs6000/rs6000.md: Ditto.
5132 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
5134 * config/rs6000/rs6000.md (length): Always define as const_int 4.
5135 (unnamed conditional branch define_insn): Set length to 4 or 8
5136 depending on offset.
5137 (<bd>_<mode>): Similar, for alternative 0.
5138 (<bd>tf_<mode>): Ditto.
5140 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5142 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5144 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
5146 * doc/rtl.texi: Replace old RTX class names with new names.
5149 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
5151 * expmed.h (canonicalize_comparison): New declaration.
5152 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5153 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5154 * optabs.c (prepare_cmp_insn): Likewise.
5155 * rtl.h (unsigned_condition_p): New function which checks if a
5156 comparison operator is unsigned.
5158 2018-08-16 Nathan Sidwell <nathan@acm.org>
5160 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5161 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5163 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5166 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5167 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5168 (mov<mov>): ..this and enable unconditionally.
5170 2018-08-16 Tamar Christina <tamar.christina@arm.com>
5172 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5174 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
5176 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5177 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5178 "Common" with "Target".
5180 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
5182 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5183 * doc/invoke.texi (mmitigate-rop): Remove.
5184 * config/i386/i386.c: Do not include "regrename.h".
5185 (ix86_rop_should_change_byte_p, reg_encoded_number)
5186 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5188 (ix86_reorg): Remove call to ix86_mitigate_rop.
5189 * config/i386/i386.md (attr "modrm_class"): Remove.
5190 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5191 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5192 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5194 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
5196 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5197 allow folding of mergeh() and mergel() for the float and double types.
5198 (fold_mergehl_helper): Rework to handle building a permute tree
5201 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
5203 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5206 2018-08-15 David Malcolm <dmalcolm@redhat.com>
5208 * common.opt (fdiagnostics-show-labels): New option.
5209 * diagnostic-show-locus.c (class layout_range): Add field
5211 (class layout): Add field "m_show_labels_p".
5212 (layout_range::layout_range): Add param "label" and use it to
5214 (make_range): Pass in NULL for new "label" param of layout_range's
5216 (layout::layout): Initialize m_show_labels_p.
5217 (layout::maybe_add_location_range): Pass in loc_range->m_label
5218 when constructing layout_range instances.
5219 (struct line_label): New struct.
5220 (layout::print_any_labels): New member function.
5221 (layout::print_line): Call it if label-printing is enabled.
5222 (selftest::test_one_liner_labels): New test.
5223 (selftest::test_diagnostic_show_locus_one_liner): Call it.
5224 * diagnostic.c (diagnostic_initialize): Initialize
5225 context->show_labels_p.
5226 * diagnostic.h (struct diagnostic_context): Add field
5228 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5229 -fno-diagnostics-show-labels.
5230 * dwarf2out.c (gen_producer_string): Add
5231 OPT_fdiagnostics_show_labels to the ignored options.
5232 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5234 (gcc_rich_location::maybe_add_expr): Likewise.
5235 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5236 label" param, defaulting to NULL.
5237 (gcc_rich_location::add_expr): Add "label" param.
5238 (gcc_rich_location::maybe_add_expr): Likewise.
5239 (class text_range_label): New class.
5240 (class range_label_for_type_mismatch): New class.
5241 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5242 of format_warning_va.
5243 (fmtwarn_n): Likewise for new params of format_warning_n_va.
5244 * lto-wrapper.c (merge_and_complain): Add
5245 OPT_fdiagnostics_show_labels to the "pick one setting" options.
5246 (append_compiler_options): Likewise to the dropped options.
5247 (append_diag_options): Likewise to the passed-on options.
5248 * opts.c (common_handle_option): Handle the new option.
5249 * selftest-diagnostic.c
5250 (test_diagnostic_context::test_diagnostic_context): Enable
5252 * substring-locations.c: Include "gcc-rich-location.h".
5253 (format_warning_n_va): Add "fmt_label" and "param_label" params
5254 and use them as appropriate.
5255 (format_warning_va): Add "fmt_label" and "param_label" params,
5256 passing them on to format_warning_n_va.
5257 (format_warning_at_substring): Likewise.
5258 (format_warning_at_substring_n): Likewise.
5259 * substring-locations.h (format_warning_va): Add "fmt_label" and
5260 "param_label" params.
5261 (format_warning_n_va): Likewise.
5262 (format_warning_at_substring): Likewise.
5263 (format_warning_at_substring_n): Likewise.
5264 * toplev.c (general_init): Initialize global_dc->show_labels_p.
5266 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
5269 * builtins.c (expand_builtin_memcmp): Do not expand the call
5270 when overflow is detected.
5272 2018-08-15 Martin Sebor <msebor@redhat.com>
5274 PR tree-optimization/71625
5275 * config/aarch64/aarch64-builtins.c
5276 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5278 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
5280 * config/s390/s390.c (s390_reorg): Remove loop.
5282 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5285 (darwin_function_switched_text_sections): Delete.
5286 * gcc/config/darwin.h
5287 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5289 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5292 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5293 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
5294 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5296 2018-08-15 Martin Liska <mliska@suse.cz>
5298 PR tree-optimization/86925
5299 * predict.c (expr_expected_value_1): When taking
5300 later predictor, assign also probability.
5301 Use fold_build2_initializer_loc in order to fold
5302 the expression in -frounding-math.
5304 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
5306 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5308 (expand_vec_perm_1): Try the new method.
5310 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
5313 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5314 Check whether lra_live_max_point is 0 before dividing.
5316 2018-08-14 Martin Sebor <msebor@redhat.com>
5318 PR tree-optimization/86650
5319 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5320 (vrp_prop::check_mem_ref): Same.
5322 2018-08-13 Liu Hao <lh_mouse@126.com>
5324 * pretty-print.c (eat_esc_sequence): Swap the foreground and
5325 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5326 and clear it thereafter, as it only works for DBCS.
5328 2018-08-13 Liu Hao <lh_mouse@126.com>
5330 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5331 handle returned by _get_osf_handle().
5333 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5335 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5336 for folding vec_perm.
5338 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5340 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5341 Add support for gimple-folding of vec_pack() and vec_unpack()
5344 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5346 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5347 vec_xst variants to the list.
5348 (rs6000_gimple_fold_builtin): Add support for folding unaligned
5349 vector loads and stores.
5351 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
5353 * config.gcc (rs6000-ibm-aix4.x): Delete.
5354 (rs6000-ibm-aix5.1): Delete.
5355 (rs6000-ibm-aix5.2): Delete.
5356 (rs6000-ibm-aix5.3): Delete.
5357 * config/rs6000/aix43.h: Delete.
5358 * config/rs6000/aix51.h: Delete.
5359 * config/rs6000/aix52.h: Delete.
5360 * config/rs6000/t-aix43: Delete.
5362 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
5364 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5366 (s390_decompose_address): Factor out constant pool ref
5369 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5371 * config/nds32/nds32-predicates.c
5372 (nds32_can_use_bclr_p): Change return type as bool.
5373 (nds32_can_use_bset_p): Ditto.
5374 (nds32_can_use_btgl_p): Ditto.
5375 (nds32_can_use_bitci_p): Ditto.
5376 * config/nds32/nds32-protos.h
5377 (nds32_can_use_bclr_p): Change declaration.
5378 (nds32_can_use_bset_p): Ditto.
5379 (nds32_can_use_btgl_p): Ditto.
5380 (nds32_can_use_bitci_p): Ditto.
5382 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5384 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5385 Support -msched-prolog-epilog option.
5386 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5388 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5390 * common/config/nds32/nds32-common.c
5391 (nds32_option_optimization_table): Enalbe -malways-align.
5393 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5395 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5397 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5398 OPT_misr_secure_ case.
5399 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5400 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5401 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5403 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5404 (nds32_isr_info): New field security_level.
5405 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5406 * config/nds32/nds32.md (return_internal): Consider critical attribute.
5407 * config/nds32/nds32.opt (misr-secure): New option.
5408 * config/nds32/nds32_init.inc: New file.
5409 * config/nds32/nds32_isr.h: New file.
5411 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
5413 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5414 Update comment for atomic instructions.
5415 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5416 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5418 (atomic_loaddi): Revise fence expansion to only emit fence prior to
5419 load for __ATOMIC_SEQ_CST model.
5420 (atomic_loaddi_1): Remove float register target.
5421 (atomic_storedi): Handle CONST_INT values.
5422 (atomic_storedi_1): Remove float register source. Add special case
5424 (memory_barrier): New expander and insn.
5426 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5428 PR tree-optimization/86835
5429 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5430 new_stmt after def_gsi, make sure to insert new_square_stmt after
5431 that stmt, not 2 stmts before it.
5433 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5436 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5439 2018-08-10 Martin Liska <mliska@suse.cz>
5442 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5444 * builtins.c (expand_builtin_expect_with_probability):
5446 (expand_builtin_expect_with_probability): New function.
5447 (build_builtin_expect_predicate): Add new argumnet probability
5448 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5449 (fold_builtin_expect):
5452 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5453 * builtins.h (fold_builtin_expect): Set new argument.
5454 * doc/extend.texi: Document __builtin_expect_with_probability.
5455 * doc/invoke.texi: Likewise.
5456 * gimple-fold.c (gimple_fold_call): Pass new argument.
5457 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5458 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5459 * predict.c (get_predictor_value): New function.
5460 (expr_expected_value): Add new argument probability. Assume
5461 that predictor and probability are always non-null.
5462 (expr_expected_value_1): Likewise. For __builtin_expect and
5463 __builtin_expect_with_probability set probability. Handle
5464 combination in binary expressions.
5465 (tree_predict_by_opcode): Simplify code by simply calling
5466 get_predictor_value.
5467 (pass_strip_predict_hints::execute): Add handling of
5468 BUILT_IN_EXPECT_WITH_PROBABILITY.
5469 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5471 * tree.h (DECL_BUILT_IN_P): New function.
5473 2018-08-10 Martin Liska <mliska@suse.cz>
5475 PR tree-optimization/85799
5476 * passes.def: Add argument for pass_strip_predict_hints.
5477 * predict.c (class pass_strip_predict_hints): Add new argument
5479 (strip_predictor_early): New function.
5480 (pass_strip_predict_hints::execute): Call the function to
5482 (strip_predict_hints): New function.
5483 * predict.def: Fix comment.
5485 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5487 * Makefile.in: Clarify which tm.texi to copy over to assert the
5488 right to grant a GFDL license for all.
5490 2018-08-09 Jeff Law <law@redhat.com>
5492 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5495 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
5497 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5500 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5502 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5503 reductions for variable-length vectors.
5505 2018-08-09 David Malcolm <dmalcolm@redhat.com>
5508 * common.opt (fdiagnostics-show-line-numbers): New option.
5509 * diagnostic-show-locus.c (class layout): Add fields
5510 "m_show_line_numbers_p" and "m_linenum_width";
5511 (num_digits): New function.
5512 (test_num_digits): New function.
5513 (layout::layout): Initialize new fields. Update m_x_offset
5514 logic to handle any left margin.
5515 (layout::print_source_line): Print line number when requested.
5516 (layout::start_annotation_line): New member function.
5517 (layout::print_annotation_line): Call it.
5518 (layout::print_leading_fixits): Likewise.
5519 (layout::print_trailing_fixits): Likewise. Update calls to
5520 move_to_column for new parameter.
5521 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5522 it to potentially call start_annotation_line.
5523 (layout::show_ruler): Call start_annotation_line.
5524 (selftest::test_line_numbers_multiline_range): New selftest.
5525 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5526 and selftest::test_line_numbers_multiline_range.
5527 * diagnostic.c (diagnostic_initialize): Initialize
5528 show_line_numbers_p.
5529 * diagnostic.h (struct diagnostic_context): Add field
5530 "show_line_numbers_p".
5531 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5532 -fno-diagnostics-show-line-numbers.
5533 * dwarf2out.c (gen_producer_string): Add
5534 OPT_fdiagnostics_show_line_numbers to the ignored options.
5535 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5536 one setting" options.
5537 (append_compiler_options): Likewise to the dropped options.
5538 (append_diag_options): Likewise to the passed-on options.
5539 * opts.c (common_handle_option): Handle the new option.
5540 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5542 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
5544 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5545 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
5546 third argument of type "const signed char" to descriptions of
5547 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5548 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5549 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5550 __builtin_bcdsub_ov functions.
5552 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5554 PR tree-optimization/86858
5555 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5556 flow_bb_inside_loop_p calls.
5558 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5560 PR tree-optimization/86871
5561 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5562 instead of gimple_assign_lhs.
5564 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5567 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5568 register constraint to operand 0.
5569 (add<mode>3_carryinC): Likewise.
5570 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5572 2018-08-09 Martin Liska <mliska@suse.cz>
5575 * common.opt: Remove extra line.
5577 2018-08-09 Martin Liska <mliska@suse.cz>
5579 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5580 at the end of a line, make first letter capital and end up
5581 a sentence with a dot.
5582 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5583 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5584 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5585 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5586 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5587 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5588 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5589 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5590 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5591 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5592 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5593 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5594 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5595 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5596 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5597 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5598 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5599 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5601 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5604 * config/s390/s390.c (s390_option_override_internal): Reduce the
5605 stack-clash-protection-probe-interval param if it would be too big
5608 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5611 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5612 * config/m68k/m68k.c (handle_move_double): Don't call
5613 m68k_final_prescan_insn.
5614 (m68k_adjust_decorated_operand): Renamed from
5615 m68k_final_prescan_insn, remove first and third operand and
5617 (print_operand): Call it.
5618 (print_operand_address): Call it.
5620 2018-08-08 Nathan Sidwell <nathan@acm.org>
5622 * diagnostic.c (diagnostic_report_current_module): Use
5623 linemap_included_from & linemap_included_from_linemap.
5625 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5627 * config/aarch64/aarch64-cores.def: Add phecda core.
5628 * config/aarch64/aarch64-tune.md: Regenerate.
5629 * doc/invoke.texi: Add phecda core.
5631 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5634 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5636 * config/s390/s390.md ("movti"): Add more alternatives for
5637 constant to GPR copies.
5639 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5641 * config/s390/s390.c: Fix whitespace damage throughout the file.
5642 * config/s390/s390.h: Likewise.
5643 * config/s390/tpf.h: Likewise.
5645 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5647 * config/s390/s390.c (s390_loadrelative_operand_p):
5648 Remove TARGET_CPU_ZARCH usages.
5649 (s390_rtx_costs): Likewise.
5650 (s390_legitimate_constant_p): Likewise.
5651 (s390_cannot_force_const_mem): Likewise.
5652 (legitimate_reload_constant_p): Likewise.
5653 (s390_preferred_reload_class): Likewise.
5654 (legitimize_pic_address): Likewise.
5655 (legitimize_tls_address): Likewise.
5656 (s390_split_branches): Removed.
5657 (s390_add_execute): Removed.
5658 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5659 (s390_mainpool_start): Likewise.
5660 (s390_mainpool_finish): Likewise.
5661 (s390_mainpool_cancel): Removed.
5662 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5663 (s390_chunkify_cancel): Likewise.
5664 (s390_return_addr_rtx): Likewise.
5665 (s390_register_info): Remove split_branches_pending_p uages.
5666 (s390_optimize_register_info): Likewise.
5667 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5668 split_branches_pending_p usages.
5669 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5670 (s390_load_got): Likewise.
5671 (s390_expand_split_stack_prologue): Likewise.
5672 (output_asm_nops): Likewise.
5673 (s390_function_profiler): Likewise.
5674 (s390_emit_call): Likewise.
5675 (s390_conditional_register_usage): Likewise.
5676 (s390_optimize_prologue): Likewise.
5677 (s390_reorg): Remove TARGET_CPU_ZARCH and
5678 split_branches_pending_p usages.
5679 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5681 (s390_output_indirect_thunk_function): Likewise.
5682 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5683 (TARGET_CPU_ZARCH_P): Removed.
5684 (struct machine_function): Remove split_branches_pending_p.
5685 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5687 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5689 * common/config/s390/s390-common.c (processor_flags_table):
5691 * config.gcc: Remove with_arch/with_tune support.
5692 * config/s390/2064.md: Remove cpu attribute comparisons.
5693 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5695 * config/s390/linux.h (ASM_SPEC):
5696 Remove -march support.
5697 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5698 Use a table to get an arch level.
5699 * config/s390/s390-opts.h (enum processor_type):
5701 * config/s390/s390.c
5702 (processor_table): Remove entries, add arch_level values.
5703 (s390_issue_rate): Remove cases.
5704 (s390_option_override): Adjust
5705 s390_option_override_internal() call.
5706 (s390_option_override_internal): Remove deprecation warning.
5707 (s390_valid_target_attribute_tree): Adjust
5708 s390_option_override_internal() call.
5709 * config/s390/s390.h (struct s390_processor):
5710 Share with s390-c.c, add arch_level field.
5711 * config/s390/s390.md:
5712 Remove occurrences in cpu attribute.
5713 * config/s390/s390.opt: Remove -march/-mtune support.
5714 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5715 * doc/invoke.texi: Remove deprecation warning.
5717 2018-08-08 Luis Machado <luis.machado@linaro.org>
5719 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5721 (qdf24xx_tunings): Set vector cost structure to
5722 qdf24xx_vector_cost.
5724 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5725 <register_sextend>: Set to 3.
5727 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5730 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5731 * config/aarch64/aarch64-simd.md
5732 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5733 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5734 (aarch64_frecpx<mode>): ...this new pattern.
5735 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5736 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5738 2018-08-07 Martin Liska <mliska@suse.cz>
5741 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5742 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5743 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5744 * doc/extend.texi: Document that malloc attribute adds
5747 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5750 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5751 Define to speculation_safe_value_not_needed.
5753 2018-08-06 Jeff Law <law@redhat.com>
5755 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5756 the vr_values instance to cprop_into_stmt.
5757 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5758 (cprop_operand): Also query EVRP to determine if OP is a constant.
5760 2018-08-06 Nathan Sidwell <nathan@acm.org>
5762 * diagnostic.c (diagnostic_report_current_module): Reroll
5763 included-at loop. Translate text.
5765 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5767 * function-tests.c (selftest::test_expansion_to_rtl): Call
5768 free_after_compilation.
5770 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5772 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5774 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5776 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5777 loops with memory block operations from getting unrolled.
5779 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5782 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5783 Define to speculation_safe_value_not_needed.
5785 2018-08-06 Jeff Law <law@redhat.com>
5787 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5790 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5793 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5794 with all enabled __intN types.
5796 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5798 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5800 * alias.c (record_set): Check for clobber high.
5801 * cfgexpand.c (expand_gimple_stmt): Likewise.
5802 * combine-stack-adj.c (single_set_for_csa): Likewise.
5803 * combine.c (find_single_use_1): Likewise.
5804 (set_nonzero_bits_and_sign_copies): Likewise.
5805 (get_combine_src_dest): Likewise.
5806 (is_parallel_of_n_reg_sets): Likewise.
5807 (try_combine): Likewise.
5808 (record_dead_and_set_regs_1): Likewise.
5809 (reg_dead_at_p_1): Likewise.
5810 (reg_dead_at_p): Likewise.
5811 * dce.c (deletable_insn_p): Likewise.
5812 (mark_nonreg_stores_1): Likewise.
5813 (mark_nonreg_stores_2): Likewise.
5814 * df-scan.c (df_find_hard_reg_defs): Likewise.
5815 (df_uses_record): Likewise.
5816 (df_get_call_refs): Likewise.
5817 * dwarf2out.c (mem_loc_descriptor): Likewise.
5818 * haifa-sched.c (haifa_classify_rtx): Likewise.
5819 * ira-build.c (create_insn_allocnos): Likewise.
5820 * ira-costs.c (scan_one_insn): Likewise.
5821 * ira.c (equiv_init_movable_p): Likewise.
5822 (rtx_moveable_p): Likewise.
5823 (interesting_dest_for_shprep): Likewise.
5824 * jump.c (mark_jump_label_1): Likewise.
5825 * postreload-gcse.c (record_opr_changes): Likewise.
5826 * postreload.c (reload_cse_simplify): Likewise.
5827 (struct reg_use): Add source expr.
5828 (reload_combine): Check for clobber high.
5829 (reload_combine_note_use): Likewise.
5830 (reload_cse_move2add): Likewise.
5831 (move2add_note_store): Likewise.
5832 * print-rtl.c (print_pattern): Likewise.
5833 * recog.c (decode_asm_operands): Likewise.
5834 (store_data_bypass_p): Likewise.
5835 (if_test_bypass_p): Likewise.
5836 * regcprop.c (kill_clobbered_value): Likewise.
5837 (kill_set_value): Likewise.
5838 * reginfo.c (reg_scan_mark_refs): Likewise.
5839 * reload1.c (maybe_fix_stack_asms): Likewise.
5840 (eliminate_regs_1): Likewise.
5841 (elimination_effects): Likewise.
5842 (mark_not_eliminable): Likewise.
5843 (scan_paradoxical_subregs): Likewise.
5844 (forget_old_reloads_1): Likewise.
5845 * reorg.c (find_end_label): Likewise.
5846 (try_merge_delay_insns): Likewise.
5847 (redundant_insn): Likewise.
5848 (own_thread_p): Likewise.
5849 (fill_simple_delay_slots): Likewise.
5850 (fill_slots_from_thread): Likewise.
5851 (dbr_schedule): Likewise.
5852 * resource.c (update_live_status): Likewise.
5853 (mark_referenced_resources): Likewise.
5854 (mark_set_resources): Likewise.
5855 * rtl.c (copy_rtx): Likewise.
5856 * rtlanal.c (reg_referenced_p): Likewise.
5857 (single_set_2): Likewise.
5858 (noop_move_p): Likewise.
5859 (note_stores): Likewise.
5860 * sched-deps.c (sched_analyze_reg): Likewise.
5861 (sched_analyze_insn): Likewise.
5863 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5865 * cse.c (invalidate_reg): New function extracted from...
5866 (invalidate): ...here.
5867 (canonicalize_insn): Check for clobber high.
5868 (invalidate_from_clobbers): invalidate clobber highs.
5869 (invalidate_from_sets_and_clobbers): Likewise.
5870 (count_reg_usage): Check for clobber high.
5871 (insn_live_p): Likewise.
5872 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5873 (cselib_invalidate_regno): Check for clobber in setter.
5874 (cselib_invalidate_rtx): Pass through setter.
5875 (cselib_invalidate_rtx_note_stores):
5876 (cselib_process_insn): Check for clobber high.
5877 * cselib.h (cselib_invalidate_rtx): Add operand.
5879 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5881 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5882 (mark_not_eliminable): Likewise.
5883 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5884 * lra-lives.c (process_bb_lives): Check for clobber high.
5885 * lra.c (new_insn_reg): Remember clobber highs.
5886 (collect_non_operand_hard_regs): Check for clobber high.
5887 (lra_set_insn_recog_data): Likewise.
5888 (add_regs_to_insn_regno_info): Likewise.
5889 (lra_update_insn_regno_info): Likewise.
5891 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5893 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5894 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5896 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5898 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5899 (copy_insn_1): Likewise.
5900 (gen_hard_reg_clobber_high): New gen function.
5901 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5902 * genemit.c (gen_exp): Likewise.
5903 (gen_emit_seq): Pass through info.
5904 (gen_insn): Check for CLOBBER_HIGH.
5905 (gen_expand): Pass through info.
5906 (gen_split): Likewise.
5907 (output_add_clobbers): Likewise.
5908 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5909 (remove_clobbers): Likewise.
5910 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5912 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5914 * doc/rtl.texi (clobber_high): Add.
5915 (parallel): Add in clobber high
5916 * rtl.c (rtl_check_failed_code3): Add function.
5917 * rtl.def (CLOBBER_HIGH): Add expression.
5918 * rtl.h (RTL_CHECKC3): Add macro.
5919 (rtl_check_failed_code3): Add declaration.
5920 (XC3EXP): Add macro.
5922 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5925 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5926 cfun->machine->max_used_stack_alignment if needed.
5928 2018-08-04 Martin Sebor <msebor@redhat.com>
5930 PR tree-optimization/86571
5931 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5934 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5937 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5940 2018-08-03 Jeff Law <law@redhat.com>
5943 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5944 Define to speculation_safe_value_not_needed.
5946 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5948 * doc/gcov.texi (-x): Remove duplicate "to".
5949 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5950 (-Wif-not-aligned): Remove duplicate "is".
5951 (-flto): Remove duplicate "the".
5952 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5953 duplicate "v5.00.b".
5954 (MSP430 Options): Remove duplicate "and" from the description
5955 of "-mgprel-sec=regexp".
5956 (x86 Options): Remove duplicate copies of "vmldLog102" and
5957 vmlsLog104 from description of "-mveclibabi=type".
5959 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5961 * internal-fn.h (first_commutative_argument): Declare.
5962 * internal-fn.c (first_commutative_argument): New function.
5963 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5964 restrictions for pattern statements. Use first_commutative_argument
5965 to look for commutative operands in calls to internal functions.
5967 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5969 * Makefile.in (wide-int-range.o): New.
5970 * tree-vrp.c: Move all the wide_int_* functions to...
5971 * wide-int-range.cc: ...here.
5972 * tree-vrp.h: Move all the wide_int_* prototypes to...
5973 * wide-int-range.h: ...here.
5975 2018-08-03 Tom de Vries <tdevries@suse.de>
5977 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5979 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5980 * except.c (output_function_exception_table): Do early exit if
5981 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5983 2018-08-03 Martin Liska <mliska@suse.cz>
5985 * predict.c (dump_prediction): Change to 2 digits
5988 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5990 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5992 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5994 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5996 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5997 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5998 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5999 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
6000 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
6002 2018-08-02 David Malcolm <dmalcolm@redhat.com>
6004 * diagnostic-show-locus.c (diagnostic_show_locus): Use
6005 pp_take_prefix when saving the existing prefix.
6006 * diagnostic.c (diagnostic_append_note): Likewise.
6007 * langhooks.c (lhd_print_error_function): Likewise.
6008 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
6009 param's type. Free the existing prefix.
6010 (pp_take_prefix): New function.
6011 (pretty_printer::pretty_printer): Drop the prefix parameter.
6012 Rename the length parameter to match the comment.
6013 (pretty_printer::~pretty_printer): Free the prefix.
6014 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
6016 (struct pretty_printer): Drop the "const" from "prefix" field's
6017 type and clarify memory management.
6018 (pp_set_prefix): Drop the "const" from the 2nd param.
6019 (pp_take_prefix): New decl.
6021 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6023 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
6024 for word_mode_ok here instead of passing as argument.
6025 (expand_block_compare): Change select_block_compare_mode() call.
6026 (expand_strncmp_gpr_sequence): New function.
6027 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
6029 2018-08-02 Jeff Law <law@redhat.com>
6032 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6033 Define to speculation_safe_value_not_needed.
6036 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6037 Define to speculation_safe_value_not_needed.
6039 2018-08-02 Tom de Vries <tdevries@suse.de>
6042 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
6043 function. Return UI_TARGET unconditionally.
6044 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
6045 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
6047 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6049 * genemit.c (print_overload_test): Fix typo.
6051 2018-08-02 Richard Biener <rguenther@suse.de>
6053 PR tree-optimization/86816
6054 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
6055 which checks for value availability before querying it.
6056 (gvn_uses_equal): Use it.
6057 (same_succ_hash): Likewise.
6058 (gimple_equal_p): Likewise.
6060 2018-08-02 Nick Clifton <nickc@redhat.com>
6063 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6064 Define to speculation_safe_value_not_needed.
6067 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6068 Define to speculation_safe_value_not_needed.
6071 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6072 Define to speculation_safe_value_not_needed.
6075 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6076 Define to speculation_safe_value_not_needed.
6079 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6080 Define to speculation_safe_value_not_needed.
6083 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6084 Define to speculation_safe_value_not_needed.
6087 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6088 Define to speculation_safe_value_not_needed.
6091 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6092 Define to speculation_safe_value_not_needed.
6095 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6096 speculation_safe_value_not_needed.
6099 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6100 to speculation_safe_value_not_needed.
6102 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6104 * doc/md.texi: Expand the documentation of instruction names
6105 to mention port-local uses. Document '@' in pattern names.
6106 * read-md.h (overloaded_instance, overloaded_name): New structs.
6108 (md_reader::handle_overloaded_name): New member function.
6109 (md_reader::get_overloads): Likewise.
6110 (md_reader::m_first_overload): New member variable.
6111 (md_reader::m_next_overload_ptr): Likewise.
6112 (md_reader::m_overloads_htab): Likewise.
6113 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6114 m_next_overload_ptr and m_overloads_htab.
6115 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6116 (get_mode_token, get_code_token, get_int_token): New functions.
6117 (map_attr_string): Add an optional argument that passes back
6118 the associated iterator.
6119 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6120 (md_reader::handle_overloaded_name, add_overload_instance): New
6122 (apply_iterators): Handle '@' names. Report an error if '@'
6123 is used without iterators.
6124 (initialize_iterators): Initialize the new iterator_group fields.
6125 * genopinit.c (handle_overloaded_code_for)
6126 (handle_overloaded_gen): New functions.
6127 (main): Use them to print declarations of maybe_code_for_* and
6128 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6129 * genemit.c (print_overload_arguments, print_overload_test)
6130 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6131 (main): Use it to print definitions of maybe_code_for_* and
6132 maybe_gen_* functions.
6133 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6134 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6135 instead of explicit mode checks.
6136 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6137 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6138 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6139 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6140 (aarch64_expand_compare_and_swap): Likewise
6141 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6142 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6143 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6144 (aarch64_constant_pool_reload_icode): Delete.
6145 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6146 instead of aarch64_constant_pool_reload_icode. Use
6147 code_for_aarch64_reload_mov instead of explicit mode checks.
6148 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6149 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6150 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6151 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6152 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6153 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6154 (aarch64_atomic_load_op_code): Delete.
6155 (aarch64_emit_atomic_load_op): Likewise.
6156 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6157 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
6158 instead of aarch64_emit_atomic_load_op.
6159 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6160 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6161 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6162 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6163 character before the pattern name.
6164 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6165 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6166 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6167 (aarch64_frecps<mode>): Likewise.
6168 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6169 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6170 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6171 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6172 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6174 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
6176 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6177 Allow HFmode constants if TARGET_FP_F16INST.
6179 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
6182 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6183 No longer check last store for clobber of address register.
6185 2018-08-02 Martin Liska <mliska@suse.cz>
6187 PR gcov-profile/86817
6188 * gcov.c (process_all_functions): New function.
6190 (process_file): Move functions processing to
6191 process_all_functions.
6193 2018-08-02 David Malcolm <dmalcolm@redhat.com>
6195 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6196 "const" to the "gimple *" and "rtx_insn *" parameters.
6197 * dumpfile.h (dump_user_location_t::dump_user_location_t):
6199 (dump_location_t::dump_location_t): Likewise.
6201 2018-08-01 Martin Sebor <msebor@redhat.com>
6203 PR tree-optimization/86650
6204 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6205 rather than a "gcall *". Directly pass the data of interest
6206 to percent_K_format, rather than building a temporary CALL_EXPR
6208 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6209 (gimple_fold_builtin_strncat): Adjust.
6210 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6211 gcall* argument with gimple*.
6212 * gimple-ssa-warn-restrict.c (check_call): Same.
6213 (wrestrict_dom_walker::before_dom_children): Same.
6214 (builtin_access::builtin_access): Same.
6215 (check_bounds_or_overlap): Same
6216 (maybe_diag_overlap): Same.
6217 (maybe_diag_offset_bounds): Same.
6218 * tree-diagnostic.c (default_tree_printer): Move usage of
6219 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6221 * tree-pretty-print.c (percent_K_format): Add argument.
6222 * tree-pretty-print.h: Add argument.
6223 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6224 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6225 (maybe_diag_stxncpy_trunc): Same.
6226 (handle_builtin_stxncpy): Same.
6227 (handle_builtin_strcat): Same.
6229 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6231 * match.pd: Optimise pointer range checks.
6233 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6235 PR tree-optimization/86758
6236 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6237 to remove pattern statements.
6239 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6241 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6242 result of dfs_enumerate_from when constructing stmt_vec_infos,
6243 instead of additionally calling get_loop_body.
6245 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6247 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6249 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6250 When creating an iv, assert that the step is not known to be zero.
6251 (vect_setup_realignment): Update call accordingly.
6252 * tree-vect-stmts.c (vectorizable_store): Likewise.
6253 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
6255 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6257 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6258 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6259 (vectorizable_reduction): Likewise.
6260 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6261 (vect_detect_hybrid_slp_stmts): Likewise.
6262 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6264 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
6266 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6267 (wide_int_set_zero_nonzero_bits): ...this.
6268 (zero_nonzero_bits_from_vr): Rename to...
6269 (vrp_set_zero_nonzero_bits): ...this.
6270 (extract_range_from_multiplicative_op_1): Abstract wide int
6272 (wide_int_range_multiplicative_op): ...here.
6273 (extract_range_from_binary_expr_1): Extract wide int binary
6274 operations into their own functions.
6275 (wide_int_range_lshift): New.
6276 (wide_int_range_can_optimize_bit_op): New.
6277 (wide_int_range_shift_undefined_p): New.
6278 (wide_int_range_bit_xor): New.
6279 (wide_int_range_bit_ior): New.
6280 (wide_int_range_bit_and): New.
6281 (wide_int_range_trunc_mod): New.
6282 (extract_range_into_wide_ints): New.
6283 (vrp_shift_undefined_p): New.
6284 (extract_range_from_multiplicative_op): New.
6285 (vrp_can_optimize_bit_op): New.
6286 * tree-vrp.h (value_range::dump): New.
6287 (wide_int_range_multiplicative_op): New.
6288 (wide_int_range_lshift):New.
6289 (wide_int_range_shift_undefined_p): New.
6290 (wide_int_range_bit_xor): New.
6291 (wide_int_range_bit_ior): New.
6292 (wide_int_range_bit_and): New.
6293 (wide_int_range_trunc_mod): New.
6294 (zero_nonzero_bits_from_bounds): Rename to...
6295 (wide_int_set_zero_nonzero_bits): ...this.
6296 (zero_nonzero_bits_from_vr): Rename to...
6297 (vrp_set_zero_nonzero_bits): ...this.
6298 (range_easy_mask_min_max): Rename to...
6299 (wide_int_range_can_optimize_bit_op): this.
6300 * vr-values.c (simplify_bit_ops_using_ranges): Rename
6301 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6303 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6305 * tree-vectorizer.h (vect_orig_stmt): New function.
6306 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6307 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6308 (vect_create_epilog_for_reduction): Likewise.
6309 (vectorizable_live_operation): Likewise.
6310 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6311 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6312 * tree-vect-stmts.c (vectorizable_call): Likewise.
6313 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6315 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6317 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6319 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6320 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6321 (vect_transform_loop): Likewise.
6322 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6324 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6326 * tree-vectorizer.h (vect_schedule_slp): Return void.
6327 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6328 (vect_schedule_slp): Likewise.
6330 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6332 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6334 (vect_transform_loop): Update calls accordingly. Schedule SLP
6335 instances before the main loop, if any exist.
6337 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6339 PR tree-optimization/86749
6340 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6341 If the lhs is used in a COND_EXPR, check that it is being used
6342 as the "then" or "else" value.
6344 2018-08-01 Tom de Vries <tdevries@suse.de>
6347 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6348 speculation_safe_value_not_needed.
6350 2018-08-01 Richard Biener <rguenther@suse.de>
6352 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6355 2018-08-01 Martin Liska <mliska@suse.cz>
6357 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6358 format how successful transformation is dumped.
6359 (gimple_mod_pow2_value_transform): Likewise.
6360 (gimple_mod_subtract_transform): Likewise.
6361 (gimple_stringops_transform): Likewise.
6363 2018-08-01 Martin Liska <mliska@suse.cz>
6366 * value-prof.c (interesting_stringop_to_profile_p):
6367 Simplify the code and add BUILT_IN_MEMMOVE.
6368 (gimple_stringops_transform): Likewise.
6370 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
6372 * config/aarch64/aarch64-simd.md
6373 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6374 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6375 use GPI iterator instead of SI mode.
6377 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6379 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6380 rs6000_speculation_barrier.
6381 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6382 new barrier pattern name.
6384 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6386 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6387 (speculation_barrier): New insn.
6389 2018-08-01 Richard Biener <rguenther@suse.de>
6392 * graphite.h: Include isl/id.h and isl/space.h to allow build
6395 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
6398 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6399 mode for COFF targets.
6400 * defaults.h (TARGET_COFF): Define.
6401 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6402 TARGET_COFF): Define.
6403 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6404 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6405 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6407 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6409 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6410 * gimple-streamer-out.c (output_bb): Save it.
6411 * lto-streamer-in.c (input_struct_function_base): Restore
6412 instance discriminator if available. Create map on demand.
6413 * lto-streamer-out.c (output_struct_function_base): Save it if
6415 * final.c (decl_to_instance_map): Document LTO strategy.
6417 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6418 Olivier Hainque <hainque@adacore.com>
6420 * debug.h (decl_to_instance_map_t): New type.
6421 (decl_to_instance_map): Declare.
6422 (maybe_create_decl_to_instance_map): New inline function.
6423 * final.c (bb_discriminator, last_bb_discriminator): New statics,
6424 to track basic block discriminators.
6425 (final_start_function_1): Initialize them.
6426 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6428 (decl_to_instance_map): New variable.
6429 (map_decl_to_instance, maybe_set_discriminator): New functions.
6430 (notice_source_line): Set discriminator.
6432 2018-07-31 Ian Lance Taylor <iant@golang.org>
6434 * targhooks.c (default_have_speculation_safe_value): Add
6437 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6439 * dump-context.h: Include "pretty-print.h".
6440 (dump_context::refresh_dumps_are_enabled): New decl.
6441 (dump_context::emit_item): New decl.
6442 (class dump_context): Add fields "m_test_pp" and
6444 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6445 (temp_dump_context::get_dumped_text): New decl.
6446 (class temp_dump_context): Add field "m_pp".
6447 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6448 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6450 (set_dump_file): Update for above change.
6451 (set_alt_dump_file): Likewise.
6452 (dump_loc): New overload, taking a pretty_printer *.
6453 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6454 to any test pretty-printer.
6455 (make_item_for_dump_gimple_stmt): New function, adapted from
6456 optinfo::add_gimple_stmt.
6457 (dump_context::dump_gimple_stmt): Call it, and use the result,
6458 eliminating the direct usage of dump_file and alt_dump_file in
6459 favor of indirectly using them via emit_item.
6460 (make_item_for_dump_gimple_expr): New function, adapted from
6461 optinfo::add_gimple_expr.
6462 (dump_context::dump_gimple_expr): Call it, and use the result,
6463 eliminating the direct usage of dump_file and alt_dump_file in
6464 favor of indirectly using them via emit_item.
6465 (make_item_for_dump_generic_expr): New function, adapted from
6467 (dump_context::dump_generic_expr): Call it, and use the result,
6468 eliminating the direct usage of dump_file and alt_dump_file in
6469 favor of indirectly using them via emit_item.
6470 (make_item_for_dump_printf_va): New function, adapted from
6471 optinfo::add_printf_va.
6472 (make_item_for_dump_printf): New function.
6473 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6474 and use the result, eliminating the direct usage of dump_file and
6475 alt_dump_file in favor of indirectly using them via emit_item.
6476 (make_item_for_dump_dec): New function.
6477 (dump_context::dump_dec): Call it, and use the result,
6478 eliminating the direct usage of dump_file and alt_dump_file in
6479 favor of indirectly using them via emit_item.
6480 (make_item_for_dump_symtab_node): New function, adapted from
6481 optinfo::add_symtab_node.
6482 (dump_context::dump_symtab_node): Call it, and use the result,
6483 eliminating the direct usage of dump_file and alt_dump_file in
6484 favor of indirectly using them via emit_item.
6485 (dump_context::begin_scope): Reimplement, avoiding direct usage
6486 of dump_file and alt_dump_file in favor of indirectly using them
6488 (dump_context::emit_item): New member function.
6489 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6490 Set up test pretty-printer on the underlying context. Call
6491 refresh_dumps_are_enabled.
6492 (temp_dump_context::~temp_dump_context): Call
6493 refresh_dumps_are_enabled.
6494 (temp_dump_context::get_dumped_text): New member function.
6495 (selftest::verify_dumped_text): New function.
6496 (ASSERT_DUMPED_TEXT_EQ): New macro.
6497 (selftest::test_capture_of_dump_calls): Run all tests twice, with
6498 and then without optinfo enabled. Add uses of
6499 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
6500 * dumpfile.h: Update comment for the dump_* API.
6501 * optinfo-emit-json.cc
6502 (selftest::test_building_json_from_dump_calls): Update for new
6503 param for temp_dump_context ctor.
6504 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6505 and "m_owned" field.
6506 (optinfo_item::~optinfo_item): Likewise.
6507 (optinfo::add_item): New member function.
6508 (optinfo::emit): Update comment.
6509 (optinfo::add_string): Delete.
6510 (optinfo::add_printf): Delete.
6511 (optinfo::add_printf_va): Delete.
6512 (optinfo::add_gimple_stmt): Delete.
6513 (optinfo::add_gimple_expr): Delete.
6514 (optinfo::add_tree): Delete.
6515 (optinfo::add_symtab_node): Delete.
6516 (optinfo::add_dec): Delete.
6517 * optinfo.h (class dump_context): New forward decl.
6518 (optinfo::add_item): New decl.
6519 (optinfo::add_string): Delete.
6520 (optinfo::add_printf): Delete.
6521 (optinfo::add_printf_va): Delete.
6522 (optinfo::add_gimple_stmt): Delete.
6523 (optinfo::add_gimple_expr): Delete.
6524 (optinfo::add_tree): Delete.
6525 (optinfo::add_symtab_node): Delete.
6526 (optinfo::add_dec): Delete.
6527 (optinfo::add_poly_int): Delete.
6528 (optinfo_item::optinfo_item): Remove "owned" param.
6529 (class optinfo_item): Remove field "m_owned".
6531 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6534 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6535 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6536 requested variable alignment.
6537 (expand_one_ssa_partition): Likewise.
6538 (expand_one_var): Likewise.
6540 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6542 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6543 to speculation_safe_value_not_needed.
6545 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6547 * targhooks.h (speculation_safe_value_not_needed): New prototype.
6548 * targhooks.c (speculation_safe_value_not_needed): New function.
6549 * target.def (have_speculation_safe_value): Update documentation.
6550 * doc/tm.texi: Regenerated.
6552 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6554 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6555 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6557 (despeculate_copy<ALLI:mode>_insn): New insn.
6558 (despeculate_copyti_insn): New insn.
6559 (despeculate_simple<ALLI:mode>): New insn
6560 (despeculate_simpleti): New insn.
6561 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6563 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6564 aarch64_speculation_safe_value.
6565 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6567 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6569 * config/aarch64/aarch64-speculation.cc: New file.
6570 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6571 before pass_reorder_blocks.
6572 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6574 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6575 X14 and X15 when tracking speculation.
6576 * config/aarch64/aarch64.md (register name constants): Add
6577 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6578 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6579 (speculation_barrier): New insn attribute.
6580 (cmp<mode>): Allow SP in comparisons.
6581 (speculation_tracker): New insn.
6582 (speculation_barrier): Add speculation_barrier attribute.
6583 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6584 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6585 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6587 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6589 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6590 aarch64_track_speculation is true.
6591 (tb<optab><mode>1): Likewise.
6592 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6593 generate CB[N]Z when tracking speculation.
6594 (aarch64_split_compare_and_swap): Likewise.
6595 (aarch64_split_atomic_op): Likewise.
6597 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6599 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6601 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6603 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6604 (speculation_barrier): New insn.
6606 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6608 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6609 * config/arm/arm.md (speculation_barrier): New expand.
6610 (speculation_barrier_insn): New pattern.
6612 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6614 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6615 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6616 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6617 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6619 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6620 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6621 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6622 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6623 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6624 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6625 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6626 * builtins.c (expand_speculation_safe_value): New function.
6627 (expand_builtin): Call it.
6628 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6629 * doc/extend.texi: Document __builtin_speculation_safe_value.
6630 * doc/md.texi: Document "speculation_barrier" pattern.
6631 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6632 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6633 * doc/tm.texi: Regenerated.
6634 * target.def (have_speculation_safe_value, speculation_safe_value): New
6636 * targhooks.c (default_have_speculation_safe_value): New function.
6637 (default_speculation_safe_value): New function.
6638 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6639 (default_speculation_safe_value): Add prototype.
6641 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6643 * dump-context.h (dump_context::dump_loc): New decl.
6644 * dumpfile.c (dump_context::dump_loc): New member function.
6645 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6646 and dump_gimple_stmt.
6647 (dump_context::dump_gimple_expr_loc): Likewise, using
6649 (dump_context::dump_generic_expr_loc): Likewise, using
6651 (dump_context::dump_printf_loc_va): Likewise, using
6653 (dump_context::begin_scope): Explicitly using the global function
6654 "dump_loc", rather than the member function.
6656 2018-07-31 Martin Sebor <msebor@redhat.com>
6658 PR tree-optimization/86741
6659 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6661 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6663 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6664 depend on whether prefetch instructions will be emitted or not.
6665 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6666 will be emitted or not.
6667 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6668 (TARGET_SETMEM_PFD): New macros.
6670 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6672 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6673 (NULL_STMT_VEC_INFO): Delete.
6674 (stmt_vec_info::operator*): Likewise.
6675 (stmt_vec_info::operator gimple *): Likewise.
6676 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6677 of NULL_STMT_VEC_INFO.
6678 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6679 (vect_reassociating_reduction_p): Likewise.
6680 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6681 (vectorizable_store): Likewise.
6682 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6683 (vec_info::free_stmt_vec_infos): Likewise.
6685 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6687 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6688 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6690 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6692 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6693 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6694 (vec_info::free_stmt_vec_info): New private member functions.
6695 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6696 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6697 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6698 set_stmt_vec_info_vec and free_stmt_vec_infos.
6699 * tree-vect-loop.c (_loop_vec_info): Remove call to
6700 set_stmt_vec_info_vec.
6701 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6702 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6703 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6704 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6705 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6706 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6707 with the clearing in the xcalloc.
6708 (stmt_vec_info_vec): Delete.
6709 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6710 (vectorize_loops): Likewise.
6711 (vec_info::~vec_info): Remove argument from call to
6712 free_stmt_vec_infos.
6713 (vec_info::add_stmt): Remove vinfo argument from call to
6716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6718 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6719 rather than a gimple stmt.
6720 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6721 information for pattern statements when passed the original
6722 statement; instead wait to be passed the pattern statement itself.
6723 Don't call set_vinfo_for_stmt here.
6724 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6725 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6726 stmt_vec_infos here.
6727 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6728 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6729 stmt_vec_infos entry.
6731 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6733 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6734 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6735 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6736 * tree-vect-stmts.c (vectorizable_call): Likewise.
6737 (vectorizable_simd_clone_call): Likewise.
6739 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6741 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6742 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6743 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6744 * tree-vect-loop.c (vect_transform_loop): Likewise.
6745 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6746 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6750 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6751 (vect_dr_stmt): Delete.
6752 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6753 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6755 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6756 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6757 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6758 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6759 (vect_analyze_data_refs): Likewise.
6760 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6762 (vect_find_same_alignment_drs): Likewise.
6763 (vect_slp_analyze_node_dependences): Update calls accordingly.
6764 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6765 instead of DR_VECT_AUX.
6766 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6767 of a vector data references. Use vec_info::lookup_dr instead of
6769 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6770 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6771 instead of DR_VECT_AUX.
6773 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6775 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6777 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6779 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6780 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6781 (vect_gen_prolog_loop_niters): Likewise.
6783 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6785 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6786 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6787 (vect_known_alignment_in_bytes, vect_dr_behavior)
6788 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6789 instead of data_references. Update calls to other routines for
6790 which the same change has been made.
6791 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6792 dr_vec_infos instead of stmt_vec_infos.
6793 (vect_analyze_data_ref_dependence): Update call accordingly.
6794 (vect_slp_analyze_data_ref_dependence)
6795 (vect_record_base_alignments): Use DR_VECT_AUX.
6796 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6797 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6798 (vector_alignment_reachable_p, vect_get_data_access_cost)
6799 (vect_peeling_supportable, vect_analyze_group_access_1)
6800 (vect_analyze_group_access, vect_analyze_data_ref_access)
6801 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6802 (vect_compile_time_alias, vect_small_gap_p)
6803 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6804 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6805 instead of data_references. Update calls to other routines for
6806 which the same change has been made.
6807 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6808 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6809 (vect_slp_analyze_and_verify_node_alignment)
6810 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6811 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6812 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6814 (_vect_peel_info::dr): Replace with...
6815 (_vect_peel_info::dr_info): ...this new field.
6816 (vect_peeling_hash_get_most_frequent)
6817 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6818 (vect_peeling_hash_get_lowest_cost):
6819 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6820 routines for which the same change has been made.
6821 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6823 * tree-vect-loop-manip.c (get_misalign_in_elems)
6824 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6826 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6827 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6828 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6829 (get_group_load_store_type, get_negative_load_store_type)
6830 (vect_get_data_ptr_increment, vectorizable_store)
6831 (vectorizable_load): Likewise.
6832 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6833 Update calls to other routines for which the same change has been made.
6835 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6837 * tree-vectorizer.h (vec_info::move_dr): New member function.
6838 (dataref_aux): Rename to...
6839 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6840 (_stmt_vec_info::dr_aux): Update accordingly.
6841 (_stmt_vec_info::data_ref_info): Delete.
6842 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6843 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6844 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6845 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6847 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6848 (STMT_VINFO_DR_INFO): New macro.
6849 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6850 (set_dr_misalignment): Update after rename of dataref_aux.
6851 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6852 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6853 initialization of STMT_VINFO_DATA_REF.
6854 * tree-vectorizer.c (vec_info::move_dr): New function.
6855 * tree-vect-patterns.c (vect_recog_bool_pattern)
6856 (vect_recog_mask_conversion_pattern)
6857 (vect_recog_gather_scatter_pattern): Use it.
6858 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6859 the "dr" and "stmt" fields of dr_vec_info instead of
6860 STMT_VINFO_DATA_REF.
6862 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6864 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6865 (is_pattern_stmt_p): Use it.
6866 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6867 on pattern statements.
6869 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6871 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6872 original stmt as a stmt_vec_info rather than a gimple stmt.
6873 (vect_pattern_recog_1): Take the statement directly as a
6874 stmt_vec_info, rather than via a gimple_stmt_iterator.
6875 Update call to vect_mark_pattern_stmts.
6876 (vect_pattern_recog): Update calls accordingly.
6878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6880 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6881 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6882 a vect_def_type for the first argument.
6883 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6884 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6885 operand if it isn't defined by a vectorized statement.
6886 (vect_build_gather_load_calls): Remove the mask_dt argument and
6887 update calls to vect_get_vec_def_for_stmt_copy.
6888 (vectorizable_bswap): Likewise the dt argument.
6889 (vectorizable_call): Update calls to vectorizable_bswap and
6890 vect_get_vec_def_for_stmt_copy.
6891 (vectorizable_simd_clone_call, vectorizable_assignment)
6892 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6893 (vectorizable_comparison): Update calls to
6894 vect_get_vec_def_for_stmt_copy.
6895 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6897 (vect_get_loop_based_defs): Remove dt argument and update call
6898 to vect_get_vec_def_for_stmt_copy.
6899 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6900 and vect_get_vec_def_for_stmt_copy.
6901 (vectorizable_load): Update calls to vect_build_gather_load_calls
6902 and vect_get_vec_def_for_stmt_copy.
6903 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6904 (vectorizable_reduction, vectorizable_live_operation): Update calls
6905 to vect_get_vec_def_for_stmt_copy.
6907 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6909 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6910 and gimple stmt arguments with a stmt_vec_info.
6911 (vect_record_base_alignments): Update calls accordingly.
6912 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6913 and gimple stmt arguments with a stmt_vec_info.
6914 (vect_build_slp_tree_1): Remove vinfo argument and update call
6915 to vect_record_max_nunits.
6916 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6917 and vect_record_max_nunits.
6919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6921 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6922 file and take a stmt_vec_info instead of a gimple stmt.
6923 (supportable_widening_operation, vect_finish_replace_stmt)
6924 (vect_finish_stmt_generation, vect_get_store_rhs)
6925 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6926 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6927 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6928 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6929 (vect_create_data_ref_ptr, bump_vector_ptr)
6930 (vect_permute_store_chain, vect_setup_realignment)
6931 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6932 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6933 (vectorizable_reduction, vectorizable_induction)
6934 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6935 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6936 than gimple stmts as arguments.
6937 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6938 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6939 (can_group_stmts_p, vect_check_gather_scatter)
6940 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6941 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6942 (vect_permute_load_chain, vect_shift_permute_load_chain)
6943 (vect_transform_grouped_load)
6944 (vect_record_grouped_load_vectors): Likewise.
6945 * tree-vect-loop.c (vect_fixup_reduc_chain)
6946 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6947 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6948 (vectorizable_reduction, vectorizable_induction)
6949 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6950 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6951 (vect_get_load_store_mask): Likewise.
6952 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6953 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6954 * tree-vect-stmts.c (vect_mark_relevant)
6955 (is_simple_and_all_uses_invariant)
6956 (exist_non_indexing_operands_for_use_p, process_use)
6957 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6958 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6959 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6960 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6961 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6962 (get_negative_load_store_type, get_load_store_type)
6963 (vect_check_load_store_mask, vect_check_store_rhs)
6964 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6965 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6966 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6967 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6968 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6969 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6970 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6971 (supportable_widening_operation): Likewise.
6973 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6975 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6976 a stmt_vec_info instead of a gcall.
6977 (vect_check_gather_scatter): Update call accordingly.
6978 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6980 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6981 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6982 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6983 instead of a gimple stmt.
6984 (vect_transform_loop): Update calls accordingly.
6985 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6986 stmt_vec_infos instead of gimple stmts.
6987 (vect_analyze_slp_instance): Update use accordingly.
6988 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6989 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6990 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6991 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6992 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6993 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6994 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6995 down to subroutines.
6997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6999 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
7000 of the worklist from a vector of gimple stmts to a vector of
7002 * tree-vect-stmts.c (vect_mark_relevant, process_use)
7003 (vect_mark_stmts_to_be_vectorized): Likewise
7005 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7007 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
7008 statement before passing it to vect_analyze_stmt.
7009 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
7010 the chain of phi vector definitions. Track the exit phi via its
7012 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
7013 STMT_VINFO_REDUC_DEF.
7014 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
7015 stmt_vec_infos to handle the statement chains.
7016 (vect_get_slp_defs): Record the first statement in the node
7017 using a stmt_vec_info.
7018 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
7019 statements here and pass their stmt_vec_info down to subroutines.
7020 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
7021 down to vect_finish_stmt_generation.
7022 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
7023 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
7024 stmt_vec_infos to subroutines.
7025 (vect_remove_stores): Use stmt_vec_infos to handle the statement
7028 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7030 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
7031 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
7032 (vect_permute_store_chain, vect_setup_realignment)
7033 (vect_permute_load_chain, vect_shift_permute_load_chain)
7034 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
7035 stmts internally, and when passing values to other vectorizer routines.
7036 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7037 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
7038 (vect_analyze_loop_operations, get_initial_def_for_reduction)
7039 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
7040 (vectorizable_reduction, vectorizable_induction)
7041 (vectorizable_live_operation, vect_transform_loop_stmt)
7042 (vect_transform_loop): Likewise.
7043 * tree-vect-patterns.c (vect_reassociating_reduction_p)
7044 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
7045 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
7046 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7047 (vect_slp_analyze_node_operations_1): Likewise.
7048 * tree-vect-stmts.c (vect_mark_relevant, process_use)
7049 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
7050 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
7051 (vect_finish_stmt_generation_1, get_group_load_store_type)
7052 (get_load_store_type, vect_build_gather_load_calls)
7053 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7054 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7055 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7056 (vectorizable_store, vectorizable_load, vectorizable_condition)
7057 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
7058 (supportable_widening_operation): Likewise.
7059 (vect_get_vector_types_for_stmt): Likewise.
7060 * tree-vectorizer.h (vect_dr_behavior): Likewise.
7062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7064 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7065 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
7066 (vect_permute_store_chain, vect_permute_load_chain)
7067 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
7068 repeated stmt_vec_info lookups.
7069 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7070 (vect_update_ivs_after_vectorizer): Likewise.
7071 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
7072 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7073 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
7074 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7075 (vect_bb_slp_scalar_cost): Likewise.
7076 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
7078 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7080 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7081 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7082 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7083 to get gassigns and gcalls, rather than operating on generc gimple
7085 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7086 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7087 (vectorizable_load, vect_analyze_stmt): Likewise.
7088 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7090 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7092 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7093 return stmt_vec_infos rather than gimple stmts. Do not accept
7095 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7097 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7098 Update use of get_later_stmt.
7099 (vect_get_constant_vectors): Update call accordingly.
7100 (vect_schedule_slp_instance): Likewise
7101 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7102 (vect_slp_analyze_instance_dependence): Likewise.
7103 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7105 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7107 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7108 (stmt_info_for_cost::stmt_info): ...this new field.
7109 (add_stmt_costs): Update accordingly.
7110 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7111 (vect_get_known_peeling_cost): Likewise.
7112 (vect_estimate_min_profitable_iters): Likewise.
7113 * tree-vect-stmts.c (record_stmt_cost): Likewise.
7115 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7117 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7118 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7119 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7121 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7123 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7125 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7126 a gimple stmt to a stmt_vec_info.
7127 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7129 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7131 * tree-vectorizer.h (vec_info::grouped_stores): Change from
7132 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7133 (_loop_vec_info::reduction_chains): Likewise.
7134 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7136 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7140 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7141 a gimple stmt to a stmt_vec_info.
7142 (_stmt_vec_info::next_element): Likewise.
7143 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7144 (vect_slp_analyze_and_verify_node_alignment)
7145 (vect_analyze_group_access_1, vect_analyze_group_access)
7146 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7147 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7148 (vect_supportable_dr_alignment): Update accordingly.
7149 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7150 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7151 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7152 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7153 * tree-vect-slp.c (vect_build_slp_tree_1)
7154 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7155 (vect_split_slp_store_group, vect_analyze_slp_instance)
7156 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7157 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7158 (get_group_load_store_type, get_load_store_type)
7159 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7160 (vect_transform_stmt, vect_remove_stores): Likewise.
7162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7164 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7166 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7167 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7168 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7169 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7170 (vector_alignment_reachable_p, vect_get_data_access_cost)
7171 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7172 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7173 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7174 (vect_analyze_group_access_1, vect_analyze_group_access)
7175 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7176 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7177 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7178 result of vect_dr_stmt and use the stmt_vec_info instead of
7179 the associated gimple stmt.
7180 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7181 (vect_gen_prolog_loop_niters): Likewise.
7182 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7186 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7187 to a vec<stmt_vec_info>.
7188 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7189 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7191 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7192 to a vec<stmt_vec_info>.
7193 (bst_traits::value_type, bst_traits::value_type): Likewise.
7194 (bst_traits::hash): Update accordingly.
7195 (vect_get_and_check_slp_defs): Change the stmts parameter from
7196 a vec<gimple *> to a vec<stmt_vec_info>.
7197 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7198 (vect_build_slp_tree): Likewise.
7199 (vect_build_slp_tree_2): Likewise. Update uses of
7200 SLP_TREE_SCALAR_STMTS.
7201 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7202 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7203 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7204 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7205 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7206 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7207 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7208 (vect_get_constant_vectors, vect_get_slp_defs)
7209 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7210 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7211 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7212 instead of gimple stmts.
7213 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7214 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7215 (vect_slp_analyze_instance_dependence): Update uses of
7216 SLP_TREE_SCALAR_STMTS.
7217 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7218 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7219 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7220 (get_initial_defs_for_reduction): Likewise.
7221 (vect_create_epilog_for_reduction): Likewise.
7222 (vectorize_fold_left_reduction): Likewise.
7223 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7224 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7225 (can_vectorize_live_stmts): Likewise.
7227 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7229 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7230 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7231 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7233 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7235 (gather_scalar_reductions): Update after above interface changes.
7236 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7237 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7239 (vect_force_simple_reduction): Likewise.
7240 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7241 LOOP_VINFO_REDUCTIONS.
7242 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7246 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7247 a gimple stmt to a stmt_vec_info.
7248 * tree-vect-loop.c (vect_active_double_reduction_p)
7249 (vect_force_simple_reduction, vectorizable_reduction): Update
7252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7254 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7255 vec<gimple *> to a vec<stmt_vec_info>.
7256 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7257 the reduction_phis argument from a vec<gimple *> to a
7259 (vectorizable_reduction): Likewise the phis local variable that
7260 is passed to vect_create_epilog_for_reduction. Update for new type
7261 of SLP_TREE_VEC_STMTS.
7262 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7263 (vectorizable_live_operation): Likewise.
7264 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7265 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7267 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7269 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7270 a gimple stmt to a stmt_vec_info.
7271 (vectorizable_condition, vectorizable_live_operation)
7272 (vectorizable_reduction, vectorizable_induction): Pass back the
7273 vectorized statement as a stmt_vec_info.
7274 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7275 use of STMT_VINFO_VEC_STMT.
7276 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7277 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7278 as stmt_vec_infos rather than gimple stmts.
7279 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7281 (vectorizable_live_operation): Likewise.
7282 (vectorizable_reduction, vectorizable_induction): Likewise,
7283 updating use of STMT_VINFO_VEC_STMT.
7284 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7285 of STMT_VINFO_VEC_STMT.
7286 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7287 (vectorizable_simd_clone_call, vectorizable_conversion)
7288 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7289 (vectorizable_store, vectorizable_load, vectorizable_condition)
7290 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7291 from a gimple stmt to a stmt_vec_info.
7292 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
7293 pointer to a stmt_vec_info to the vectorizable_* routines.
7295 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7297 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7298 a gimple stmt to a stmt_vec_info.
7299 (is_pattern_stmt_p): Update accordingly.
7300 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7301 (vect_record_grouped_load_vectors): Likewise.
7302 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7303 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7304 (vect_model_reduction_cost): Likewise.
7305 (vect_create_epilog_for_reduction): Likewise.
7306 (vectorizable_reduction, vectorizable_induction): Likewise.
7307 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7308 Return the stmt_vec_info for the pattern statement.
7309 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7310 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7311 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7312 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7313 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7314 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7315 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7316 (free_stmt_vec_info, vect_is_simple_use): Likewise.
7318 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7320 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7321 (vect_finish_stmt_generation): Likewise.
7322 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7323 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7324 (vect_build_gather_load_calls): Use the return value of the above
7325 functions instead of a separate call to vinfo_for_stmt. Use narrow
7326 scopes for the input gimple stmt and wider scopes for the associated
7327 stmt_vec_info. Use vec_info::lookup_def when setting these
7328 stmt_vec_infos from an SSA_NAME definition.
7329 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7330 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7331 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7332 (vectorizable_store, vectorizable_load, vectorizable_condition)
7333 (vectorizable_comparison): Likewise.
7334 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7335 (vectorizable_reduction): Likewise.
7337 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7339 * tree-vectorizer.h (vect_is_simple_use): Add an optional
7340 stmt_vec_info * parameter before the optional gimple **.
7341 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7342 (process_use, vect_get_vec_def_for_operand_1): Update callers.
7343 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7344 * tree-vect-loop.c (vectorizable_reduction): Likewise.
7345 (vectorizable_live_operation): Likewise.
7346 * tree-vect-patterns.c (type_conversion_p): Likewise.
7347 (vect_look_through_possible_promotion): Likewise.
7348 (vect_recog_rotate_pattern): Likewise.
7349 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7351 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7353 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7354 a typedef to a wrapper class.
7355 (NULL_STMT_VEC_INFO): New macro.
7356 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7357 (stmt_vec_info::operator*): New function.
7358 (stmt_vec_info::operator gimple *): Likewise.
7359 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7360 (add_stmt_costs): Likewise.
7361 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7362 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7363 (vect_get_known_peeling_cost): Likewise.
7364 (vect_estimate_min_profitable_iters): Likewise.
7365 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7366 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7367 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7368 (vectorizable_store, free_stmt_vec_infos): Likewise.
7369 (new_stmt_vec_info): Change return type of xcalloc to
7372 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7374 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7375 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7376 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7377 a single_imm_use-based sequence.
7378 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7380 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7382 * tree-vectorizer.h (vec_info::lookup_def): Declare.
7383 * tree-vectorizer.c (vec_info::lookup_def): New function.
7384 * tree-vect-patterns.c (vect_get_internal_def): Use it.
7385 (vect_widened_op_tree): Likewise.
7386 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7387 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7388 (vectorizable_reduction): Likewise.
7389 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7391 (vect_is_slp_reduction): Update calls accordingly. Use
7392 vec_info::lookup_def.
7393 (vect_is_simple_reduction): Likewise
7394 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7398 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7399 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7400 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7402 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7403 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7404 (vect_update_vf_for_slp, vect_analyze_loop_operations)
7405 (vect_is_slp_reduction, vectorizable_induction)
7406 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7407 * tree-vect-patterns.c (vect_init_pattern_stmt):
7408 (vect_determine_min_output_precision_1, vect_determine_precisions)
7409 (vect_pattern_recog): Likewise.
7410 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7411 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7412 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7413 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7414 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7415 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
7416 info field from a loop to a loop_vec_info.
7418 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7420 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7421 (vec_info::add_stmt): Declare.
7422 * tree-vectorizer.c (vec_info::add_stmt): New function.
7423 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7424 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7425 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7426 (vectorizable_induction): Likewise.
7427 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7428 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7429 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7430 (vectorizable_load): Likewise.
7431 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7432 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7433 (vect_recog_gather_scatter_pattern): Likewise.
7434 (append_pattern_def_seq): Likewise. Remove a check that is
7435 performed by add_stmt itself.
7437 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7439 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7440 which make_ssa_name was called with new_stmt before new_stmt
7443 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7445 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7447 (vect_is_slp_reduction): ...here...
7448 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7449 that are already known to be false.
7451 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7453 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7454 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7455 STMT_VINFO_NUM_SLP_USES when it's true.
7456 (vect_free_slp_instance): Add a final_p parameter and pass it to
7458 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7459 (vect_analyze_slp_instance): Likewise.
7460 (vect_slp_analyze_operations): Likewise.
7461 (vect_slp_analyze_bb_1): Likewise.
7462 * tree-vectorizer.c (vec_info): Likewise.
7463 * tree-vect-loop.c (vect_transform_loop): Likewise.
7465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7467 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7468 function is not called for second and subsequent members of
7471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7473 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7474 cases for nested loops from here to ...
7475 (vect_create_epilog_for_reduction): ...here. Only call
7476 vect_is_simple_use for inner-loop reductions.
7478 2018-07-31 Martin Liska <mliska@suse.cz>
7480 PR gcov-profile/85338
7481 PR gcov-profile/85350
7482 PR gcov-profile/85372
7483 * profile.c (struct location_triplet): New.
7484 (struct location_triplet_hash): Likewise.
7485 (output_location): Do not output a BB that
7486 is already recorded for a line.
7487 (branch_prob): Use streamed_locations.
7489 2018-07-31 Martin Liska <mliska@suse.cz>
7491 PR gcov-profile/85370
7492 * coverage.c (coverage_begin_function): Do not mark target
7493 clones as artificial functions.
7495 2018-07-31 Martin Liska <mliska@suse.cz>
7497 PR gcov-profile/83813
7498 PR gcov-profile/84758
7499 PR gcov-profile/85217
7500 PR gcov-profile/85332
7501 * profile.c (branch_prob): Do not record GOTO expressions
7502 for GIMPLE statements which locations are already streamed.
7504 2018-07-31 Olivier Hainque <hainque@adacore.com>
7506 * gcc.c (handle_spec_function): Accept a soft_matched_part
7507 argument, as do_spec_1. Pass it down to ...
7508 (eval_spec_function): Accept a soft_matched_part argument,
7509 and pass it down to ...
7510 (do_spec_2): Accept a soft_matched_part argument, and pass
7511 it down to do_spec_1.
7512 (do_spec_1): Pass soft_matched_part to handle_spec_function.
7513 (handle_braces): Update call to handle_spec_function.
7514 (driver::set_up_specs): Update calls to do_spec_2.
7515 (compare_debug_dump_opt_spec_function): Likewise.
7516 (compare_debug_self_opt_spec_function): Likewise.
7518 2018-07-31 Olivier Hainque <hainque@adacore.com>
7520 * common.opt (nolibc): New option.
7521 * doc/invoke.texi (Link Options): Document it.
7522 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7523 * config/alpha/linux.h: Likewise.
7524 * config/arc/elf.h: Likewise.
7525 * config/arm/uclinux-elf.h: Likewise.
7526 * config/arm/unknown-elf.h: Likewise.
7527 * config/avr/avrlibc.h: Likewise.
7528 * config/bfin/bfin.h: Likewise.
7529 * config/bfin/linux.h: Likewise.
7530 * config/bfin/uclinux.h: Likewise.
7531 * config/darwin.h: Likewise.
7532 * config/darwin10.h: Likewise.
7533 * config/darwin12.h: Likewise.
7534 * config/gnu-user.h: Likewise.
7535 * config/lm32/uclinux-elf.h: Likewise.
7536 * config/pa/pa-hpux11.h: Likewise.
7537 * config/pa/pa64-hpux.h: Likewise.
7538 * config/sparc/sparc.h: Likewise.
7540 2018-07-31 Olivier Hainque <hainque@adacore.com>
7542 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7543 undefined variables.
7545 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7548 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7551 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7553 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7554 terminated string literal.
7556 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7558 PR rtl-optimization/85160
7559 * combine.c (is_just_move): New function.
7560 (try_combine): Allow combining two instructions into two if neither of
7561 the original instructions was a move.
7563 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7566 * doc/extend.texi (Global Register Variables): Discourage use of type
7568 (Local Register Variables): Likewise.
7570 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7572 PR tree-optimization/86506
7573 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7575 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7578 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7579 hard_regno, make sure no insn between `from` and `to` clobbers it.
7581 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7582 Tom de Vries <tdevries@suse.de>
7584 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7585 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7586 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7587 PTX_DEFAULT_RUNTIME_DIM.
7588 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7590 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7592 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7593 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7594 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7596 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7598 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7600 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7601 predicate to reflect toc fusion has been deleted.
7602 (toc_fusion_mem_raw): Delete, no longer used.
7603 (toc_fusion_mem_wrapped): Likewise.
7604 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7606 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7607 Delete, no longer used.
7608 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7609 meant to be used for toc fusion.
7610 (rs6000_debug_print_mode): Delete toc fusion debugging.
7611 (rs6000_debug_reg_global): Likewise.
7612 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7613 fusion and secondary reload support that were never used.
7614 (rs6000_option_override_internal): Delete TOC fusion, that was only
7615 partially defined, and it did not work unless you also used the
7617 (rs6000_legitimate_address_p): Delete TOC fusion support.
7618 (rs6000_opt_masks): Likewise.
7619 (fusion_wrap_memory_address): Delete function, no longer used.
7620 (fusion_split_address); Delete TOC fusion support.
7621 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7622 longer used with toc fusion being deleted.
7623 (TARGET_TOC_FUSION_FP): Likewise.
7624 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7626 (toc fusion spliter): Delete TOC fusion support.
7627 (toc_fusionload_<mode>): Likewise.
7628 (toc_fusionload_di): Likewise.
7629 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7630 longer needs to be named. Rename predicate to delete TOC fusion.
7631 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7632 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7633 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7634 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7635 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7637 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7639 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7640 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7641 __int128 in built-in function prototypes.
7642 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7643 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7645 2018-07-27 Martin Sebor <msebor@redhat.com>
7647 PR tree-optimization/86696
7648 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7649 types, including enums.
7650 (handle_char_store): Be prepared for the above function to fail.
7652 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7654 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7655 when optimization level is lower than 2 or optimize for size.
7657 2018-07-26 Martin Sebor <msebor@redhat.com>
7659 PR tree-optimization/86043
7660 PR tree-optimization/86042
7661 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7662 (get_string_cst_length): Rename...
7663 (get_min_string_length): ...to this. Add argument.
7664 (handle_char_store): Extend to handle multi-character stores by
7666 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7667 * tree.h (initializer_zerop): Add argument.
7669 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7672 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7673 declare target to variables if they have always,{to,from,tofrom} map
7676 2018-07-26 Martin Liska <mliska@suse.cz>
7679 * lto-wrapper.c: Add linker_output as prefix
7680 for ltrans_output_file.
7682 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7684 PR rtl-optimization/85805
7685 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7686 value for hard registers if that was written in the same mode.
7688 2018-07-26 Martin Liska <mliska@suse.cz>
7690 PR gcov-profile/86536
7691 * gcov.c (format_gcov): Use printf format %.*f directly
7692 and do not handle special values.
7694 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7696 * common/config/arc/arc-common.c (arc_option_optimization_table):
7697 Update default optimizations for size.
7699 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7701 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7702 * config/arc/constraints.md (CfZ): New constraint.
7703 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7704 (subsf3_fpu): Likewise.
7705 (cmpsf_fpu): Likewise.
7706 (cmpsf_fpu_uneq): Likewise.
7708 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7710 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7712 (arc_is_uncached_mem_p): uncached applies to both the variable and
7715 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7717 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7720 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7722 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7723 field "m_scopes" from vec to auto_vec.
7725 2018-07-25 Martin Liska <mliska@suse.cz>
7727 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7730 2018-07-25 Richard Biener <rguenther@suse.de>
7733 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7734 special wrt context_die late.
7735 (gen_subprogram_die): Re-use DIEs in local scope.
7737 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7739 PR tree-optimization/86644
7740 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7742 2018-07-25 Martin Liska <mliska@suse.cz>
7745 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7746 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7748 2018-07-25 Martin Liska <mliska@suse.cz>
7751 * params.def: Explain ASan abbreviation and provide
7752 a documentation link.
7754 2018-07-24 Martin Sebor <msebor@redhat.com>
7756 PR tree-optimization/86622
7757 PR tree-optimization/86532
7758 * builtins.h (string_length): Declare.
7759 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7760 (check_access): Be prepared for non-constant length ranges.
7761 (string_length): Make extern.
7762 * expr.c (string_constant): Only handle the minor non-constant
7763 array index. Use string_constant to compute the length of
7764 a generic string constant.
7766 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7768 PR tree-optimization/86618
7769 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7770 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7772 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7774 PR tree-optimization/86636
7775 * json.cc (json::object::set): Fix comment. Add assertions.
7776 (json::array::append): Move here from json.h. Add comment and an
7778 (json::string::string): Likewise.
7779 * json.h (json::array::append): Move to json.cc.
7780 (json::string::string): Likewise.
7781 * optinfo-emit-json.cc
7782 (optrecord_json_writer::impl_location_to_json): Assert that we
7783 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7784 wrapper around it. Expand the location once, rather than three
7786 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7787 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7789 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7790 places. Fix some overlong lines.
7792 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7794 * config/aarch64/aarch64-simd.md
7795 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7796 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7797 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7798 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7799 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7800 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7801 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7802 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7803 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7805 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7808 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7809 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7810 and abs_d == d, do the power of two handling if profitable.
7812 2018-07-24 Richard Biener <rguenther@suse.de>
7814 * match.pd: Add BIT_FIELD_REF canonicalizations.
7816 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7819 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7821 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7823 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7824 terminated STRING_CST object.
7826 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7828 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7830 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7832 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7833 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7834 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7835 the elements into a register.
7836 (rs6000_split_v4si_init_di_reg): Delete.
7837 (rs6000_split_v4si_init): Delete.
7838 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7839 (vsx_init_v4si): Rewrite as a define_expand.
7841 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7843 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7844 zero_extend argument from memory): New.
7846 2018-07-22 Martin Sebor <msebor@redhat.com>
7849 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7850 diagnosing calls with unknown arguments unless -Walloca-larger-than
7851 is restricted to less than PTRDIFF_MAX bytes.
7853 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7855 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7857 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7859 * pretty-print.c (text_info::set_location): Remove redundant
7860 "line_table" parameter from call to rich_location::set_range.
7862 2018-07-20 Martin Sebor <msebor@redhat.com>
7865 * builtins.c (expand_builtin_alloca): Adjust.
7866 * calls.c (alloc_max_size): Simplify.
7867 * cgraphunit.c (cgraph_node::expand): Adjust.
7868 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7870 (frame_larger_than_size): Same.
7871 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7872 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7874 * doc/invoke.texi (GCC Command Options): Document option arguments.
7875 Explain byte-size arguments and suffixes.
7876 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7877 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7878 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7879 * doc/options.texi (UInteger): Expand.
7880 (Host_Wide_Int, ByteSize): Document new properties.
7881 * final.c (final_start_function_1): Include sizes in an error message.
7882 * function.c (frame_offset_overflow): Same.
7883 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7884 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7885 Diagnose unbounded alloca calls only for limits of less than
7887 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7888 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7890 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7891 only for limits of less than PTRDIFF_MAX.
7892 * langhooks-def.h (lhd_handle_option): Change function argument
7894 * langhooks.c (lhd_handle_option): Same.
7895 * langhooks.h (handle_option): Same.
7896 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7898 (var_type, var_type_struct): Same.
7899 (var_set): Handle ByteSize flag.
7900 * optc-gen.awk: Add comments to output to ease debugging. Make
7901 use of HOST_WIDE_INT where appropriate.
7902 * opts-gen-save.awk: Use %lx to format unsigned long.
7903 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7904 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7905 arguments. Parse bytes-size suffixes.
7906 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7907 (enum_value_to_arg): Same.
7908 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7909 (handle_option): Adjust.
7910 (generate_option): Change function argument to HOST_WIDE_INT.
7911 (cmdline_handle_error): Adjust.
7912 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7913 (set_option): Change function argument to HOST_WIDE_INT.
7914 (option_enabled): Handle cl_host_wide_int.
7915 (get_option_state): Handle CLVC_SIZE.
7916 (control_warning_option): Same.
7917 * opts.c (common_handle_option): Change function argument to
7918 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7919 OPT_Wvla_larger_than_.
7920 * opts.h (enum cl_var_type): Add an enumerator.
7921 * stor-layout.c (layout_decl): Print a more meaningful warning.
7922 * toplev.c (output_stack_usage): Adjust.
7924 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7926 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7927 call to inline_expand_builtin_string_cmp.
7928 (expand_builtin_strcmp): Likewise.
7929 (expand_builtin_strncmp): Likewise.
7930 (inline_string_cmp): Delete the last parameter, change char_type_node
7931 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7933 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7934 the inlining expansion on target where the type of the call has same or
7935 narrower precision than unsigned char.
7937 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7939 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7940 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7941 * common.opt (fsave-optimization-record): New option.
7942 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7943 * doc/invoke.texi (-fsave-optimization-record): New option.
7944 * dumpfile.c: Include "optinfo-emit-json.h".
7945 (struct kv_pair): Move to coretypes.h.
7946 (optgroup_options): Make non-static.
7947 (dump_context::end_scope): Call
7948 optimization_records_maybe_pop_dump_scope.
7949 * dumpfile.h (optgroup_options): New decl.
7950 * json.cc: New file.
7952 * optinfo-emit-json.cc: New file.
7953 * optinfo-emit-json.h: New file.
7954 * optinfo.cc: Include "optinfo-emit-json.h".
7955 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7956 (optinfo_enabled_p): Check optimization_records_enabled_p.
7957 (optinfo_wants_inlining_info_p): Likewise.
7958 * optinfo.h: Update comment.
7959 * profile-count.c (profile_quality_as_string): New function.
7960 * profile-count.h (profile_quality_as_string): New decl.
7961 (profile_count::quality): New accessor.
7962 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7963 and optinfo_emit_json_cc_tests.
7964 * selftest.h (selftest::json_cc_tests): New decl.
7965 (selftest::optinfo_emit_json_cc_tests): New decl.
7966 * toplev.c: Include "optinfo-emit-json.h".
7967 (compile_file): Call optimization_records_finish.
7968 (do_compile): Call optimization_records_start.
7969 * tree-ssa-live.c: Include optinfo.h.
7970 (remove_unused_scope_block_p): Retain inlining information if
7971 optinfo_wants_inlining_info_p returns true.
7973 2018-07-20 Richard Biener <rguenther@suse.de>
7976 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7977 to cover -flto-partition=none.
7979 2018-07-20 Martin Liska <mliska@suse.cz>
7981 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7982 (get_decl_source_range): Remove unused function.
7984 2018-07-20 Richard Biener <rguenther@suse.de>
7986 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7987 (struct vn_phi_s): Likewise.
7988 (struct vn_reference_s): Likewise.
7989 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7990 for searching the slot of an entry known to be in the hash itself.
7991 (vn_phi_hasher::equal): Likewise.
7992 (vn_reference_hasher::equal): Likewise.
7993 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7995 (optimistic_info, current_info): Remove, keeping only valid_info.
7996 (vn_reference_lookup_1): Remove fallback lookup.
7997 (vn_reference_lookup_2): Likewise.
7998 (vn_nary_op_lookup_1): Likewise.
7999 (vn_phi_lookup): Likewise.
8000 (vn_nary_build_or_lookup_1): Make sure to not chain the built
8002 (vn_reference_insert): Adjust, chain the inserted hash element
8003 at last_inserted_ref.
8004 (vn_reference_insert_pieces): Likewise.
8005 (visit_reference_op_call): Likewise.
8006 (vn_nary_op_insert_into): Chain the inserted hash element at
8008 (vn_nary_op_insert_pieces): Adjust.
8009 (vn_nary_op_insert): Likewise.
8010 (vn_nary_op_insert_stmt): Likewise.
8011 (vn_phi_insert): Adjust, chain the inserted hash element at
8013 (process_scc): Remove clearing and copying the optimistic
8014 table. Instead remove elements inserted during an optimistic
8015 iteration from the single table we maintain.
8016 (init_scc_vn): Adjust.
8017 (free_scc_vn): Likewise.
8018 (sccvn_dom_walker::record_cond): Likewise.
8019 (sccvn_dom_walker::after_dom_children): Likewise.
8021 2018-07-19 Martin Sebor <msebor@redhat.com>
8023 PR tree-optimization/84047
8024 PR tree-optimization/83776
8025 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
8026 (check_array_bounds): Call it.
8028 2018-07-19 Martin Sebor <msebor@redhat.com>
8030 * align.h (align_flags): Use member initialization.
8032 2018-07-19 David Malcolm <dmalcolm@redhat.com>
8034 * Makefile.in (OBJS): Add optinfo.o.
8035 * coretypes.h (class symtab_node): New forward decl.
8036 (struct cgraph_node): New forward decl.
8037 (class varpool_node): New forward decl.
8038 * dump-context.h: New file.
8039 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
8041 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
8042 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
8043 (set_alt_dump_file): Likewise.
8044 (dump_context::~dump_context): New dtor.
8045 (dump_gimple_stmt): Move implementation to...
8046 (dump_context::dump_gimple_stmt): ...this new member function.
8047 Add the stmt to any pending optinfo, creating one if need be.
8048 (dump_gimple_stmt_loc): Move implementation to...
8049 (dump_context::dump_gimple_stmt_loc): ...this new member function.
8050 Start a new optinfo and add the stmt to it.
8051 (dump_gimple_expr): Move implementation to...
8052 (dump_context::dump_gimple_expr): ...this new member function.
8053 Add the stmt to any pending optinfo, creating one if need be.
8054 (dump_gimple_expr_loc): Move implementation to...
8055 (dump_context::dump_gimple_expr_loc): ...this new member function.
8056 Start a new optinfo and add the stmt to it.
8057 (dump_generic_expr): Move implementation to...
8058 (dump_context::dump_generic_expr): ...this new member function.
8059 Add the tree to any pending optinfo, creating one if need be.
8060 (dump_generic_expr_loc): Move implementation to...
8061 (dump_context::dump_generic_expr_loc): ...this new member
8062 function. Add the tree to any pending optinfo, creating one if
8064 (dump_printf): Move implementation to...
8065 (dump_context::dump_printf_va): ...this new member function. Add
8066 the text to any pending optinfo, creating one if need be.
8067 (dump_printf_loc): Move implementation to...
8068 (dump_context::dump_printf_loc_va): ...this new member function.
8069 Start a new optinfo and add the stmt to it.
8070 (dump_dec): Move implementation to...
8071 (dump_context::dump_dec): ...this new member function. Add the
8072 value to any pending optinfo, creating one if need be.
8073 (dump_context::dump_symtab_node): New member function.
8074 (dump_context::get_scope_depth): New member function.
8075 (dump_context::begin_scope): New member function.
8076 (dump_context::end_scope): New member function.
8077 (dump_context::ensure_pending_optinfo): New member function.
8078 (dump_context::begin_next_optinfo): New member function.
8079 (dump_context::end_any_optinfo): New member function.
8080 (dump_context::s_current): New global.
8081 (dump_context::s_default): New global.
8082 (dump_scope_depth): Delete global.
8083 (dumpfile_ensure_any_optinfo_are_flushed): New function.
8084 (dump_symtab_node): New function.
8085 (get_dump_scope_depth): Reimplement in terms of dump_context.
8086 (dump_begin_scope): Likewise.
8087 (dump_end_scope): Likewise.
8088 (selftest::temp_dump_context::temp_dump_context): New ctor.
8089 (selftest::temp_dump_context::~temp_dump_context): New dtor.
8090 (selftest::verify_item): New function.
8091 (ASSERT_IS_TEXT): New macro.
8092 (ASSERT_IS_TREE): New macro.
8093 (ASSERT_IS_GIMPLE): New macro.
8094 (selftest::test_capture_of_dump_calls): New test.
8095 (selftest::dumpfile_c_tests): Call it.
8096 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8097 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8098 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8099 descriptive comment.
8100 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8101 (dump_node, dump_bb): Move these unrelated decls.
8102 (class dump_manager): Add leading comment.
8103 * optinfo.cc: New file.
8104 * optinfo.h: New file.
8106 2018-07-19 Michael Collison <michael.collison@arm.com>
8107 Richard Henderson <rth@redhat.com>
8109 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8110 (subti): Handle op1 zero.
8111 (subvti4, usub4ti4): New.
8112 (*sub<GPI>3_compare1_imm): New.
8113 (sub<GPI>3_carryinCV): New.
8114 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8115 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8117 2018-07-19 Michael Collison <michael.collison@arm.com>
8118 Richard Henderson <rth@redhat.com>
8120 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8121 (addti3): Create simpler code if low part is already known to be 0.
8122 (addvti4, uaddvti4): New.
8123 (*add<GPI>3_compareC_cconly_imm): New.
8124 (*add<GPI>3_compareC_cconly): New.
8125 (*add<GPI>3_compareC_imm): New.
8126 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8127 handle constants within this pattern..
8128 (*add<GPI>3_compareV_cconly_imm): New.
8129 (*add<GPI>3_compareV_cconly): New.
8130 (*add<GPI>3_compareV_imm): New.
8131 (add<GPI>3_compareV): New.
8132 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8133 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8134 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8135 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8136 with 'comparison' operator.
8137 (*add<GPI>3_compareV_cconly_imm): Ditto.
8138 (*add<GPI>3_compareV_cconly): Ditto.
8139 (*add<GPI>3_compareV_imm): Ditto.
8140 (add<GPI>3_compareV): Ditto.
8141 (add<mode>3_carryinC): Ditto.
8142 (*add<mode>3_carryinC_zero): Ditto.
8143 (*add<mode>3_carryinC): Ditto.
8144 (add<mode>3_carryinV): Ditto.
8145 (*add<mode>3_carryinV_zero): Ditto.
8146 (*add<mode>3_carryinV): Ditto.
8148 2018-07-19 Michael Collison <michael.collison@arm.com>
8149 Richard Henderson <rth@redhat.com>
8151 * config/aarch64/aarch64-modes.def (CC_V): New.
8152 * config/aarch64/aarch64-protos.h
8153 (aarch64_addti_scratch_regs): Declare
8154 (aarch64_subvti_scratch_regs): Declare.
8155 (aarch64_expand_subvti): Declare.
8156 (aarch64_gen_unlikely_cbranch): Declare
8157 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8158 for signed overflow using CC_Vmode.
8159 (aarch64_get_condition_code_1): Handle CC_Vmode.
8160 (aarch64_gen_unlikely_cbranch): New function.
8161 (aarch64_addti_scratch_regs): New function.
8162 (aarch64_subvti_scratch_regs): New function.
8163 (aarch64_expand_subvti): New function.
8165 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8167 * config/aarch64/aarch64-option-extensions.def: New entry for profile
8169 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8170 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8173 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8176 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8177 address check not strict.
8179 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
8181 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8183 (store_pair_lanes<mode>): Likewise.
8184 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8185 enum value 'ADDR_QUERY_LDP_STP_N'.
8186 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8187 (aarch64_print_address_internal): Add declaration.
8188 (aarch64_print_ldpstp_address): Remove.
8189 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8190 (aarch64_print_operand): Change printing of 'y'.
8191 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8192 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8193 'true' rather than '1'.
8194 * config/aarch64/constraints.md (Uml): Likewise.
8195 (Uml): Rename to Umn.
8198 2018-07-19 Richard Biener <rguenther@suse.de>
8200 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8202 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8203 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8204 (vn_reference_hasher): Likewise.
8205 (struct vn_tables_s): Remove obstack and alloc-pool members.
8206 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8207 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8208 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8209 (vn_reference_insert_pieces): Likewise.
8210 (alloc_vn_nary_op_noinit): Adjust.
8211 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8212 (vn_phi_eq): Adjust.
8213 (shared_lookup_phiargs): Remove.
8214 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8215 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8216 (visit_reference_op_call): Likewise.
8217 (copy_nary, copy_phi, copy_reference): Remove.
8218 (process_scc): Rewind the obstack when iterating. Do not
8219 copy the elements to valid_info but just move them from one
8220 hashtable to the other.
8221 (allocate_vn_table): Adjust.
8222 (free_vn_table): Likewise.
8223 (init_scc_vn): Likewise.
8224 (free_scc_vn): Likewise.
8226 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
8229 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8230 indirect_return as function type attribute.
8231 (ix86_attribute_table): Change indirect_return to function
8233 * doc/extend.texi: Update indirect_return attribute.
8235 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
8237 * wide-int.h (widest2_int): New.
8238 * gimple-fold.c (arith_overflowed_p): Use it.
8239 * tree.h (widest2_int_cst): New.
8240 * tree-vrp.c (wide_int_binop_overflow): Rename from
8241 vrp_int_const_binop.
8242 Rewrite to work on trees.
8243 (extract_range_from_multiplicative_op_1): Abstract code to...
8244 (wide_int_range_min_max): ...here.
8245 (wide_int_range_cross_product): ...and here.
8246 (extract_range_from_binary_expr_1): Abstract overflow code to...
8247 (wide_int_range_mult_wrapping): ...here.
8248 * tree-vrp.h (wide_int_range_cross_product): New.
8249 (wide_int_range_mult_wrapping): New.
8251 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
8252 Julia Koval <julia.koval@intel.com>
8254 * config/i386/x86-tune-costs.h (skylake_memcpy,
8255 skylake_memset): Replace rep_prefix with unrolling for size 512.
8257 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
8260 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8261 comparision with EQ_EXPR in last stmt.
8263 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
8265 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8266 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8267 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8268 previously known as "PowerPC AltiVec Built-in Functions". Move
8269 some material to new subsubsections "PowerPC AltiVec Built-in
8270 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8272 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8273 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8274 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8275 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8277 2018-07-18 Richard Biener <rguenther@suse.de>
8279 PR tree-optimization/86557
8280 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8283 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
8285 * config/s390/s390.c (s390_function_profiler): Generate CFI.
8287 2018-07-17 Jeff Law <law@redhat.com>
8289 * config/arm/arm.c (get_label_padding): Update for recent
8290 changes to label_to_alignment.
8292 PR tree-optimization/86010
8293 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8295 * config/mips/mips.c (vr4130_align_insns): Update for recent
8296 changes to label_to_alignment.
8298 * config/frv/frv.c (frv_label_align): Update for recent changes
8299 to label_to_alignment.
8301 * config/nios2/nios2.c (nios2_label_align): Update for recent
8302 changes which dropped ALIGN_LABELS_LOG.
8304 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
8306 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8307 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8309 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
8311 * config/arc/arc.c (arc_label_align): Use align_labels instead of
8312 deprecated align_labels_log.
8314 2018-07-17 Richard Biener <rguenther@suse.de>
8317 * dwarf2out.c (init_sections_and_labels): Always generate
8318 a debug_line_str_section for early LTO debug.
8319 (dwarf2out_finish): Reset debug_line_str_hash output early.
8320 Bump counter for extra dwarf5 .debug_loc labels to not conflict
8322 (dwarf2out_early_finish): Output debug_line_str.
8324 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8326 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8327 index register on z196 or later.
8329 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8331 * config/s390/s390.c (s390_default_align): Set default function
8333 (s390_override_options_after_change): Call s390_default align.
8334 (s390_option_override_internal): Call s390_default_align.
8335 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8337 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8340 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8341 to _looptemp_ clauses, other than the first two.
8343 2018-07-17 Martin Liska <mliska@suse.cz>
8345 * opts.c: Do not enable OPT_falign_* for -Os.
8347 2018-07-17 Martin Liska <mliska@suse.cz>
8349 * align.h (MAX_CODE_ALIGN): New.
8350 (MAX_CODE_ALIGN_VALUE): New.
8351 * common/config/i386/i386-common.c (ix86_handle_option):
8352 (MAX_CODE_ALIGN): Moved to align.h.
8353 * final.c (MAX_CODE_ALIGN): Likewise.
8354 * opts.c (parse_and_check_align_values):
8355 (MAX_CODE_ALIGN): Likewise.
8356 (MAX_CODE_ALIGN_VALUE): Likewise.
8358 2018-07-17 Martin Liska <mliska@suse.cz>
8360 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8361 in order to fulfil coding style.
8362 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8363 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8364 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8365 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8366 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8367 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8368 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8369 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8370 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8372 2018-07-17 Martin Liska <mliska@suse.cz>
8374 * align.h: New file.
8375 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8377 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8378 align_flags of label_to_alignment.
8379 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8381 * config/m68k/m68k.c: Do not use removed align_labels_value and
8383 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8384 (LOOP_ALIGN): Likewise.
8385 (LABEL_ALIGN): Likewise.
8386 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8387 Remove not used macro.
8388 (rs6000_loop_align): Change return type to align_flags.
8389 (rs6000_loop_align_max_skip): Remove.
8390 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8391 Change return type to align_flags.
8392 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8393 Remove not used macro.
8394 (rs6000_loop_align): Change return type to align_flags.
8395 (rs6000_loop_align_max_skip): Remove.
8396 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8397 * config/rx/rx-protos.h (rx_align_for_label): Make it
8399 * config/rx/rx.c (rx_align_for_label): Change return type
8401 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8403 into align_flags class.
8404 (LABEL_ALIGN): Likewise.
8405 (LOOP_ALIGN): Likewise.
8406 * config/s390/s390.c (s390_label_align): Use align_flags
8408 (s390_asm_output_function_label): Likewise.
8409 * config/sh/sh.c (sh_override_options_after_change):
8410 Use align_flags class directly without macros.
8411 (find_barrier): Likewise.
8412 (barrier_align): Likewise.
8413 (sh_loop_align): Likewise.
8414 * config/spu/spu.c (spu_option_override):
8415 Use align_flags_tuple::get_value instead of removed macros.
8416 (spu_sched_init): Likewise.
8417 * config/spu/spu.h (GTY): Likewise.
8418 * config/visium/visium.c (visium_option_override):
8419 Set "8" as default secondary alignment.
8420 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8421 in order to guarantee secondary alignment of 8.
8422 * coretypes.h: Include align.h header file.
8423 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8424 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8425 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8426 * doc/tm.texi.in: Likewise.
8427 * final.c (struct label_alignment): Remove not used structure.
8428 (LABEL_ALIGN): Change type to align_flags.
8429 (LOOP_ALIGN): Likewise.
8430 (JUMP_ALIGN): Likewise.
8431 (default_loop_align_max_skip): Remove.
8432 (default_label_align_max_skip): Likewise.
8433 (default_jump_align_max_skip): Likewise.
8434 (default_label_align_after_barrier_max_skip):
8435 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8436 (LABEL_TO_MAX_SKIP): Remove.
8437 (label_to_alignment): Return align_flags type instead of integer.
8438 (label_to_max_skip): Remove.
8439 (align_fuzz): Use align_flags type.
8440 (compute_alignments): Use align_flags type and use align_flags::max
8441 to combine multiple alignments.
8442 (grow_label_align): Grow vec instead of C array.
8443 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8444 (shorten_branches): Use align_flags type and use align_flags::max
8445 to combine multiple alignments.
8446 (final_scan_insn_1): Remove usage of secondary alignment that comes
8447 from label alignment, but instead use proper secondary alignment
8448 which is computed in grow_label_align.
8449 * flags.h (struct align_flags_tuple): Move to align.h.
8450 (struct align_flags): Likewise.
8451 (state_align_loops): Rename to align_loops.
8452 (state_align_jumps): Rename to align_jumps.
8453 (state_align_labels): Rename to align_labels.
8454 (state_align_functions): Rename to align_functions.
8455 (align_loops_log): Remove.
8456 (align_jumps_log): Remove.
8457 (align_labels_log): Remove.
8458 (align_functions_log): Remove.
8459 (align_loops_max_skip): Remove.
8460 (align_jumps_max_skip): Remove.
8461 (align_labels_max_skip): Remove.
8462 (align_functions_max_skip): Remove.
8463 (align_loops_value): Remove.
8464 (align_jumps_value): Remove.
8465 (align_labels_value): Remove.
8466 (align_functions_value): Remove.
8467 * output.h (label_to_alignment): Change return type to align_flags.
8468 (label_to_max_skip): Remove.
8469 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8470 jump_align_max_skip macros.
8471 * targhooks.h (default_loop_align_max_skip): Remove.
8472 (default_label_align_max_skip): Likewise.
8473 (default_jump_align_max_skip): Likewise.
8474 (default_label_align_after_barrier_max_skip): Remove.
8475 * toplev.c (read_log_maxskip): Use ::normalize function.
8476 (parse_N_M): Remove not used argument and also call ::normalize.
8477 (parse_alignment_opts): Do not pass unused arguments.
8478 * varasm.c (assemble_start_function): Use directly align_functions
8479 instead of removed macros.
8480 * system.h: Do not poison removed macros.
8482 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8485 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8486 and cond temporaries don't have reference type if iterator has
8487 pointer type. For init use &for_pre_body instead of pre_p if
8488 for_pre_body is non-empty.
8490 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8492 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8493 double-double modes to SFmode directly directly.
8494 (trunc<mode>sf2_fprs): Delete.
8496 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8498 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8499 for conversions between IFmode and the decimal floating point modes.
8500 (init_float128_ieee): Use the correct names for conversions between
8501 KFmode and the decimal floating point modes.
8503 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8505 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8506 for the conversions between TDmode and IFmode.
8507 (init_float128_ieee): Use more correct names for the conversions
8508 between TDmode and KFmode.
8510 2018-07-16 Jakub Jelinek <jakub@redhat.com>
8512 PR tree-optimization/86526
8513 * builtins.c (expand_builtin_memcmp): Formatting fixes.
8514 (inline_expand_builtin_string_cmp): Likewise.
8515 (inline_string_cmp): Likewise. Use c_readstr instead of
8516 builtin_memcpy_read_str. Add unit_mode temporary.
8518 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8521 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8522 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8524 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8526 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8527 Alphabetize prototypes of built-in functions, separating out
8528 built-in functions that are listed in this section but should be
8529 described elsewhere.
8531 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
8534 * expmed.c (emit_store_flag): Do not emit setcc followed by a
8535 conditional move when trapping comparison was split to a
8536 non-trapping one (and vice versa).
8538 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8540 * config/s390/s390.c (s390_function_profiler): Generate nops
8541 instead of profiler call sequences.
8542 * config/s390/s390.opt: Add the new option.
8544 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8546 * config/s390/s390.c (s390_function_profiler): Generate
8547 __mcount_loc section.
8548 * config/s390/s390.opt: Add the new option.
8550 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8552 * common.opt: Add the new warning.
8553 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8554 %r0,__fentry__" when -mfentry is specified.
8555 (s390_option_override_internal): Disallow -mfentry for 31-bit
8557 * config/s390/s390.opt: Add the new option.
8559 2018-07-16 Richard Biener <rguenther@suse.de>
8562 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8563 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8565 2018-07-16 Martin Liska <mliska@suse.cz>
8568 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8571 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8573 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8575 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8577 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8579 * config/arc/arc-cpus.def (hs4x): New cpu.
8581 * config/arc/arc-tables.opt: Regenerate.
8582 * config/arc/arc.c (arc_sched_issue_rate): New function.
8583 (TARGET_SCHED_ISSUE_RATE): Define.
8584 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8585 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8587 (attr tune): Add ARCHS4x tune values.
8588 (attr tune_dspmpy): Define.
8589 (*tst): Correct instruction type.
8590 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8591 * config/arc/arcHS4x.md: New file.
8592 * config/arc/fpu.md: Update instruction type attributes.
8593 * config/arc/t-multilib: Regenerate.
8595 2018-07-16 Tom de Vries <tdevries@suse.de>
8598 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8600 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8602 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8605 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8607 PR tree-optimization/86514
8608 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8609 conversion to a boolean type from a type with greater precision.
8611 2018-07-16 Tom de Vries <tdevries@suse.de>
8613 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8614 dump_flags request TDF_SLIM.
8616 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8618 * fold-const.c (int_const_binop_1): Abstract...
8619 (wide_int_binop): ...wide int code here.
8620 (poly_int_binop): ...poly int code here.
8621 Abstract the rest of int_const_binop_1 into int_const_binop.
8622 * fold-const.h (wide_int_binop): New.
8623 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8624 Remove useless PLUS/MINUS_EXPR case.
8625 (zero_nonzero_bits_from_vr): Move wide int code...
8626 (zero_nonzero_bits_from_bounds): ...here.
8627 (extract_range_from_binary_expr_1): Move mask optimization code...
8628 (range_easy_mask_min_max): ...here.
8629 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8630 (range_easy_mask_min_max): New.
8632 2018-07-15 Jeff Law <law@redhat.com>
8635 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8638 2018-07-14 Jim Wilson <jimw@sifive.com>
8640 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8642 2018-07-14 Paul Koning <ni1d@arrl.net>
8644 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8646 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8648 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8651 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8652 Steve Munroe <munroesj52@gmail.com>
8654 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8655 (_mm_andnot_si128): Likewise.
8656 (_mm_or_si128): Likewise.
8657 (_mm_xor_si128): Likewise.
8659 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8662 * builtins.c (expand_builtin_memcmp): Inline the calls first
8663 when result_eq is false.
8664 (expand_builtin_strcmp): Inline the calls first.
8665 (expand_builtin_strncmp): Likewise.
8666 (inline_string_cmp): New routine. Expand a string compare
8667 call by using a sequence of char comparison.
8668 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8669 a call to str(n)cmp/memcmp.
8670 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8672 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8674 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8676 * config/arm/driver-arm.c: Include arm-native.h.
8677 (host_detect_local_cpu): Use auto-generated data tables.
8678 (vendors, arm_cpu_table): Delete. Move part information to ...
8679 * config/arm/arm-cpus.in: ... here.
8680 * config/arm/parsecpu.awk (gen_native): New function.
8681 (vendor, part): New CPU fields.
8682 (END): Add support for building the native CPU detection tables.
8683 * config/arm/t-arm (arm-native.h): Add build rule.
8684 (driver-arm.o): Add dependency on arm-native.h.
8686 2018-07-13 Richard Biener <rguenther@suse.de>
8689 * match.pd (addr1 - addr2): Allow either of the operand to
8692 2018-07-13 Tom de Vries <tdevries@suse.de>
8694 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8697 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8699 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8700 arrays instead of numbered variables.
8702 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8704 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8705 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8707 2018-07-13 Richard Biener <rguenther@suse.de>
8710 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8711 instead of get_context_die.
8713 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8714 Richard Biener <rguenther@suse.de>
8717 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8718 that the loop latch destination where phi is defined.
8720 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8722 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8723 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8724 (riscv_set_current_function): Extract getting interrupt type to new
8726 (riscv_get_interrupt_type): New function.
8727 (riscv_merge_decl_attributes): New function, checking interrupt type is
8729 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8731 2018-07-12 Paul Koning <ni1d@arrl.net>
8733 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8736 2018-07-12 Paul Koning <ni1d@arrl.net>
8738 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8739 zero reference, add doloop_end instead.
8740 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8741 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8742 detail for doloop_end.
8744 2018-07-12 Martin Sebor <msebor@redhat.com>
8747 * attribs.c (decl_attributes): Reject conflicting attributes before
8748 calling attribute handlers.
8750 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8752 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8754 (gcc::dump_manager::get_dump_file_name): likewise.
8755 (dump_begin): Likewise.
8756 * dumpfile.h (dump_begin): Update prototype.
8757 (gcc::dump_manager::get_dump_file_name,
8758 gcc::dump_manager::get_dump_file_name): Update prototype.
8760 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8762 * internal-fn.h (vectorizable_internal_fn_p): New function.
8763 * tree-vect-slp.c (compatible_calls_p): Likewise.
8764 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8765 to internal functions.
8766 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8768 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8770 * fold-const.h (inverse_conditions_p): Declare.
8771 * fold-const.c (inverse_conditions_p): New function.
8772 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8773 that test the inverse condition of a conditional internal function.
8774 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8775 * internal-fn.c (internal_fn_mask_index): Handle conditional
8777 (vectorized_internal_fn_supported_p): New function.
8778 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8779 (any_pred_load_store): Replace with...
8780 (need_to_predicate): ...this new variable.
8781 (redundant_ssa_names): New variable.
8782 (ifcvt_can_use_mask_load_store): Move initial checks to...
8783 (ifcvt_can_predicate): ...this new function. Handle tree codes
8784 for which a conditional internal function exists.
8785 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8786 instead of ifcvt_can_use_mask_load_store. Update after variable
8788 (predicate_load_or_store): New function, split out from
8789 predicate_mem_writes.
8790 (check_redundant_cond_expr): New function.
8791 (value_available_p): Likewise.
8792 (predicate_rhs_code): Likewise.
8793 (predicate_mem_writes): Rename to...
8794 (predicate_statements): ...this. Use predicate_load_or_store
8795 and predicate_rhs_code.
8796 (combine_blocks, tree_if_conversion): Update after above name changes.
8797 (ifcvt_local_dce): Handle redundant_ssa_names.
8798 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8799 general conditional functions.
8800 * tree-vect-stmts.c (vectorizable_call): Likewise.
8802 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8803 Alan Hayward <alan.hayward@arm.com>
8804 David Sherwood <david.sherwood@arm.com>
8806 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8807 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8808 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8809 plus and minus and convert them into IFN_COND_FMA-based sequences.
8810 (convert_mult_to_fma): Handle conditional plus and minus.
8812 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8814 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8815 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8816 (cond_fnms_optab): New optabs.
8817 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8819 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8820 * internal-fn.h (get_conditional_internal_fn): Declare.
8821 (get_unconditional_internal_fn): Likewise.
8822 * internal-fn.c (cond_ternary_direct): New macro.
8823 (expand_cond_ternary_optab_fn): Likewise.
8824 (direct_cond_ternary_optab_supported_p): Likewise.
8825 (FOR_EACH_COND_FN_PAIR): Likewise.
8826 (get_conditional_internal_fn): New function.
8827 (get_unconditional_internal_fn): Likewise.
8828 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8829 (gimple_match_op::gimple_match_op): Add a new overload for 5
8831 (gimple_match_op::set_op): Likewise.
8832 (gimple_resimplify5): Declare.
8833 * genmatch.c (decision_tree::gen): Generate simplifications for
8835 * gimple-match-head.c (gimple_simplify): Define an overload for
8836 5 operands. Handle calls with 5 arguments in the top-level overload.
8837 (convert_conditional_op): Handle conversions from unconditional
8838 internal functions to conditional ones.
8839 (gimple_resimplify5): New function.
8840 (build_call_internal): Pass a fifth operand.
8841 (maybe_push_res_to_seq): Likewise.
8842 (try_conditional_simplification): Try converting conditional
8843 internal functions to unconditional internal functions.
8844 Handle 3-operand unconditional forms.
8845 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8846 Define ternary equivalents of the current rules for binary conditional
8848 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8850 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8851 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8852 (optab): Handle them.
8853 (SVE_COND_FP_TERNARY): New int iterator.
8854 (sve_fmla_op, sve_fmad_op): New int attributes.
8855 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8856 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8857 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8859 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8861 * target.def (preferred_else_value): New target hook.
8862 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8863 * doc/tm.texi: Regenerate.
8864 * targhooks.h (default_preferred_else_value): Declare.
8865 * targhooks.c (default_preferred_else_value): New function.
8866 * internal-fn.h (conditional_internal_fn_code): Declare.
8867 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8868 (get_conditional_internal_fn): Use it.
8869 (conditional_internal_fn_code): New function.
8870 * gimple-match.h (gimple_match_cond): New struct.
8871 (gimple_match_op): Add a cond member function.
8872 (gimple_match_op::gimple_match_op): Update all forms to take a
8874 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8875 for the suboperation, but don't specify a particular else_value.
8876 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8877 (visit_nary_op, visit_reference_op_load): Pass
8878 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8879 * gimple-match-head.c: Include tree-eh.h
8880 (convert_conditional_op): New function.
8881 (maybe_resimplify_conditional_op): Likewise.
8882 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8883 (gimple_resimplify2): Likewise.
8884 (gimple_resimplify3): Likewise.
8885 (gimple_resimplify4): Likewise.
8886 (maybe_push_res_to_seq): Return null for conditional operations.
8887 (try_conditional_simplification): New function.
8888 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8890 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8892 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8894 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8896 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8898 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8900 (hash_tree): Do not hash DECL_FCONTEXT
8901 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8902 Do not stream DECL_FCONTEXT.
8903 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8904 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8906 2018-07-12 Richard Biener <rguenther@suse.de>
8909 * dwarf2out.c (gen_block_die): Only output blocks when they have
8910 at least one !DECL_IGNORED_P variable.
8912 2018-07-12 Richard Biener <rguenther@suse.de>
8915 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8916 Remove -mieee-fp handling.
8918 2018-07-12 Richard Biener <rguenther@suse.de>
8920 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8921 left-over from last patch.
8923 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8925 PR tree-optimization/86492
8926 * gimple-ssa-store-merging.c
8927 (imm_store_chain_info::coalesce_immediate_stores): Call
8928 check_no_overlap even for the merge_overlapping case. Formatting fix.
8930 2018-07-12 Richard Biener <rguenther@suse.de>
8933 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8934 move possibly trapping operations into the conditional.
8936 2018-07-12 Richard Biener <rguenther@suse.de>
8938 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8939 (vn_lookup_simplify_result): Remove recursion limit applied
8941 (vn_nary_build_or_lookup_1): Adjust.
8942 (try_to_simplify): Likewise.
8943 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8945 (gimple_resimplify2): Likewise.
8946 (gimple_resimplify3): Likewise.
8947 (gimple_resimplify4): Likewise.
8949 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8951 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8952 Use __mmask64 type instead of __mmask8 for __M argument.
8953 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8954 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8956 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8957 __mmask16 for __M argument.
8958 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8959 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8960 to __mmask16 instead of __mmask8.
8961 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8962 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8963 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8964 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8965 instead of __mmask16 for __U argument.
8966 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8967 __mmask16 instead of __mmask8 for __U argument.
8968 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8970 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8972 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8974 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8976 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8978 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8980 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8982 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8984 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8986 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8988 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8989 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8990 return type as well as __M argument type and all casts from __mmask8
8992 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8993 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8994 return type as well as __M argument type and all casts from __mmask8
8996 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8997 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8998 return type as well as __M argument type and all casts from __mmask8
9000 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
9001 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
9002 return type as well as __M argument type and all casts from __mmask8
9004 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
9005 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
9008 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
9010 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
9011 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
9014 2018-07-11 Paul Koning <ni1d@arrl.net>
9016 * doc/md.texi (define_subst): Document how multiple occurrences of
9017 the same argument in the replacement pattern are handled.
9019 2018-07-11 Paul Koning <ni1d@arrl.net>
9021 * doc/extend.texi (Common Variable Attributes): Move "mode" into
9023 (Common Type Attributes): Add "mode" attribute.
9025 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
9027 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
9028 stream DECL_ORIGINAL_TYPE.
9029 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
9030 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
9031 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
9032 Do not walk original type.
9033 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
9035 (write_ts_decl_non_common_tree_pointers): Do not stream
9037 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
9038 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
9040 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
9042 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
9043 thread twice from the same starting edge.
9045 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
9047 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
9048 * gimple.c (gimple_call_nonnull_result_p): ...here...
9049 (gimple_call_nonnull_arg): ...and here.
9050 * gimple.h (gimple_call_nonnull_result_p): New.
9051 (gimple_call_nonnull_arg): New.
9053 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
9055 * config/arm/arm-cpus.in: Move information from fpu field of each
9056 cpu definition to the isa field.
9057 * config/arm/parsecpu.awk (fpu): Delete match rule.
9058 (gen_comm_data): Don't add bits from the CPU's FPU entry.
9060 2018-07-11 Richard Biener <rguenther@suse.de>
9063 * dwarf2out.c (init_sections_and_labels): Use
9064 output_asm_line_debug_info consistently.
9065 (dwarf2out_early_finish): Likewise.
9066 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
9069 2018-07-11 Richard Biener <rguenther@suse.de>
9071 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
9072 Rework father_bb setting in a way to avoid propagating constants
9073 multiple times on a loop body.
9075 2018-07-10 Mark Wielaard <mark@klomp.org>
9078 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
9080 2018-07-10 Richard Biener <rguenther@suse.de>
9082 * hash-map.h (hash_map::iterator::operator*): Return
9083 references to key and value.
9085 2018-07-10 Jakub Jelinek <jakub@redhat.com>
9088 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9089 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9090 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9091 (gimplify_omp_for): For composite loops, move outer
9092 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9093 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
9094 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
9095 TREE_LIST for both the original class iterator and the "last" helper
9096 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
9097 loop, remember has_decl_expr from outer composite loops for the
9098 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9100 2018-07-09 Martin Sebor <msebor@redhat.com>
9104 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9105 accessing implicitly initialized array elements.
9106 * expr.c (string_constant): Handle string initializers of
9107 character arrays within aggregates.
9108 * gimple-fold.c (fold_array_ctor_reference): Add argument.
9109 Store element offset. As a special case, handle zero size.
9110 (fold_nonarray_ctor_reference): Same.
9111 (fold_ctor_reference): Add argument. Store subobject offset.
9112 * gimple-fold.h (fold_ctor_reference): Add argument.
9114 2018-07-09 Paul Koning <ni1d@arrl.net>
9116 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9117 (pdp11_insn_cost): New function.
9118 (pdp11_md_asm_adjust): New function.
9119 (TARGET_INVALID_WITHIN_DOLOOP): Define.
9120 (pdp11_rtx_costs): Update to match machine better.
9121 (output_addr_const_pdp11): Correct format mismatch warnings.
9122 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9123 * config/pdp11/pdp11.md: General change to add base_cost and/or
9124 length attributes for use by new pdp11_insn_cost function.
9125 (MIN_BRANCH): Correct definition.
9127 (doloop_end): Use standard pattern name for looping pattern.
9128 (doloop_end_nocc): New.
9129 (movsf): Add another constraint alternative.
9130 (zero_extendqihi2): Add constraint alternatives for not in place
9132 (zero_extendhisi2): Remove.
9133 (shift patterns): Add CC handling variants.
9137 (define_peephole2): New peephole to recognize mov that sets CC for
9140 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9142 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9143 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9146 2018-07-09 Jakub Jelinek <jakub@redhat.com>
9149 * real.c (real_nextafter): Return true if result is denormal.
9151 2018-07-09 Martin Liska <mliska@suse.cz>
9153 * common.opt: Add back wrongly removed attribute.
9155 2018-07-09 Richard Biener <rguenther@suse.de>
9158 * dwarf2out.c (gen_block_die): For an early generated DIE
9159 always output high/low PC attributes.
9161 2018-07-09 Tom de Vries <tdevries@suse.de>
9163 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9164 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9165 onto VAR_DECL with abstract origin.
9167 2018-07-07 Jim Wilson <jimw@sifive.com>
9169 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9171 2018-07-07 Tom de Vries <tdevries@suse.de>
9173 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9175 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
9177 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9179 (combine_bound): Use wide-int overflow calculation instead of
9181 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9183 * fold-const.c (int_const_binop_2): Same.
9184 (extract_muldiv_1): Same.
9185 (fold_div_compare): Same.
9186 (fold_abs_const): Same.
9188 * poly-int.h (add): Same.
9192 * predict.c (predict_iv_comparison): Same.
9193 * profile-count.c (slow_safe_scale_64bit): Same.
9194 * simplify-rtx.c (simplify_const_binary_operation): Same.
9195 * tree-chrec.c (tree_fold_binomial): Same.
9196 * tree-data-ref.c (split_constant_offset_1): Same.
9197 * tree-if-conv.c (idx_within_array_bound): Same.
9198 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9199 * tree-ssa-phiopt.c (minmax_replacement): Same.
9200 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9201 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9202 * vr-values.c (vr_values::adjust_range_with_scev): Same.
9203 * wide-int.cc (wi::add_large): Same.
9204 (wi::mul_internal): Same.
9205 (wi::sub_large): Same.
9206 (wi::divmod_internal): Same.
9207 * wide-int.h: Change overflow type to overflow_type for neg, add,
9208 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9209 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9210 mul_internal, divmod_internal.
9211 (overflow_type): New enum.
9212 (accumulate_overflow): New.
9214 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
9216 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9217 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9219 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
9221 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9222 argument is checked for zero before entering loop, avoid checking again.
9224 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
9226 * gimplify.h (generic_expr_could_trap_p): Set as global function.
9227 * gimplify.h (generic_expr_could_trap_p): Likwise.
9228 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9230 2018-07-06 Jakub Jelinek <jakub@redhat.com>
9232 PR tree-optimization/86401
9233 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9234 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9235 (fold_bit_and_mask): ... here. New helper function for match.pd.
9236 * fold-const.h (fold_bit_and_mask): Declare.
9237 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9239 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
9242 * target.def (translate_mode_attribute): New hook.
9243 * targhooks.h (default_translate_mode_attribute): Declare.
9244 * targhooks.c (default_translate_mode_attribute): New function.
9245 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9246 * doc/tm.texi: Regenerate.
9247 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9248 (rs6000_translate_mode_attribute): New function.
9250 2018-07-06 Paul Koning <ni1d@arrl.net>
9252 * doc/md.texi (define_split): Document DONE and FAIL.
9253 (define_peephole2): Ditto.
9255 2018-07-05 Jeff Law <law@redhat.com>
9257 PR tree-optimization/86010
9258 * tree-ssa-dse.c (compute_trims): More aggressively trim at
9259 both the head and tail of mem* and str* calls.
9261 2018-07-05 Jim Wilson <jimw@sifive.com>
9263 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9265 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
9267 * config/aarch64/aarch64-simd.md: correct flags text for
9268 MIN_EXPR replacement.
9270 2018-07-05 James Clarke <jrtc27@jrtc27.com>
9272 * configure: Regenerated.
9274 2018-07-05 Carl Love <cel@us.ibm.com>
9276 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9277 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9278 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9279 VSX_BUILTIN_DOUBLEL_V4SF.
9281 2018-07-05 Martin Sebor <msebor@redhat.com>
9284 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9285 than its domain to compute its the upper bound of a char array.
9287 2018-07-05 Nathan Sidwell <nathan@acm.org>
9289 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9290 * doc/cpp.texi: Update comment.
9291 * doc/tm.texi: Rebuilt.
9292 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9293 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9294 * doc/extend.texi (Backwards Compatibility): Clarify it is system
9295 headers affected by extern "C".
9296 * system.h: Poison NO_IMPLICIT_EXTERN_C.
9297 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9298 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9299 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9300 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9301 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9302 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9303 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9304 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9305 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9306 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9307 config/sparc/sp64-elf.h, config/spu/spu.h,
9308 config/stormy16/stormy16.h, config/v850/v850.h,
9309 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9310 define NO_IMPLICIT_EXTERN_C.
9311 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9313 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9316 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9317 instead of GET_MODE_SIZE when comparing Units.
9319 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9322 * rtlanal.c (set_noop_p): Constrain on mode change,
9323 include hard-reg-set.h
9325 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9327 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9329 2018-07-05 Jakub Jelinek <jakub@redhat.com>
9332 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9335 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9337 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9339 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9342 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9344 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9346 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
9349 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9351 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
9353 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9354 neg_*_op* variables.
9356 2018-07-04 Martin Liska <mliska@suse.cz>
9358 * tree-switch-conversion.c: Define
9359 max_ratio_for_speed and max_ratio_for_size constants.
9361 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9362 Martin Liska <mliska@suse.cz>
9367 * common.opt: Rename align options with 'str_' prefix.
9368 * common/config/i386/i386-common.c (set_malign_value): New
9370 (ix86_handle_option): Use it to set -falign-* options/
9371 * config/aarch64/aarch64-protos.h (struct tune_params): Change
9372 type from int to string.
9373 * config/aarch64/aarch64.c: Update default values from int
9375 * config/alpha/alpha.c (alpha_override_options_after_change):
9377 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9378 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9379 max skip conditionally.
9380 * config/i386/freebsd.h (SUBALIGN_LOG): New.
9381 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9382 max skip conditionally.
9383 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9384 max skip conditionally.
9385 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9386 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9387 max skip conditionally.
9388 * config/i386/i386.c (struct ptt): Change type from int to
9390 (ix86_default_align): Set default values.
9391 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9392 max skip conditionally.
9393 * config/i386/iamcu.h (SUBALIGN_LOG): New.
9394 (ASM_OUTPUT_MAX_SKIP_ALIGN):
9395 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9396 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9397 max skip conditionally.
9398 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9399 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9400 * config/i386/x86-64.h (SUBALIGN_LOG): New.
9401 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9402 max skip conditionally.
9403 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9404 * config/ia64/ia64.c (ia64_option_override): Set default values
9405 for alignment options.
9406 * config/m68k/m68k.c: Handle new str_align_* options.
9407 * config/mips/mips.c (mips_set_compression_mode): Change
9409 (mips_option_override): Set default values for options.
9410 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9412 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9414 * config/rx/rx.c (rx_option_override): Likewise.
9415 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9416 (LABEL_ALIGN): Use align_labels_log.
9417 (LOOP_ALIGN): Use align_loops_align.
9418 * config/s390/s390.c (s390_asm_output_function_label): Use new
9420 * config/sh/sh.c (sh_override_options_after_change):
9421 Change type of constants.
9422 * config/spu/spu.c (spu_sched_init): Likewise.
9423 * config/sparc/sparc.c (sparc_option_override): Set default
9425 * config/visium/visium.c (visium_option_override): Likewise.
9426 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9427 emit p2align format with last argument if it's not needed.
9428 * doc/invoke.texi: Document extended format of -falign-*.
9429 * final.c: Use align_labels alignment.
9430 * flags.h (struct target_flag_state): Change type to use
9432 (struct align_flags_tuple): New.
9433 (struct align_flags): Likewise.
9434 (align_loops_log): Redefine macro to use new types.
9435 (align_loops_max_skip): Redefine macro to use new types.
9436 (align_jumps_log): Redefine macro to use new types.
9437 (align_jumps_max_skip): Redefine macro to use new types.
9438 (align_labels_log): Redefine macro to use new types.
9439 (align_labels_max_skip): Redefine macro to use new types.
9440 (align_functions_log): Redefine macro to use new types.
9441 (align_loops): Redefine macro to use new types.
9442 (align_jumps): Redefine macro to use new types.
9443 (align_labels): Redefine macro to use new types.
9444 (align_functions): Redefine macro to use new types.
9445 (align_functions_max_skip): Redefine macro to use new types.
9446 (align_loops_value): New macro.
9447 (align_jumps_value): New macro.
9448 (align_labels_value): New macro.
9449 (align_functions_value): New macro.
9450 * function.c (invoke_set_current_function_hook): Propagate
9451 alignment values from flags to global variables default in
9453 * ipa-icf.c (sem_function::equals_wpa): Use
9454 cl_optimization_option_eq instead of memcmp.
9455 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9457 (cl_optimization_stream_in): Likewise.
9458 * optc-save-gen.awk: Support strings in cl_optimization.
9459 * opth-gen.awk: Likewise.
9460 * opts.c (finish_options): Remove error checking of invalid
9462 (MAX_CODE_ALIGN): Remove.
9463 (MAX_CODE_ALIGN_VALUE): Likewise.
9464 (parse_and_check_align_values): New function.
9465 (check_alignment_argument): Likewise.
9466 (common_handle_option): Use check_alignment_argument.
9467 * opts.h (parse_and_check_align_values): Declare.
9468 * toplev.c (init_alignments): Remove.
9469 (read_log_maxskip): New.
9470 (parse_N_M): Likewise.
9471 (parse_alignment_opts): Likewise.
9472 (backend_init_target): Remove usage of init_alignments.
9473 * toplev.h (parse_alignment_opts): Declare.
9474 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9476 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9477 * tree.c (cl_option_hasher::equal): New.
9478 * varasm.c: Use new global macros.
9480 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9482 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9483 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9484 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9485 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9486 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9487 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9488 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9489 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9490 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9491 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9492 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9493 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9494 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9496 2018-07-04 Martin Liska <mliska@suse.cz>
9497 Jonathan Wakely <jwakely@redhat.com>
9499 * coverage.c: Use correct type.
9500 * doc/invoke.texi: Language correction.
9502 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
9505 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9506 ENDBRANCH for non-tail call which may return via indirect branch.
9507 * doc/extend.texi: Document indirect_return attribute.
9509 2018-07-03 Martin Sebor <msebor@redhat.com>
9511 PR tree-optimization/86274
9512 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9514 (format_floating): Correct handling of infinities and NaNs.
9516 2018-07-03 Martin Sebor <msebor@redhat.com>
9518 * print-tree.c (print_real_cst): New function.
9519 (print_node_brief): Call it.
9520 (print_node): Ditto.
9522 2018-07-03 Jeff Law <law@redhat.com>
9524 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9525 into a single pattern.
9527 * config/h8300/h8300.md (ors code_iterator): New.
9528 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9529 a single pattern and single splitter.
9530 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9531 (iorqi3_1, xorqi3_1): Likewise.
9532 (iorqi3, xorqi3 expanders): Similarly.
9534 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9535 (movmd_internal) into a single pattern using the P mode iterator.
9536 (movmd splitters): Similarly.
9537 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9538 (movsd splitters): Similarly.
9540 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9541 ADDB, ADDW and ADDL into a single ADD attribute which selects the
9542 right table based on the size of the operand.
9543 * config/h8300/h8300.md (length_table): Corresponding changes. All
9544 references to "addb", "addw" and "addl" changed to "add".
9545 (btst patterns): Merge two variants into a single pattern.
9546 (tstqi, tsthi): Likewise.
9547 (addhi3_incdec, addsi3_incdec): Likewise.
9548 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9549 (mulhi3, mulsi3): Likewise.
9550 (udivhi3, udivsi3): Likewise.
9551 (divhi3, divsi3): Likewise.
9552 (andorqi3, andorhi3, andorsi3): Likewise.
9554 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9557 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9558 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9560 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9562 PR tree-optimization/85694
9563 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9564 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9566 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9567 (<u>avg<mode>3_ceil): New patterns.
9569 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9571 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9572 scan-tree-dump directive.
9573 * gcc.dg/vect/slp-perm-2.c: Likewise.
9574 * gcc.dg/vect/slp-perm-3.c: Likewise.
9575 * gcc.dg/vect/slp-perm-5.c: Likewise.
9576 * gcc.dg/vect/slp-perm-6.c: Likewise.
9577 * gcc.dg/vect/slp-perm-7.c: Likewise.
9578 * gcc.dg/vect/slp-perm-8.c: Likewise.
9580 2018-07-03 Marek Polacek <polacek@redhat.com>
9583 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9585 2018-07-03 Richard Biener <rguenther@suse.de>
9588 * tree-ssa-structalias.c (find_func_clobbers): Properly
9589 handle indirect calls.
9591 2018-07-03 Jeff Law <law@redhat.com>
9593 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9594 (shifts): New code iterator.
9595 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9596 expander. Fix HImode handling on H8/SX.
9597 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9598 (subqi3, subhi3, subsi3 expanders): Likewise.
9599 (andqi3, andhi3, andsi3 expanders): Likewise.
9600 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9601 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9602 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9603 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9604 (zero_extendqihi2, zero_extendqisi2): Likewise.
9605 (extendqihi2, extendqisi2): Likewise.
9606 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9607 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9608 (rotlqi3_1, rotlhi3_1): Likewise.
9609 (logicalhi3_sn, logicalsi3_sn): Likewise.
9610 (logicalhi3, logicalsi3): Likewise.
9612 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9614 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9615 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9616 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9617 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9618 type to append_pattern_def_seq instead of creating a stmt_vec_info
9620 (build_mask_conversion): Likewise. Remove vinfo argument.
9621 (vect_add_conversion_to_patterm): Likewise, renaming to...
9622 (vect_add_conversion_to_pattern): ...this.
9623 (vect_recog_mask_conversion_pattern): Update call to
9624 build_mask_conversion. Pass the vector type to
9625 append_pattern_def_seq here too.
9626 (vect_recog_gather_scatter_pattern): Update call to
9627 vect_add_conversion_to_pattern.
9629 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9631 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9632 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9633 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9634 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9635 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9636 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9637 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9638 append_pattern_def_seq instead of new_pattern_def_seq.
9639 (vect_recog_divmod_pattern): Do both of the above.
9640 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9643 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9645 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9646 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9647 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9648 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9649 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9650 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9651 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9652 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9653 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9654 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9655 parameter with a single stmt_vec_info.
9656 (vect_recog_func_ptr): Likewise.
9657 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9658 (vect_try_gather_scatter_pattern): ...this.
9659 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9660 the stmt_vec_info of the statement to be matched. Don't clear
9661 STMT_VINFO_RELATED_STMT.
9662 (vect_pattern_recog): Update call accordingly.
9664 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9666 PR tree-optimization/85694
9667 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9668 (uavgM3_ceil): Document new optabs.
9669 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9670 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9672 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9673 (savg_ceil_optab): New optabs.
9674 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9675 (vect_vect_recog_func_ptrs): Add it.
9676 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9677 constant directly from the associated lhs.
9679 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9681 * tree-vect-patterns.c (vect_split_statement): New function.
9682 (vect_convert_input): Use it to try to split an existing cast.
9684 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9686 * poly-int.h (print_hex): New function.
9687 * dumpfile.h (dump_dec, dump_hex): Declare.
9688 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9689 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9690 min_input_precision, operation_precision and operation_sign.
9691 * tree-vect-patterns.c (vect_get_range_info): New function.
9692 (vect_same_loop_or_bb_p, vect_single_imm_use)
9693 (vect_operation_fits_smaller_type): Delete.
9694 (vect_look_through_possible_promotion): Add an optional
9695 single_use_p parameter.
9696 (vect_recog_over_widening_pattern): Rewrite to use new
9697 stmt_vec_info infomration. Handle one operation at a time.
9698 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9699 (vect_truncatable_operation_p, vect_set_operation_type)
9700 (vect_set_min_input_precision): New functions.
9701 (vect_determine_min_output_precision_1): Likewise.
9702 (vect_determine_min_output_precision): Likewise.
9703 (vect_determine_precisions_from_range): Likewise.
9704 (vect_determine_precisions_from_users): Likewise.
9705 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9706 (vect_vect_recog_func_ptrs): Put over_widening first.
9708 (vect_pattern_recog): Call vect_determine_precisions.
9710 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9712 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9713 statements that have been replaced by further pattern statements.
9714 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9716 2018-07-03 Richard Biener <rguenther@suse.de>
9718 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9719 always set *dt. Dump vectype in vectype overload.
9720 * dumpfile.h (dump_gimple_expr): New function.
9721 (dump_gimple_expr_loc): Likewise.
9722 * dumpfile.c (dump_gimple_expr): New function.
9723 (dump_gimple_expr_loc): Likewise.
9725 2018-07-02 Jeff Law <law@redhat.com>
9727 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9728 the H8/300, H8/300H and H8/S variants into a single pattern.
9729 (movhi_h8300, movqi_h8300hs): Similarly.
9730 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9731 (QHI mode iterator): New.
9733 * config/h8300/h8300.md: Remove trailing whitespace.
9735 2018-07-02 Jim Wilson <jimw@sifive.com>
9737 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9738 instead of emit_insn for interrupt returns.
9739 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9740 (riscv_sret, riscv_uret): Likewise.
9742 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9744 * pretty-print.c (selftest::test_pp_format): Move save and restore
9745 of quotes to class auto_fix_quotes, and add an instance.
9746 * selftest.c: Include "intl.h".
9747 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9748 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9749 * selftest.h (selftest::auto_fix_quotes): New class.
9751 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9753 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9754 (aarch64_sve_prepare_conditional_op): Remove.
9755 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9756 Allow aarch64_simd_reg_or_zero as select operand; remove
9757 the aarch64_sve_prepare_conditional_op call.
9758 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9759 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9760 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9761 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9762 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9763 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9764 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9765 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9766 and a splitters to match all of the *_any patterns.
9767 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9769 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9770 (SVE_COND_FP_BINARY_REV): Remove.
9771 (sve_int_op_rev, sve_fp_op_rev): New.
9772 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9773 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9774 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9775 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9776 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9777 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9778 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9779 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9780 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9782 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9783 Remove match_dup 1 from the inner unspec.
9784 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9786 * config/aarch64/aarch64.md (movprfx): New attr.
9787 (length): Default movprfx to 8.
9788 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9789 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9790 (*<su>mul<SVE_I>3_highpart): Likewise.
9791 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9792 (*v<ASHIFT><SVE_I>3): Likewise.
9793 (*<su><MAXMIN><SVE_I>3): Likewise.
9794 (*<su><MAXMIN><SVE_F>3): Likewise.
9795 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9796 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9797 (*div<SVE_F>4): Likewise.
9799 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9801 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9804 2018-07-02 Richard Biener <rguenther@suse.de>
9806 PR tree-optimization/86363
9807 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9808 memset argument refers to a non-variable address.
9810 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9812 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9813 {PLUS,MINUS}_EXPR code to...
9814 (adjust_symbolic_bound): ...here,
9815 (combine_bound): ...here,
9816 (set_value_range_with_overflow): ...and here.
9818 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9820 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9822 (extract_range_from_abs_expr): ...here.
9824 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9826 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9827 -fno-omit-frame-pointer when not optimizing.
9829 2018-07-02 Martin Liska <mliska@suse.cz>
9832 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9833 (propagate_nothrow): Likewise.
9835 2018-07-02 Martin Liska <mliska@suse.cz>
9838 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9840 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9842 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9843 function in r262149, changing "loc" param from source_location to
9844 const dump_location_t &.
9845 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9846 declaration, as above.
9848 2018-07-01 Paul Koning <ni1d@arrl.net>
9850 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9851 -munit-asm, -mgnu-asm, -mdec-asm.
9852 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9853 (pdp11_output_labelref): New.
9854 (pdp11_output_def): New.
9855 (pdp11_output_addr_vec_elt): New.
9856 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9857 %# and %@ format codes.
9858 (pdp11_option_override): New.
9859 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9860 (pdp11_output_ident): New.
9861 (pdp11_asm_named_section): New.
9862 (pdp11_asm_init_sections): New.
9863 (pdp11_file_start): New.
9864 (pdp11_file_end): New.
9865 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9866 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9867 %o, like %c but octal.
9868 (pdp11_option_override): New.
9869 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9871 (DATA_SECTION_ASM_OP): Ditto.
9872 (READONLY_DATA_SECTION_ASM_OP): New.
9873 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9874 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9875 (ASM_OUTPUT_LABELREF): Ditto.
9876 (ASM_OUTPUT_DEF): Ditto.
9877 (ASM_OUTPUT_EXTERNAL): New.
9878 (ASM_OUTPUT_SOURCE_FILENAME): New.
9879 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9880 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9881 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9882 %# and %@ format codes.
9883 * config/pdp11/pdp11.opt (mgnu-asm): New.
9884 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9885 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9886 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9888 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9890 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9891 dereferencing path[] beyond its length.
9893 (debug_all_paths): New.
9894 (rewire_first_differing_edge): New.
9895 (adjust_paths_after_duplication): New.
9896 (duplicate_thread_path): Call adjust_paths_after_duplication.
9898 (thread_through_all_blocks): Add new argument to
9899 duplicate_thread_path.
9901 2018-06-30 Jim Wilson <jimw@sifive.com>
9903 * config/riscv/predicates.md (p2m1_shift_operand): New.
9904 (high_mask_shift_operand): New.
9905 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9906 pattern using p2m1_shift_operand.
9907 (lshsi3_zero_extend_3+2): New combiner pattern using
9908 high_mask_shift_operand.
9910 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9912 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9914 (vect_recog_rotate_pattern): ...here.
9915 (vect_convert_input): Try to insert casts of invariants in the
9917 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9918 preheader to be empty.
9920 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9922 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9923 vector type. If given, install it in the new statement's
9925 (vect_element_precision): New function.
9926 (vect_unpromoted_value): New struct.
9927 (vect_unpromoted_value::vect_unpromoted_value): New function.
9928 (vect_unpromoted_value::set_op): Likewise.
9929 (vect_look_through_possible_promotion): Likewise.
9930 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9931 (vect_widened_op_tree, vect_convert_input): Likewise.
9932 (vect_convert_inputs, vect_convert_output): Likewise.
9933 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9934 to handle the optional cast of the multiplication result and
9935 vect_widened_op_tree to detect the widened multiplication itself.
9936 Do not require the input and output of promotion casts to have
9937 the same sign, but base the signedness of the operation on the
9938 input rather than the result. If the pattern includes two
9939 promotions, check that those promotions have the same sign.
9940 Do not restrict the MULT_EXPR handling to a double-width result;
9941 handle quadruple-width results and wider. Use vect_convert_inputs
9942 to convert the inputs to the common type.
9943 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9944 to handle the optional cast of the ABS result. Also allow a sign
9945 change or a sign extension between the ABS and MINUS.
9946 Use vect_widened_op_tree to detect the widened subtraction and use
9947 vect_convert_inputs to convert the inputs to the common type.
9948 (vect_handle_widen_op_by_const): Delete.
9949 (vect_recog_widen_op_pattern): New function.
9950 (vect_recog_widen_mult_pattern): Use it.
9951 (vect_recog_widen_shift_pattern): Likewise.
9952 (vect_recog_widen_sum_pattern): Use
9953 vect_look_through_possible_promotion to handle the promoted
9956 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9958 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9959 the containing gimple_seq *.
9960 * gimple-iterator.h (gsi_for_stmt): Declare it.
9961 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9962 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9963 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9964 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9965 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9967 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9969 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9970 statement being replaced is part of an existing pattern
9971 definition sequence, inserting the new pattern statements before
9973 (vect_pattern_recog_1): Don't return a bool. If the statement
9974 is already part of a pattern, instead apply pattern matching
9975 to the pattern definition statements. Don't clear the
9976 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9977 (vect_pattern_recog): Don't break after the first match;
9978 continue processing the pattern definition statements instead.
9979 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9981 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9983 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9984 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9985 (vect_recog_widen_sum_pattern): Use it.
9987 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9989 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9990 phi is not a pattern statement and has not been replaced by
9991 a pattern statement.
9992 * tree-vect-patterns.c (type_conversion_p): Don't check
9993 STMT_VINFO_IN_PATTERN_P.
9994 (vect_recog_vector_vector_shift_pattern): Likewise.
9995 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9996 the pattern statement rather than the original statement; check
9997 directly for a WIDEN_MULT_EXPR here.
9998 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9999 vect_is_simple_use to return the pattern statement rather
10000 than the original statement; use is_pattern_stmt_p to check
10001 for such a pattern statement.
10002 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
10003 to return the pattern statement rather than the original statement;
10004 don't do the same transformation here.
10005 (vect_is_simple_use): If the defining statement has been replaced
10006 by a pattern statement, return the pattern statement instead.
10007 Remove the corresponding (local) transformation from the vectype
10010 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
10012 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
10013 end and default to null.
10014 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10015 (vectorizable_reduction): Update calls accordingly, dropping the
10016 gimple ** argument if the passed-back statement isn't needed.
10017 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
10018 (vect_recog_rotate_pattern): Likewise.
10019 (vect_recog_mask_conversion_pattern): Likewise.
10020 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10021 (vect_mask_constant_operand_p): Likewise.
10022 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
10023 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
10024 (get_group_load_store_type, get_load_store_type): Likewise.
10025 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
10026 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
10027 (vectorizable_conversion, vectorizable_assignment): Likewise.
10028 (vectorizable_shift, vectorizable_operation): Likewise.
10029 (vectorizable_store, vect_is_simple_cond): Likewise.
10030 (vectorizable_condition, vectorizable_comparison): Likewise.
10031 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
10032 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
10033 and move it to the end. Cope with null def_stmt_outs.
10035 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10037 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
10039 2018-06-29 Jeff Law <law@redhat.com>
10041 * config/v850/v850.c (v850_legitimate_address_p): Handle large
10042 displacements for TARGET_V850E2V3 and newer.
10043 (TARGET_LRA_P): Remove. Defaults to LRA now.
10044 * config/v850/v850.md (sign23byte_load): Remove.
10045 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
10046 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
10048 2018-06-29 Martin Liska <mliska@suse.cz>
10051 * coverage.c (coverage_init): Mangle full path name.
10052 * doc/invoke.texi: Document the change.
10053 * gcov-io.c (mangle_path): New.
10054 * gcov-io.h (mangle_path): Likewise.
10055 * gcov.c (mangle_name): Use mangle_path for path mangling.
10057 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10059 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
10060 if starting source register is not even.
10062 2018-06-29 Martin Liska <mliska@suse.cz>
10064 PR tree-optimization/86263
10065 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
10066 Make edge redirection.
10068 2018-06-29 David Malcolm <dmalcolm@redhat.com>
10070 * dumpfile.c (dump_loc): Add indentation based on scope depth.
10071 (dump_scope_depth): New variable.
10072 (get_dump_scope_depth): New function.
10073 (dump_begin_scope): New function.
10074 (dump_end_scope): New function.
10075 * dumpfile.h (get_dump_scope_depth): New declaration.
10076 (dump_begin_scope): New declaration.
10077 (dump_end_scope): New declaration.
10078 (class auto_dump_scope): New class.
10079 (AUTO_DUMP_SCOPE): New macro.
10080 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10083 2018-06-29 Richard Biener <rguenther@suse.de>
10085 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10086 compute_all_dependences succeeds.
10087 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10088 exceed --param loop-max-datarefs-for-datadeps.
10090 2018-06-29 Jakub Jelinek <jakub@redhat.com>
10092 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10094 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
10097 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10098 alternative 0 in preferred_for_speed attribute.
10100 2018-06-28 Paul Koning <ni1d@arrl.net>
10102 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10103 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10104 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10105 * config/pdp11/pdp11.md: Correct "length" attribute calculation
10106 for shift insn patterns.
10108 2018-06-28 David Malcolm <dmalcolm@redhat.com>
10110 * cgraph.c (cgraph_node::get_body): Replace assignments to
10111 "dump_file" with calls to set_dump_file.
10112 * dumpfile.c (alt_dump_file): Make static, and group with...
10113 (alt_flags): ...this definition.
10114 (dumps_are_enabled): New variable.
10115 (refresh_dumps_are_enabled): New function.
10116 (set_dump_file): New function.
10117 (set_alt_dump_file): New function.
10118 (gcc::dump_manager::dump_start): Replace assignments to
10119 "dump_file" and "alt_dump_file" with calls to set_dump_file and
10121 (gcc::dump_manager::dump_finish): Likewise.
10122 * dumpfile.h (alt_dump_file): Delete decl.
10123 (dumps_are_enabled): New variable decl.
10124 (set_dump_file): New function decl.
10125 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10127 * tree-nested.c (lower_nested_functions): Replace assignments to
10128 "dump_file" with calls to set_dump_file.
10130 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
10132 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10133 goto_locus of each outgoing edge of each basic block.
10135 2018-06-28 Richard Biener <rguenther@suse.de>
10137 * dwarf2out.c (decl_scope_table): Remove.
10138 (push_decl_scope): Likewise.
10139 (pop_decl_scope): Likewise.
10140 (gen_type_die_for_member): Do not call push/pop_decl_scope.
10141 (gen_struct_or_union_type_die): Likewise.
10142 (gen_tagged_type_die): Likewise.
10143 (dwarf2out_init): Do not initialize decl_scope_table.
10144 (dwarf2out_c_finalize): Do not free it.
10146 2018-06-28 Richard Biener <rguenther@suse.de>
10148 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10149 deciding whether to not re-use a DIE.
10151 2018-06-28 Richard Biener <rguenther@suse.de>
10153 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10154 DW_AT_abstract_origin attribute.
10156 2018-06-28 Martin Liska <mliska@suse.cz>
10158 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10159 Use newly introduced constants.
10160 * tree-switch-conversion.h (struct jump_table_cluster):
10161 Define max_ratio_for_size and max_ratio_for_speed.
10163 2018-06-28 Martin Liska <mliska@suse.cz>
10165 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10166 Add new checking assert to catch invalid state.
10167 (jump_table_cluster::can_be_handled): Handle single case
10169 (jump_table_cluster::is_beneficial): Bail out for such case.
10170 (bit_test_cluster::find_bit_tests):
10171 Add new checking assert to catch invalid state.
10172 (bit_test_cluster::can_be_handled): Handle single case
10174 (bit_test_cluster::is_beneficial): Bail out for such case.
10175 (switch_decision_tree::analyze_switch_statement):
10178 2018-06-28 Martin Liska <mliska@suse.cz>
10180 * common.opt: Introduce -completion option.
10181 * gcc.c (driver_handle_option): Handle it.
10182 (driver::main): Print completions if completion
10184 * opt-suggestions.c (option_proposer::get_completions):
10186 (option_proposer::suggest_completion): Likewise.
10187 (option_proposer::find_param_completions): Likewise.
10188 (verify_autocompletions): Likewise.
10189 (test_completion_valid_options): Likewise.
10190 (test_completion_valid_params): Likewise.
10191 (in_completion_p): Likewise.
10192 (empty_completion_p): Likewise.
10193 (test_completion_partial_match): Likewise.
10194 (test_completion_garbage): Likewise.
10195 (opt_proposer_c_tests): Likewise.
10196 * opt-suggestions.h: Declare new functions.
10197 * opts.c (common_handle_option): Handle OPT__completion_.
10198 * selftest-run-tests.c (selftest::run_tests): Add
10199 opt_proposer_c_tests.
10200 * selftest.c (assert_str_startswith): New.
10201 * selftest.h (assert_str_startswith): Likewise.
10202 (opt_proposer_c_tests): New.
10203 (ASSERT_STR_STARTSWITH): Likewise.
10205 2018-06-28 Martin Liska <mliska@suse.cz>
10207 * Makefile.in: Add opt-suggestions.o.
10208 * gcc-main.c: Include opt-suggestions.h.
10209 * gcc.c (driver::driver): Likewise.
10210 (driver::~driver): Remove m_option_suggestions.
10211 (driver::build_option_suggestions): Moved to option_proposer.
10212 (driver::suggest_option): Likewise.
10213 (driver::handle_unrecognized_options): Use option_proposer.
10214 * gcc.h (class driver): Add new memver m_option_proposer.
10215 * opt-suggestions.c: New file.
10216 * opt-suggestions.h: New file.
10218 2018-06-28 Martin Liska <mliska@suse.cz>
10220 * vec.h (class auto_string_vec): New (moved from auto_argvec).
10221 (auto_string_vec::~auto_string_vec): Likewise.
10223 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
10225 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10226 prevent_decl_creation_for_types fields up and add reset_location field.
10227 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10228 statement if id->reset_location is true.
10229 (copy_edges_for_bb): Do not set goto_locus on the new edges if
10230 id->reset_location is true.
10231 (copy_phis_for_bb): Force input_location on the arguments if
10232 id->reset_location is true.
10233 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10234 is set on the function to be inlined.
10236 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
10238 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10240 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
10242 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10243 registers for Pmode.
10244 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10245 hard registers for the clobbered pseudo.
10247 2018-06-27 Paul Koning <ni1d@arrl.net>
10249 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10250 mutually exclusive options.
10251 * config/pdp11/constraints.md (h): New constraint.
10252 (O): Update definition to match shift code generation.
10253 (D): New constraint.
10254 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10256 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10258 (output_jump): Change arguments.
10259 (pdp11_fixed_cc_regs): New function.
10260 (pdp11_cc_mode): Ditto.
10261 (pdp11_expand_shift): Ditto.
10262 (pdp11_assemble_shift): Ditto.
10263 (pdp11_small_shift): Ditto.
10264 (pdp11_branch_cost): Remove.
10265 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10267 (pdp11_register_move_cost): Update for CC registers.
10268 (pdp11_rtx_costs): Add case for LSHIFTRT.
10269 (pdp11_output_jump): Add CCNZ mode conditional branches.
10270 (notice_update_cc_on_set): Remove.
10271 (pdp11_cc_mode): New function.
10272 (simple_memory_operand): Correct pre/post decrement case.
10273 (no_side_effect_operand): New function.
10274 (pdp11_regno_reg_class): Add CC_REGS class.
10275 (pdp11_fixed_cc_regs): New function.
10276 (pdp11_small_shift): New function.
10277 (pdp11_expand_shift): New function to expand shift insns.
10278 (pdp11_assemble_shift): New function to output shifts.
10279 (pdp11_branch_cost): Remove.
10280 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10281 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10282 (WCHAR_TYPE): Ditto.
10283 (PTRDIFF_TYPE): Ditto.
10284 (ADJUST_INSN_LENGTH): New macro.
10285 (FIXED_REGISTERS): Add CC registers.
10286 (CALL_USED_REGISTERS): Ditto.
10287 (reg_class): Ditto.
10288 (REG_CLASS_NAMES): Ditto.
10289 (REG_CLASS_CONTENTS): Ditto.
10290 (SELECT_CC_MODE): Use new function.
10291 (TARGET_FLAGS_REGNUM): New macro.
10292 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10293 (cc0_reg_rtx): Remove.
10294 (CC_STATUS_MDEP): Remove.
10295 (CC_STATUS_MDEFP_INIT): Remove.
10296 (CC_IN_FPU): Remove.
10297 (NOTICE_UPDATE_CC): Remove.
10298 (REGISTER_NAMES): Add CC registers.
10299 (BRANCH_COST): Change to constant 1.
10300 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10302 * config/pdp11/pdp11.opt (mbcopy): Remove.
10303 (mbcopy-builtin): Remove.
10304 (mbranch-cheap): Remove.
10305 (mbranch-expensive): Remove.
10306 * config/pdp11/predicates.md (expand_shift_operand): Update to
10307 match shift code generation.
10308 (ccnz_operator): New predicate.
10309 * doc/invoke.texi (PDP-11 Options): Remove deleted options
10310 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10311 Remove non-existent option -mabshi, -mno-abshi. Document mutually
10313 * doc/md.texi (PDP-11): Document new D and h constraints. Update
10314 description of O constraint.
10316 2018-06-27 Jeff Law <law@redhat.com>
10317 Austin Law <austinklaw@gmail.com>
10319 * config/v850/v850.md (addsi3_set_flags): New pattern.
10320 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10321 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10322 (zero_extendhisi2_v850_set_flags): Likewise.
10323 (zero_extendqisi2_v850_set_flags): Likewise.
10324 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10325 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10326 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10328 * config/v850/v850-protos.h (notice_update_cc): Remove.
10329 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10330 (v850_print_operand): Handle 'D' and "d".
10331 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10332 Add handling of arithmetic/logical operations compared against zero.
10333 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10334 Do not look at v850_compare_op, instead get mode from last argument.
10335 (v850_gen_compare): Remove
10336 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10337 after reload for prologue insns.
10338 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10340 (construct_save_jarl): Likewise.
10341 (TARGET_FLAGS_REGNUM): Define.
10342 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10343 (NOTICE_UPDATE_CC): Remove.
10344 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10345 than cc0. Conditionalize on reload_completed.
10346 (cmpsi_insn, setfcc_insn): Likewise.
10347 (tst1 splitter): Turn into define_and_split which sets the flags
10349 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10350 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10351 (cstoresf4, cstoredf4): Clobber the flags.
10352 (cmpsi, cmpsf, cmpdf): Remove expanders.
10353 (setf_insn): Remove pattern.
10354 (addsi3): Turn into define_and_split which clobbers the flags after
10355 reload and a suitable pattern (addsi3_clobber_flags) for use after
10357 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10358 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10359 (ashrsi3, ashrsi3_v850e2): Likewise.
10360 (bins): Clobber the flags.
10361 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10362 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10363 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10364 (call_value_internal_short, call_value_internal_long): Likewise.
10365 (callt_save_interrupt, callt_return_interrupt): Likewise.
10366 (save_interrupt, return_interrupt): Likewise.
10367 (callt_save_all_interrupt, save_all_interrupt): Likewise.
10368 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10369 (restore_all_interrupt, _restore_all_interrupt): Likewise.
10370 (All FP comparisons): Only allow after reload has completed.
10372 (divh, divhu): Tweak output template.
10373 (branch_z_normal, branch_z_invert): Remove
10374 (branch_nz_normal, branch_nz_invert): Likewise.
10375 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10377 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10378 * config/v850/v850.c (notice_update_cc): Remove.
10379 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
10380 (CC_NO_CARRY): Likewise.
10381 (NOTICE_UPDATE_CC): Define to nothing.
10382 * config/v850/v850.md: Remove block comment on cc0 handling
10383 Remove "cc" attribute from all patterns. Remove cc_status handling
10384 from all patterns. Minor formatting fixes.
10386 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10388 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10389 (cortex-a76.cortex-a55): Likewise.
10390 * config/aarch64/aarch64-tune.md: Regenerate.
10391 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10392 cortex-a76.cortex-a55.
10394 2018-06-27 Jeff Law <law@redhat.com>
10396 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10397 (MULTILIB_DIRNAMES): Similarly.
10399 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
10401 * gimple.h (gimple_return_retbnd): Delete.
10402 (gimple_return_set_retbnd): Likewise.
10403 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10404 gimple_return_set_retbnd.
10405 * gimple-pretty-print.c (dump_gimple_return): Remove call to
10406 gimple_return_retbnd and adjust.
10407 * tree-inline.h (struct copy_body_data): Remove retbnd field.
10408 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10409 Explicitly return NULL in a couple more cases. Move assertion
10410 on debug statements and remove unreachable code.
10411 (reset_debug_binding): Do not test id->retbnd.
10412 (expand_call_inline): Do not set it.
10414 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10416 * configure.ac: Add --disable-gcov option.
10417 * configure: Regenerate.
10418 * Makefile.in: Honour @enable_gcov@.
10419 * doc/install.texi: Document --disable-gcov.
10421 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10423 * config/arm/arm-cpus.in (cortex-a76): New entry.
10424 (cortex-a76.cortex-a55): Likewise.
10425 * config/arm/arm-tables.opt: Regenerate.
10426 * config/arm/arm-tune.md: Likewise.
10427 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10428 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10429 cortex-a76.cortex-a55.
10431 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10434 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10436 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10438 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10440 (EPILOGUE_USES): Likewise.
10442 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10444 * tree-inline.c (remap_location): New function extracted from...
10445 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10446 (copy_phis_for_bb): ...here. Call remap_location.
10447 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10449 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10451 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10452 unaligned vsx for 16B memset.
10454 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10457 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10458 ieee128_float_type_node to long_double_type_node unless
10459 TARGET_LONG_DOUBLE_128 is set.
10461 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10463 * cfgloop.c (get_loop_location): Convert return type from
10464 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10465 by implicit construction from rtx_insn *, and using
10466 dump_user_location_t::from_function_decl for the fallback case.
10467 * cfgloop.h (get_loop_location): Convert return type from
10468 location_t to dump_user_location_t.
10469 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10470 dump_printf_loc to pass in a dump_location_t rather than a
10471 location_t, via the gimple stmt.
10472 * coverage.c (get_coverage_counts): Update calls to
10473 dump_printf_loc to pass in dump_location_t rather than a
10475 * doc/optinfo.texi (Dump types): Convert example of
10476 dump_printf_loc from taking "locus" to taking "insn". Update
10477 description of the "_loc" calls to cover dump_location_t.
10478 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10480 (dump_user_location_t::dump_user_location_t): New constructors,
10481 from gimple *stmt and rtx_insn *.
10482 (dump_user_location_t::from_function_decl): New function.
10483 (dump_loc): Make static.
10484 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10485 const dump_location_t &.
10486 (dump_generic_expr_loc): Delete.
10487 (dump_printf_loc): Convert param "loc" from location_t to
10488 const dump_location_t &.
10489 (selftest::test_impl_location): New function.
10490 (selftest::dumpfile_c_tests): New function.
10491 * dumpfile.h: Include "profile-count.h".
10492 (class dump_user_location_t): New class.
10493 (struct dump_impl_location_t): New struct.
10494 (class dump_location_t): New class.
10495 (dump_printf_loc): Convert 2nd param from source_location to
10496 const dump_location_t &.
10497 (dump_generic_expr_loc): Delete.
10498 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10499 const dump_location_t &.
10500 * gimple-fold.c (fold_gimple_assign): Update call to
10501 dump_printf_loc to pass in a dump_location_t rather than a
10502 location_t, via the gimple stmt.
10503 (gimple_fold_call): Likewise.
10504 * gimple-loop-interchange.cc
10505 (loop_cand::analyze_iloop_reduction_var): Update for change to
10506 check_reduction_path.
10507 (tree_loop_interchange::interchange): Update for change to
10508 find_loop_location.
10509 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10510 change in return-type of find_loop_location.
10511 (graphite_regenerate_ast_isl): Likewise.
10512 * graphite-optimize-isl.c (optimize_isl): Likewise.
10513 * graphite.c (graphite_transform_loops): Likewise.
10514 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10515 pass in a dump_location_t rather than a location_t, via the
10517 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10518 * ipa.c (walk_polymorphic_call_targets): Likewise.
10519 * loop-unroll.c (report_unroll): Convert "locus" param from
10520 location_t to dump_location_t.
10521 (decide_unrolling): Update for change to get_loop_location's
10523 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10524 location_t to dump_user_location_t.
10525 (grid_find_single_omp_among_assignments_1): Updates calls to
10526 dump_printf_loc to pass in a dump_location_t rather than a
10527 location_t, via the gimple stmt.
10528 (grid_parallel_clauses_gridifiable): Convert "tloc" from
10529 location_t to dump_location_t. Updates calls to dump_printf_loc
10530 to pass in a dump_location_t rather than a location_t, via the
10532 (grid_inner_loop_gridifiable_p): Likewise.
10533 (grid_dist_follows_simple_pattern): Likewise.
10534 (grid_gfor_follows_tiling_pattern): Likewise.
10535 (grid_target_follows_gridifiable_pattern): Likewise.
10536 (grid_attempt_target_gridification): Convert initialization
10537 of local "grid" from memset to zero-initialization; FIXME: does
10538 this require C++11? Update call to dump_printf_loc to pass in a
10539 optinfo_location rather than a location_t, via the gimple stmt.
10540 * profile.c (read_profile_edge_counts): Updates call to
10541 dump_printf_loc to pass in a dump_location_t rather than a
10543 (compute_branch_probabilities): Likewise.
10544 * selftest-run-tests.c (selftest::run_tests): Call
10546 * selftest.h (dumpfile_c_tests): New decl.
10547 * tree-loop-distribution.c (pass_loop_distribution::execute):
10548 Update for change in return type of find_loop_location.
10549 * tree-parloops.c (parallelize_loops): Likewise.
10550 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10551 "locus" from location_t to dump_user_location_t.
10552 (canonicalize_loop_induction_variables): Likewise.
10553 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10554 for change in return type of find_loop_location.
10555 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10556 to dump_printf_loc to pass in a dump_location_t rather than a
10557 location_t, via the stmt.
10558 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10560 * tree-vect-loop-manip.c (find_loop_location): Convert return
10561 type from source_location to dump_user_location_t.
10562 (vect_do_peeling): Update for above change.
10563 (vect_loop_versioning): Update for change in type of
10565 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10566 from location_t to dump_user_location_t.
10567 (vect_estimate_min_profitable_iters): Update for change in type
10569 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10570 location_t to dump_location_t.
10571 (vect_slp_bb): Update for change in type of vect_location.
10572 * tree-vectorizer.c (vect_location): Convert from source_location
10573 to dump_user_location_t.
10574 (try_vectorize_loop_1): Update for change in vect_location's type.
10575 (vectorize_loops): Likewise.
10576 (increase_alignment): Likewise.
10577 * tree-vectorizer.h (vect_location): Convert from source_location
10578 to dump_user_location_t.
10579 (find_loop_location): Convert return type from source_location to
10580 dump_user_location_t.
10581 (check_reduction_path): Convert 1st param from location_t to
10582 dump_user_location_t.
10583 * value-prof.c (check_counter): Update call to dump_printf_loc to
10584 pass in a dump_user_location_t rather than a location_t; update
10585 call to error_at for change in type of "locus".
10586 (check_ic_target): Update call to dump_printf_loc to
10587 pass in a dump_user_location_t rather than a location_t, via the
10590 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10592 * config/s390/s390.h (enum processor_flags): Do not use
10593 default tune parameter when -march was specified.
10595 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10598 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10599 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10602 2018-06-26 Richard Biener <rguenther@suse.de>
10604 PR tree-optimization/86287
10606 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10607 (vect_analyze_loop): Initialize n_stmts.
10609 2018-06-26 Richard Biener <rguenther@suse.de>
10611 PR middle-end/86271
10612 * fold-const.c (fold_convertible_p): Pointer extension
10615 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10618 * dwarf2out.c (loc_list_has_views): Adjust comments.
10619 (dw_loc_list): Split single cross-partition range with
10622 2018-06-25 Jeff Law <law@redhat.com>
10624 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10625 on -mbig-switch by default.
10627 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10629 (const_float_0_operand): Remove unused predicate.
10630 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10631 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10632 (recipsf2): New expander. Original pattern now called
10634 (recipdf2, recipdf2_insn): Similarly.
10635 (rsqrtsf2, rsqrtsf2_insn): Similarly
10636 (rsqrtdf2, rsqrtdf2_insn): Similarly
10638 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10640 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10641 Simplify logic for FreeBSD (twice).
10643 2018-06-25 Martin Sebor <msebor@redhat.com>
10645 PR tree-optimization/86204
10646 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10647 a strnlen result if it's less than the length of the string.
10649 2018-06-25 Martin Sebor <msebor@redhat.com>
10651 PR tree-optimization/85700
10652 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10653 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10654 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10656 2018-06-25 Martin Sebor <msebor@redhat.com>
10658 * doc/extend.texi (Zero-length arrays): Update and clarify.
10660 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10662 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10663 added IEEE/IBM long double multilib support on PowerPC little
10664 endian Linux systems.
10665 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10666 (MULTILIB_DEFAULTS): Likewise.
10667 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10669 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10670 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10671 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10673 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10675 PR middle-end/86311
10676 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10677 (REORDER_45): Likewise.
10679 2018-06-25 Jeff Law <law@redhat.com>
10681 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10682 dividend to 32 bits. Adjust length.
10683 (udivmodhi4): Cleanup output template. Fix length.
10685 2018-06-25 Carl Love <cel@us.ibm.com>
10687 * config/rs6000/vsx.md: Change word selector to prefered location.
10689 2018-06-25 Richard Biener <rguenther@suse.de>
10691 PR tree-optimization/86304
10692 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10693 epilogue-if-converted loops as well.
10695 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10697 * lto-section-out.c (lto_begin_section): Do not print section
10698 name for noaddr and unnumbered dumps.
10700 2018-06-25 Richard Biener <rguenther@suse.de>
10702 * tree-vectorizer.h (struct vec_info_shared): New structure
10703 with parts split out from struct vec_info and loop_nest from
10704 struct _loop_vec_info.
10705 (struct vec_info): Adjust accordingly.
10706 (struct _loop_vec_info): Likewise.
10707 (LOOP_VINFO_LOOP_NEST): Adjust.
10708 (LOOP_VINFO_DATAREFS): Likewise.
10709 (LOOP_VINFO_DDRS): Likewise.
10710 (struct _bb_vec_info): Likewise.
10711 (BB_VINFO_DATAREFS): Likewise.
10712 (BB_VINFO_DDRS): Likewise.
10713 (struct _stmt_vec_info): Add dr_aux member.
10714 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10715 (DR_MISALIGNMENT_UNINITIALIZED): New.
10716 (set_dr_misalignment): Adjust.
10717 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10718 (vect_analyze_loop): Adjust prototype.
10719 (vect_analyze_loop_form): Likewise.
10720 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10721 Compute dependences lazily.
10722 (vect_record_base_alignments): Use shared datarefs/ddrs.
10723 (vect_verify_datarefs_alignment): Likewise.
10724 (vect_analyze_data_refs_alignment): Likewise.
10725 (vect_analyze_data_ref_accesses): Likewise.
10726 (vect_analyze_data_refs): Likewise.
10727 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10728 constructor parameter for shared part.
10729 (vect_analyze_loop_form): Pass in shared part and adjust.
10730 (vect_analyze_loop_2): Pass in storage for the number of
10731 stmts. Move loop nest finding to the caller. Compute
10733 (vect_analyze_loop): Pass in shared part.
10734 (vect_transform_loop): Verify shared datarefs are unchanged.
10735 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10736 constructor parameter for shared part.
10737 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10738 (vect_slp_bb): Verify shared datarefs are unchanged before
10740 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10742 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10743 DR_MISALIGNMENT_UNINITIALIZED.
10744 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10745 parameter for shared part.
10746 (vec_info::~vec_info): Adjust.
10747 (vec_info_shared::vec_info_shared): New.
10748 (vec_info_shared::~vec_info_shared): Likewise.
10749 (vec_info_shared::save_datarefs): Likewise.
10750 (vec_info_shared::check_datarefs): Likewise.
10751 (try_vectorize_loop_1): Construct shared part live for analyses
10752 of a single loop for multiple vector sizes.
10753 * tree-parloops.c (gather_scalar_reductions): Adjust.
10755 2018-06-25 Richard Biener <rguenther@suse.de>
10757 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10758 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10759 (vect_analyze_data_refs): Remove similar code from here and
10760 simplify accordingly.
10762 2018-06-25 Richard Biener <rguenther@suse.de>
10764 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10765 for reverse storage order accesses rather than asserting
10766 they cannot happen here.
10768 2018-06-25 Tom de Vries <tdevries@suse.de>
10771 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10772 Use data16 instead of .byte for insn prefix.
10774 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10777 * parser.c (make_char_string_pack): Pass this literal chars
10778 through cpp_interpret_string.
10779 (cp_parser_userdef_numeric_literal): Check the result of
10780 make_char_string_pack.
10782 2018-06-24 Maya Rashish <coypu@sdf.org>
10784 * ginclude/stddef.h: Simplify conditions around avoiding
10785 re-definition of __size_t.
10787 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10789 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10790 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10792 2018-06-22 Maya Rashish <coypu@sdf.org>
10794 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10795 made to OpenBSD and NetBSD through the years.
10797 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10799 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10800 behavior of vec_pack (vector double, vector double) to match
10801 behavior of vec_float2 (vector double, vector double).
10803 2018-06-22 Olivier Hainque <hainque@adacore.com>
10805 * gimplify.c (gimplify_function_tree): Prevent creation
10806 of a trampoline for the address of the current function
10807 passed to entry/exit instrumentation hooks.
10809 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10812 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10815 2018-06-22 Martin Liska <mliska@suse.cz>
10817 PR tree-optimization/86263
10818 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10819 Bail out if is_enabled is false.
10820 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10822 (jump_table_cluster::is_enabled): New function.
10824 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10826 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10827 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10828 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10829 (lto_input_ts_binfo_tree_pointers): Likewise.
10830 * tree-streamer-out.c (streamer_write_tree_bitfields,
10831 write_ts_binfo_tree_pointers): Likewise.
10832 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10834 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10836 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10838 2018-06-22 Martin Liska <mliska@suse.cz>
10840 * symbol-summary.h (get): Make it pure and inline move
10841 functionality from ::get function.
10842 (get): Remove and inline into ::get and ::get_create.
10843 (get_create): Move code from ::get function.
10845 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10848 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10849 -x assembler-with-cpp.
10851 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10853 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10854 _FILE_OFFSET_BITS=64 for C++.
10856 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10858 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10859 conversion insn that shows up when pr85657-3.c is compiled using
10860 IEEE 128-bit long double.
10861 (neg<mode>2_internal): Use the correct mode to check whether the
10862 mode is IBM extended.
10863 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10864 multiply and divide external functions from being created more
10867 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10869 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10871 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10872 the edge can be forwarded.
10873 (cfg_layout_merge_blocks): Likewise.
10875 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10877 * except.c (finish_eh_generation): Commit edge insertions only after
10878 the EH edges have been redirected from post-landing to landing pads.
10880 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10882 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10883 create_tmp_var_for to create the FRAME decl.
10884 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10886 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10888 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10889 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10890 debug statement when resetting its value.
10891 (expand_call_inline): Copy the locus of the call onto the assignment
10892 of the return value, if any. Use local variable in more cases.
10894 2018-06-21 Martin Liska <mliska@suse.cz>
10896 * ipa-pure-const.c (propagate_nothrow): Use
10897 funct_state_summaries->get.
10898 (dump_malloc_lattice): Likewise.
10899 (propagate_malloc): Likewise.
10901 2018-06-21 Richard Biener <rguenther@suse.de>
10903 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10904 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10905 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10907 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10908 BLOCK_ABSTRACT_ORIGIN unconditionally.
10910 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10912 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10914 * ipa-reference.c (ipa_reference_c_finalize): Delete
10915 ipa_ref_opt_sum_summaries and set it to NULL.
10917 2018-06-21 Tom de Vries <tdevries@suse.de>
10919 PR tree-optimization/85859
10920 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10921 test with comment from bb_no_side_effects_p.
10923 2018-06-21 Richard Biener <rguenther@suse.de>
10925 PR tree-optimization/86232
10926 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10927 max for constant niter.
10929 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10931 * config/aarch64/aarch64-simd.md
10932 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10934 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10936 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10937 Make opernads of the unspec commutative.
10939 2018-06-21 Richard Biener <rguenther@suse.de>
10941 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10942 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10943 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10944 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10946 (vect_record_base_alignments): Do not record base alignment
10947 for gathers or scatters.
10948 (vect_compute_data_ref_alignment): Drop return value that is always
10949 true. Bail out early for gathers or scatters.
10950 (vect_enhance_data_refs_alignment): Bail out early for gathers
10952 (vect_find_same_alignment_drs): Likewise.
10953 (vect_analyze_data_refs_alignment): Remove dead code.
10954 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10955 (vect_analyze_data_refs): For possible gathers or scatters do
10956 not create an alternate DR, just check their possible validity
10957 and mark them. Adjust DECL_NONALIASED handling to not rely
10958 on DR_BASE_ADDRESS.
10959 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10960 update inits of gathers or scatters.
10961 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10962 Also copy gather/scatter flag to pattern vinfo.
10964 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10966 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10967 behavior of vec_packsu (vector unsigned long long, vector unsigned
10968 long long) to match behavior of vec_packs with same signature.
10970 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10971 Thomas Schwinge <thomas@codesourcery.com>
10972 Cesar Philippidis <cesar@codesourcery.com>
10974 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10975 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10976 (gimplify_adjust_omp_clauses): Likewise.
10977 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10978 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10979 (gimplify_omp_target_update): Update handling of acc update and
10981 * omp-low.c (install_var_field): Remove unused parameter
10982 base_pointers_restrict.
10983 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10984 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10986 (omp_target_base_pointers_restrict_p): Delete.
10987 (scan_omp_target): Update call to scan_sharing_clauses.
10988 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10990 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10991 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10992 (convert_local_omp_clauses): Likewise.
10993 * tree-pretty-print.c (dump_omp_clause): Likewise.
10994 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10996 (omp_clause_code_name): Likewise.
10998 2018-06-20 Jakub Jelinek <jakub@redhat.com>
11001 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
11004 PR tree-optimization/86231
11005 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
11006 anti-range don't overwrite *vr0min before using it to compute *vr0max.
11008 2018-06-20 Tom de Vries <tdevries@suse.de>
11010 PR tree-optimization/86097
11011 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11012 iv type if signedness of iv type is not the same as that of *nit.
11014 2018-06-20 Jakub Jelinek <jakub@redhat.com>
11016 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
11017 EDGE_EH edges, verify they are all EDGE_EH.
11019 2018-06-20 Maya Rashish <coypu@sdf.org>
11021 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
11023 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11025 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
11026 * config/aarch64/aarch64.c (xgene1_tunings): Add
11027 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
11028 (aarch64_mode_valid_for_sched_fusion_p):
11029 Allow 16-byte modes.
11030 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
11031 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
11033 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
11035 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
11036 * config/aarch64/iterators.md (VQ2): New mode iterator.
11038 2018-06-20 Martin Liska <mliska@suse.cz>
11040 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11041 Change default ratio from 10 to 8.
11043 2018-06-20 Martin Liska <mliska@suse.cz>
11045 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11047 (bit_test_cluster::find_bit_tests): Likewise.
11048 (switch_decision_tree::analyze_switch_statement): Find clusters.
11049 * tree-switch-conversion.h (struct jump_table_cluster): Document
11052 2018-06-20 Martin Liska <mliska@suse.cz>
11054 * tree-switch-conversion.c (switch_conversion::collect):
11055 Record m_uniq property.
11056 (switch_conversion::expand): Bail out for special conditions.
11057 (group_cluster::~group_cluster): New.
11058 (group_cluster::group_cluster): Likewise.
11059 (group_cluster::dump): Likewise.
11060 (jump_table_cluster::emit): New.
11061 (switch_decision_tree::fix_phi_operands_for_edges): New.
11062 (struct case_node): Remove struct.
11063 (jump_table_cluster::can_be_handled): New.
11064 (case_values_threshold): Moved to header.
11065 (reset_out_edges_aux): Likewise.
11066 (jump_table_cluster::is_beneficial): New.
11067 (bit_test_cluster::can_be_handled): Likewise.
11068 (add_case_node): Remove.
11069 (bit_test_cluster::is_beneficial): New.
11070 (case_bit_test::cmp): New.
11071 (bit_test_cluster::emit): New.
11072 (expand_switch_as_decision_tree_p): Remove.
11073 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
11074 (fix_phi_operands_for_edge): Likewise.
11075 (switch_decision_tree::analyze_switch_statement): New.
11076 (compute_cases_per_edge): Move ...
11077 (switch_decision_tree::compute_cases_per_edge): ... here.
11078 (try_switch_expansion): Likewise.
11079 (switch_decision_tree::try_switch_expansion): Likewise.
11080 (record_phi_operand_mapping): Likewise.
11081 (switch_decision_tree::record_phi_operand_mapping): Likewise.
11082 (emit_case_decision_tree): Likewise.
11083 (switch_decision_tree::emit): Likewise.
11084 (balance_case_nodes): Likewise.
11085 (switch_decision_tree::balance_case_nodes): Likewise.
11086 (dump_case_nodes): Likewise.
11087 (switch_decision_tree::dump_case_nodes): Likewise.
11088 (emit_jump): Likewise.
11089 (switch_decision_tree::emit_jump): Likewise.
11090 (emit_cmp_and_jump_insns): Likewise.
11091 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11092 (emit_case_nodes): Likewise.
11093 (switch_decision_tree::emit_case_nodes): Likewise.
11094 (conditional_probability): Remove.
11095 * tree-switch-conversion.h (enum cluster_type): New.
11097 (struct cluster): Likewise.
11098 (cluster::cluster): Likewise.
11099 (struct simple_cluster): Likewise.
11100 (simple_cluster::simple_cluster): Likewise.
11101 (struct group_cluster): Likewise.
11102 (struct jump_table_cluster): Likewise.
11103 (struct bit_test_cluster): Likewise.
11104 (struct min_cluster_item): Likewise.
11105 (struct case_tree_node): Likewise.
11106 (case_tree_node::case_tree_node): Likewise.
11107 (jump_table_cluster::case_values_threshold): Likewise.
11108 (struct case_bit_test): Likewise.
11109 (struct switch_decision_tree): Likewise.
11110 (struct switch_conversion): Likewise.
11111 (switch_decision_tree::reset_out_edges_aux): Likewise.
11113 2018-06-20 Martin Liska <mliska@suse.cz>
11115 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11116 (hoist_edge_and_branch_if_true): Likewise.
11117 (expand_switch_using_bit_tests_p): Likewise.
11118 (struct case_bit_test): Likewise.
11119 (case_bit_test_cmp): Likewise.
11120 (emit_case_bit_tests): Likewise.
11121 (switch_conversion::switch_conversion): New class.
11122 (struct switch_conv_info): Remove old struct.
11123 (collect_switch_conv_info): More to ...
11124 (switch_conversion::collect): ... this.
11125 (check_range): Likewise.
11126 (switch_conversion::check_range): Likewise.
11127 (check_all_empty_except_final): Likewise.
11128 (switch_conversion::check_all_empty_except_final): Likewise.
11129 (check_final_bb): Likewise.
11130 (switch_conversion::check_final_bb): Likewise.
11131 (create_temp_arrays): Likewise.
11132 (switch_conversion::create_temp_arrays): Likewise.
11133 (free_temp_arrays): Likewise.
11134 (gather_default_values): Likewise.
11135 (switch_conversion::gather_default_values): Likewise.
11136 (build_constructors): Likewise.
11137 (switch_conversion::build_constructors): Likewise.
11138 (constructor_contains_same_values_p): Likewise.
11139 (switch_conversion::contains_same_values_p): Likewise.
11140 (array_value_type): Likewise.
11141 (switch_conversion::array_value_type): Likewise.
11142 (build_one_array): Likewise.
11143 (switch_conversion::build_one_array): Likewise.
11144 (build_arrays): Likewise.
11145 (switch_conversion::build_arrays): Likewise.
11146 (gen_def_assigns): Likewise.
11147 (switch_conversion::gen_def_assigns): Likewise.
11148 (prune_bbs): Likewise.
11149 (switch_conversion::prune_bbs): Likewise.
11150 (fix_phi_nodes): Likewise.
11151 (switch_conversion::fix_phi_nodes): Likewise.
11152 (gen_inbound_check): Likewise.
11153 (switch_conversion::gen_inbound_check): Likewise.
11154 (process_switch): Use the newly created class.
11155 (switch_conversion::expand): New.
11156 (switch_conversion::~switch_conversion): New.
11157 * tree-switch-conversion.h: New file.
11159 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11161 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11162 tree-vect-patterns.c.
11163 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11164 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
11165 (vect_recog_sad_pattern): Likewise.
11166 (vect_recog_widen_sum_pattern): Likewise.
11167 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
11168 (vect_recog_widen_shift_pattern): Remove the type_in argument.
11169 (vect_recog_rotate_pattern): Likewise.
11170 (vect_recog_mult_pattern): Likewise.
11171 (vect_recog_vector_vector_shift_pattern): Likewise.
11172 (vect_recog_divmod_pattern): Likewise.
11173 (vect_recog_mixed_size_cond_pattern): Likewise.
11174 (vect_recog_bool_pattern): Likewise.
11175 (vect_recog_mask_conversion_pattern): Likewise.
11176 (vect_try_gather_scatter_pattern): Likewise.
11177 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
11178 (vect_recog_over_widening_pattern): Likewise.
11179 (vect_recog_gather_scatter_pattern): Likewise.
11180 (vect_recog_func_ptr): Move from tree-vectorizer.h
11181 (vect_vect_recog_func_ptrs): Move further down the file.
11182 (vect_recog_func): Likewise. Remove the third argument.
11183 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11184 (vect_pattern_recog_1): Expect the pattern function to do any
11185 necessary target tests. Also expect it to provide a vector type.
11186 Remove the type_in handling.
11188 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11190 * tree-vect-patterns.c (vect_pattern_detected): New function.
11191 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11192 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11193 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11194 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11195 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11196 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11197 (vect_recog_mask_conversion_pattern)
11198 (vect_try_gather_scatter_pattern): Likewise.
11200 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11202 * tree-vect-patterns.c (vect_get_internal_def): New function.
11203 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11204 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11205 (search_type_for_mask_1): Use it.
11207 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11209 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11210 redundant WIDEN_SUM_EXPR handling.
11211 (vect_recog_sad_pattern): Likewise.
11213 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11215 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11216 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11217 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11218 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11219 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11221 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11223 * tree-vect-stmts.c (vectorizable_call): Make sure that we
11224 use the stmt_vec_info of the original bb statement for the
11225 new zero assignment, even if the call is part of a pattern.
11227 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11229 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11230 that the sequence is attached to the original statement rather
11231 than the pattern statement.
11232 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11233 PATTERN_DEF_SEQ from the original statement rather than
11234 the main pattern statement.
11235 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11236 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11237 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11239 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
11241 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11242 definition statements before the early exit for statements that aren't
11244 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11246 (vect_transform_loop): ...here. Process pattern definition
11247 statements without first checking whether the main pattern
11248 statement is live or relevant.
11250 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11252 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11253 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11255 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
11257 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11258 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11259 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11260 (expand_block_compare): Change select_block_compare_mode call.
11261 (expand_strncmp_align_check): Use new functions, fix comment.
11262 (emit_final_str_compare_gpr): New function.
11263 (expand_strn_compare): Refactor and clean up code.
11264 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11266 2018-06-19 Tony Reix <tony.reix@atos.com>
11267 Damien Bergamini <damien.bergamini@atos.com>
11268 David Edelsohn <dje.gcc@gmail.com>
11270 * collect2.c (static_obj): New variable.
11271 (static_libs): New variable.
11272 (is_in_list): Uncomment declaration.
11273 (main): Track AIX libraries linked statically.
11274 (is_in_list): Uncomment definition.
11275 (scan_prog_file): Don't add AIX shared libraries initializer
11276 to constructor list if linking statically.
11278 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
11280 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11282 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11284 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
11286 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11289 2018-06-19 Martin Liska <mliska@suse.cz>
11291 * config/i386/i386.c (ix86_can_inline_p): Do not use
11292 ipa_fn_summaries::get_create.
11293 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11295 (devirtualization_time_bonus): Likewise.
11296 (ipcp_propagate_stage): Likewise.
11297 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11298 (edge_set_predicate): Likewise.
11299 (evaluate_conditions_for_known_args): Likewise.
11300 (evaluate_properties_for_edge): Likewise.
11301 (ipa_call_summary::reset): Tranform to ...
11302 (ipa_call_summary::~ipa_call_summary): ... this.
11303 (ipa_fn_summary::reset): Transform to ...
11304 (ipa_fn_summary::~ipa_fn_summary): ... this.
11305 (ipa_fn_summary_t::remove): Rename to ...
11306 (ipa_fn_summary_t::remove_callees): ... this.
11307 (ipa_fn_summary_t::duplicate): Use placement new
11308 instead of memory copy.
11309 (ipa_call_summary_t::duplicate): Likewise.
11310 (ipa_call_summary_t::remove): Remove.
11311 (dump_ipa_call_summary): Change get_create to get.
11312 (ipa_dump_fn_summary): Dump only when summary exists.
11313 (analyze_function_body): Use symbol_summary::get instead
11315 (compute_fn_summary): Likewise.
11316 (estimate_edge_devirt_benefit): Likewise.
11317 (estimate_edge_size_and_time): Likewise.
11318 (inline_update_callee_summaries): Likewise.
11319 (remap_edge_change_prob): Likewise.
11320 (remap_edge_summaries): Likewise.
11321 (ipa_merge_fn_summary_after_inlining): Likewise.
11322 (write_ipa_call_summary): Likewise.
11323 (ipa_fn_summary_write): Likewise.
11324 (ipa_free_fn_summary): Likewise.
11325 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11326 (struct ipa_call_summary): Likewise.
11327 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11329 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11330 (estimate_size_after_inlining): Likewise.
11331 (estimate_growth): Likewise.
11332 (growth_likely_positive): Likewise.
11333 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11334 (inline_call): Likewise.
11335 * ipa-inline.c (caller_growth_limits): Likewise.
11336 (can_inline_edge_p): Likewise.
11337 (can_inline_edge_by_limits_p): Likewise.
11338 (compute_uninlined_call_time): Likewise.
11339 (compute_inlined_call_time): Likewise.
11340 (want_inline_small_function_p): Likewise.
11341 (edge_badness): Likewise.
11342 (update_caller_keys): Likewise.
11343 (update_callee_keys): Likewise.
11344 (inline_small_functions): Likewise.
11345 (inline_to_all_callers_1): Likewise.
11346 (dump_overall_stats): Likewise.
11347 (early_inline_small_functions): Likewise.
11348 (early_inliner): Likewise.
11349 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11350 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11351 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11352 * ipa-split.c (execute_split_functions): Likewise.
11353 * symbol-summary.h: Likewise.
11354 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11356 2018-06-19 Richard Biener <rguenther@suse.de>
11358 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11359 (vectorize_loops): ... here. Fix dbgcnt handling.
11360 (try_vectorize_loop): Wrap try_vectorize_loop_1.
11362 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
11365 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11366 ieee128 argument takes up only one (vector) register, not two (floating
11369 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11371 * gimplify.c (gimplify_init_constructor): Really never clear for an
11372 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11374 2018-06-19 Richard Biener <rguenther@suse.de>
11376 PR tree-optimization/86179
11377 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11378 after failed recognition.
11380 2018-06-18 Martin Sebor <msebor@redhat.com>
11382 PR middle-end/85602
11383 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11384 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11385 Handle integer subtraction.
11386 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11387 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11389 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11391 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11392 param from rtx to rtx_insn *.
11393 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11395 (frv_ifcvt_modify_insn): Likwise.
11396 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11397 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
11398 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11399 as_a <rtx_insn *> cast to local "unprotected_region" once
11400 it's been established that it's not NULL or pc_rtx.
11401 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11402 param "sethi" from rtx to rtx_insn *.
11403 (nds32_group_float_insns): Likewise for param "insn".
11404 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11406 (vax_output_int_subtract): Likewise.
11407 * config/vax/vax.c (vax_output_int_add): Likewise for param
11409 (vax_output_int_subtract): Likewise.
11410 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11411 (emit_pattern_after): Likewise for param "after".
11412 (emit_insn_after): Likewise.
11413 (emit_jump_insn_after): Likewise.
11414 (emit_call_insn_after): Likewise.
11415 (emit_debug_insn_after): Likewise.
11416 (emit_pattern_before): Likewise for param "before".
11417 (emit_insn_before): Likewise.
11418 (emit_jump_insn_before): Likewise.
11419 * final.c (get_insn_template): Likewise for param "insn", removing
11421 * output.h (get_insn_template): Likewise for 2nd param.
11422 * rtl.h (emit_insn_before): Likewise.
11423 (emit_jump_insn_before): Likewise.
11424 (emit_debug_insn_before_noloc): Likewise.
11425 (emit_insn_after): Likewise.
11426 (emit_jump_insn_after): Likewise.
11427 (emit_call_insn_after): Likewise.
11428 (emit_debug_insn_after): Likewise.
11429 (set_insn_deleted): Likewise for param.
11431 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11434 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11435 floating point modes, so that IFmode is numerically greater than
11436 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11437 to declare the ordering. This prevents IFmode from being
11438 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11439 machine. Include rs6000-modes.h to share the fractional values
11440 between genmodes* and the rest of the compiler.
11441 (IFmode): Likewise.
11442 (KFmode): Likewise.
11443 (TFmode): Likewise.
11444 * config/rs6000/rs6000-modes.h: New file.
11445 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11446 meaning of rs6000_long_double_size so that 126..128 selects an
11447 appropriate 128-bit floating point type.
11448 (rs6000_option_override_internal): Likewise.
11449 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11450 (TARGET_LONG_DOUBLE_128): Change the meaning of
11451 rs6000_long_double_size so that 126..128 selects an appropriate
11452 128-bit floating point type.
11453 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11454 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11455 source and destination to match the standard usage.
11456 (truncifkf2): Likewise.
11457 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11458 ISA 2.07 to use an explicit clobber, instead of passing in a
11460 (copysign<mode>3_soft): Likewise.
11462 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11464 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11465 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11466 (vect_slp_analyze_instance_dependence): Likewise.
11467 (vect_enhance_data_refs_alignment): Likewise.
11468 (vect_analyze_data_refs_alignment): Likewise.
11469 (vect_slp_analyze_and_verify_instance_alignment
11470 (vect_analyze_data_ref_accesses): Likewise.
11471 (vect_prune_runtime_alias_test_list): Likewise.
11472 (vect_analyze_data_refs): Likewise.
11473 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11474 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11475 (vect_analyze_scalar_cycles_1): Likewise.
11476 (vect_get_loop_niters): Likewise.
11477 (vect_analyze_loop_form_1): Likewise.
11478 (vect_update_vf_for_slp): Likewise.
11479 (vect_analyze_loop_operations): Likewise.
11480 (vect_analyze_loop): Likewise.
11481 (vectorizable_induction): Likewise.
11482 (vect_transform_loop): Likewise.
11483 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11484 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11485 (vect_make_slp_decision): Likewise.
11486 (vect_detect_hybrid_slp): Likewise.
11487 (vect_slp_analyze_operations): Likewise.
11488 (vect_slp_bb): Likewise.
11489 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11490 (vectorizable_bswap): Likewise.
11491 (vectorizable_call): Likewise.
11492 (vectorizable_simd_clone_call): Likewise.
11493 (vectorizable_conversion): Likewise.
11494 (vectorizable_assignment): Likewise.
11495 (vectorizable_shift): Likewise.
11496 (vectorizable_operation): Likewise.
11497 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11499 2018-06-18 Martin Sebor <msebor@redhat.com>
11501 PR tree-optimization/81384
11502 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11503 * builtins.c (expand_builtin_strnlen): New function.
11504 (expand_builtin): Call it.
11505 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11506 * builtins.def (BUILT_IN_STRNLEN): New.
11507 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11508 Warn for bounds in excess of maximum object size.
11509 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11510 single-value ranges. Handle strnlen.
11511 (handle_builtin_strlen): Handle strnlen.
11512 (strlen_check_and_optimize_stmt): Same.
11513 * doc/extend.texi (Other Builtins): Document strnlen.
11515 2018-06-18 Maya Rashish <coypu@sdf.org>
11517 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11518 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11519 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11521 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11523 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11525 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11527 * tree.c (escaped_string::escape): Replace cast to char * by
11528 const_cast<char *> (unescaped).
11530 2018-06-18 Nick Clifton <nickc@redhat.com>
11533 * tree.c (escaped_string): New class. Converts an unescaped
11534 string into its escaped equivalent.
11535 (warn_deprecated_use): Use the new class to convert the
11536 deprecation message, if present.
11537 (test_escaped_strings): New self test.
11538 (test_c_tests): Add test_escaped_strings.
11539 * doc/extend.texi (deprecated): Add a note that the
11540 deprecation message is affected by the -fmessage-length
11541 option, and that control characters will be escaped.
11542 (#pragma GCC error): Document this pragma.
11543 (#pragma GCC warning): Likewise.
11544 * doc/invoke.texi (-fmessage-length): Document this option's
11545 effect on the #warning and #error preprocessor directives and
11546 the deprecated attribute.
11548 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
11550 * tree.c (decl_value_expr_lookup): Revert latest change.
11551 (decl_value_expr_insert): Likewise.
11553 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11555 * gimplify.c (nonlocal_vlas): Delete.
11556 (nonlocal_vla_vars): Likewise.
11557 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11559 (gimplify_body): Do not create and destroy nonlocal_vlas.
11560 * tree-nested.c: Include diagnostic.h.
11561 (use_pointer_in_frame): Tweak.
11562 (lookup_field_for_decl): Add assertion and declare the transformation.
11563 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11564 internal error when the reference is in a wrong context. Do not
11565 create a debug decl by default.
11566 (note_nonlocal_block_vlas): Delete.
11567 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11568 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11569 create a debug decl by default.
11570 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11571 call is in a wrong context.
11572 (fixup_vla_decls): New function.
11573 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11574 debug variables were created.
11575 * tree.c (decl_value_expr_lookup): Add checking assertion.
11576 (decl_value_expr_insert): Likewise.
11578 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11580 PR middle-end/82479
11581 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11582 * tree-scalar-evolution.c (interpret_expr): Likewise.
11583 (expression_expensive_p): Likewise.
11584 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11585 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11586 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11587 (ssa_defined_by_minus_one_stmt_p): New.
11589 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11591 PR middle-end/64946
11592 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11593 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11594 * dojump.c (do_jump): Likewise.
11595 * expr.c (expand_expr_real_2): Check operand type's sign.
11596 * fold-const.c (const_unop): Handle ABSU_EXPR.
11597 (fold_abs_const): Likewise.
11598 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11599 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11600 (strip_sign_op_1): Likesise.
11601 * match.pd: Add new pattern to generate ABSU_EXPR.
11602 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11603 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11604 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11605 * tree-inline.c (estimate_operator_cost): Likewise.
11606 * tree-pretty-print.c (dump_generic_node): Likewise.
11607 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11608 * tree.def (ABSU_EXPR): New.
11610 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11612 PR middle-end/86095
11613 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11614 documented as preserved for backward compatibility only.
11615 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11617 PR rtl-optimization/86108
11618 * bb-reorder.c (create_forwarder_block): Renamed to ...
11619 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11620 jump from new landing pad to the second part.
11621 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11624 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11626 PR middle-end/85878
11627 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11628 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11629 Only call store_expr for halves if the mode is the same.
11631 PR middle-end/86123
11632 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11633 Fix up comment formatting.
11635 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11637 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11638 (typed_splay_tree::closure,
11639 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11640 (typed_splay_tree::typed_splay_tree,
11641 typed_splay_tree::operator =): Declared private.
11642 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11643 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11644 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11645 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11646 typed_splay_tree::splay_tree_splay,
11647 typed_splay_tree::splay_tree_foreach_helper,
11648 typed_splay_tree::splay_tree_insert,
11649 typed_splay_tree::splay_tree_remove,
11650 typed_splay_tree::splay_tree_lookup,
11651 typed_splay_tree::splay_tree_predecessor,
11652 typed_splay_tree::splay_tree_successor,
11653 typed_splay_tree::splay_tree_min,
11654 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11655 (typed_splay_tree::root, typed_splay_tree::comp,
11656 typed_splay_tree::delete_key,
11657 typed_splay_tree::delete_value): New data members.
11658 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11659 typed_splay_tree::remove.
11661 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11663 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11664 -mginv and -mno-ginv to the assembler.
11665 * config/mips/mips.opt (-mcrc): New option.
11666 (-mginv): Likewise.
11667 * doc/invoke.text (-mcrc): Document.
11668 (-mginv): Likewise.
11670 2018-06-15 Nick Clifton <nickc@redhat.com>
11673 * tree.c (escaped_string): New class. Converts an unescaped
11674 string into its escaped equivalent.
11675 (warn_deprecated_use): Use the new class to convert the
11676 deprecation message, if present.
11677 (test_escaped_strings): New self test.
11678 (test_c_tests): Add test_escaped_strings.
11679 * doc/extend.texi (deprecated): Add a note that the
11680 deprecation message is affected by the -fmessage-length
11681 option, and that control characters will be escaped.
11682 (#pragma GCC error): Document this pragma.
11683 (#pragma GCC warning): Likewise.
11684 * doc/invoke.texi (-fmessage-length): Document this option's
11685 effect on the #warning and #error preprocessor directives and
11686 the deprecated attribute.
11688 2018-06-15 Richard Biener <rguenther@suse.de>
11690 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11691 here, also noting vector size used.
11692 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11693 size used in MSG_OPTIMIZED_LOCATIONS dump.
11694 (pass_slp_vectorize::execute): Adjust.
11696 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11699 * config/arc/arc.c (arc_return_address_register): Fix
11702 2018-06-15 Richard Biener <rguenther@suse.de>
11704 PR middle-end/86159
11705 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11706 leave useless conversion stripping to force_gimple_operand_gsi.
11707 (gimplify_build2): Likewise.
11708 (gimplify_build1): Likewise.
11710 2018-06-15 Richard Biener <rguenther@suse.de>
11712 PR middle-end/86076
11713 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11714 before adjusting their block.
11716 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11718 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11719 multilibs for *-*-rtems*.
11720 * config/riscv/t-rtems: New file.
11722 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11724 PR middle-end/86122
11725 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11726 unsigned_type_for returns NULL.
11729 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11730 subregs of multi-word pseudos unless the float mode has word size.
11732 2018-06-14 Richard Biener <rguenther@suse.de>
11734 PR middle-end/86139
11735 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11736 duplicate and harmful type_hash_canon.
11737 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11739 2018-06-14 Richard Biener <rguenther@suse.de>
11742 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11745 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11747 * config/rtems.h (STDINT_LONG32): Define.
11749 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11750 Prachi Godbole <prachi.godbole@imgtec.com>
11752 * config/mips/mips-cpus.def: Define P6600.
11753 * config/mips/mips-tables.opt: Regenerate.
11754 * config/mips/mips.c (mips_ucbranch_type): New enum.
11755 (mips_rtx_cost_data): Add support for P6600.
11756 (mips_issue_rate): Likewise.
11757 (mips_multipass_dfa_lookahead): Likewise.
11758 (mips_avoid_hazard): Likewise.
11759 (mips_reorg_process_insns): Likewise.
11760 (mips_classify_branch_p6600): New function.
11761 * config/mips/mips.h (TUNE_P6600): New define.
11762 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11763 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11764 * config/mips/mips.md: Include p6600.md.
11765 (processor): Add p6600.
11766 * config/mips/p6600.md: New file.
11767 * doc/invoke.texi: Add p6600 to supported architectures.
11769 2018-06-13 Martin Sebor <msebor@redhat.com>
11771 PR tree-optimization/86114
11772 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11774 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11776 2018-06-13 Richard Biener <rguenther@suse.de>
11778 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11779 Properly set vector type of the intermediate stmt.
11780 * tree-vect-stmts.c (vectorizable_operation): The destination
11781 var always has vectype_out type.
11783 2018-06-13 Jeff Law <law@redhat.com>
11785 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11786 integer 0 for argument to print_rtl_with_bb.
11787 (rl78_reorg): Likewise.
11789 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11791 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11792 from rtx to rtx_insn *.
11793 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11795 (add_sched_insns_for_speculation): Likewise for local "target",
11796 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11797 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11798 from rtx_insn ** to rtx_code_label **.
11799 (reorg_emit_nops): Likewise.
11800 (c6x_reorg): Likewise for local "call_labels".
11801 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11803 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11804 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11805 the loops over LABEL_REFS.
11806 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11808 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11809 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11810 (split_branches): Strengthen local "olabel" from rtx to
11811 rtx_insn *, adding a safe_as_a cast.
11812 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11814 (add_insn_after): Likewise for first two params.
11815 (add_insn_before): Likewise.
11816 (remove_insn): Likewise for param.
11817 (emit_pattern_before_noloc): Likewise for second and third params.
11818 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11819 (emit_call_insn_before_noloc): Likewise.
11820 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11822 (emit_barrier_before): Likewise.
11823 (emit_label_before): Strengthen "label" param from "rtx" to
11824 "rtx_code_label *". Strengthen "before" param from "rtx" to
11826 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11828 (emit_pattern_after_noloc): Likewise.
11829 (emit_insn_after_noloc): Likewise.
11830 (emit_jump_insn_after_noloc): Likewise.
11831 (emit_call_insn_after_noloc): Likewise.
11832 (emit_debug_insn_after_noloc): Likewise.
11833 (emit_barrier_after): Likewise.
11834 (emit_label_after): Likewise for both params.
11835 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11836 "loc" param from "int" to "location_t".
11837 (emit_insn_after_setloc): Likewise.
11838 (emit_jump_insn_after_setloc): Likewise.
11839 (emit_call_insn_after_setloc): Likewise.
11840 (emit_debug_insn_after_setloc): Likewise.
11841 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11842 "loc" param from "int" to "location_t".
11843 (emit_pattern_before): Convert NULL_RTX to NULL.
11844 (emit_insn_before_setloc): Convert "loc" param from "int" to
11846 (emit_jump_insn_before_setloc): Likewise.
11847 (emit_call_insn_before_setloc): Likewise.
11848 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11849 rtx_insn *. Convert "loc" param from "int" to "location_t".
11850 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11851 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11852 Convert 3rd param from "int" to "location_t".
11853 (emit_barrier_before, emit_barrier_after, next_real_insn):
11854 Strengthen param from rtx to rtx_insn *.
11855 (emit_label_before): Strengthen 1st param from "rtx" to
11856 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11858 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11859 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11860 Strengthen 2nd param from "rtx" to "rtx_insn *".
11861 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11862 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11863 Likewise. Convert 3rd param from "int" to "location_t".
11864 (emit_label_after): Strengthen 1st param from "rtx" to
11865 "rtx_code_label *".
11866 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11868 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11869 from "rtx" to "rtx_insn *".
11871 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11873 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11874 bodies streamed in with -Q.
11875 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11876 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11877 * gimple-streamer-out.c: Include gimple-pretty-print.h
11878 (output_bb): Dump stmts streamed.
11879 * lto-section-out.c: Include print-tree.h
11880 (lto_begin_section): Dump sections created.
11881 (lto_output_decl_index): Dump decl encoded.
11882 * lto-streamer-out.c: Include print-tree.h
11883 (create_output_block): Dump output block created.
11884 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11885 (output_function): Dump function output.
11886 (output_constructor): Dump constructor streamed.
11887 (write_global_stream): Output indexes encoded.
11888 (produce_asm_for_decls): Dump streams encoded.
11889 * lto-streamer.c (streamer_dump_file): New global var.
11890 * lto-streamer.h (streamer_dump_file): Declare.
11891 * passes.c (ipa_write_summaries): Initialize streamer dump.
11892 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11895 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11898 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11899 offsets for register save directives. Emit a second batch of save
11900 directives, if need be, when the function accesses prior frames.
11902 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11904 * config/arc/fpu.md (fmasf4): Force operand to register.
11905 (fnmasf4): Likewise.
11907 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11909 * config/arc/arc-protos.h (arc_pad_return): Remove.
11910 * config/arc/arc.c (machine_function): Remove force_short_suffix
11912 (arc_print_operand): Adjust printing of '&'.
11913 (arc_verify_short): Remove conditional printing of short suffix.
11914 (arc_final_prescan_insn): Remove reference to size_reason.
11915 (pad_return): New function.
11916 (arc_reorg): Call pad_return.
11917 (arc_pad_return): Remove.
11918 (arc_init_machine_status): Remove reference to force_short_suffix.
11919 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11920 (attr length): When attribute iscompact is true force to 2
11921 regardless; in the case of maybe check if we want to force the
11922 instruction to have 4 bytes length.
11923 (nopv): Change it to generate 4 byte long nop as well.
11924 (blockage): New pattern.
11925 (simple_return): Remove call to arc_pad_return.
11926 (p_return_i): Likewise.
11928 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11930 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11932 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11934 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11937 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11939 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11940 for ARC700 and ARCv2.
11942 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11945 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11946 operands[2] instead of operands[1].
11949 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11951 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11952 case, check whether the outer register overlaps an unallocatable
11953 register, not just whether it fits the required class.
11955 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11957 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11959 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11960 (memrefs_conflict_p): Likewise.
11961 (init_alias_analysis): Likewise.
11962 * cfgexpand.c (expand_debug_expr): Likewise.
11963 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11964 * cse.c (fold_rtx): Likewise.
11965 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11966 * expr.c (emit_block_move_hints): Likewise.
11967 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11968 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11969 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11970 (emit_group_store): Likewise.
11971 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11972 to read the PRE/POST_MODIFY increment.
11973 * calls.c (store_one_arg): Use strip_offset.
11974 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11976 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11978 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11979 (simplify_binary_operation_1): Extend CONST_INT handling to
11981 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11982 than a HOST_WIDE_INT.
11983 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11985 (adjust_mems, add_stores): Update accodingly.
11986 (vt_canonicalize_addr): Track polynomial offsets.
11987 (emit_note_insn_var_location): Likewise.
11988 (vt_add_function_parameter): Likewise.
11989 (vt_initialize): Likewise.
11991 2018-06-12 Jeff Law <law@redhat.com>
11993 * config.gcc (alpha*-*-freebsd*): Remove.
11994 * config/alpha/freebsd.h: Remove.
11996 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11999 * spellcheck-tree.c (levenshtein_distance): Rename to...
12000 (get_edit_distance): ...this, and update for underlying renaming.
12001 * spellcheck-tree.h (levenshtein_distance): Rename to...
12002 (get_edit_distance): ...this.
12003 * spellcheck.c (levenshtein_distance): Rename to...
12004 (get_edit_distance): ...this. Convert from Levenshtein distance
12005 to Damerau-Levenshtein distance by supporting transpositions of
12006 adjacent characters. Rename "v1" to "v_next" and "v0" to
12008 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
12009 (selftest::test_edit_distance_unit_test_oneway): ...this, and
12010 update for underlying renaming.
12011 (selftest::levenshtein_distance_unit_test): Rename to...
12012 (selftest::test_get_edit_distance_unit): ...this, and update for
12013 underlying renaming.
12014 (selftest::test_find_closest_string): Add example from PR 69968
12015 where transposition helps
12016 (selftest::test_metric_conditions): Update for renaming.
12017 (selftest::test_metric_conditions): Likewise.
12018 (selftest::spellcheck_c_tests): Likewise.
12019 * spellcheck.h (levenshtein_distance): Rename both overloads to...
12020 (get_edit_distance): ...this.
12021 (best_match::consider): Update for renaming.
12023 2018-06-12 Martin Sebor <msebor@redhat.com>
12025 PR tree-optimization/85259
12026 * builtins.c (compute_objsize): Handle constant offsets.
12027 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
12028 true iff a warning has been issued.
12029 * gimple.h (gimple_nonartificial_location): New function.
12030 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
12031 gimple_nonartificial_location and handle -Wno-system-headers.
12032 (handle_builtin_stxncpy): Same.
12034 2018-06-12 Martin Sebor <msebor@redhat.com>
12037 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
12039 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
12041 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12042 BUILTIN_VEC_XST entries for pointer to double and long long.
12044 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
12047 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12049 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12052 2018-06-12 Martin Liska <mliska@suse.cz>
12054 * doc/options.texi: Document IntegerRange.
12056 2018-06-12 Martin Liska <mliska@suse.cz>
12058 * config/i386/i386.opt: Make MPX-related options as Deprecated.
12059 * opt-functions.awk: Handle Deprecated flag.
12060 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
12062 (read_cmdline_option): Report warning for a deprecated option.
12063 * opts.h (struct cl_option): Add new field cl_deprecated.
12064 (CL_ERR_DEPRECATED): New.
12066 2018-06-12 Martin Liska <mliska@suse.cz>
12068 * doc/options.texi: Document Deprecated option flag.
12070 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12072 * config/arc/arc-arch.h (arc_extras): New enum.
12073 (arc_cpu_t):Add field extra.
12074 (arc_cpu_types): Consider the extras.
12075 * config/arc/arc-cpus.def: Add extras info.
12076 * config/arc/arc-opts.h (processor_type): Consider extra field.
12077 * config/arc/arc.c (arc_override_options): Handle extra field.
12079 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
12081 * config/arc/arc-arch.h: Update ARC_OPTX macro.
12082 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12084 * config/arc/arc.c (arc_init): Update pic warning.
12085 (irq_range): Update irq range parsing warnings.
12086 (arc_override_options): Update various warning messages.
12087 (arc_handle_aux_attribute): Likewise.
12089 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
12091 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12093 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12095 * doc/sourcebuild.texi: Document usage of line number 0 in verify
12096 compiler messages directives.
12098 2018-06-12 Matthew Fortune <mfortune@gmail.com>
12100 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12101 * config/mips/mips-tables.opt: Regenerate.
12102 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12104 * doc/invoke.texi: Document -march=i6500.
12106 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
12108 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12109 (i6400_gpmul): Add cpu_unit.
12110 (i6400_gpdiv): Likewise.
12111 (i6400_msa_add_d): Update reservations.
12112 (i6400_msa_int_add) Likewise.
12113 (i6400_msa_short_logic3) Likewise.
12114 (i6400_msa_short_logic2) Likewise.
12115 (i6400_msa_short_logic) Likewise.
12116 (i6400_msa_move) Likewise.
12117 (i6400_msa_cmp) Likewise.
12118 (i6400_msa_short_float2) Likewise.
12119 (i6400_msa_div_d) Likewise.
12120 (i6400_msa_long_logic1) Likewise.
12121 (i6400_msa_long_logic2) Likewise.
12122 (i6400_msa_mult) Likewise.
12123 (i6400_msa_long_float2) Likewise.
12124 (i6400_msa_long_float4) Likewise.
12125 (i6400_msa_long_float5) Likewise.
12126 (i6400_msa_long_float8) Likewise.
12127 (i6400_fpu_fadd): Include frint type.
12128 (i6400_fpu_store): New define_insn_reservation.
12129 (i6400_fpu_load): Likewise.
12130 (i6400_fpu_move): Likewise.
12131 (i6400_fpu_fcmp): Likewise.
12132 (i6400_fpu_fmadd): Likewise.
12133 (i6400_int_mult): Include imul3nc type and update reservation.
12134 (i6400_int_div): Include idiv3 type and update reservation.
12135 (i6400_int_load): Update to check type not move_type.
12136 (i6400_int_store): Likewise.
12137 (i6400_int_prefetch): Set zero latency.
12139 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
12141 * gcc.c: Document new %@{...} sequence.
12142 (LINK_COMMAND_SPEC): Use it for the -L switches.
12143 (cpp_unique_options): Use it for the -I switches.
12144 (at_file_argbuf): New global variable.
12145 (in_at_file): Likewise.
12146 (alloc_args): Create at_file_argbuf.
12147 (clear_args): Truncate at_file_argbuf.
12148 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12149 (open_at_file): New function.
12150 (close_at_file): Likewise.
12151 (create_at_file): Delete.
12152 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12155 (validate_switches_from_spec): Deal with %@{...} sequence.
12156 (validate_switches): Likewise.
12157 (driver::finalize): Call clear_args.
12159 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
12161 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12163 2018-06-11 Martin Sebor <msebor@redhat.com>
12165 * doc/invoke.texi (-Wall): List -Wc++17-compat.
12166 (Wno-class-memaccess): Add @opindex.
12167 (Wno-templates, Wno-multiple-inheritance): Same.
12168 (Wno-virtual-inheritance, Wno-namespaces): Same.
12169 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12170 (Wno-format-overflow, Wno-format-truncation): Same.
12171 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12172 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12173 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12174 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12175 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12176 (Wno-misspelled-isr): Same.
12178 2018-06-11 Martin Sebor <msebor@redhat.com>
12180 * PR tree-optimization/86083
12181 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12183 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
12185 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12187 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
12190 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12191 on the correct operand.
12192 (*movdi_internal64): Ditto.
12194 2018-06-11 Martin Liska <mliska@suse.cz>
12196 PR tree-optimization/86089
12197 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12199 2018-06-11 Julia Koval <julia.koval@intel.com>
12201 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12202 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12203 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12205 2018-06-11 Olivier Hainque <hainque@adacore.com>
12207 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12208 for Ada with strict dwarf2.
12210 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
12213 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12216 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
12218 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12220 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
12222 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12225 2018-06-08 Martin Liska <mliska@suse.cz>
12227 * tree-cfg.h (debug_function): Fix argument type to match
12230 2018-06-08 Martin Liska <mliska@suse.cz>
12232 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12233 Remove usage of MPX-related (and removed) fields.
12234 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12236 2018-06-08 David Malcolm <dmalcolm@redhat.com>
12238 * cfg.c (debug): Use TDF_NONE rather than 0.
12239 * cfghooks.c (debug): Likewise.
12240 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12241 (struct dump_option_value_info): Convert to...
12242 (struct kv_pair): ...this template type.
12243 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12245 (optinfo_verbosity_options): Likewise.
12246 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12248 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12249 than int for "optgroup_flags" param.
12250 (dump_generic_expr_loc): Use dump_flags_t rather than int for
12252 (dump_dec): Likewise.
12253 (dump_finish): Use TDF_NONE rather than 0.
12254 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12255 rather than int for "optgroup_flags" param. Use TDF_NONE rather
12256 than 0. Update for change to option_ptr.
12257 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12258 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
12259 0. Update for changes to optinfo_verbosity_options and
12261 (opt_info_switch_p): Convert optgroup_flags from int to
12263 (dump_basic_block): Use dump_flags_t rather than int
12264 for "dump_kind" param.
12265 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12266 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12267 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12268 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12269 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12270 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12271 TDF_NONE): Convert from macros to...
12272 (enum dump_flag): ...this new enum.
12273 (dump_flags_t): Update to use enum.
12274 (operator|, operator&, operator~, operator|=, operator&=):
12275 Implement for dump_flags_t.
12276 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12277 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12278 Convert from macros to...
12279 (enum optgroup_flag): ...this new enum.
12280 (optgroup_flags_t): New typedef.
12281 (operator|, operator|=): Implement for optgroup_flags_t.
12282 (struct dump_file_info): Convert field "alt_flags" to
12283 dump_flags_t. Convert field "optgroup_flags" to
12285 (dump_basic_block): Use dump_flags_t rather than int for param.
12286 (dump_generic_expr_loc): Likewise.
12287 (dump_dec): Likewise.
12288 (dump_register): Convert param "optgroup_flags" to
12290 (opt_info_enable_passes): Likewise.
12291 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12293 * gimple-pretty-print.c (debug): Likewise.
12294 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12295 (merged_store_group::apply_stores): Likewise.
12296 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12297 * gimple.c (verify_gimple_pp): Likewise.
12298 * graphite-poly.c (print_pbb_body): Likewise.
12299 * passes.c (pass_manager::register_one_dump_file): Convert
12300 local "optgroup_flags" to optgroup_flags_t.
12301 * print-tree.c (print_node): Use TDF_NONE rather than 0.
12303 (debug_body): Likewise.
12304 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12305 to optgroup_flags_t.
12306 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12308 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12309 (convert_mult_to_fma): Likewise.
12310 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12311 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12312 * tree-vect-data-refs.c (dump_lower_bound): Convert param
12313 "dump_kind" to dump_flags_t.
12315 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12317 * config/rs6000/rs6000.c (min, max): Delete.
12319 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12321 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12322 -mabi=spe and -mabi=no-spe.
12324 2018-06-08 Martin Liska <mliska@suse.cz>
12326 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12327 where we expect an existing summary.
12329 2018-06-08 Martin Liska <mliska@suse.cz>
12331 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12332 * ipa-inline.h (estimate_edge_growth): Likewise.
12334 2018-06-08 Martin Liska <mliska@suse.cz>
12336 * cgraph.c (function_version_hasher::hash): Use
12337 cgraph_node::get_uid ().
12338 (function_version_hasher::equal):
12339 * cgraph.h (cgraph_node::get_uid): New method.
12340 * ipa-inline.c (update_caller_keys): Use
12341 cgraph_node::get_uid ().
12342 (update_callee_keys): Likewise.
12343 * ipa-utils.c (searchc): Likewise.
12344 (ipa_reduced_postorder): Likewise.
12345 * lto-cgraph.c (input_node): Likewise.
12346 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12347 * symbol-summary.h (symtab_insertion): Likewise.
12348 (symtab_removal): Likewise.
12349 (symtab_duplication): Likewise.
12350 * tree-pretty-print.c (dump_function_header): Likewise.
12351 * tree-sra.c (convert_callers_for_node): Likewise.
12353 2018-06-08 Martin Liska <mliska@suse.cz>
12355 * cgraph.c (symbol_table::create_edge): Always assign a new
12357 (symbol_table::free_edge): Do not recycle numbers.
12358 * cgraph.h (cgraph_edge::get): New method.
12359 * symbol-summary.h (symtab_removal): Use it.
12360 (symtab_duplication): Likewise.
12361 (call_summary::hashable_uid): Remove.
12363 2018-06-08 Martin Liska <mliska@suse.cz>
12365 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12366 (initialize_growth_caches): Remove.
12367 (free_growth_caches): Likewise.
12368 (do_estimate_edge_time): Use edge_growth_cache.
12369 (do_estimate_edge_size): Likewise.
12370 (do_estimate_edge_hints): Likewise.
12371 * ipa-inline.c (reset_edge_caches): Likewise.
12372 (recursive_inlining): Likewise.
12373 (inline_small_functions): Likewise.
12374 * ipa-inline.h (initialize_growth_caches): Remove.
12375 (estimate_edge_size): Likewise.
12376 (estimate_edge_time): Likewise.
12377 (estimate_edge_hints): Likewise.
12378 (reset_edge_growth_cache): Likewise.
12379 * symbol-summary.h (call_summary::remove): New method.
12381 2018-06-08 Martin Liska <mliska@suse.cz>
12383 * ipa-cp.c (class edge_clone_summary): New summary.
12384 (grow_edge_clone_vectors): Remove.
12385 (ipcp_edge_duplication_hook): Remove.
12386 (class edge_clone_summary_t): New call_summary class.
12387 (ipcp_edge_removal_hook): Remove.
12388 (edge_clone_summary_t::duplicate): New function.
12389 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12390 (create_specialized_node): Likewise.
12391 (ipcp_driver): Initialize edge_clone_summaries and do not
12394 2018-06-08 Martin Liska <mliska@suse.cz>
12396 * symbol-summary.h (get): New function.
12397 (call_summary::m_initialize_when_cloning): New class member.
12399 2018-06-08 Martin Liska <mliska@suse.cz>
12401 * cgraph.c (cgraph_node::remove): Do not recycle uid.
12402 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12403 (symbol_table::allocate_cgraph_symbol): Do not set uid.
12404 * passes.c (uid_hash_t): Record removed_nodes by their uids.
12405 (remove_cgraph_node_from_order): Use the removed_nodes set.
12406 (do_per_function_toporder): Likwise.
12407 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12408 instead of summary_uid.
12409 (symtab_removal): Likewise.
12410 (symtab_duplication): Likewise.
12412 2018-06-08 Martin Liska <mliska@suse.cz>
12414 * ipa-cp.c (ipcp_store_bits_results): Use
12415 ipcp_transformation_sum.
12416 (ipcp_store_vr_results): Likewise.
12417 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12419 (ipcp_transformation_initialize): ... this.
12420 (ipa_set_node_agg_value_chain):
12421 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12422 (write_ipcp_transformation_info): Likewise.
12423 (read_ipcp_transformation_info): Likewise.
12424 (ipcp_update_bits): Likewise.
12425 (ipcp_update_vr): Likewise.
12426 (ipcp_transform_function): Likewise.
12427 * ipa-prop.h: Rename ipcp_transformation_summary to
12428 ipcp_transformation.
12429 (class ipcp_transformation_t): New function summary.
12430 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12431 (ipa_get_agg_replacements_for_node): Likewise.
12433 2018-06-08 Martin Liska <mliska@suse.cz>
12435 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12437 (class funct_state_summary_t): New function_summary class.
12438 (has_function_state): Remove.
12439 (get_function_state): Likewise.
12440 (set_function_state): Likewise.
12441 (add_new_function): Likewise.
12442 (funct_state_summary_t::insert): New function.
12443 (duplicate_node_data): Remove.
12444 (remove_node_data): Remove.
12445 (funct_state_summary_t::duplicate): New function.
12446 (register_hooks): Create new funct_state_summaries.
12447 (pure_const_generate_summary): Use it.
12448 (pure_const_write_summary): Likewise.
12449 (pure_const_read_summary): Likewise.
12450 (propagate_pure_const): Likewise.
12451 (propagate_nothrow): Likewise.
12452 (dump_malloc_lattice): Likewise.
12453 (propagate_malloc): Likewise.
12454 (execute): Do not register hooks, just remove summary
12456 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12459 2018-06-08 Martin Liska <mliska@suse.cz>
12461 * ipa-reference.c (remove_node_data): Remove.
12462 (duplicate_node_data): Likewise.
12463 (class ipa_ref_var_info_summary_t): New class.
12464 (class ipa_ref_opt_summary_t): Likewise.
12465 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12466 (get_reference_optimization_summary): Use
12467 ipa_ref_opt_sum_summaries.
12468 (set_reference_vars_info): Remove.
12469 (set_reference_optimization_summary): Likewise.
12470 (ipa_init): Create summaries.
12471 (init_function_info): Use function summary.
12472 (ipa_ref_opt_summary_t::duplicate): New function.
12473 (ipa_ref_opt_summary_t::remove): New function.
12474 (get_read_write_all_from_node): Fix GNU coding style.
12475 (propagate): Use function summary.
12476 (write_node_summary_p): Fix GNU coding style.
12477 (stream_out_bitmap): Likewise.
12478 (ipa_reference_read_optimization_summary): Use function summary.
12479 (ipa_reference_c_finalize): Do not release hooks.
12481 2018-06-08 Martin Liska <mliska@suse.cz>
12483 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12484 (analyze_function_body): Extract multiple calls of get_create.
12485 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12486 * ipa-inline.c (recursive_inlining): Use ::get method.
12487 * ipa-inline.h (estimate_edge_growth): Likewise.
12489 2018-06-08 Martin Liska <mliska@suse.cz>
12491 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12493 (hsa_function_summary::hsa_function_summary): Use the new enum
12495 (hsa_gpu_implementation_p): Use hsa_summaries::get.
12496 * hsa-gen.c (hsa_get_host_function): Likewise.
12497 (get_brig_function_name): Likewise.
12498 * ipa-hsa.c (process_hsa_functions): Likewise.
12499 (ipa_hsa_write_summary): Likewise.
12500 * symbol-summary.h (symtab_duplication): Use ::get function/
12501 (get): New function.
12503 2018-06-08 Martin Liska <mliska@suse.cz>
12505 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12507 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12508 (hsa_register_kernel): Likewise.
12509 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12510 * hsa-gen.c (hsa_get_host_function): Likewise.
12511 (get_brig_function_name): Likewise.
12512 (generate_hsa): Likewise.
12513 (pass_gen_hsail::execute): Likewise.
12514 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12515 (devirtualization_time_bonus): Likewise.
12516 (ipcp_propagate_stage): Likewise.
12517 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12518 (edge_set_predicate): Likewise.
12519 (evaluate_conditions_for_known_args): Likewise.
12520 (evaluate_properties_for_edge): Likewise.
12521 (ipa_fn_summary::reset): Likewise.
12522 (ipa_fn_summary_t::duplicate): Likewise.
12523 (dump_ipa_call_summary): Likewise.
12524 (ipa_dump_fn_summary): Likewise.
12525 (analyze_function_body): Likewise.
12526 (compute_fn_summary): Likewise.
12527 (estimate_edge_devirt_benefit): Likewise.
12528 (estimate_edge_size_and_time): Likewise.
12529 (estimate_calls_size_and_time): Likewise.
12530 (estimate_node_size_and_time): Likewise.
12531 (inline_update_callee_summaries): Likewise.
12532 (remap_edge_change_prob): Likewise.
12533 (remap_edge_summaries): Likewise.
12534 (ipa_merge_fn_summary_after_inlining): Likewise.
12535 (ipa_update_overall_fn_summary): Likewise.
12536 (read_ipa_call_summary): Likewise.
12537 (inline_read_section): Likewise.
12538 (write_ipa_call_summary): Likewise.
12539 (ipa_fn_summary_write): Likewise.
12540 (ipa_free_fn_summary): Likewise.
12541 * ipa-hsa.c (process_hsa_functions): Likewise.
12542 (ipa_hsa_write_summary): Likewise.
12543 (ipa_hsa_read_section): Likewise.
12544 * ipa-icf.c (sem_function::merge): Likewise.
12545 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12546 (do_estimate_edge_time): Likewise.
12547 (estimate_size_after_inlining): Likewise.
12548 (estimate_growth): Likewise.
12549 (growth_likely_positive): Likewise.
12550 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12551 (inline_call): Likewise.
12552 * ipa-inline.c (caller_growth_limits): Likewise.
12553 (can_inline_edge_p): Likewise.
12554 (can_inline_edge_by_limits_p): Likewise.
12555 (compute_uninlined_call_time): Likewise.
12556 (compute_inlined_call_time): Likewise.
12557 (want_inline_small_function_p): Likewise.
12558 (edge_badness): Likewise.
12559 (update_caller_keys): Likewise.
12560 (update_callee_keys): Likewise.
12561 (recursive_inlining): Likewise.
12562 (inline_small_functions): Likewise.
12563 (inline_to_all_callers_1): Likewise.
12564 (dump_overall_stats): Likewise.
12565 (early_inline_small_functions): Likewise.
12566 (early_inliner): Likewise.
12567 * ipa-inline.h (estimate_edge_growth): Likewise.
12568 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12569 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12570 * ipa-prop.h (IPA_NODE_REF): Likewise.
12571 (IPA_EDGE_REF): Likewise.
12572 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12573 (propagate_malloc): Likewise.
12574 * ipa-split.c (execute_split_functions): Likewise.
12575 * symbol-summary.h: Rename get to get_create.
12577 (get_create): Likewise.
12578 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12580 2018-06-08 Martin Liska <mliska@suse.cz>
12582 * symbol-summary.h (release): Move definition out of class
12584 (symtab_removal): Likewise.
12585 (symtab_duplication): Likewise.
12587 2018-06-08 Martin Liska <mliska@suse.cz>
12589 * symbol-summary.h (function_summary): Move constructor
12590 implementation out of class declaration.
12591 (release): Likewise.
12592 (symtab_insertion): Likewise.
12593 (symtab_removal): Likewise.
12594 (symtab_duplication): Likewise.
12597 2018-06-08 Martin Liska <mliska@suse.cz>
12599 * Makefile.in: Remove support for MPX (macros, related functions,
12600 fields in cgraph_node, ...).
12601 * builtin-types.def (BT_BND): Likewise.
12602 (BT_FN_BND_CONST_PTR): Likewise.
12603 (BT_FN_CONST_PTR_BND): Likewise.
12604 (BT_FN_VOID_PTR_BND): Likewise.
12605 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12606 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12607 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12608 (expand_builtin_mempcpy_with_bounds): Likewise.
12609 (expand_builtin_memset_with_bounds): Likewise.
12610 (expand_builtin_memset_args): Likewise.
12611 (std_expand_builtin_va_start): Likewise.
12612 (expand_builtin): Likewise.
12613 (expand_builtin_with_bounds): Likewise.
12614 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12615 (DEF_LIB_BUILTIN_CHKP): Likewise.
12616 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12617 (DEF_CHKP_BUILTIN): Likewise.
12618 (BUILT_IN_MEMCPY): Likewise.
12619 (BUILT_IN_MEMMOVE): Likewise.
12620 (BUILT_IN_MEMPCPY): Likewise.
12621 (BUILT_IN_MEMSET): Likewise.
12622 (BUILT_IN_STPCPY): Likewise.
12623 (BUILT_IN_STRCAT): Likewise.
12624 (BUILT_IN_STRCHR): Likewise.
12625 (BUILT_IN_STRCPY): Likewise.
12626 (BUILT_IN_STRLEN): Likewise.
12627 (BUILT_IN_MEMCPY_CHK): Likewise.
12628 (BUILT_IN_MEMMOVE_CHK): Likewise.
12629 (BUILT_IN_MEMPCPY_CHK): Likewise.
12630 (BUILT_IN_MEMSET_CHK): Likewise.
12631 (BUILT_IN_STPCPY_CHK): Likewise.
12632 (BUILT_IN_STRCAT_CHK): Likewise.
12633 (BUILT_IN_STRCPY_CHK): Likewise.
12634 * calls.c (store_bounds): Likewise.
12635 (emit_call_1): Likewise.
12636 (special_function_p): Likewise.
12637 (maybe_warn_nonstring_arg): Likewise.
12638 (initialize_argument_information): Likewise.
12639 (finalize_must_preallocate): Likewise.
12640 (compute_argument_addresses): Likewise.
12641 (expand_call): Likewise.
12642 * cfgexpand.c (expand_call_stmt): Likewise.
12643 (expand_return): Likewise.
12644 (expand_gimple_stmt_1): Likewise.
12645 (pass_expand::execute): Likewise.
12646 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12647 (cgraph_node::remove): Likewise.
12648 (cgraph_node::dump): Likewise.
12649 (cgraph_node::verify_node): Likewise.
12650 * cgraph.h (chkp_function_instrumented_p): Likewise.
12651 (symtab_node::get_alias_target): Likewise.
12652 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12653 (cgraph_local_p): Likewise.
12654 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12655 (cgraph_edge::rebuild_references): Likewise.
12656 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12657 (walk_polymorphic_call_targets): Likewise.
12658 (cgraph_node::expand_thunk): Likewise.
12659 (symbol_table::output_weakrefs): Likewise.
12660 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12661 (ix86_handle_option): Likewise.
12662 * config/i386/constraints.md: Likewise.
12663 * config/i386/i386-builtin-types.def (BND): Likewise.
12667 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12668 (BDESC_FIRST): Likewise.
12670 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12671 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12672 * config/i386/i386.c (enum reg_class): Likewise.
12673 (ix86_target_string): Likewise.
12674 (ix86_option_override_internal): Likewise.
12675 (ix86_conditional_register_usage): Likewise.
12676 (ix86_valid_target_attribute_inner_p): Likewise.
12677 (ix86_set_indirect_branch_type): Likewise.
12678 (ix86_set_current_function): Likewise.
12679 (ix86_function_arg_regno_p): Likewise.
12680 (init_cumulative_args): Likewise.
12681 (ix86_function_arg_advance): Likewise.
12682 (ix86_function_arg): Likewise.
12683 (ix86_pass_by_reference): Likewise.
12684 (ix86_function_value_regno_p): Likewise.
12685 (ix86_function_value_1): Likewise.
12686 (ix86_function_value_bounds): Likewise.
12687 (ix86_return_in_memory): Likewise.
12688 (ix86_setup_incoming_vararg_bounds): Likewise.
12689 (ix86_va_start): Likewise.
12690 (indirect_thunk_need_prefix): Likewise.
12691 (print_reg): Likewise.
12692 (ix86_print_operand): Likewise.
12693 (ix86_expand_call): Likewise.
12694 (ix86_output_function_return): Likewise.
12695 (reg_encoded_number): Likewise.
12696 (BDESC_VERIFYS): Likewise.
12697 (ix86_init_mpx_builtins): Likewise.
12698 (ix86_init_builtins): Likewise.
12699 (ix86_emit_cmove): Likewise.
12700 (ix86_emit_move_max): Likewise.
12701 (ix86_expand_builtin): Likewise.
12702 (ix86_builtin_mpx_function): Likewise.
12703 (ix86_get_arg_address_for_bt): Likewise.
12704 (ix86_load_bounds): Likewise.
12705 (ix86_store_bounds): Likewise.
12706 (ix86_load_returned_bounds): Likewise.
12707 (ix86_store_returned_bounds): Likewise.
12708 (ix86_class_likely_spilled_p): Likewise.
12709 (ix86_hard_regno_mode_ok): Likewise.
12710 (x86_order_regs_for_local_alloc): Likewise.
12711 (ix86_mitigate_rop): Likewise.
12712 (ix86_bnd_prefixed_insn_p): Likewise.
12713 (ix86_mpx_bound_mode): Likewise.
12714 (ix86_make_bounds_constant): Likewise.
12715 (ix86_initialize_bounds): Likewise.
12716 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12717 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12718 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12719 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12720 (TARGET_CHKP_BOUND_MODE): Likewise.
12721 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12722 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12723 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12724 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12725 * config/i386/i386.h (TARGET_MPX): Likewise.
12726 (TARGET_MPX_P): Likewise.
12727 (VALID_BND_REG_MODE): Likewise.
12728 (FIRST_BND_REG): Likewise.
12729 (LAST_BND_REG): Likewise.
12730 (enum reg_class): Likewise.
12731 (BND_REG_P): Likewise.
12732 (BND_REGNO_P): Likewise.
12733 (BNDmode): Likewise.
12734 (ADJUST_INSN_LENGTH): Likewise.
12735 * config/i386/i386.md: Likewise.
12736 * config/i386/i386.opt: Likewise.
12737 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12738 (defined): Likewise.
12739 (LINK_MPX): Likewise.
12740 (MPX_SPEC): Likewise.
12741 (LIBMPX_SPEC): Likewise.
12742 (LIBMPXWRAPPERS_SPEC): Likewise.
12743 (CHKP_SPEC): Likewise.
12744 * config/i386/predicates.md: Likewise.
12745 * dbxout.c (dbxout_type): Likewise.
12746 * doc/extend.texi: Likewise.
12747 * doc/invoke.texi: Likewise.
12748 * doc/md.texi: Likewise.
12749 * doc/tm.texi: Likewise.
12750 * doc/tm.texi.in: Likewise.
12751 * dwarf2out.c (is_base_type): Likewise.
12752 (gen_formal_types_die): Likewise.
12753 (gen_subprogram_die): Likewise.
12754 (gen_type_die_with_usage): Likewise.
12755 (gen_decl_die): Likewise.
12756 (dwarf2out_late_global_decl): Likewise.
12757 * expr.c (expand_assignment): Likewise.
12758 (emit_storent_insn): Likewise.
12759 (store_expr_with_bounds): Likewise.
12760 (store_expr): Likewise.
12761 (expand_expr_real_1): Likewise.
12762 * expr.h (store_expr_with_bounds): Likewise.
12763 * function.c (use_register_for_decl): Likewise.
12764 (struct bounds_parm_data): Likewise.
12765 (assign_parms_augmented_arg_list): Likewise.
12766 (assign_parm_find_entry_rtl): Likewise.
12767 (assign_parm_is_stack_parm): Likewise.
12768 (assign_parm_load_bounds): Likewise.
12769 (assign_bounds): Likewise.
12770 (assign_parms): Likewise.
12771 (expand_function_start): Likewise.
12772 * gcc.c (CHKP_SPEC): Likewise.
12773 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12774 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12775 (wrestrict_dom_walker::check_call): Likewise.
12776 * gimple.c (gimple_build_call_from_tree): Likewise.
12777 * gimple.h (enum gf_mask): Likewise.
12778 (gimple_call_with_bounds_p): Likewise.
12779 (gimple_call_set_with_bounds): Likewise.
12780 * gimplify.c (gimplify_init_constructor): Likewise.
12781 * ipa-cp.c (initialize_node_lattices): Likewise.
12782 (propagate_constants_across_call): Likewise.
12783 (find_more_scalar_values_for_callers_subset): Likewise.
12784 * ipa-hsa.c (process_hsa_functions): Likewise.
12785 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12786 * ipa-icf.c (sem_function::merge): Likewise.
12787 * ipa-inline.c (early_inliner): Likewise.
12788 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12789 (warn_function_cold): Likewise.
12790 (propagate_pure_const): Likewise.
12791 * ipa-ref.h (enum GTY): Likewise.
12792 * ipa-split.c (find_retbnd): Likewise.
12793 (consider_split): Likewise.
12794 (split_function): Likewise.
12795 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12796 * ipa.c (walk_polymorphic_call_targets): Likewise.
12797 (symbol_table::remove_unreachable_nodes): Likewise.
12798 (process_references): Likewise.
12799 (cgraph_build_static_cdtor_1): Likewise.
12800 * lto-cgraph.c (lto_output_node): Likewise.
12801 (output_refs): Likewise.
12802 (compute_ltrans_boundary): Likewise.
12803 (input_overwrite_node): Likewise.
12804 (input_node): Likewise.
12805 (input_cgraph_1): Likewise.
12806 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12807 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12808 (class pass_chkp_instrumentation_passes): Likewise.
12809 (make_pass_chkp_instrumentation_passes): Likewise.
12810 * passes.def: Likewise.
12811 * rtl.h (struct GTY): Likewise.
12812 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12813 * stor-layout.c (layout_type): Likewise.
12814 * symtab.c: Likewise.
12815 * target.def: Likewise.
12816 * targhooks.c (default_chkp_bound_type): Likewise.
12817 (default_chkp_bound_mode): Likewise.
12818 (default_builtin_chkp_function): Likewise.
12819 (default_chkp_function_value_bounds): Likewise.
12820 (default_chkp_make_bounds_constant): Likewise.
12821 (default_chkp_initialize_bounds): Likewise.
12822 * targhooks.h (default_chkp_bound_type): Likewise.
12823 (default_chkp_bound_mode): Likewise.
12824 (default_builtin_chkp_function): Likewise.
12825 (default_chkp_function_value_bounds): Likewise.
12826 (default_chkp_make_bounds_constant): Likewise.
12827 (default_chkp_initialize_bounds): Likewise.
12828 * toplev.c (compile_file): Likewise.
12829 (process_options): Likewise.
12830 * tree-core.h (DEF_BUILTIN): Likewise.
12831 (DEF_BUILTIN_CHKP): Likewise.
12832 * tree-inline.c (declare_return_variable): Likewise.
12833 (remap_gimple_stmt): Likewise.
12834 (copy_bb): Likewise.
12835 (initialize_inlined_parameters): Likewise.
12836 (expand_call_inline): Likewise.
12837 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12838 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12839 (make_pass_ipa_chkp_produce_thunks): Likewise.
12840 (make_pass_chkp): Likewise.
12841 (make_pass_chkp_opt): Likewise.
12842 (make_pass_chkp_instrumentation_passes): Likewise.
12843 * tree-pretty-print.c (dump_generic_node): Likewise.
12844 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12845 * tree-ssa-dce.c (propagate_necessity): Likewise.
12846 (eliminate_unnecessary_stmts): Likewise.
12847 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12848 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12849 * tree-ssa-sccvn.h: Likewise.
12850 * tree-ssa-strlen.c (get_string_length): Likewise.
12851 (valid_builtin_call): Likewise.
12852 (adjust_last_stmt): Likewise.
12853 (handle_builtin_strchr): Likewise.
12854 (handle_builtin_strcpy): Likewise.
12855 (handle_builtin_stxncpy): Likewise.
12856 (handle_builtin_memcpy): Likewise.
12857 (handle_builtin_strcat): Likewise.
12858 (strlen_check_and_optimize_stmt): Likewise.
12859 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12860 * tree-streamer-in.c: Likewise.
12861 * tree-streamer.c (record_common_node): Likewise.
12862 * tree.c (tree_code_size): Likewise.
12863 (wide_int_to_tree_1): Likewise.
12864 (type_contains_placeholder_1): Likewise.
12865 (build_common_tree_nodes): Likewise.
12866 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12867 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12868 (POINTER_BOUNDS_P): Likewise.
12869 (BOUNDED_TYPE_P): Likewise.
12870 (BOUNDED_P): Likewise.
12871 (CALL_WITH_BOUNDS_P): Likewise.
12872 (pointer_bounds_type_node): Likewise.
12873 * value-prof.c (gimple_ic): Likewise.
12874 * var-tracking.c (vt_add_function_parameters): Likewise.
12875 * varasm.c (make_decl_rtl): Likewise.
12876 (assemble_start_function): Likewise.
12877 (output_constant): Likewise.
12878 (maybe_assemble_visibility): Likewise.
12879 * varpool.c (ctor_for_folding): Likewise.
12880 * chkp-builtins.def: Remove.
12881 * ipa-chkp.c: Remove.
12882 * ipa-chkp.h: Remove.
12883 * rtl-chkp.c: Remove.
12884 * rtl-chkp.h: Remove.
12885 * tree-chkp-opt.c: Remove.
12886 * tree-chkp.c: Remove.
12887 * tree-chkp.h: Remove.
12889 2018-06-07 Carl Love <cel@us.ibm.com>
12891 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12892 vextract_fp_from_shortl): Add BE support.
12894 2018-06-07 Paul Koning <ni1d@arrl.net>
12896 * compare-elim.c (try_merge_compare): Don't merge compare if
12897 address contains a side effect.
12898 (try_eliminate_compare): Likewise.
12900 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12902 * config.gcc: Support "tremont".
12903 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12904 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12906 * config/i386/i386.c (m_TREMONT): Define.
12907 (processor_target_table): Add "tremont".
12908 (PTA_TREMONT): Define.
12909 (ix86_lea_outperforms): Add TARGET_TREMONT.
12910 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12911 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12912 and M_INTEL_GOLDMONT_PLUS.
12913 (fold_builtin_cpu): Add "tremont".
12914 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12915 (ix86_option_override_internal): Add "tremont".
12916 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12917 (processor_type): Add PROCESSOR_TREMONT.
12918 * config/i386/x86-tune.def: Add m_TREMONT.
12919 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12921 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12923 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12924 symbol defined for msp430i* devices to be lower case.
12926 2018-06-07 Richard Biener <rguenther@suse.de>
12928 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12929 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12930 Properly wrap signed arithmetic if overflow wraps.
12932 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12934 PR tree-optimization/69615
12935 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12936 of a cast from a same precision integral SSA_NAME in a bb dominated
12937 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12938 cast to utype if rhs2 has already a compatible type.
12940 2018-06-07 Richard Biener <rguenther@suse.de>
12942 PR tree-optimization/85935
12943 * graphite-scop-detection.c (find_params_in_bb): Analyze
12944 condition operands with respect to the correct loop. Assert
12945 the analysis doesn't fail.
12947 2018-06-04 Carl Love <cel@us.ibm.com>
12949 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12950 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12951 as it is slightly cheaper.
12952 (first_match_or_eos_index_<mode>):
12953 Calculate index using natural element order.
12954 (first_match_index_<mode>):
12955 Calculate index using natural element order.
12956 (first_match_or_eos_index_<mode>):
12957 Calculate index using natural order.
12958 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12959 for BE and LE modes.
12960 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12961 P9V_BUILTIN_VCLZLSBB_V16QI.
12962 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12965 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12967 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12968 indentation and line wrap for many prototypes. Add missing
12969 @smallexample directives around block of prototypes for vec_xl and
12972 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12974 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12975 track if we pass or return IEEE 128-bit floating point.
12976 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12977 C++ mangling that is compatible with GCC 8.1.
12978 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12979 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12980 floating point types.
12981 (rs6000_function_arg_advance_1): Likewise.
12982 (rs6000_mangle_type): Optionally generate mangled names that match
12983 what GCC 8.1 generated for IEEE 128-bit floating point types.
12984 (rs6000_globalize_decl_name): If we have an external function that
12985 passes or returns IEEE 128-bit types, generate a weak reference
12986 from the mangled name used in GCC 8.1 to the current mangled
12988 (rs6000_init_builtins): Make __ibm128 use the long double type if
12989 long double is IBM extended double. Make __float128 use the long
12990 double type if long double is IEEE 128-bit.
12993 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12994 macro for __ibm128 built-in functions.
12995 (PACK_IF): Add __ibm128 pack/unpack functions.
12996 (UNPACK_IF): Likewise.
12997 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12998 enable long double built-in functions if long double is IEEE
12999 128-bit floating point.
13000 (rs6000_invalid_builtin): Update long double built-in function
13002 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
13003 functions, adjust the built-in function to use the long double
13004 built-in function if __ibm128 and long double are the same type.
13005 * doc/extend.texi (PowerPC builtins): Update documention for
13006 __builtin_{,un}pack_longdouble. Add documentation for
13007 __builtin_{,un}pack_ibm128.
13009 2018-06-06 Jim Wilson <jimw@sifive.com>
13011 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
13012 (struct machine_function): New field interrupt_mode.
13013 (riscv_handle_type_attribute): New function. Add forward declaration.
13014 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
13015 (riscv_expand_epilogue): Check interrupt_mode field.
13016 (riscv_set_current_function): Check interrupt attribute args and
13017 set interrupt_mode field.
13018 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
13019 (riscv_sret, riscv_uret): New.
13020 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
13021 new arguments to interrupt attribute.
13023 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
13026 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
13027 Don't handle -mcpu=power8 if -mpower9-vector is also used.
13029 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
13031 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
13032 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
13033 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13034 several redundant entries.
13036 2018-06-06 David Malcolm <dmalcolm@redhat.com>
13038 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
13039 type from "rtx" to "rtx_insn *".
13040 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13041 for local "call_insn", removing cast.
13042 (ix86_expand_call): Likewise, introducing a "call_insn" local.
13044 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
13046 PR tree-optimization/86066
13047 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
13048 for BIT_INSERT_EXPR stores.
13050 2018-06-06 Richard Biener <rguenther@suse.de>
13052 PR tree-optimization/86062
13053 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13054 component refs ontop
13055 of to be offsetted base.
13057 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13059 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
13060 to be static and remove check on interrupt attribute name.
13062 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
13064 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13065 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
13067 2018-06-05 Steve Ellcey <sellcey@cavium.com>
13070 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
13072 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
13073 Remove second argument, change how error is called.
13074 (aarch64_layout_arg): Remove second argument from
13075 aarch64_err_no_fpadvsimd call.
13076 (aarch64_init_cumulative_args): Ditto.
13077 (aarch64_gimplify_va_arg_expr): Ditto.
13078 * config/aarch64/aarch64.md (mov<mode>): Ditto.
13080 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
13082 * config/i386/i386.md (simple_return_indirect_internal): New expander.
13083 (*simple_return_indirect_internal<mode>): Rename from
13084 simple_return_indirect_internal. Use W mode iterator.
13085 (rstorssp): New expander.
13086 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
13087 (clrssbsy): New expander.
13088 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
13090 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
13092 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13094 (cmse_check_pointed_object): Likewise.
13096 2018-06-05 Martin Liska <mliska@suse.cz>
13098 PR gcov-profile/47618
13099 * doc/invoke.texi: Document how -fprofile-dir format
13102 2018-06-05 Richard Biener <rguenther@suse.de>
13104 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13105 removal pretend DOM info isn't available so we do not update
13106 it and only remove edges, not dominated blocks. Actually free
13107 DOM info in case we removed something. Remove unreachable blocks.
13108 (mfb_keep_latches): Work with either DOM info or marked backedges.
13109 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13110 first. Mark backedges if DOM info isn't available.
13111 (Re-)compute DOM info after cleanup_control_flow_pre.
13113 2018-06-05 Richard Biener <rguenther@suse.de>
13115 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13116 (locus_discrim_hasher::hash): Adjust.
13117 (locus_discrim_hasher::equal): Likewise.
13118 (next_discriminator_for_locus): Work on line directly.
13119 (same_line_p): Pass in expanded locus1 as well.
13120 (assign_discriminators): Avoid redundant location expansions.
13122 2018-06-05 Richard Biener <rguenther@suse.de>
13124 PR tree-optimization/86046
13125 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13126 if required after clearing TREE_ADDRESSABLE.
13128 2018-06-05 Richard Biener <rguenther@suse.de>
13130 PR tree-optimization/86047
13131 * tree-ssa-loop.c (for_each_index): Glob handling of all
13132 decls and constants and really handle all of them.
13134 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13137 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13138 qualifier_void_pointer and qualifier_const_void_pointer.
13139 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13140 (arm_init_builtins): Handle the above.
13141 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13142 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13143 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13146 2018-06-05 Martin Liska <mliska@suse.cz>
13148 * auto-profile.c (read_autofdo_file): Do not use
13149 gcov_ctr_summary struct.
13150 (afdo_callsite_hot_enough_for_early_inline): Likewise.
13151 * coverage.c (struct counts_entry): Likewise.
13152 (read_counts_file): Read just single summary entry.
13153 (get_coverage_counts): Use gcov_summary struct.
13154 * coverage.h (get_coverage_counts): Likewise.
13155 * gcov-dump.c (dump_working_sets): Likewise.
13156 (tag_summary): Dump just single summary.
13157 * gcov-io.c (gcov_write_summary): Write just histogram
13159 (gcov_read_summary): Read just single summary.
13160 (compute_working_sets): Use gcov_summary struct.
13161 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13162 of GCOV_COUNTERS_SUMMABLE.
13163 (GCOV_COUNTERS_SUMMABLE): Remove.
13164 (GCOV_FIRST_VALUE_COUNTER): Replace with
13165 GCOV_COUNTER_V_INTERVAL.
13166 (struct gcov_ctr_summary): Remove.
13167 (struct gcov_summary): Directly use fields of former
13169 (compute_working_sets): Use gcov_summary struct.
13170 * gcov.c (read_count_file): Do not use ctrs fields.
13171 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13173 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13175 * profile.c: Likewise.
13176 * profile.h: Likewise.
13178 2018-06-05 Martin Liska <mliska@suse.cz>
13180 PR gcov-profile/84846
13181 * gcov.c (output_lines): Print working directory only
13182 in intermediate format.
13184 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
13186 * config/s390/s390-builtin-types.def: Add void function type.
13187 * config/s390/s390-builtins.def: Use the function type for the
13190 2018-06-04 Jim Wilson <jimw@sifive.com>
13192 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13194 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13195 and maybe_eh_return. Change regno to unsigned int. Use new args to
13196 handle EH_RETURN_DATA_REGNO registers properly.
13197 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13198 (riscv_expand_epilogue): Update comment. Change argument name and
13199 type. Update code to use new name and type. Pass new args to
13200 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
13202 * config/riscv/riscv.md (NORMAL_RETURN): New.
13203 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13204 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13205 (eh_return): Call gen_eh_return_internal and emit barrier.
13206 (eh_return_internal): Call riscv_expand_epilogue.
13208 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
13210 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13211 bit_insertion field and declare can_be_merged_into method.
13212 (merged_store_group::can_be_merged_into): New method.
13213 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13214 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
13215 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13217 2018-06-04 Richard Biener <rguenther@suse.de>
13219 PR tree-optimization/85955
13220 * builtins.c (fold_builtin_sincos): Convert pointers to
13221 destination to appropriate type before dereferencing.
13223 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
13225 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13227 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
13229 * expr.c (expand_expr_real_1): Force the operand into memory if
13230 its TYPE_MODE is BLKmode and if there is no integer mode for
13231 the number of bits being extracted.
13233 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13237 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13238 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13240 2018-06-04 Richard Biener <rguenther@suse.de>
13242 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13243 (cleanup_tree_cfg_noloop): ... single caller. Do
13244 start_recording_case_labels later.
13246 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
13248 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13249 to _IMMINTRIN_H_INCLUDED.
13250 * config/i386/pconfigintrin.h: Ditto.
13251 * config/i386/waitpkgintrin.h: Ditto.
13252 * config/i386/immintrin.h: Add includes for sgxintrin.h,
13253 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13254 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13255 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13256 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13257 waitpkgintrin.h and cldemoteintrin.h.
13259 2018-06-04 Richard Biener <rguenther@suse.de>
13261 PR tree-optimization/86038
13262 * tracer.c (find_best_successor): Check probability for
13263 being initialized, bail out if not.
13265 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
13268 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13269 of bits to ignore when comparing architectures.
13271 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13273 PR tree-optimization/69615
13274 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13275 maximum or minimum of the type, try to merge it also as if
13276 range1 is + [-, x - 1] or + [x + 1, -].
13279 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13281 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
13283 PR tree-optimization/86034
13284 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13285 the unsigned bitfield type in a bit insertion sequence if it does not
13286 have a larger precision than the bitfield size.
13287 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13289 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
13291 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13293 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13295 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13296 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13297 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13298 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13300 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13302 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13303 Disable -fdelete-null-pointer-checks for ELF toolchain.
13305 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13306 Kito Cheng <kito.cheng@gmail.com>
13308 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13309 (nds32le-*-*, nds32be-*-*): Integrate checking process.
13310 (nds32*-*-*): Add glibc and uclibc conditions.
13311 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13312 (TARGET_EXCEPT_UNWIND_INFO): Define.
13313 * config/nds32/elf.h: New file.
13314 * config/nds32/linux.h: New file.
13315 * config/nds32/nds32-elf.opt: New file.
13316 * config/nds32/nds32-linux.opt: New file.
13317 * config/nds32/nds32-fp-as-gp.c
13318 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13319 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13321 (nds32_asm_file_end): Ditto.
13322 (nds32_print_operand): Ditto.
13323 (nds32_insert_attributes): Ditto.
13324 (nds32_init_libfuncs): New function.
13325 (TARGET_HAVE_TLS): Define.
13326 (TARGET_INIT_LIBFUNCS): Define.
13327 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13329 (TARGET_ELF): Apply different mcmodel setting.
13330 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13331 been migrated into elf.h and linux.h files.
13332 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13333 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13334 (mcmodel): The content has been migrated into nds32-elf.opt and
13335 nds32-linux.opt files.
13336 * config/nds32/t-elf: New file.
13337 * config/nds32/t-linux: New file.
13339 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13340 Shiva Chen <shiva0217@gmail.com>
13342 * config/nds32/constants.md (unspec_volatile_element): Add
13343 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13344 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13346 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13347 (make_pass_nds32_fp_as_gp): Declare.
13348 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13350 (nds32_asm_function_end_prologue): Remove unused asm output.
13351 (nds32_asm_function_begin_epilogue): Remove unused asm output.
13352 (nds32_asm_file_start): Output necessary fp_as_gp information.
13353 (nds32_option_override): Adjust register usage.
13354 (nds32_expand_prologue): Consider fp_as_gp situation.
13355 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13356 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13359 (simple_return): Ditto.
13360 (omit_fp_begin): Output special directive for fp_as_gp.
13361 (omit_fp_end): Output special directive for fp_as_gp.
13362 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13363 mforbid-fp-as-gp): New options.
13365 2018-06-01 Mark Wielaard <mark@klomp.org>
13367 * dwarf2out.c (dwarf2out_finish): Remove generation of
13368 DW_AT_loclists_base.
13370 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
13372 * gimple-ssa-store-merging.c: Include gimple-fold.h.
13373 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13374 (struct merged_store_group): Add bit_insertion field.
13375 (dump_char_array): Use standard hexadecimal format.
13376 (merged_store_group::merged_store_group): Set bit_insertion to false.
13377 (merged_store_group::apply_stores): Use optimal buffer size. Deal
13378 with BIT_INSERT_EXPR stores. Move up code updating the mask and
13379 also print the mask in the dump file.
13380 (pass_store_merging::gate): Minor tweak.
13381 (imm_store_chain_info::coalesce_immediate): Fix wrong association
13382 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
13383 stores with INTEGER_CST stores.
13384 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13385 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13386 and use it throughout. Generate bit insertion sequences if need be.
13387 (pass_store_merging::process_store): Remove redundant condition.
13388 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13390 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
13392 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13393 the 128-bit floating point types. Fix function comment.
13395 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13397 * config/aarch64/aarch64-simd.md
13398 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13400 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13403 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13405 PR tree-optimization/85989
13406 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13408 (backprop::intersect_uses): Check it when deciding whether this
13409 is a backedge reference.
13410 (backprop::process_block): Add each phi to m_visited_phis
13411 after visiting it, then clear it at the end.
13413 2018-06-01 Richard Biener <rguenther@suse.de>
13415 * tree-vectorizer.h (vect_dr_stmt): New function.
13416 (vect_get_load_cost): Adjust.
13417 (vect_get_store_cost): Likewise.
13418 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13419 Use vect_dr_stmt instead of DR_SMTT.
13420 (vect_record_base_alignments): Likewise.
13421 (vect_calculate_target_alignment): Likewise.
13422 (vect_compute_data_ref_alignment): Likewise and make static.
13423 (vect_update_misalignment_for_peel): Likewise.
13424 (vect_verify_datarefs_alignment): Likewise.
13425 (vector_alignment_reachable_p): Likewise.
13426 (vect_get_data_access_cost): Likewise. Pass down
13427 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13428 (vect_get_peeling_costs_all_drs): Likewise.
13429 (vect_peeling_hash_get_lowest_cost): Likewise.
13430 (vect_enhance_data_refs_alignment): Likewise.
13431 (vect_find_same_alignment_drs): Likewise.
13432 (vect_analyze_data_refs_alignment): Likewise.
13433 (vect_analyze_group_access_1): Likewise.
13434 (vect_analyze_group_access): Likewise.
13435 (vect_analyze_data_ref_access): Likewise.
13436 (vect_analyze_data_ref_accesses): Likewise.
13437 (vect_vfa_segment_size): Likewise.
13438 (vect_small_gap_p): Likewise.
13439 (vectorizable_with_step_bound_p): Likewise.
13440 (vect_prune_runtime_alias_test_list): Likewise.
13441 (vect_analyze_data_refs): Likewise.
13442 (vect_supportable_dr_alignment): Likewise.
13443 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13444 (vect_gen_prolog_loop_niters): Likewise.
13445 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13446 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13448 (vect_recog_mask_conversion_pattern): Likewise.
13449 (vect_try_gather_scatter_pattern): Likewise.
13450 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13451 to vect_get_store_cost.
13452 (vect_get_store_cost): Get stmt_info instead of DR.
13453 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13454 (vect_get_load_cost): Get stmt_info instead of DR.
13456 2018-06-01 Richard Biener <rguenther@suse.de>
13458 PR middle-end/86017
13459 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13460 vars wrapped in MEM_REFs.
13462 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13464 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13465 Fix subreg tests so that we only return a choice between
13466 GENERAL_REGS and FP_REGS if the original classes included both.
13468 2018-06-01 Richard Biener <rguenther@suse.de>
13471 * tree-ssa-structalias.c (get_function_part_constraint):
13472 Handle NULL fi->decl.
13473 (find_func_aliases_for_call): Properly handle indirect
13474 fi from direct call.
13475 (find_func_clobbers): Likewise.
13476 (ipa_pta_execute): Likewise.
13477 (create_variable_info_for): For functions that are ifunc_resolver
13478 resolve to a varinfo that contains the result of the resolver call.
13479 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13482 2018-05-31 Michael Collison <michael.collison@arm.com>
13484 * config/aarch64/aarch64.md:
13485 (*fix_to_zero_extenddfdi2): New pattern.
13486 * gcc.target/aarch64/fix_extend1.c: New testcase.
13488 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13490 PR middle-end/78809
13491 PR middle-end/83026
13492 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13493 and BUILT_IN_STRNCMP_EQ.
13494 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13495 BUILT_IN_STRNCMP_EQ.
13496 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13497 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13498 (gimple_fold_builtin): Likewise.
13499 * tree-ssa-strlen.c (compute_string_length): New function.
13500 (determine_min_obsize): New function.
13501 (handle_builtin_string_cmp): New function to handle calls to
13502 string compare functions.
13503 (strlen_optimize_stmt): Add handling to builtin string compare
13505 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13506 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13507 * tree.c (build_common_builtin_nodes): Add new defines of
13508 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13510 2018-05-31 Jakub Jelinek <jakub@redhat.com>
13513 * bb-reorder.c (pass_partition_blocks::gate): Return false for
13514 functions with naked attribute.
13516 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
13518 * config/i386/sse.md (avx_vec_concat<mode>):
13519 Substitute concat_tg_mode mode attribute with xtg_mode.
13520 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13521 (concat_tg_mode): Remove mode attribute.
13523 2018-05-31 Martin Sebor <msebor@redhat.com>
13526 * calls.c (alloc_max_size): Correct a logic error/typo.
13527 Treat excessive arguments as infinite. Warn for invalid arguments.
13528 * doc/invoke.texi (-Walloc-size-larger-than): Update.
13530 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
13533 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13534 and movx for Haswell.
13536 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
13537 Cesar Philippidis <cesar@codesourcery.com>
13539 PR middle-end/85879
13540 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13541 when emitting error on private/firstprivate reductions.
13542 * omp-low.c (lower_omp_target): Avoid reference-type processing
13543 on pointers for firstprivate clause.
13545 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13547 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13550 * config/aarch64/aarch64-simd.md
13551 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13552 (aarch64_ld1_x3_<mode>): Likewise
13553 (aarch64_st1x2<VALLDIF:mode>): Likewise
13554 (aarch64_st1_x2_<mode>): Likewise
13555 (aarch64_st1x3<VALLDIF:mode>): Likewise
13556 (aarch64_st1_x3_<mode>): Likewise
13557 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13558 (vld1_s8_x3): Likewise.
13559 (vld1_u16_x3): Likewise.
13560 (vld1_s16_x3): Likewise.
13561 (vld1_u32_x3): Likewise.
13562 (vld1_s32_x3): Likewise.
13563 (vld1_u64_x3): Likewise.
13564 (vld1_s64_x3): Likewise.
13565 (vld1_f16_x3): Likewise.
13566 (vld1_f32_x3): Likewise.
13567 (vld1_f64_x3): Likewise.
13568 (vld1_p8_x3): Likewise.
13569 (vld1_p16_x3): Likewise.
13570 (vld1_p64_x3): Likewise.
13571 (vld1q_u8_x3): Likewise.
13572 (vld1q_s8_x3): Likewise.
13573 (vld1q_u16_x3): Likewise.
13574 (vld1q_s16_x3): Likewise.
13575 (vld1q_u32_x3): Likewise.
13576 (vld1q_s32_x3): Likewise.
13577 (vld1q_u64_x3): Likewise.
13578 (vld1q_s64_x3): Likewise.
13579 (vld1q_f16_x3): Likewise.
13580 (vld1q_f32_x3): Likewise.
13581 (vld1q_f64_x3): Likewise.
13582 (vld1q_p8_x3): Likewise.
13583 (vld1q_p16_x3): Likewise.
13584 (vld1q_p64_x3): Likewise.
13585 (vst1_s64_x2): Likewise.
13586 (vst1_u64_x2): Likewise.
13587 (vst1_f64_x2): Likewise.
13588 (vst1_s8_x2): Likewise.
13589 (vst1_p8_x2): Likewise.
13590 (vst1_s16_x2): Likewise.
13591 (vst1_p16_x2): Likewise.
13592 (vst1_s32_x2): Likewise.
13593 (vst1_u8_x2): Likewise.
13594 (vst1_u16_x2): Likewise.
13595 (vst1_u32_x2): Likewise.
13596 (vst1_f16_x2): Likewise.
13597 (vst1_f32_x2): Likewise.
13598 (vst1_p64_x2): Likewise.
13599 (vst1q_s8_x2): Likewise.
13600 (vst1q_p8_x2): Likewise.
13601 (vst1q_s16_x2): Likewise.
13602 (vst1q_p16_x2): Likewise.
13603 (vst1q_s32_x2): Likewise.
13604 (vst1q_s64_x2): Likewise.
13605 (vst1q_u8_x2): Likewise.
13606 (vst1q_u16_x2): Likewise.
13607 (vst1q_u32_x2): Likewise.
13608 (vst1q_u64_x2): Likewise.
13609 (vst1q_f16_x2): Likewise.
13610 (vst1q_f32_x2): Likewise.
13611 (vst1q_f64_x2): Likewise.
13612 (vst1q_p64_x2): Likewise.
13613 (vst1_s64_x3): Likewise.
13614 (vst1_u64_x3): Likewise.
13615 (vst1_f64_x3): Likewise.
13616 (vst1_s8_x3): Likewise.
13617 (vst1_p8_x3): Likewise.
13618 (vst1_s16_x3): Likewise.
13619 (vst1_p16_x3): Likewise.
13620 (vst1_s32_x3): Likewise.
13621 (vst1_u8_x3): Likewise.
13622 (vst1_u16_x3): Likewise.
13623 (vst1_u32_x3): Likewise.
13624 (vst1_f16_x3): Likewise.
13625 (vst1_f32_x3): Likewise.
13626 (vst1_p64_x3): Likewise.
13627 (vst1q_s8_x3): Likewise.
13628 (vst1q_p8_x3): Likewise.
13629 (vst1q_s16_x3): Likewise.
13630 (vst1q_p16_x3): Likewise.
13631 (vst1q_s32_x3): Likewise.
13632 (vst1q_s64_x3): Likewise.
13633 (vst1q_u8_x3): Likewise.
13634 (vst1q_u16_x3): Likewise.
13635 (vst1q_u32_x3): Likewise.
13636 (vst1q_u64_x3): Likewise.
13637 (vst1q_f16_x3): Likewise.
13638 (vst1q_f32_x3): Likewise.
13639 (vst1q_f64_x3): Likewise.
13640 (vst1q_p64_x3): Likewise.
13642 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13644 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13645 user_label_prefix to name.
13647 * tree-core.h: Update comment about the format of NAME string
13648 passed to handler in attribute_spec.
13650 * config/msp430/msp430.md: Remove erroneous subreg expression from
13651 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13652 zero_extend{q,h}isi2.
13654 2018-05-30 Borislav Petkov <bp@suse.de>
13656 * doc/extend.texi: Document some architecture specific
13657 constraints and sort entries.
13659 2018-05-30 Martin Sebor <msebor@redhat.com>
13661 PR middle-end/85369
13662 * builtins.c (expand_builtin_stpcpy_1): New function.
13663 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13664 only if the former succeeds.
13666 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13668 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13671 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13673 * doc/invoke.texi (-flinker-output): Document
13675 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13677 * passes.c (ipa_write_summaries): Only modify statements if body
13679 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13680 incrementally linking.
13681 (ipa_passes): Likewise.
13682 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13683 pass down resolution info.
13684 * common.opt (flag_incremental_link): Update info.
13685 * gcc.c (plugin specs): Turn flinker-output=* to
13686 -plugin-opt=-linker-output-known
13687 * toplev.c (compile_file): Also cut compilation when doing incremental
13689 * flag-types. (enum lto_partition_model): Add
13690 LTO_LINKER_OUTPUT_NOLTOREL.
13691 (invoke.texi): Add -flinker-output docs.
13692 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13693 link same way as WPA; do not stream in dead initializers.
13695 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13696 darf2out_register_external_decl): Support incremental link.
13698 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13700 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13702 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13704 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13705 it down to simple_object_copy_lto_debug_sections.
13706 (run_gcc): Determine incremental LTO link time and configure
13707 lto1 into non-wpa mode, disable renaming of debug sections.
13709 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13711 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13712 descriptions of various incorrectly documented functions.
13714 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13717 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13718 address check not strict.
13720 2018-05-30 Richard Biener <rguenther@suse.de>
13722 PR tree-optimization/85964
13723 * tracer.c (better_p): Drop initialized count check, we only
13724 call the function with initialized counts now.
13725 (find_best_successor): Do find a best edge if one
13726 has uninitialized count.
13727 (find_best_predecessor): Likewise. Do BB frequency check only
13728 if count is initialized.
13730 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13732 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13733 (aarch64_ldrstr_offset_compare): New.
13734 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13735 load/store orderings.
13736 (aarch64_gen_adjusted_ldpstp): Likewise.
13738 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13740 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13741 Check for subset of GENERAL_REGS and FP_REGS.
13742 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13745 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13747 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13748 and wi::to_poly_offset. Add the current offset and then check
13749 whether the sum fits, rather than using an unchecked addition of
13750 a checked term. Check for a shwi rather than a uhwi.
13751 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13752 (store_constructor): Use poly_int_tree_p.
13753 (expand_expr_real_1): Likewise.
13754 * function.c (assign_temp): Likewise.
13755 * fold-const.c (const_binop): Use poly_int_tree_p and
13756 wi::to_poly_offset.
13757 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13759 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13760 to_poly_offset for MEM offsets.
13761 * ipa-icf.c (sem_variable::equals): Likewise.
13762 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13763 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13764 wi::to_poly_offset for BIT_FIELD_REF offsets.
13765 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13766 wi::to_poly_offset.
13767 * var-tracking.c (emit_note_insn_var_location): Use
13768 tree_to_poly_uint64.
13770 2018-05-29 Jim Wilson <jimw@sifive.com>
13772 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13774 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13777 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13778 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13780 (sse4_1_round<mode>2): Use nonimmediate_operand
13781 for operand 1 predicate.
13783 2018-05-29 Martin Sebor <msebor@redhat.com>
13784 Richard Biener <rguenther@suse.de>
13787 * calls.c (get_size_range): Call determine_value_range instead
13788 of get_value_range..
13789 * tree-vrp.h (determine_value_range): Declared new function.
13790 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13792 2018-05-29 Richard Biener <rguenther@suse.de>
13794 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13795 sure to use non-pattern stmts for get_earlier_stmt arguments.
13796 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13797 called on pattern stmts.
13798 (get_later_stmt): Likewise.
13800 2018-05-29 Martin Liska <mliska@suse.cz>
13802 PR gcov-profile/85759
13803 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13806 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13808 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13810 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13814 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13815 VEC_PACK_FLOAT_EXPR): New tree codes.
13816 * tree-pretty-print.c (op_code_prio): Handle
13817 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13818 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13819 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13820 * tree-inline.c (estimate_operator_cost): Likewise.
13821 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13822 * fold-const.c (const_binop): Likewise.
13823 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13824 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13825 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13826 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13827 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13828 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13829 * expr.c (expand_expr_real_2): Likewise.
13830 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13831 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13832 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13834 * optabs.c (expand_widen_pattern_expr): For
13835 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13836 sign from result type rather than operand's type.
13837 (expand_binop_directly): For vec_packu_float_optab and
13838 vec_packs_float_optab allow result type to be different from operand's
13840 * optabs-tree.c (optab_for_tree_code): Handle
13841 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13842 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13843 * tree-vect-generic.c (expand_vector_operations_1): Handle
13844 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13845 VEC_PACK_FLOAT_EXPR.
13846 * tree-vect-stmts.c (supportable_widening_operation): Handle
13848 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13849 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13850 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13851 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13852 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13854 (vec_pack<floatprefix>_float_<mode>): New expander.
13855 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13857 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13858 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13859 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13860 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13861 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13863 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13864 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13865 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13866 VEC_PACK_FLOAT_EXPR): Document.
13868 2018-05-29 Richard Biener <rguenther@suse.de>
13870 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13872 (stmt_vec_info_vec): Make pointer.
13873 (init_stmt_vec_info_vec): Remove.
13874 (free_stmt_vec_info_vec): Likewise.
13875 (set_stmt_vec_info_vec): New function.
13876 (free_stmt_vec_infos): Likewise.
13877 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13878 (set_vinfo_for_stmt): Likewise.
13879 (get_earlier_stmt): Likewise.
13880 (get_later_stmt): Likewise.
13881 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13882 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13883 (vec_info::~vec_info): Free stmt_vec_infos.
13884 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13885 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13886 (pass_slp_vectorize::execute): Likewise.
13887 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13888 (free_stmt_vec_info_vec): Likewise.
13889 (set_stmt_vec_info_vec): New function.
13890 (free_stmt_vec_infos): Likewise.
13891 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13892 the global stmt_vec_info_vec.
13893 * tree-parloops.c (gather_scalar_reductions): Use
13894 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13897 2018-05-29 Richard Biener <rguenther@suse.de>
13899 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13901 2018-05-29 Martin Liska <mliska@suse.cz>
13902 David Malcolm <dmalcolm@redhat.com>
13904 * vec.c (test_reverse): New.
13905 (vec_c_tests): Add new test.
13906 * vec.h (vl_ptr>::reverse): New function.
13908 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13910 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13912 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13915 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13917 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13919 2018-05-28 Richard Biener <rguenther@suse.de>
13921 PR tree-optimization/85933
13922 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13923 look at stmts marked as vectorizable.
13925 2018-05-28 Richard Biener <rguenther@suse.de>
13927 PR tree-optimization/85934
13928 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13929 vector boolean check before scalar optimization.
13931 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13933 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13936 2018-05-28 Mark Wielaard <mark@klomp.org>
13938 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13939 if it is an expression containing a minus sign.
13941 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13943 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13945 2018-05-27 Paul Koning <ni1d@arrl.net>
13947 * config/pdp11/pdp11.md (truncsihi2): Remove.
13949 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13950 Chung-Ju Wu <jasonwucj@gmail.com>
13952 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13954 (unaligned_store_dw): Ditto.
13955 * config/nds32/nds32-memory-manipulation.c
13956 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13957 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13958 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13959 (emit_setmem_word_loop): Rename to ...
13960 (emit_setmem_doubleword_loop): ... this.
13961 (nds32_gen_dup_4_byte_to_word_value): New function.
13962 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13963 (nds32_expand_setmem_loop): Refine implementation.
13964 (nds32_expand_setmem_loop_v3m): Ditto.
13965 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13968 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13970 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13972 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13974 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13975 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13976 machine->attr_no_prologue_p.
13977 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13978 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13979 (nds32_expand_epilogue): Consider attr_naked_p.
13980 (nds32_expand_epilogue_v3pop): Likewise.
13981 (nds32_can_use_return_insn): Likewise.
13982 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13983 attr_no_prologue_p fields.
13984 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13986 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13989 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13991 * config/i386/sse.md
13992 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13994 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13996 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13998 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
14000 (*<floatsuffix>floatv2div2sf2): Rename to ...
14001 (*float<floatunssuffix>v2div2sf2): ... this.
14002 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
14003 (float<floatunssuffix>v2div2sf2_mask): ... this.
14004 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
14005 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
14006 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
14008 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
14010 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14012 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14014 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14016 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14018 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
14019 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
14020 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
14021 gen_ufix_truncv8dfv8si2.
14022 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
14023 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
14024 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
14025 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
14026 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
14027 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
14028 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
14029 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
14031 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14035 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
14037 2018-05-25 Jim Wilson <jimw@sifive.com>
14039 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
14040 * config/riscv/riscv.c (struct machine_function): Add
14041 interrupt_handler_p and attribute_checked_p fields.
14042 (riscv_attribute_table): Add interrupt.
14043 (riscv_interrupt_type_p): New.
14044 (riscv_save_reg_p): Save extra regs for interrupt handler.
14045 (riscv_use_save_libcall): Return false for interrupt handler.
14046 (riscv_first_stack_step): Add forward declaration.
14047 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
14048 for interrupt handler with large frame. Use it for saved reg list.
14049 (riscv_expand_prologue): Move flag_stack_usage_info support to
14050 eliminate duplication.
14051 (riscv_expand_epilogue): Generate mret for interrupt handler.
14052 (riscv_epilogue_uses): New.
14053 (riscv_can_use_return_insn): Return false for interrupt handler.
14054 (riscv_function_ok_for_sibcall): Likewise.
14055 (riscv_set_current_function): Add interrupt handler support.
14056 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
14057 * config/riscv/riscv.md (UNSPECV_MRET): New.
14059 (riscv_frflags, riscv_fsflags): Use tab after opcode.
14061 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
14063 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
14065 PR tree-optimization/85712
14066 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
14067 this candidate has already been replaced in-situ by a copy.
14069 2018-05-25 Jason Merrill <jason@redhat.com>
14071 PR c++/80485 - inline function non-zero address.
14072 * symtab.c (nonzero_address): Check DECL_COMDAT.
14074 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
14077 * config/alpha/alpha.md (ashlsi3): New insn pattern.
14078 (*ashlsi_se): Rename from *ashldi_se. Define as sign
14079 extension of SImode operation. Use const123_operand predicate.
14080 (*saddsi_1): Remove.
14081 (*saddl_se_1): Ditto.
14082 (*ssubsi_1): Ditto.
14083 (*ssubl_se_1): Ditto.
14084 * config/alpha/predicates.md (const123_operand): New predicate.
14085 * config/alpha/constraints.md (P): Use IN_RANGE.
14087 2018-05-25 Richard Biener <rguenther@suse.de>
14089 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14091 (ref_maybe_used_by_stmt_p): Likewise.
14092 (stmt_may_clobber_ref_p): Likewise.
14093 (stmt_may_clobber_ref_p_1): Likewise.
14094 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14096 (ref_maybe_used_by_stmt_p): Likewise.
14097 (stmt_may_clobber_ref_p): Likewise.
14098 (stmt_may_clobber_ref_p_1): Likewise.
14099 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14100 the alias oracle to disambiguate DRs with stmts DR analysis
14102 (vect_analyze_data_refs): Do not give up on not analyzable
14103 DRs for BB vectorization. Remove code truncating the dataref
14106 2018-05-25 Jakub Jelinek <jakub@redhat.com>
14109 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14110 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
14111 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14113 2018-05-25 Richard Biener <rguenther@suse.de>
14115 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14116 function, combining stmt data ref gathering and fatal analysis
14118 (vect_analyze_data_refs): Remove now redudnant code and simplify.
14119 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14120 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14121 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14122 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14124 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14126 PR tree-optimization/85720
14127 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14128 SCC if all partitions are builtins.
14129 (version_loop_by_alias_check): New parameter. Generate cancelable
14130 runtime alias check if all partitions are builtins.
14131 (distribute_loop): Update call to above function.
14133 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14135 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14136 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14137 (parm_default_def_partition_arg): Ditto.
14138 (set_parm_default_def_partition): Ditto.
14139 (get_parm_default_def_partitions): Ditto and make it static.
14140 (get_undefined_value_partitions): Ditto and make it static.
14141 (remove_ssa_form): Refactor call to init_var_map here.
14142 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14143 computation for loop region.
14144 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14145 (register_default_def): Delete.
14146 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14147 (parm_default_def_partition_arg): Ditto.
14148 (set_parm_default_def_partition): Ditto.
14149 (get_parm_default_def_partitions): Ditto and make it static.
14150 (get_undefined_value_partitions): Ditto and make it static.
14151 (coalesce_with_default, coalesce_with_default): Update comment.
14152 (create_coalesce_list_for_region): New func factored out from
14153 create_outofssa_var_map.
14154 (populate_coalesce_list_for_outofssa): New func factored out from
14155 create_outofssa_var_map and coalesce_ssa_name.
14156 (create_outofssa_var_map): Delete.
14157 (coalesce_ssa_name): Refactor to support live range computation.
14158 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14159 (get_parm_default_def_partitions): Delete.
14160 (get_undefined_value_partitions): Ditto.
14161 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14162 computation for loop region.
14163 (new_tree_live_info, loe_visit_block): Ditto.
14164 (live_worklist, set_var_live_on_entry): Ditto.
14165 (calculate_live_on_exit, verify_live_on_entry): Ditto.
14166 * tree-ssa-live.h (struct _var_map): New fields.
14167 (init_var_map): Change decl.
14168 (region_contains_p): New.
14170 2018-05-25 Bin Cheng <bin.cheng@arm.com>
14172 * tree-ssa-live.h (live_merge_and_clear): Delete.
14174 2018-05-25 Richard Biener <rguenther@suse.de>
14177 * tree-dump.c (dequeue_and_dump): Remove access to removed
14178 operand 2 of a SWITCH_EXPR.
14180 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14182 * doc/sourcebuild.texi (vect_double_cond_arith): Include
14183 multiplication and division.
14184 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14185 (cond_udiv@var{m}, cond_umod@var{m}): Document.
14186 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14187 (cond_udiv_optab, cond_umod_optab): New optabs.
14188 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14189 (IFN_COND_RDIV): New internal functions.
14190 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14191 TRUNC_MOD_EXPR and RDIV_EXPR.
14192 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14193 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14195 (SVE_INT_BINARY): Include mult.
14196 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14197 (optab, sve_int_op): Handle mult.
14198 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14200 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14201 for SVE_INT_BINARY_SD.
14203 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14205 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14206 (optab, sve_int_op): Handle div and udiv.
14207 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14208 for SVE_INT_BINARY_SD.
14209 (*<optab><mode>3): New insn for the same.
14211 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14213 * tree-vect-patterns.c: Include predict.h.
14214 (vect_recog_divmod_pattern): Restrict check for division support
14215 to when optimizing for size.
14217 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14219 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14220 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14221 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14222 (gimple_match_op::set_op): Likewise.
14223 (gimple_resimplify4): Declare.
14224 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14225 (expr::gen_transform): Likewise.
14226 (decision_tree::gen): Generate a simplification routine for 4 operands.
14227 * gimple-match-head.c (gimple_simplify): Add an overload for
14228 4 operands. In the top-level function, handle up to 4 call
14229 arguments and call gimple_resimplify4.
14230 (gimple_resimplify4): New function.
14231 (build_call_internal): Pass a fourth operand.
14232 (maybe_push_to_seq): Likewise.
14233 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14234 Fold VEC_COND_EXPRs of an operation and a default value into
14235 an IFN_COND_* function if possible.
14236 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14238 (SVE_COND_FP_BINARY): Include them.
14239 (optab, sve_fp_op): Handle them.
14240 (SVE_INT_BINARY_REV): New code iterator.
14241 (SVE_COND_FP_BINARY_REV): New int iterator.
14242 (commutative): New int attribute.
14243 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14245 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14247 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14248 (*cond_<optab><mode>): New patterns for reversed operands.
14250 2018-05-25 Richard Biener <rguenther@suse.de>
14252 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14253 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14254 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14255 (STMT_VINFO_GROUPED_ACCESS): Adjust.
14256 * tree-vect-data-refs.c (everywhere): Adjust users.
14257 * tree-vect-loop.c (everywhere): Likewise.
14258 * tree-vect-slp.c (everywhere): Likewise.
14259 * tree-vect-stmts.c (everywhere): Likewise.
14260 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14262 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14264 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14266 (gcc_cv_as_section_exclude): ... this.
14267 Try Solaris as #exclude syntax.
14268 * configure: Regenerate.
14269 * config.in: Regenerate.
14270 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14272 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14273 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14275 * varasm.c (default_elf_asm_named_section): Don't check if
14276 HAVE_GAS_SECTION_EXCLUDE is defined.
14278 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14280 * doc/md.texi: Update the documentation of the cond_* optabs
14281 to mention the new final operand. Fix GET_MODE_NUNITS call.
14282 Describe the scalar case too.
14283 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14284 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14286 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14287 (get_conditional_internal_fn): Update comment.
14288 * tree-vect-loop.c (vectorizable_reduction): Pass the original
14289 accumulator value as a final argument to conditional functions.
14290 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14291 a define_expand and add an "else" operand. Assert for now that
14292 the else operand is equal to operand 2. Use SVE_INT_BINARY and
14293 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14294 (*cond_<optab><mode>): New patterns.
14295 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14296 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14297 (UNSPEC_COND_EOR): Delete.
14298 (optab): Remove associated mappings.
14299 (SVE_INT_BINARY): New code iterator.
14300 (sve_int_op): Remove int attribute and add "minus" to the code
14302 (SVE_COND_INT_OP): Delete.
14303 (SVE_COND_FP_OP): Rename to...
14304 (SVE_COND_FP_BINARY): ...this.
14306 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14308 * optabs.c (can_reuse_operands_p): New function.
14309 (maybe_legitimize_operands): Try to reuse the results for
14312 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14314 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14315 Add {q} suffix to insn mnemonic.
14317 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14319 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14320 (msp430_warn_func_return): New.
14322 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
14324 * fold-const.c (tree_nonzero_bits): New function.
14325 * fold-const.h (tree_nonzero_bits): Likewise.
14326 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14327 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14329 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14333 * varasm.c (assemble_alias): Check ifunc_resolver only on
14336 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14339 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14340 when memory input operand is handled.
14342 2018-05-24 Luis Machado <luis.machado@linaro.org>
14344 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14346 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14348 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14350 * match.pd: Delay FMA folds until after vectorization.
14352 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
14355 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14356 address check not strict.
14358 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14360 * gimple-match.h (gimple_match_op): New class.
14361 (mprts_hook): Replace parameters with a gimple_match_op *.
14362 (maybe_build_generic_op): Likewise.
14363 (gimple_simplified_result_is_gimple_val): Replace parameters with
14364 a const gimple_match_op *.
14365 (gimple_simplify): Replace code_helper * and tree * parameters with
14366 a gimple_match_op * parameter.
14367 (gimple_resimplify1): Replace code_helper *, tree and tree *
14368 parameters with a gimple_match_op * parameter.
14369 (gimple_resimplify2): Likewise.
14370 (gimple_resimplify3): Likewise.
14371 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14372 parameters with a gimple_match_op * parameter.
14373 * gimple-match-head.c (gimple_simplify): Change prototypes of
14374 auto-generated functions to take a gimple_match_op * instead of
14375 separate code_helper * and tree * parameters. Make the same
14376 change in the top-level overload and update calls to the
14377 gimple_resimplify routines. Update calls to the auto-generated
14378 functions and to maybe_push_res_to_seq in the publicly-facing
14379 operation-specific gimple_simplify overloads.
14380 (gimple_match_op::MAX_NUM_OPS): Define.
14381 (gimple_resimplify1): Replace rcode and ops with a single res_op
14382 parameter. Update call to gimple_simplify.
14383 (gimple_resimplify2): Likewise.
14384 (gimple_resimplify3): Likewise.
14385 (mprts_hook): Replace parameters with a gimple_match_op *.
14386 (maybe_build_generic_op): Likewise.
14387 (build_call_internal): Replace type, nargs and ops with
14388 a gimple_match_op *.
14389 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14390 with a single gimple_match_op *. Update calls to mprts_hook,
14391 build_call_internal and gimple_simplified_result_is_gimple_val.
14392 Factor out code that is common to the tree_code and combined_fn cases.
14393 * genmatch.c (expr::gen_transform): Replace tem_code and
14394 tem_ops with a gimple_match_op called tem_op. Update calls
14395 to the gimple_resimplify functions and maybe_push_res_to_seq.
14396 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14397 res_ops. Update call to the gimple_resimplify functions.
14398 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14399 (decision_tree::gen): Make the functions take a gimple_match_op *
14400 called res_op instead of separate res_code and res_ops parameters.
14401 Update call accordingly.
14402 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14403 and ops with a single res_op parameter. Update calls to
14404 maybe_build_generic_op and maybe_push_res_to_seq.
14405 (fold_stmt_1): Update calls to gimple_simplify and
14406 replace_stmt_with_simplification.
14407 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14408 and gimple_simplified_result_is_gimple_val.
14409 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14411 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14412 with a gimple_match_op *.
14413 (vn_nary_build_or_lookup): Likewise. Update call to
14414 vn_nary_build_or_lookup_1.
14415 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14416 gimple_match_op *. Update calls to the gimple_resimplify routines
14417 and to gimple_simplified_result_is_gimple_val.
14418 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14419 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14420 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14421 (visit_nary_op): Likewise.
14422 (visit_reference_op_load): Likewise.
14424 2018-05-23 Luis Machado <luis.machado@linaro.org>
14426 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14427 modifier for printing the step amount.
14429 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14432 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14435 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14437 * doc/sourcebuild.texi (Endianness): New subsubsection.
14439 2018-05-23 Luis Machado <luis.machado@linaro.org>
14441 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14442 <prefetch_dynamic_strides>: New const bool field.
14443 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14444 prefetch_dynamic_strides.
14445 (exynosm1_prefetch_tune): Likewise.
14446 (thunderxt88_prefetch_tune): Likewise.
14447 (thunderx_prefetch_tune): Likewise.
14448 (thunderx2t99_prefetch_tune): Likewise.
14449 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14451 (aarch64_override_options_internal): Update to set
14452 PARAM_PREFETCH_DYNAMIC_STRIDES.
14453 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14454 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14455 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14456 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14457 prefetch-dynamic-strides setting.
14459 2018-05-23 Luis Machado <luis.machado@linaro.org>
14461 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14462 <minimum_stride>: New const int field.
14463 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14464 minimum_stride field defaulting to -1.
14465 (exynosm1_prefetch_tune): Likewise.
14466 (thunderxt88_prefetch_tune): Likewise.
14467 (thunderx_prefetch_tune): Likewise.
14468 (thunderx2t99_prefetch_tune): Likewise.
14469 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14470 <default_opt_level>: Set to 3.
14471 (aarch64_override_options_internal): Update to set
14472 PARAM_PREFETCH_MINIMUM_STRIDE.
14473 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14474 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14475 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14476 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14477 stride is constant and is below the minimum stride threshold.
14479 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14481 * config/arm/arm-cpus.in (mode26): Delete.
14482 (armv4): Delete mode26 reference.
14483 * config/arm/arm.c (arm_configure_build_target): Delete use of
14486 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14488 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14490 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14491 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
14493 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
14494 (floatunsdidf2): Ditto.
14496 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14498 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14499 (fixuns_trunc<mode>si2_avx512f): Ditto.
14500 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14501 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14502 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14504 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14506 PR rtl-optimization/79985
14507 * df-scan.c (df_insn_refs_collect): Remove special case for
14508 global registers and asm statements.
14510 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14512 * extend.texi (Global Register Variables): Rewrite the bullet list.
14513 Note that the register is available for allocation. Note that access
14514 via inline asm must use constraints. Add note about async-signal
14515 handlers. Remove paragraph about automagic register selection.
14517 2018-05-23 Richard Biener <rguenther@suse.de>
14519 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14520 of fixed offset from memset VN.
14522 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
14524 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14525 first_interp field.
14526 (alloc_cand_and_find_basis): Initialize first_interp field.
14527 (slsr_process_mul): Modify first_interp field.
14528 (slsr_process_add): Likewise.
14529 (slsr_process_cast): Modify first_interp field for each new
14531 (slsr_process_copy): Likewise.
14532 (dump_candidate): Dump first_interp field.
14533 (replace_mult_candidate): Process all interpretations, not just
14535 (replace_rhs_if_not_dup): Likewise.
14536 (replace_one_candidate): Likewise.
14538 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
14540 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14542 (aarch64_needs_frame_chain): New function.
14543 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14545 2018-05-23 Sudakshina Das <sudi.das@arm.com>
14548 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14549 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14550 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14551 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14552 as true for strict-align.
14553 (aarch64_can_inline_p): Perform checks even when callee has no
14554 attributes to check for strict alignment.
14555 * doc/extend.texi (AArch64 Function Attributes): Document
14557 * doc/invoke.texi: (AArch64 Options): Likewise.
14559 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14561 PR tree-optimization/85853
14562 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14563 the handling of the root of the node to...
14564 (vect_slp_analyze_node_operations_1): ...this new function,
14565 and run the whole thing with the child nodes' def types
14566 set according to their SLP node's def type.
14568 2018-05-23 Richard Biener <rguenther@suse.de>
14570 PR middle-end/85874
14571 * tree-data-ref.c (create_runtime_alias_checks): Defer
14572 and ignore overflow warnings.
14574 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14576 PR tree-optimization/85822
14577 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14580 2018-05-23 Richard Biener <rguenther@suse.de>
14582 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14583 memset constants via native_interpret_expr.
14585 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14588 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14590 (cgraph_node::create_alias): Likewise.
14591 (cgraph_node::get_availability): Check ifunc_resolver instead
14592 of looking up ifunc attribute.
14593 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14594 * varasm.c (do_assemble_alias): Likewise.
14595 (assemble_alias): Likewise.
14596 (default_binds_local_p_3): Likewise.
14597 * cgraph.h (cgraph_node): Add ifunc_resolver.
14598 (cgraph_node::only_called_directly_or_aliased_p): Return false
14599 for IFUNC resolver.
14600 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14602 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14603 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14604 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14605 instead of looking up ifunc attribute.
14607 2018-05-22 Luis Machado <luis.machado@linaro.org>
14609 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14611 2018-05-22 Martin Sebor <msebor@redhat.com>
14613 PR middle-end/85359
14614 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14615 only when expasion succeeds.
14616 (expand_builtin_strcmp): Same.
14617 (expand_builtin_strncmp): Same.
14619 2018-05-22 Martin Sebor <msebor@redhat.com>
14621 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14623 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14624 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14626 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14627 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14629 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14630 Add check for legitimate_address.
14631 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14632 (aarch64_swap_ldrstr_operands): New.
14633 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14636 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14637 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14639 * config/aarch64/aarch64.md: New patterns to generate stp
14641 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14642 single words and double words.
14643 (load_pair_sw, load_pair_dw): Likewise.
14644 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14646 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14648 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14649 for different mode ldpstp and add peephole for merged zero stores.
14650 Likewise for loads.
14651 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14653 (aarch64_gen_store_pair): Rename calls to match new patterns.
14654 (aarch64_gen_load_pair): Rename calls to match new patterns.
14655 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14656 (load_pair<DREG:mode><DREG2:mode>): ... This.
14657 (store_pair<mode>): Rename to...
14658 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14659 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14660 New mode iterators.
14661 (V_INT_EQUIV): Handle SImode.
14662 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14665 2018-05-22 Martin Sebor <msebor@redhat.com>
14668 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14669 or ajust the presumed bound on an operation to avoid unnecessary
14672 2018-05-22 Martin Sebor <msebor@redhat.com>
14674 PR tree-optimization/85826
14675 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14676 assuming that a DECL necesarily has a constant size.
14678 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14680 PR middle-end/85862
14681 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14683 2018-05-22 Richard Biener <rguenther@suse.de>
14685 PR tree-optimization/85834
14686 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14687 non-constant and non-zero memset arguments.
14689 2018-05-22 Martin Liska <mliska@suse.cz>
14692 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14694 2018-05-22 Richard Biener <rguenther@suse.de>
14696 PR tree-optimization/85863
14697 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14698 comparisons when vectype is specified.
14699 (vectorizable_condition): Do not specify vectype for
14700 vect_is_simple_cond when SLP vectorizing.
14702 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14705 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14706 define __ibm128 as long double.
14707 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14708 as a distinct type when IEEE 128-bit support is enabled.
14709 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14710 128-bit types to use the correct functions.
14711 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14712 convert between 128-bit floating point types that have different
14713 modes but the same representation, instead of using gen_lowpart to
14715 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14717 (IFKF_reg): New attributes to give the register constraints for
14719 (extend<mode>tf2_internal): New insns to mark an explicit
14720 conversion between 128-bit floating point types that have a
14721 different mode but share the same representation.
14723 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14725 PR tree-optimization/85814
14726 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14727 a null return from get_strinfo when unsharing the next
14728 strinfo in the chain.
14730 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14733 * varasm.c (weak_finish): Clean up weak_decls.
14735 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14737 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14738 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14739 UNSPEC_UADALP values.
14740 * config/aarch64/iterators.md (ABAL): New int iterator.
14743 (sur): Add mappings for the above.
14744 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14746 (aarch64_<sur>abal<mode>_4): Likewise.
14747 (aarch64_<sur>adalp<mode>_3): Likewise.
14748 (<sur>sadv16qi): New define_expand.
14750 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14752 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14753 (*movdf_internal): Ditto.
14754 (*rcpsf2_sse): Ditto.
14755 (*rsqrtsf2_sse): Ditto.
14756 (*sqrt<mode>2_sse): Ditto.
14758 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14760 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14762 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14763 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14764 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14765 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14767 * config/aarch64/arm_neon.h: Likewise.
14768 * config/aarch64/iterators.md (VQ_I): New.
14770 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14772 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14774 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14777 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14779 * config/nds32/constraints.md (S): New constraint.
14780 * config/nds32/nds32.md (call_internal): Use constraint S.
14781 (call_value_internal): Likewise.
14782 (sibcall_internal): Likewise.
14783 (sibcall_value_internal): Likewise.
14785 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14786 Chung-Ju Wu <jasonwucj@gmail.com>
14788 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14789 into consideration.
14791 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14792 Chung-Ju Wu <jasonwucj@gmail.com>
14794 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14795 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14796 (nds32_rtx_costs_impl): Simplify.
14797 (nds32_address_cost_impl): Simplify.
14798 (nds32_init_rtx_costs): New function.
14799 (nds32_rtx_costs_speed_prefer): Likewise.
14800 (nds32_rtx_costs_size_prefer): Likewise.
14801 (nds32_address_cost_speed_prefer): Likewise.
14802 (nds32_address_cost_speed_fwprop): Likewise.
14803 (nds32_address_cost_size_prefer): Likewise.
14804 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14805 * config/nds32/nds32.c (nds32_option_override): Use
14806 nds32_init_rtx_costs function.
14808 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14810 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14811 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14812 (TARGET_PIPELINE_N8): Likewise.
14813 (TARGET_PIPELINE_N10): Likewise.
14814 (TARGET_PIPELINE_N13): Likewise.
14815 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14817 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14819 * config/nds32/nds32-fpu.md: Update copyright year.
14821 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14823 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14825 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14827 * config/nds32/nds32.c
14828 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14829 * config/nds32/nds32.opt (minline-asm-r15): New option.
14831 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14833 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14835 * config/nds32/nds32.md (abssi2): New pattern.
14837 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14839 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14840 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14841 Merge insn pattern from sse_cvtsi2ss<round_name> and
14842 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14843 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14844 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14845 using SWI48 mode iterator.
14846 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14847 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14848 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14849 pattern from sse_cvttss2si<round_saeonly_name>
14850 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14851 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14852 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14853 using SWI48 mode iterator.
14854 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14855 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14856 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14857 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14858 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14859 using SWI48 mode iterator.
14860 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14861 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14862 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14863 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14864 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14865 SWI48 mode iterator.
14866 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14867 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14868 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14869 pattern from sse_cvttsd2si<round_saeonly_name>
14870 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14872 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14874 * config/nds32/nds32-md-auxiliary.c
14875 (nds32_valid_smw_lwm_base_p): Refine.
14876 (nds32_output_smw_single_word): Refine.
14877 (nds32_output_smw_double_word): New.
14878 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14880 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14882 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14883 (nds32_output_stack_pop): Refine.
14884 (nds32_expand_unaligned_load): Refine.
14885 (nds32_expand_unaligned_store): Refine.
14887 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14888 Chung-Ju Wu <jasonwucj@gmail.com>
14890 * config/nds32/constants.md: Add TP_REGNUM constant.
14891 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14892 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14894 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14895 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14896 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14897 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14898 and PIC code generation.
14899 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14901 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14903 * config/nds32/nds32.md: Support TLS and PIC.
14904 * config/nds32/nds32.c: Support TLS and PIC.
14905 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14906 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14909 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14911 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14912 mode with E_ prefix.
14914 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14915 Chung-Ju Wu <jasonwucj@gmail.com>
14917 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14918 * config/nds32/nds32-md-auxiliary.c
14919 (symbolic_reference_mentioned_p): New.
14920 (nds32_legitimize_ict_address): New.
14921 (nds32_expand_ict_move): New.
14922 (nds32_indirect_call_referenced_p): New.
14923 (nds32_symbol_binds_local_p): Delete.
14924 (nds32_long_call_p): Modify.
14925 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14926 * config/nds32/nds32-protos.h
14927 (symbolic_reference_mentioned_p): Declare.
14928 (nds32_legitimize_ict_address): Declare.
14929 (nds32_expand_ict_move): Declare.
14930 (nds32_indirect_call_referenced_p): Declare.
14931 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14932 (nds32_relax_group): Use nds32_ict_const_p as condition.
14933 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14934 (nds32_asm_file_start): Output ict_model directive in asm code.
14935 (nds32_legitimate_address_p): Consider indirect call.
14936 (nds32_print_operand): Consider indirect call.
14937 (nds32_print_operand_address): Consider indirect call.
14938 (nds32_insert_attributes): Handle "indirect_call" attribute.
14939 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14940 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14941 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14942 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14943 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14944 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14945 (TARGET_ICT_MODEL_SMALL): Define.
14946 (TARGET_ICT_MODEL_LARGE): Define.
14947 * config/nds32/nds32.md (movsi): Consider ict model.
14948 (call, call_value): Consider ict model.
14949 (sibcall, sibcall_value): Consider ict model.
14950 * config/nds32/nds32.opt (mict-model): New option.
14951 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14954 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14955 Monk Chiang <sh.chiang04@gmail.com>
14956 Jim Wilson <jimw@sifive.com>
14958 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14959 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14960 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14961 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14962 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14963 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14964 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14965 compute save_libcall_adjustment properly.
14966 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14967 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14968 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14969 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14970 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14971 (ABI_SPEC): Handle mabi=ilp32e.
14972 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14973 (RVE): Add RVE mask.
14974 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14975 <-march>: Add rv32e as an example.
14977 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14980 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14981 (intra_create_variable_infos): Handle C++ constructors.
14983 2018-05-18 Martin Liska <mliska@suse.cz>
14985 * passes.def: Remove a redundant pass.
14987 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14990 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14992 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14994 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14996 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14998 (armv2, armv2a, armv3, armv3m): Delete architectures.
14999 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
15000 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
15001 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
15003 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
15004 (*mulsidi3adddi): Likewise.
15005 (mulsidi3): Likewise.
15006 (*mulsidi3_nov6): Likewise.
15007 (umulsidi3): Likewise.
15008 (umulsidi3_nov6): Likewise.
15009 (umaddsidi4): Likewise.
15010 (*umulsidi3adddi): Likewise.
15011 (smulsi3_highpart): Likewise.
15012 (*smulsi3_highpart_nov6): Likewise.
15013 (umulsi3_highpart): Likewise.
15014 (*umulsi3_highpart_nov6): Likewise.
15015 * config/arm/arm.h (arm_arch3m): Delete.
15016 * config/arm/arm.c (arm_arch3m): Delete.
15017 (arm_option_override_internal): Update armv3-related comment.
15018 (arm_configure_build_target): Delete use of isa_bit_mode32.
15019 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
15020 (arm_rtx_costs_internal): Delete check of arm_arch3m.
15021 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
15022 (mulsa3): Likewise.
15023 (mulusa3): Likewise.
15024 * config/arm/arm-protos.h (arm_arch3m): Delete.
15025 * config/arm/arm-tables.opt: Regenerate.
15026 * config/arm/arm-tune.md: Likewise.
15027 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
15028 deleted architectures.
15030 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15032 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
15033 (armv5t, armv5te): New features.
15034 (ARMv5, ARMv5e): Delete fgroups.
15035 (ARMv5t, ARMv5te): Adjust for above changes.
15036 (ARMv6m): Likewise.
15037 (armv5, armv5e): Delete arches.
15038 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
15040 (*call_reg_arm): Likewise.
15041 (*call_value_reg_armv5): Likewise.
15042 (*call_value_reg_arm): Likewise.
15043 (*call_symbol): Likewise.
15044 (*call_value_symbol): Likewise.
15045 (*sibcall_insn): Likewise.
15046 (*sibcall_value_insn): Likewise.
15047 (clzsi2): Likewise.
15048 (prefetch): Likewise.
15049 (define_split and define_peephole2 dependent on arm_arch5):
15051 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
15053 (TARGET_ARM_QBIT): Likewise.
15054 (TARGET_DSP_MULTIPLY): Likewise.
15055 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
15056 (arm_arch5, arm_arch5e): Delete.
15057 (arm_arch5t, arm_arch5te): Declare.
15058 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
15059 (arm_arch5t): Declare.
15060 (arm_option_reconfigure_globals): Update for the above.
15061 (arm_options_perform_arch_sanity_checks): Update comment, replace
15062 use of arm_arch5 with arm_arch5t.
15063 (use_return_insn): Likewise.
15064 (arm_emit_call_insn): Likewise.
15065 (output_return_instruction): Likewise.
15066 (arm_final_prescan_insn): Likewise.
15067 (arm_coproc_builtin_available): Likewise.
15068 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
15069 arm_arch5e with arm_arch5t and arm_arch5te.
15070 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
15071 (arm_arch5t, arm_arch5te): Declare.
15072 * config/arm/arm-tables.opt: Regenerate.
15073 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
15074 * config/arm/t-multilib: Likewise.
15075 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
15076 instead of arm_arch5.
15077 (*call_reg_thumb1): Likewise.
15078 (*call_value_reg_thumb1_v5): Likewise.
15079 (*call_value_reg_thumb1): Likewise.
15080 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15082 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15084 2018-05-18 Martin Liska <mliska@suse.cz>
15086 PR gcov-profile/84846
15087 * doc/gcov.texi: Document -t option of gcov tool.
15089 2018-05-18 Martin Liska <mliska@suse.cz>
15091 PR gcov-profile/84846
15092 * gcov.c (print_usage): Add new -t option.
15093 (process_args): Handle the option.
15094 (generate_results): Use stdout as output when requested by
15097 2018-05-18 Martin Liska <mliska@suse.cz>
15099 PR gcov-profile/84846
15100 * coverage.c (coverage_init): Write PWD to .gcno file.
15101 * doc/gcov.texi: Document how working directory is printed.
15102 * gcov-dump.c (dump_gcov_file): Print PWD.
15103 * gcov.c (output_intermediate_file): Likewise.
15104 (read_graph_file): Read PWD string.
15105 (output_lines): Print PWD.
15107 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15109 PR middle-end/85817
15110 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15111 for retval and return false if all args to phi are zero.
15113 2018-05-18 Richard Biener <rguenther@suse.de>
15115 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15117 (evrp_dom_walker::before_dom_children): Call it.
15119 2018-05-18 Richard Biener <rguenther@suse.de>
15121 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15122 results when processing array refs with variable index.
15124 2018-05-18 Toon Moene <toon@moene.org>
15126 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15127 directly after that of -floop-interchange. Indicate that both
15128 options are enabled by default when specifying -O3.
15130 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15132 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15133 iterator. Delete separate integer-mode vec_set<mode> expander.
15134 (aarch64_simd_vec_setv2di): Delete.
15135 (vec_setv2di): Delete.
15136 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15137 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
15138 the "w, r" alternative.
15140 2018-05-18 Martin Liska <mliska@suse.cz>
15142 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15143 * tree-pass.h (make_pass_lower_switch_O0): New function.
15144 * tree-switch-conversion.c (node_has_low_bound): Remove.
15145 (node_has_high_bound): Likewise.
15146 (node_is_bounded): Likewise.
15147 (class pass_lower_switch): Make it a template type and create
15149 (pass_lower_switch::execute): Add template argument.
15150 (make_pass_lower_switch): New function.
15151 (make_pass_lower_switch_O0): New function.
15152 (do_jump_if_equal): Remove.
15153 (emit_case_nodes): Simplify to just handle all 3 cases and leave
15154 all the hard work to tree optimization passes.
15156 2018-05-18 Martin Liska <mliska@suse.cz>
15158 * dbgcnt.c (limit_low): Renamed from limit.
15159 (limit_high): New variable.
15160 (dbg_cnt_is_enabled): Check for upper limit.
15161 (dbg_cnt): Adjust dumping.
15162 (dbg_cnt_set_limit_by_index): Add new argument for high
15164 (dbg_cnt_set_limit_by_name): Likewise.
15165 (dbg_cnt_process_single_pair): Parse new format.
15166 (dbg_cnt_process_opt): Use strtok.
15167 (dbg_cnt_list_all_counters): Remove 'value' and add
15169 * doc/invoke.texi: Document changes.
15171 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
15173 * doc/sourcebuild.texi (scalar_all_fma): Document.
15174 * tree.def (FMA_EXPR): Delete.
15175 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15176 * internal-fn.c (ternary_direct): New macro.
15177 (expand_ternary_optab_fn): Likewise.
15178 (direct_ternary_optab_supported_p): Likewise.
15179 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15180 * builtins.c (fold_builtin_fma): Delete.
15181 (fold_builtin_3): Don't call it.
15182 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15183 * expr.c (expand_expr_real_2): Likewise.
15184 * fold-const.c (operand_equal_p): Likewise.
15185 (fold_ternary_loc): Likewise.
15186 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15187 * gimple.c (DEFTREECODE): Likewise.
15188 * gimplify.c (gimplify_expr): Likewise.
15189 * optabs-tree.c (optab_for_tree_code): Likewise.
15190 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15191 * tree-eh.c (operation_could_trap_p): Likewise.
15192 (stmt_could_throw_1_p): Likewise.
15193 * tree-inline.c (estimate_operator_cost): Likewise.
15194 * tree-pretty-print.c (dump_generic_node): Likewise.
15195 (op_code_prio): Likewise.
15196 * tree-ssa-loop-im.c (stmt_cost): Likewise.
15197 * tree-ssa-operands.c (get_expr_operands): Likewise.
15198 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15199 * fold-const-call.h (fold_fma): Delete.
15200 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15201 CFN_FNMA and CFN_FNMS.
15202 (fold_fma): Delete.
15203 * genmatch.c (combined_fn): New enum.
15204 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15205 (commutative_op): New function.
15206 (commutate): Use it. Handle more than 2 operands.
15207 (dt_operand::gen_gimple_expr): Use commutative_op.
15208 (parser::parse_expr): Allow :c to be used with non-binary
15209 operators if the commutative operand is known.
15210 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15211 CFN_FMS, CFN_FNMA and CFN_FNMS.
15212 (backprop::process_assign_use): Remove FMA_EXPR handling.
15213 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15214 (gen_hsa_fma): New function.
15215 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15216 IFN_FNMA and IFN_FNMS.
15217 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15218 * gimple-fold.h (follow_all_ssa_edges): Declare.
15219 * gimple-fold.c (follow_all_ssa_edges): New function.
15220 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15221 gimple_build interface and use follow_all_ssa_edges to fold the result.
15222 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15223 instead of checking for optabs directly.
15224 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15225 rather than FMA_EXPRs.
15226 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15227 call to IFN_FMA instead of an FMA_EXPR.
15229 2018-05-17 Jim Wilson <jimw@sifive.com>
15231 * expr.c (do_tablejump): When converting index to Pmode, if we have a
15232 sign extended promoted subreg, and the range does not have the sign bit
15233 set, then do a sign extend.
15235 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15236 test, check for sign extended subreg and/or constant operands, and
15237 do a sign extend in that case.
15239 2018-05-17 Steve Ellcey <sellcey@cavium.com>
15241 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15242 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15244 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15245 Change logics_shift_reg to logics_shift_imm.
15246 (thunderx2t99_fp_loadpair_basic): Delete.
15247 (thunderx2t99_fp_storepair_basic): Delete.
15248 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15249 (thunderx2t99_asimd_polynomial): Delete.
15250 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15251 and neon_fp_mul_d_scalar_q.
15252 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15253 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15254 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15255 (thunderx2t99_asimd_lut): Add missing tbl types.
15256 (thunderx2t99_asimd_ext): Delete.
15257 (thunderx2t99_asimd_load1_1_mult): Delete.
15258 (thunderx2t99_asimd_load1_2_mult): Delete.
15259 (thunderx2t99_asimd_load1_ldp): New.
15260 (thunderx2t99_asimd_load1): New.
15261 (thunderx2t99_asimd_load2): Add missing *load2* types.
15262 (thunderx2t99_asimd_load3): New.
15263 (thunderx2t99_asimd_load4): New.
15264 (thunderx2t99_asimd_store1_1_mult): Delete.
15265 (thunderx2t99_asimd_store1_2_mult): Delete.
15266 (thunderx2t99_asimd_store2_mult): Delete.
15267 (thunderx2t99_asimd_store2_onelane): Delete.
15268 (thunderx2t99_asimd_store_stp): New.
15269 (thunderx2t99_asimd_store1): New.
15270 (thunderx2t99_asimd_store2): New.
15271 (thunderx2t99_asimd_store3): New.
15272 (thunderx2t99_asimd_store4): New.
15274 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
15276 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15277 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
15279 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
15280 Segher Boessenkool <segher@kernel.crashing.org>
15283 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15286 2018-05-17 Richard Biener <rguenther@suse.de>
15288 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15289 for pruning loop and prune defs feeding only already visited PHIs.
15291 2018-05-17 Richard Biener <rguenther@suse.de>
15293 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15295 2018-05-17 Bin Cheng <bin.cheng@arm.com>
15296 Richard Biener <rguenther@suse.de>
15298 PR tree-optimization/85793
15299 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15300 for VMAT_ELEMENTWISE.
15302 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15304 * internal-fn.h (lookup_internal_fn): Declare
15305 * internal-fn.c (lookup_internal_fn): New function.
15306 * gimple.c (gimple_build_call_from_tree): Handle calls to
15307 internal functions.
15308 * gimple-pretty-print.c (dump_gimple_call): Print "." before
15309 internal function names.
15310 * tree-pretty-print.c (dump_generic_node): Likewise.
15311 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15313 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15315 * gimple-fold.h (gimple_build): Make the function forms take
15316 combined_fn rather than built_in_function.
15317 (gimple_simplify): Likewise.
15318 * gimple-match-head.c (gimple_simplify): Likewise.
15319 * gimple-fold.c (gimple_build): Likewise.
15320 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15321 rather than gimple_build_call_internal.
15322 (get_initial_defs_for_reduction): Likewise.
15323 (vect_create_epilog_for_reduction): Likewise.
15324 (vectorizable_live_operation): Likewise.
15326 2018-05-17 Martin Liska <mliska@suse.cz>
15328 * gimple-ssa-sprintf.c (format_directive): Do not use
15329 space in between 'G_' and '('.
15331 2018-05-17 Jakub Jelinek <jakub@redhat.com>
15334 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15335 even if the mask is not all ones.
15338 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15340 (ix86_gimple_fold_builtin): Likewise.
15343 * config/i386/i386.c: Include tree-vector-builder.h.
15344 (ix86_vector_shift_count): New function.
15345 (ix86_fold_builtin): Fold shift builtins by scalar count.
15346 (ix86_gimple_fold_builtin): Likewise.
15348 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15349 _mm512_setzero): New intrinsics.
15351 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
15352 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15354 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15355 code generation for cases where splatting a value is not useful.
15356 * simplify-rtx.c (simplify_ternary_operation): Simplify
15357 vec_merge across a vec_duplicate and a paradoxical subreg forming
15358 a vector mode to a vec_concat.
15360 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
15362 * config.gcc: Support "goldmont-plus".
15363 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15365 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15366 PROCESSOR_GOLDMONT_PLUS.
15367 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15368 (processor_target_table): Add "goldmont-plus".
15369 (PTA_GOLDMONT_PLUS): Define.
15370 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15371 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15372 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15373 (fold_builtin_cpu): Add "goldmont-plus".
15374 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15375 (ix86_option_override_internal): Add "goldmont-plus".
15376 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15377 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15378 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15379 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15381 2018-05-17 Richard Biener <rguenther@suse.de>
15383 PR tree-optimization/85757
15384 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15385 remove defs that only feed that PHI from further processing.
15387 2018-05-16 Jim Wilson <jimw@sifive.com>
15389 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15391 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15393 2018-05-16 Mark Wielaard <mark@klomp.org>
15395 * dwarf2out.c (count_index_strings): New function.
15396 (output_indirect_strings): Call count_index_strings and generate
15397 header for dwarf_version >= 5.
15399 2018-05-16 Mark Wielaard <mark@klomp.org>
15401 * dwarf2out.c (dwarf_FORM): New function.
15402 (set_indirect_string): Use dwarf_FORM.
15403 (reset_indirect_string): Likewise.
15404 (size_of_die): Likewise.
15405 (value_format): Likewise.
15406 (output_die): Likewise.
15407 (add_skeleton_AT_string): Likewise.
15408 (output_macinfo_op): Likewise.
15409 (index_string): Likewise.
15410 (output_index_string_offset): Likewise.
15411 (output_index_string): Likewise.
15412 (count_index_strings): Likewise.
15414 2018-05-16 Carl Love <cel@us.ibm.com>
15416 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15417 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15419 2018-05-16 Martin Jambor <mjambor@suse.cz>
15421 * ipa-prop.c (ipa_free_all_edge_args): Remove.
15422 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15424 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15426 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15427 (fnma<mode>4): Likewise.
15428 (fms<mode>4): Likewise.
15429 (fnms<mode>4): Likewise.
15430 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15431 (aarch64_fnma<mode>4): Likewise.
15432 (aarch64_fms<mode>4): Likewise.
15433 (aarch64_fnms<mode>4): Likewise.
15434 (aarch64_fnmadd<mode>4): Likewise.
15436 2018-05-16 Jason Merrill <jason@redhat.com>
15438 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15440 2018-05-16 Richard Biener <rguenther@suse.de>
15442 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15443 (dump_stmt_cost): Declare.
15444 (add_stmt_cost): Dump cost we add.
15445 (add_stmt_costs): New function.
15446 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15447 No longer exported.
15448 (vect_analyze_stmt): Adjust prototype.
15449 (vectorizable_condition): Likewise.
15450 (vectorizable_live_operation): Likewise.
15451 (vectorizable_reduction): Likewise.
15452 (vectorizable_induction): Likewise.
15453 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15454 cost vector to pass to vectorizable_ and record afterwards.
15455 (vect_model_reduction_cost): Take cost vector argument and adjust.
15456 (vect_model_induction_cost): Likewise.
15457 (vectorizable_reduction): Likewise.
15458 (vectorizable_induction): Likewise.
15459 (vectorizable_live_operation): Likewise.
15460 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15461 SLP_TREE_NUMBER_OF_VEC_STMTS.
15462 (vect_analyze_slp_cost_1): Remove.
15463 (vect_analyze_slp_cost): Likewise.
15464 (vect_slp_analyze_node_operations): Take visited args and
15465 a target cost vector. Avoid processing already visited stmt sets.
15466 (vect_slp_analyze_operations): Use a local cost vector to gather
15467 costs and register those of non-discarded instances.
15468 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15469 (vect_schedule_slp_instance): Remove copying of
15470 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15472 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15473 adding cost. Record cost entry location.
15474 (vect_prologue_cost_for_slp_op): Function to compute cost of
15475 a constant or invariant generated for SLP vect in the prologue,
15476 split out from vect_analyze_slp_cost_1.
15477 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15478 (vect_model_promotion_demotion_cost): Likewise.
15479 (vect_model_store_cost): Likewise, make static.
15480 (vect_model_load_cost): Likewise.
15481 (vectorizable_bswap): Add cost vector arg and adjust.
15482 (vectorizable_call): Likewise.
15483 (vectorizable_simd_clone_call): Likewise.
15484 (vectorizable_conversion): Likewise.
15485 (vectorizable_assignment): Likewise.
15486 (vectorizable_shift): Likewise.
15487 (vectorizable_operation): Likewise.
15488 (vectorizable_store): Likewise.
15489 (vectorizable_load): Likewise.
15490 (vectorizable_condition): Likewise.
15491 (vectorizable_comparison): Likewise.
15492 (can_vectorize_live_stmts): Likewise.
15493 (vect_analyze_stmt): Likewise.
15494 (vect_transform_stmt): Adjust calls to vectorizable_*.
15495 * tree-vectorizer.c: Include gimple-pretty-print.h.
15496 (dump_stmt_cost): New function.
15498 2018-05-16 Richard Biener <rguenther@suse.de>
15500 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15501 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15502 * tree-ssa-dse.c: Include tree-ssa-loop.h.
15503 (check_name): New callback.
15504 (dse_classify_store): Track cycles via a visited bitmap of PHI
15505 defs and simplify handling of in-loop and across loop dead stores
15506 and properly fail for loop-variant refs. Handle byte-tracking with
15507 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15510 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
15512 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15513 (vect_get_mask_type_for_stmt): Likewise.
15514 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15516 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
15517 to determine the statement's vector type and the vector type that
15518 should be used for calculating nunits. Deal with cases in which
15519 the type has to be deferred.
15520 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15521 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15522 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15523 (vect_determine_vf_for_stmt): New functions, split out from...
15524 (vect_determine_vectorization_factor): ...here.
15525 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15526 (vect_get_mask_type_for_stmt): New functions, split out from
15527 vect_determine_vectorization_factor.
15529 2018-05-16 Richard Biener <rguenther@suse.de>
15531 * tree-cfg.c (verify_gimple_assign_ternary): Properly
15532 verify the [VEC_]COND_EXPR embedded comparison.
15534 2018-05-15 Martin Sebor <msebor@redhat.com>
15536 PR tree-optimization/85753
15537 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15538 RECORD_TYPE in addition to ARRAY_TYPE.
15540 2018-05-15 Martin Sebor <msebor@redhat.com>
15542 PR middle-end/85643
15543 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15545 2018-05-15 Richard Biener <rguenther@suse.de>
15547 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15548 add by_clobber_p one. Change algorithm to collect all defs
15549 representing uses we need to walk and try reducing them to
15550 a single one before failing.
15551 (dse_dom_walker::dse_optimize_stmt): Adjust.
15553 2018-05-13 Mark Wielaard <mark@klomp.org>
15555 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15556 (size_of_loc_descr): Likewise.
15557 (output_loc_operands): Likewise.
15558 (output_loc_operands_raw): Likewise.
15559 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15560 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15561 (hash_loc_operands): Likewise.
15562 (compare_loc_operands): Likewise.
15564 2018-05-14 Mark Wielaard <mark@klomp.org>
15566 * dwarf2out.c (count_index_addrs): New function.
15567 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15569 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15571 PR tree-optimization/83648
15572 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15573 return value as malloc candidate.
15575 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15578 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15579 param as true in call to suggest_attribute.
15581 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15583 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15584 -mreadonly-in-sdata.
15586 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15588 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15590 (aarch64_crypto_aesd_fused): Likewise.
15592 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15594 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15595 (movsi_aarch64): Likewise.
15596 (load_pairsi): Likewise.
15597 (load_pairdi): Likewise.
15598 (store_pairsi): Likewise.
15599 (store_pairdi): Likewise.
15600 (load_pairsf): Likewise.
15601 (load_pairdf): Likewise.
15602 (store_pairsf): Likewise.
15603 (store_pairdf): Likewise.
15604 (zero_extend): Likewise.
15605 (trunc): Swap alternatives.
15606 (fcvt_target): Add '?' to prefer w over r.
15608 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15611 * config/i386/i386.md: Disallow non-commutative arithmetics in
15612 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15613 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15614 in the peephole2 before it.
15616 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15618 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15619 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15620 (ix86_handle_option): Handle -mcldemote.
15621 * config.gcc: New header.
15622 * config/i386/cldemoteintrin.h: New file.
15623 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15624 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15626 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15627 OPTION_MASK_ISA_CLDEMOTE.
15628 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15629 (ix86_valid_target_attribute_inner_p): Ditto.
15630 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15631 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15632 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15633 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15634 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15636 * config/i386/i386.opt: Add -mcldemote.
15637 * config/i386/x86intrin.h: New header.
15638 * doc/invoke.texi: Add -mcldemote.
15640 2018-05-14 Richard Biener <rguenther@suse.de>
15642 * doc/match-and-simplify.texi: Adjust :s documentation.
15644 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15646 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15647 intended memcpy size.
15648 (REORDER_45): Likewise.
15650 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15652 * sort.cc: New file.
15653 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15654 * vec.c (qsort_chk): Use gcc_qsort.
15655 * Makefile.in (OBJS-libcommon): Add sort.o.
15656 (build/sort.o): New target. Use it...
15657 (BUILD_RTL): ... here, and...
15658 (build/gencfn-macros): ... here, and...
15659 (build/genmatch): ... here.
15661 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15662 Chung-Ju Wu <jasonwucj@gmail.com>
15664 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15665 * config/nds32/nds32-graywolf.md: New file.
15666 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15667 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15669 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15670 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15671 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15672 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15673 * config/nds32/pipelines.md: Include n15 settings.
15675 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15676 Chung-Ju Wu <jasonwucj@gmail.com>
15678 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15679 * config/nds32/nds32-n13.md: New file.
15680 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15681 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15683 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15684 * config/nds32/nds32.md (pipeline_model): Add n13.
15685 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15686 * config/nds32/pipelines.md: Include n13 settings.
15688 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15689 Chung-Ju Wu <jasonwucj@gmail.com>
15691 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15692 * config/nds32/nds32-n10.md: New file.
15693 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15694 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15696 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15697 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15698 * config/nds32/nds32.md (pipeline_model): Add n10.
15699 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15700 * config/nds32/pipelines.md: Include n10 settings.
15702 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15703 Kito Cheng <kito.cheng@gmail.com>
15704 Chung-Ju Wu <jasonwucj@gmail.com>
15706 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15707 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15708 Add enum values for DSP extension instructions.
15709 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15711 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15712 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15713 New code iterators.
15714 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15715 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15716 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15717 * config/nds32/nds32-intrinsic.md: Likewise.
15718 * config/nds32/nds32_intrinsic.h: Likewise.
15719 * config/nds32/nds32-md-auxiliary.c: Likewise.
15720 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15721 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15722 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15723 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15724 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15725 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15726 TYPE_DMAC in switch statement.
15727 * config/nds32/nds32.c: New checking and implementation for DSP
15728 extension instructions.
15729 * config/nds32/nds32.h: Likewise.
15730 * config/nds32/nds32.md: Likewise.
15731 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15732 * config/nds32/predicates.md: Implement new predicates for DSP
15735 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15737 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15738 Reformat alternatives and attributes so it is easier to identify
15739 which constraints/attributes go with which instruction.
15740 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15741 (mov<mode>_softfloat32, FMOVE64): Likewise.
15742 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15743 (mov<mode>_softfloat64, FMOVE64): Likewise.
15745 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15747 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15749 (Basic PowerPC Built-in Functions): The new name of the
15750 subsection previously known as "PowerPC Built-in Functions".
15751 (Basic PowerPC Built-in Functions Available on all Configurations):
15753 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15754 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15755 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15756 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15758 2018-05-11 Martin Jambor <mjambor@suse.cz>
15761 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15764 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15767 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15769 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15771 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15772 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15773 (ix86_handle_option): Handle -mwaitpkg.
15774 * config.gcc: New header.
15775 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15776 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15777 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15779 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15780 OPTION_MASK_ISA_WAITPKG.
15781 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15782 (ix86_option_override_internal): Add PTA_WAITPKG.
15783 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15784 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15785 IX86_BUILTIN_TPAUSE.
15786 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15787 __builtin_ia32_umwait and __builtin_ia32_tpause.
15788 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15789 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15790 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15791 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15792 UNSPECV_TPAUSE): New.
15793 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15794 * config/i386/i386.opt: Add -mwaitpkg.
15795 * config/i386/waitpkgintrin.h: New file.
15796 * config/i386/x86intrin.h: New header.
15797 * doc/invoke.texi: Add -mwaitpkg.
15799 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15802 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15804 (cortex-m0): Use armv6s-m isa.
15805 (cortex-m0plus): Likewise.
15806 (cortex-m1): Likewise.
15807 (cortex-m0.small-multiply): Likewise.
15808 (cortex-m0plus.small-multiply): Likewise.
15809 (cortex-m1.small-multiply): Likewise.
15811 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15812 Jakub Jelinek <jakub@redhat.com>
15814 PR tree-optimization/85692
15815 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15816 source permute as well.
15818 2018-05-11 Martin Liska <mliska@suse.cz>
15821 * doc/extend.texi: Document LLVM style format for no_sanitize
15824 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15826 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15827 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15828 (mode_supports_vsx_dform_quad): Likewise.
15829 (mode_supports_vmx_dform): Move these functions to be next to the
15830 other mode_supports functions.
15831 (mode_supports_dq_form): Likewise.
15832 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15833 mode_supports_dq_form.
15834 (reg_offset_addressing_ok_p): Likewise.
15835 (offsettable_ok_by_alignment): Likewise.
15836 (rs6000_legitimate_offset_address_p): Likewise.
15837 (legitimate_lo_sum_address_p): Likewise.
15838 (rs6000_legitimize_address): Likewise.
15839 (rs6000_legitimize_reload_address): Likewise.
15840 (rs6000_secondary_reload_inner): Likewise.
15841 (rs6000_preferred_reload_class): Likewise.
15842 (rs6000_output_move_128bit): Likewise.
15844 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15846 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15847 Generate SImode target register for null target.
15848 <case IX86_BUILTIN_XGETBV>: Ditto.
15849 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15850 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15852 2018-05-10 Carl Love <cel@us.ibm.com>
15854 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15855 dcbtt and dcbtstt if operands[2] is 0.
15857 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15860 * config/i386/sse.md (usadv64qi): New expander.
15862 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15864 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15865 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15866 -maltivec=be support.
15867 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15868 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15869 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15870 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15871 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15872 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15873 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15874 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15875 altivec_vsumsws): Adjust.
15876 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15877 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15878 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15880 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15881 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15882 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15883 (altivec_lve<VI_char>x): Delete expand.
15884 (*altivec_lve<VI_char>x_internal): Rename to...
15885 (altivec_lve<VI_char>x): ... this.
15886 (altivec_lvxl_<mode>): Delete expand.
15887 (*altivec_lvxl_<mode>_internal): Rename to ...
15888 (altivec_lvxl_<mode>): ... this.
15889 (altivec_stvxl_<mode>): Delete expand.
15890 (*altivec_stvxl_<mode>_internal): Rename to ...
15891 (altivec_stvxl_<mode>): ... this.
15892 (altivec_stve<VI_char>x): Delete expand.
15893 (*altivec_stve<VI_char>x_internal): Rename to ...
15894 (altivec_stve<VI_char>x): ... this.
15895 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15896 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15897 reduc_plus_scal_<mode>): Adjust.
15898 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15900 (rs6000_cpu_cpp_builtins): Adjust.
15901 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15902 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15903 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15904 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15905 -maltivec=be support.
15906 (rs6000_split_vec_extract_var): Adjust.
15907 (rs6000_split_v4si_init): Adjust.
15908 (swap_selector_for_mode): Delete.
15909 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15910 altivec_expand_stvex_be): Delete.
15911 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15912 -maltivec=be support.
15913 (rs6000_gimple_fold_builtin): Ditto.
15914 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15916 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15917 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15918 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15919 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15920 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15921 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15922 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15923 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15924 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15925 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15926 anonymous split): Adjust.
15927 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15928 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15930 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15932 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15933 when --with-gxx-include-dir is also specified.
15934 * configure: Regenerate.
15936 2018-05-09 Jim Wilson <jimw@sifive.com>
15939 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15940 * config/riscv/t-withmultilib: New.
15941 * config/riscv/withmultilib.h: New.
15942 * doc/install.texi: Document RISC-V --with-multilib-list support.
15944 2018-05-09 Richard Biener <rguenther@suse.de>
15946 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15948 (vect_bb_vectorization_profitable_p): Adjust. Compute
15949 actual scalar cost using the cost vector and the add_stmt_cost
15952 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15954 PR rtl-optimization/85645
15955 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15956 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15958 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15960 PR rtl-optimization/85645
15961 * shrink-wrap.c (spread_components): Return a boolean saying if
15962 anything was changed.
15963 (try_shrink_wrapping_separate): Iterate spread_components until
15964 nothing changes anymore.
15966 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15968 PR rtl-optimization/85645
15969 * regrename.c (build_def_use): Also kill the chains that include the
15970 destination of a REG_CFA_REGISTER note.
15972 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15974 PR rtl-optimization/85645
15975 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15976 insn that has a REG_CFA_REGISTER note.
15978 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15980 * cfgexpand.c (expand_clobber): New function.
15981 (expand_gimple_stmt_1): Use it.
15982 * tree-vect-stmts.c (vect_clobber_variable): New function,
15984 (vectorizable_simd_clone_call): ...here.
15985 (vectorizable_store): Emit a clobber either side of an
15986 IFN_STORE_LANES sequence.
15987 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15989 2018-05-09 Tom de Vries <tom@codesourcery.com>
15992 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15993 (define_insn "trap_if_false"): Add exit after trap.
15995 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15997 PR rtl-optimization/85638
15998 * bb-reorder.c: Include common/common-target.h.
15999 (create_forwarder_block): New function extracted from...
16000 (fix_up_crossing_landing_pad): ...here. Rename into...
16001 (dw2_fix_up_crossing_landing_pad): ...this.
16002 (sjlj_fix_up_crossing_landing_pad): New function.
16003 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
16004 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
16005 from both partitions and exit the loop after one iteration.
16007 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
16010 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16012 (Basic PowerPC Built-in Functions): The new name of the
16013 subsection previously known as "PowerPC Built-in Functions".
16014 (Basic PowerPC Built-in Functions Available on all Configurations):
16016 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16018 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16020 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16022 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16025 2018-05-08 Jim Wilson <jimw@sifive.com>
16027 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
16028 (LD_EMUL_SUFFIX): New.
16029 (LINK_SPEC): Use it.
16031 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
16033 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16035 (Basic PowerPC Built-in Functions): The new name of the
16036 subsection previously known as "PowerPC Built-in Functions".
16037 (Basic PowerPC Built-in Functions Available on all Configurations):
16039 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16041 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16043 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16045 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16048 2018-05-08 Jakub Jelinek <jakub@redhat.com>
16051 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
16052 after cmpelim optimization.
16054 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
16056 * config.gcc: Support "goldmont".
16057 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
16058 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16059 PROCESSOR_GOLDMONT.
16060 * config/i386/i386.c (m_GOLDMONT): Define.
16061 (processor_target_table): Add "goldmont".
16062 (PTA_GOLDMONT): Define.
16063 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
16064 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
16065 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
16066 (fold_builtin_cpu): Add "goldmont".
16067 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
16068 (ix86_option_override_internal): Add "goldmont".
16069 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
16070 (processor_type): Add PROCESSOR_GOLDMONT.
16071 * config/i386/i386.md: Add CPU "glm".
16072 * config/i386/glm.md: New file.
16073 * config/i386/x86-tune.def: Add m_GOLDMONT.
16074 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
16076 2018-05-08 Jakub Jelinek <jakub@redhat.com>
16079 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16081 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16082 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
16083 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
16086 * config/i386/i386.c (ix86_fold_builtin): Handle
16087 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16090 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16091 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16093 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
16096 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16097 (check_arch): Likewise.
16098 (check_fpu): Return the result rather than printing it.
16099 (end arch): Fix operator precedence.
16100 (end cpu): Likewise.
16101 (END): Print the result from check_fpu.
16103 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
16104 Alan Hayward <alan.hayward@arm.com>
16105 David Sherwood <david.sherwood@arm.com>
16107 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16108 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16109 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16110 (*fcmuo<mode>_and): New patterns.
16112 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
16114 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16115 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16116 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16117 (cmp_op, sve_imm_con): New code attributes.
16118 (SVE_COND_INT_CMP, imm_con): Delete.
16119 (cmp_op): Remove above unspecs from int attribute.
16120 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16122 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
16123 comparison-specific unspecs.
16124 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16125 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16126 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16127 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16128 (*vec_fcm<cmp_op><mode>): Rename to...
16129 (*fcm<cmp_op><mode>): ...this and adjust likewise.
16130 (*vec_fcmuo<mode>): Rename to...
16131 (*fcmuo<mode>): ...this and adjust likewise.
16132 (*pred_fcm<cmp_op><mode>): New pattern.
16133 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16134 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16136 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16138 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16139 (aarch64_emit_sve_predicated_cond): New function.
16140 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16141 (aarch64_emit_unspec_cond_or): Replace with...
16142 (aarch64_emit_sve_or_conds): ...this new function. Use
16143 aarch64_emit_sve_ptrue_op for the individual comparisons and
16144 aarch64_emit_binop to OR them together.
16145 (aarch64_emit_inverted_unspec_cond): Replace with...
16146 (aarch64_emit_sve_inverted_cond): ...this new function. Use
16147 aarch64_emit_sve_ptrue_op for the comparison and
16148 aarch64_emit_unop to invert the result.
16149 (aarch64_expand_sve_vec_cmp_float): Update after the above
16150 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
16152 2018-05-07 Nathan Sidwell <nathan@acm.org>
16154 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16155 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16156 (Backwards Compatibility): Likewise.
16158 2018-05-07 Luis Machado <luis.machado@linaro.org>
16162 2018-05-07 Luis Machado <luis.machado@linaro.org>
16164 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16165 <prefetch_dynamic_strides>: New const bool field.
16166 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16167 prefetch_dynamic_strides.
16168 (exynosm1_prefetch_tune): Likewise.
16169 (thunderxt88_prefetch_tune): Likewise.
16170 (thunderx_prefetch_tune): Likewise.
16171 (thunderx2t99_prefetch_tune): Likewise.
16172 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16174 (aarch64_override_options_internal): Update to set
16175 PARAM_PREFETCH_DYNAMIC_STRIDES.
16176 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16177 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16178 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16179 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16180 prefetch-dynamic-strides setting.
16182 2018-05-07 Luis Machado <luis.machado@linaro.org>
16184 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16185 <minimum_stride>: New const int field.
16186 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16187 minimum_stride field.
16188 (exynosm1_prefetch_tune): Likewise.
16189 (thunderxt88_prefetch_tune): Likewise.
16190 (thunderx_prefetch_tune): Likewise.
16191 (thunderx2t99_prefetch_tune): Likewise.
16192 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16193 (aarch64_override_options_internal): Update to set
16194 PARAM_PREFETCH_MINIMUM_STRIDE.
16195 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16196 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16197 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16198 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16199 stride is constant and is below the minimum stride threshold.
16201 2018-05-07 Luis Machado <luis.machado@linaro.org>
16203 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16206 2018-05-07 Luis Machado <luis.machado@linaro.org>
16208 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16209 <prefetch_dynamic_strides>: New const bool field.
16210 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16211 prefetch_dynamic_strides.
16212 (exynosm1_prefetch_tune): Likewise.
16213 (thunderxt88_prefetch_tune): Likewise.
16214 (thunderx_prefetch_tune): Likewise.
16215 (thunderx2t99_prefetch_tune): Likewise.
16216 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16218 (aarch64_override_options_internal): Update to set
16219 PARAM_PREFETCH_DYNAMIC_STRIDES.
16220 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16221 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16222 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16223 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16224 prefetch-dynamic-strides setting.
16226 2018-05-07 Luis Machado <luis.machado@linaro.org>
16228 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16229 <minimum_stride>: New const int field.
16230 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16231 minimum_stride field.
16232 (exynosm1_prefetch_tune): Likewise.
16233 (thunderxt88_prefetch_tune): Likewise.
16234 (thunderx_prefetch_tune): Likewise.
16235 (thunderx2t99_prefetch_tune): Likewise.
16236 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16237 (aarch64_override_options_internal): Update to set
16238 PARAM_PREFETCH_MINIMUM_STRIDE.
16239 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16240 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16241 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16242 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16243 stride is constant and is below the minimum stride threshold.
16245 2018-05-06 Jakub Jelinek <jakub@redhat.com>
16248 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16249 the type is addressable. Don't force op into register if it has
16252 2018-05-05 Roland McGrath <mcgrathr@google.com>
16255 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16256 any section for which we don't know a specific type it should have,
16257 regardless of name. Previously this was done only for the exact
16258 names ".init_array", ".fini_array", and ".preinit_array".
16259 (default_elf_asm_named_section): Add comment about
16260 relationship with default_section_type_flags and SECTION_NOTYPE.
16261 (get_section): Don't consider it a type conflict if one side has
16262 SECTION_NOTYPE and the other doesn't, as long as neither has the
16263 SECTION_BSS et al used in the default_section_type_flags logic.
16265 2018-05-05 Tom de Vries <tom@codesourcery.com>
16268 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16269 (workaround_barsyncs): New function.
16270 (nvptx_reorg): Use workaround_barsyncs.
16271 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16272 (define_expand "nvptx_membar_cta"): New define_expand.
16273 (define_insn "*nvptx_membar_cta"): New insn.
16275 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
16277 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16278 To improve optimization opportunities.
16279 * builtin-types.def: The new needed builtin types for the above.
16281 2018-05-04 Richard Biener <rguenther@suse.de>
16283 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16284 * gimple-ssa-store-merging.c
16285 (imm_store_chain_info::output_merged_store): Remove redundant create,
16286 release split_store vector contents on failure.
16287 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16288 scalar stmt vector on cache hit.
16290 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
16292 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16294 * config.gcc (powerpc-xilinx-eabi*): Remove.
16295 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16297 (fusion_addis_mem_combo_load): Ditto.
16298 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16300 (rs6000_cpu_cpp_builtins): Ditto.
16301 * config/rs6000/rs6000-linux.c
16302 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16303 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16304 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16306 (rs6000_setup_reg_addr_masks): Ditto.
16307 (rs6000_init_hard_regno_mode_ok): Ditto.
16308 (rs6000_option_override_internal): Ditto.
16309 (legitimate_lo_sum_address_p): Ditto.
16310 (rs6000_legitimize_address): Ditto.
16311 (rs6000_legitimize_reload_address): Ditto.
16312 (rs6000_legitimate_address_p): Ditto.
16313 (abi_v4_pass_in_fpr): Ditto.
16314 (setup_incoming_varargs): Ditto.
16315 (rs6000_gimplify_va_arg): Ditto.
16316 (rs6000_split_multireg_move): Ditto.
16317 (rs6000_savres_strategy): Ditto.
16318 (rs6000_emit_prologue_components): Ditto.
16319 (rs6000_emit_epilogue_components): Ditto.
16320 (rs6000_emit_prologue): Ditto.
16321 (rs6000_emit_epilogue): Ditto.
16322 (rs6000_elf_file_end): Ditto.
16323 (rs6000_function_value): Ditto.
16324 (rs6000_libcall_value): Ditto.
16325 * config/rs6000/rs6000.h: Ditto.
16326 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16327 (TARGET_MINMAX): ... this. New.
16328 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16329 * config/rs6000/rs6000.md: Remove Xilinx FP support.
16330 (*movsi_internal1_single): Delete.
16331 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16332 mfpu=, mxilinx-fpu): Delete.
16333 * config/rs6000/singlefp.h: Delete.
16334 * config/rs6000/sysv4.h: Remove Xilinx FP support.
16335 * config/rs6000/t-rs6000: Ditto.
16336 * config/rs6000/t-xilinx: Delete.
16337 * config/rs6000/titan.md: Adjust for fp_type removal.
16338 * config/rs6000/vsx.md: Remove Xilinx FP support.
16339 (VStype_simple): Delete.
16340 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16341 * config/rs6000/xfpu.h: Delete.
16342 * config/rs6000/xfpu.md: Delete.
16343 * config/rs6000/xilinx.h: Delete.
16344 * config/rs6000/xilinx.opt: Delete.
16345 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16346 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16348 2018-05-04 Tom de Vries <tom@codesourcery.com>
16351 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16354 2018-05-04 Richard Biener <rguenther@suse.de>
16356 PR middle-end/85627
16357 * tree-complex.c (update_complex_assignment): We are always in SSA form.
16358 (expand_complex_div_wide): Likewise.
16359 (expand_complex_operations_1): Likewise.
16360 (expand_complex_libcall): Preserve EH info of the original stmt.
16361 (tree_lower_complex): Handle removed blocks.
16362 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16363 on complex multiplication and division libcall builtins.
16365 2018-05-04 Richard Biener <rguenther@suse.de>
16367 PR middle-end/85574
16368 * fold-const.c (negate_expr_p): Restrict negation of operand
16369 zero of a division to when we know that can happen without
16371 (fold_negate_expr_1): Likewise.
16373 2018-05-04 Jakub Jelinek <jakub@redhat.com>
16376 * real.h (real_nextafter): Declare.
16377 * real.c (real_nextafter): New function.
16378 * fold-const-call.c (fold_const_nextafter): New function.
16379 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16380 CASE_CFN_NEXTTOWARD.
16381 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16382 even when arg1_mode is different from arg0_mode.
16384 2018-05-03 Nathan Sidwell <nathan@acm.org>
16386 * doc/extend.texi (Deprecated Features): Remove
16387 -ffriend-injection.
16388 (Backwards Compatibility): Likewise.
16389 * doc/invoke.texi (C++ Language Options): Likewise.
16390 (C++ Dialect Options): Likewise.
16392 2018-05-03 Jakub Jelinek <jakub@redhat.com>
16395 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16396 _mm512_mask_mullox_epi64): New intrinsics.
16398 2018-05-03 Tom de Vries <tom@codesourcery.com>
16401 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16402 dump files): Add offload-tree.
16404 2018-05-03 Richard Biener <rguenther@suse.de>
16406 PR tree-optimization/85615
16407 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16408 to loops not nested in BBs loop father to avoid creating multi-entry
16411 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16413 PR tree-optimization/70291
16414 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16415 arguments. Change return type to tree. Emit libcall as a new
16416 statement rather than replacing existing one when inplace_p is true.
16417 (expand_complex_multiplication_components): New function.
16418 (expand_complex_multiplication): Expand floating-point complex
16419 multiplication using the above.
16420 (expand_complex_division): Rename inner_type parameter to type.
16421 Update expand_complex_libcall call-site.
16422 (expand_complex_operations_1): Update expand_complex_multiplication
16423 and expand_complex_division call-sites.
16425 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16428 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16429 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16430 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16431 the highest significant bit of the shift count mask is clear. In
16432 check whether and[sq]i3 is needed verify that all significant bits
16433 of the shift count other than the highest are set.
16435 2018-05-02 Tom de Vries <tom@codesourcery.com>
16438 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16439 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16440 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16441 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16442 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16443 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16444 __builtin_goacc_parlevel_size.
16446 2018-05-02 Richard Biener <rguenther@suse.de>
16448 PR tree-optimization/85597
16449 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16450 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16453 2018-05-02 Tom de Vries <tom@codesourcery.com>
16456 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16457 dump files): Add ltrans-tree.
16459 2018-05-02 Tom de Vries <tom@codesourcery.com>
16462 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16463 dump files): Add wpa-ipa.
16465 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16467 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16468 powerpc*-*-linux*paired* target.
16469 * config/rs6000/750cl.h: Delete.
16470 * config/rs6000/paired.h: Delete.
16471 * config/rs6000/paired.md: Delete.
16472 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16474 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16475 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16476 comment. Remove paired float support.
16477 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16478 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16480 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16481 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16483 * config/rs6000/rs6000.c: Remove paired float support.
16484 (paired_expand_vector_init, paired_expand_vector_move,
16485 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16486 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16487 paired_expand_builtin, paired_expand_predicate_builtin,
16488 paired_init_builtins): Delete.
16489 * config/rs6000/rs6000.h: Remove paired float support.
16490 * config/rs6000/rs6000.md: Remove paired float support.
16491 (move_from_CR_ov_bit): Delete.
16492 * config/rs6000/rs6000.opt (mpaired): Delete.
16493 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16494 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16496 2018-05-02 Richard Biener <rguenther@suse.de>
16498 PR middle-end/85567
16499 * gimplify.c (gimplify_save_expr): When in SSA form allow
16500 SAVE_EXPRs to compute to SSA vars.
16502 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16505 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16506 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16507 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16508 clobber operands[2], instead use a new pseudo. Formatting fixes.
16510 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
16512 PR tree-optimization/85586
16513 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16514 exit early for statements in the same group if the accesses are
16517 2018-05-02 Tom de Vries <tom@codesourcery.com>
16520 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16523 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
16525 PR tree-optimization/85143
16526 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16528 2018-05-01 Tom de Vries <tom@codesourcery.com>
16531 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16532 not found" error message.
16534 2018-05-01 Tom de Vries <tom@codesourcery.com>
16537 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16538 * vec.c (test_ordered_remove_if): New function.
16539 (vec_c_tests): Call test_ordered_remove_if.
16540 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16541 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16542 * tree-vect-patterns.c (vect_pattern_recog_1): Use
16543 VEC_ORDERED_REMOVE_IF.
16545 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16547 PR tree-optimization/82665
16548 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16549 pointer subtraction where arguments come from a memchr call.
16551 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16553 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16554 --push-state --as-needed and --pop-state instead of --as-needed and
16555 --no-as-needed if ld supports it.
16556 * configure: Regenerated.
16559 * doc/install.texi2html: Replace _002d with - and _002a with * in
16560 generated html files using sed.
16562 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16565 * gcc-rich-location.c (blank_line_before_p): New function.
16566 (use_new_line): New function.
16567 (gcc_rich_location::add_fixit_insert_formatted): New function.
16568 * gcc-rich-location.h
16569 (gcc_rich_location::add_fixit_insert_formatted): New function.
16571 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16573 * selftest.c (assert_streq): Rename "expected" and "actual" to
16574 "val1" and "val2". Extend NULL-handling to cover both inputs
16575 symmetrically, while still requiring both to be non-NULL for a pass.
16576 * selftest.h (assert_streq): Rename "expected" and "actual" to
16578 (ASSERT_EQ): Likewise.
16579 (ASSERT_EQ_AT): Likewise.
16580 (ASSERT_KNOWN_EQ): Likewise.
16581 (ASSERT_KNOWN_EQ_AT): Likewise.
16582 (ASSERT_NE): Likewise.
16583 (ASSERT_MAYBE_NE): Likewise.
16584 (ASSERT_MAYBE_NE_AT): Likewise.
16585 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16586 the assertion to pass.
16587 (ASSERT_STREQ_AT): Likewise.
16589 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16591 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16592 interaction with -pie.
16594 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16596 * selftest.h: Fix alphabetization of per-source-file selftest
16599 2018-04-30 Jason Merrill <jason@redhat.com>
16601 PR c++/61982 - dead stores to destroyed objects.
16602 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16605 2018-04-30 Jason Merrill <jason@redhat.com>
16607 * tree.c (build_clobber): New.
16608 * tree.h: Declare it.
16609 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16611 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16613 * diagnostic-show-locus.c (layout::layout): Update for
16614 location_get_source_line returning a char_span.
16615 (struct char_span): Move to input.h.
16616 (struct correction): Update for fields in char_span becoming
16618 (struct source_line): Update for location_get_source_line
16619 returning a char_span.
16620 (layout::print_line): Likewise.
16621 * edit-context.c (edited_file::print_content): Likewise.
16622 (edited_file::print_diff_hunk): Likewise.
16623 (edited_file::print_run_of_changed_lines): Likewise.
16624 (edited_file::get_num_lines): Likewise.
16625 (edited_line::edited_line): Likewise.
16626 * final.c (asm_show_source): Likewise.
16627 * input.c (location_get_source_line): Convert return type
16628 from const char * to char_span, losing the final "line_len"
16630 (dump_location_info): Update for the above.
16631 (get_substring_ranges_for_loc): Likewise. Use a char_span
16632 when handling the literal within the line.
16633 (test_reading_source_line): Update for location_get_source_line
16634 returning a char_span.
16635 * input.h (class char_span): Move here from
16636 diagnostic-show-locus.c, converting from a struct to a class.
16637 Make data members private.
16638 (char_span::operator bool): New.
16639 (char_span::length): New.
16640 (char_span::get_buffer): New.
16641 (char_span::operator[]): New.
16642 (char_span::subspan): Make const.
16643 (char_span::xstrdup): New.
16644 (location_get_source_line): Convert return type from const char *
16645 to char_span, losing the final "line_size" param.
16647 2018-04-30 Jan Hubicka <jh@suse.cz>
16649 * lto-wrapper.c (ltrans_priorities): New static var.
16650 (cmp_priority): New.
16651 (run_gcc): Read priorities and if doing parallel build order
16652 the Makefile by them.
16654 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16656 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16658 2018-04-30 Richard Biener <rguenther@suse.de>
16660 * tree-cfg.c (verify_address): Remove base argument, add
16661 flag whether to check TREE_ADDRESSABLE and do that.
16662 (verify_expr): Remove.
16663 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16664 (verify_gimple_assign_single): Likewise.
16665 (verify_gimple_switch): Likewise.
16666 (verify_expr_location_1): Dereference tp once. Add (disabled)
16667 piece from verify_expr.
16668 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16670 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16672 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16674 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16676 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16677 (small_data_pattern): Likewise.
16678 (arc_rewrite_small_data): Likewise.
16679 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16680 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16681 (get_symbol_alignment): New function.
16682 (legitimate_small_data_address_p): Likewise.
16683 (legitimate_scaled_address): Update, call
16684 legitimate_small_data_address_p.
16685 (output_sdata): New static variable.
16686 (arc_print_operand): Update how we handle small data operands.
16687 (arc_print_operand_address): Likewise.
16688 (arc_legitimate_address_p): Update, use
16689 legitimate_small_data_address_p.
16690 (arc_rewrite_small_data_p): Remove.
16691 (arc_rewrite_small_data_1): Likewise.
16692 (arc_rewrite_small_data): Likewise.
16693 (small_data_pattern): Likewise.
16694 (compact_sda_memory_operand): Update to use
16695 legitimate_small_data_address_p and get_symbol_alignment.
16696 (prepare_move_operands): Don't rewite sdata pattern.
16697 (prepare_extend_operands): Remove.
16698 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16700 (zero_extendqisi2): Likewise.
16701 (zero_extendhisi2): Likewise.
16702 (extendqihi2): Likewise.
16703 (extendqisi2): Likewise.
16704 (extendhisi2): Likewise.
16705 (addsi3): Likewise.
16706 (subsi3): Likewise.
16707 (andsi3): Likewise.
16708 * config/arc/constraints.md (Usd): Change it to memory constraint.
16710 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16712 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16713 as source of std instructions.
16714 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16715 allow 6-bit constants as source for store instructions.
16716 (movdi_insn): Update instruction pattern to allow 6-bit constants
16717 as source for store instructions.
16719 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16721 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16723 2018-04-30 Nathan Sidwell <nathan@acm.org>
16724 Sandra Loosemore <sandra@codesourcery.com>
16726 * dumpfile.c (dump_open): Allow '-' for stdout.
16727 * doc/invoke.texi (Developer Options): Document dump filename
16728 determination early. Document stdin/stdout selection.
16730 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16732 Microblaze Target: PIC data text relative
16734 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16735 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16737 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16738 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16739 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16740 New addressing mode for data-text relative position indepenedent code.
16741 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16742 'ADDRESS_SYMBOLIC_TXT_REL'.
16743 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16744 (microblaze_legitimate_pic_operand): Exclude function calls from
16745 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16746 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16748 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16749 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16750 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16751 for 'address + offset'.
16752 (microblaze_expand_prologue): Add new function prologue call for
16754 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16755 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16756 table in case of TARGET_PIC_DATA_TEXT_REL.
16757 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16758 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16759 Add new macros 'UNSPEC_TEXT',
16760 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16761 + exclude function calls from 'UNSPEC_PLT' in case of data text
16763 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16764 new target hook for generating address diff vector tables in case of
16766 * doc/tm.texi : Regenerate.
16767 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16768 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16769 of addr diff vector generation.
16770 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16771 target hook definition.
16772 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16773 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16774 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16775 option for data text relative.
16777 2018-04-30 Richard Biener <rguenther@suse.de>
16779 * tree-chrec.h (evolution_function_is_constant_p): Remove
16781 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16783 2018-04-30 Richard Biener <rguenther@suse.de>
16786 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16788 2018-04-30 Richard Biener <rguenther@suse.de>
16790 PR tree-optimization/28364
16791 PR tree-optimization/85275
16792 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16793 copying first exit test.
16795 2018-04-28 Mark Wielaard <mark@klomp.org>
16797 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16798 dwarf_version >= 5.
16799 (dwarf_AT): Handle DW_AT_addr_base.
16800 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16802 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16805 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16806 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16807 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16808 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16810 2018-04-28 Richard Biener <rguenther@suse.de>
16812 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16813 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16814 to reflect use. Only add interesting stmts.
16816 2018-04-27 Martin Jambor <mjambor@suse.cz>
16819 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16820 the jump function allows for passing through aggregate values.
16822 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16824 * input.h (in_system_header_at): Convert from macro to inline
16826 (from_macro_expansion_at): Likewise.
16827 (from_macro_definition_at): Likewise.
16829 2018-04-27 Jeff Law <law@redhat.com>
16831 * config.gcc: Mark tile* targets as deprecated/obsolete.
16833 2018-04-27 Richard Biener <rguenther@suse.de>
16835 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16838 2018-04-27 Richard Biener <rguenther@suse.de>
16840 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16842 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16844 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16845 with Yd constraint. Set "preferred_for_speed" attribute from
16846 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16847 with Yd constraint.
16848 (*movdi_internal): Ditto.
16849 (movti_interunit splitters): Remove
16850 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16851 (movdi_interunit splitters): Ditto.
16852 * config/i386/constraints.md (Ye): Remove.
16853 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16855 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16858 * config/aarch64/constraints.md (Usg): Limit to 31.
16859 (Usj): Limit to 63.
16861 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16863 PR tree-optimization/85529
16864 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16865 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16866 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16867 zero extension or masking of the MSB bit.
16868 (optimize_range_tests): Add FIRST_BB argument, pass it through
16869 to optimize_range_tests_var_bound.
16870 (maybe_optimize_range_tests, reassociate_bb): Adjust
16871 optimize_range_tests callers.
16873 2018-04-26 Richard Biener <rguenther@suse.de>
16874 Jakub Jelinek <jakub@redhat.com>
16876 * cgraph.h (symbol_table): Just declare debug method here.
16877 * symtab.c (symbol_table::debug): Define.
16879 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16881 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16883 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16885 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16886 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16887 (*movdi_internal): Substitute Yi and Yj constraint with x
16888 and Ym and Yn constraint with y constraint. Update "isa"
16889 attribute and set "preferred_for_speed" attribute from
16890 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16891 (*movsi_internal): Ditto.
16892 (*movdf_internal): Ditto.
16893 (*movsf_internal): Ditto.
16894 (*zero_extendsidi2): Ditto.
16895 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16896 (sse2_loadld): Ditto.
16897 (*vec_extract<ssevecmodelower>_0): Ditto.
16898 (*vec_extractv4si_0_zext_sse4): Ditto.
16899 (vec_concatv2di): Ditto.
16900 (*vec_dup<mode>): Ditto.
16901 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16902 * config/i386/constraints.md (Yi): Remove.
16907 2018-04-26 Nathan Sidwell <nathan@acm.org>
16909 * dumpfile.c (dump_open): New.
16910 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16911 (dump_finish): Detect stdio/stderr by value not name.
16913 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16915 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16917 2018-04-26 Tom de Vries <tom@codesourcery.com>
16920 * config/nvptx/nvptx.c (verify_neutering_jumps)
16921 (verify_neutering_labels): New function
16922 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16924 2018-04-26 Tom de Vries <tom@codesourcery.com>
16927 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16928 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16931 2018-04-26 Richard Biener <rguenther@suse.de>
16932 Tom de Vries <tom@codesourcery.com>
16935 * lto-streamer-out.c (output_function): Fixup loops if required to match
16936 discovery done in the reader.
16938 2018-04-26 Richard Biener <rguenther@suse.de>
16940 PR tree-optimization/85116
16941 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16942 have a loop exit from the single latch predecessor. Remove
16943 case of header with just condition.
16944 (ch_base::copy_headers): Exclude infinite loops from any
16946 (pass_ch::execute): Record exits.
16948 2018-04-26 Richard Biener <rguenther@suse.de>
16950 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16951 prologue cost vector and pass it to vect_get_load_cost.
16952 (vect_get_peeling_costs_all_drs): Likewise.
16953 (vect_peeling_hash_get_lowest_cost): Likewise.
16954 (vect_enhance_data_refs_alignment): Likewise.
16956 2018-04-26 Richard Biener <rguenther@suse.de>
16958 PR middle-end/85450
16959 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16960 checking of integer<->pointer conversions.
16961 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16962 sign-/zero-extending pointer types.
16963 (expand_omp_for_static_chunk): Likewise.
16965 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16966 Jean Lee <xiaoyur347@gmail.com>
16968 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16969 (TARGET_ASAN_SHADOW_OFFSET): Define.
16970 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16971 true for -fsanitize=address.
16973 2018-04-25 Mark Wielaard <mark@klomp.org>
16975 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16978 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16980 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16981 than "alu", remove explicit "memory" and "imm_disp" attributes.
16982 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16984 PR middle-end/85414
16985 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16986 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16987 gen_lowpart_no_emit.
16989 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16992 * config/i386/i386.c (ix86_expand_builtin): Change memory
16993 operand to XI, extend p0 to Pmode.
16994 * config/i386/i386.md: Change unspec volatile and operand
16995 1 mode to XI, change operand 0 mode to P.
16997 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16999 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
17000 GET_MODE_MASK before any checking.
17001 (nds32_can_use_bset_p): Likewise.
17002 (nds32_can_use_btgl_p): Likewise.
17004 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17006 * config/nds32/nds32-doubleword.md: New define_split pattern for
17007 illegal register number.
17009 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17011 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
17013 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
17015 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
17017 2018-04-25 Richard Biener <rguenther@suse.de>
17019 * lto-streamer.h (LTO_major_version): Bump to 8.
17021 2018-04-25 Jakub Jelinek <jakub@redhat.com>
17023 * BASE-VER: Set to 9.0.0.
17025 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
17027 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
17028 in __abskf2 and __powikf2.
17030 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17033 * config/aarch64/constraints.md (Usg, Usj): New constraints.
17034 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
17035 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
17036 Use the above on operand 2. Reindent.
17037 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
17039 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
17042 * common/config/i386/i386-common.c (ix86_handle_option): Don't
17044 * config/i386/i386.opt (mcet): Removed.
17045 * doc/install.texi: Remove -mcet documentation.
17046 * doc/invoke.texi: Likewise.
17048 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
17051 * doc/install.texi: Remove -mcet from bootstrap-cet.
17053 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17056 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
17057 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
17061 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
17062 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
17063 containing a CONST_VECTOR.
17065 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
17067 * doc/install.texi: Update newlib dependency for nvptx.
17069 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17072 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
17073 instead of INTVAL when shifting x left.
17075 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
17077 PR tree-optimization/85478
17078 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
17079 vect_grouped_store_supported for single element vectors.
17081 2018-04-24 Richard Biener <rguenther@suse.de>
17084 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17085 load cost increase to the case of non-constant step.
17087 2018-04-24 Jakub Jelinek <jakub@redhat.com>
17090 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17091 destination if any_malformed_asm.
17093 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
17095 PR middle-end/85496
17096 * expr.c (store_field): In the bitfield case, if the value comes from
17097 a function call and is returned in registers by means of a PARALLEL,
17098 do not change the mode of the temporary unless BLKmode and VOIDmode.
17100 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
17102 PR rtl-optimization/85423
17103 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17104 dependencies to debug insns when the previous insn is non-debug.
17106 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
17108 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17109 enums into a single definition.
17110 (fls): Fix predicates and printing.
17113 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
17115 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17116 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17117 and short u6 immediate.
17118 (check_if_valid_sleep_operand): Remove.
17119 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17121 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17123 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17124 flag_always_save_lp condition.
17125 * config/nds32/nds32.opt (malways-save-lp): New option.
17127 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17129 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17130 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17131 * config/nds32/nds32.h
17132 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17133 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17135 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17137 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17138 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17140 2018-04-22 Shiva Chen <shiva0217@gmail.com>
17141 Chung-Ju Wu <jasonwucj@gmail.com>
17143 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17145 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17146 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17148 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17150 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17152 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17154 * config/nds32/nds32-protos.h (nds32_data_alignment,
17155 nds32_local_alignment): Declare.
17156 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17157 nds32_local_alignment): New functions.
17158 (TARGET_CONSTANT_ALIGNMENT): Define.
17159 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17161 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17163 * config/nds32/nds32.c
17164 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17165 (TARGET_MODES_TIEABLE_P): Likewise.
17167 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
17169 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17170 level Ofast and Og.
17172 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
17173 Chung-Ju Wu <jasonwucj@gmail.com>
17175 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17176 for unaligned access.
17177 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17179 * config/nds32/nds32-intrinsic.md: Likewise.
17180 * config/nds32/nds32_intrinsic.h: Likewise.
17181 * config/nds32/nds32.h (nds32_builtins): Likewise.
17182 * config/nds32/nds32.opt (munaligned-access): New option.
17183 * config/nds32/nds32.c (nds32_asm_file_start): Display
17184 flag_unaligned_access status.
17186 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
17188 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17189 -mno-relax is present.
17190 * config/riscv/linux.h (LINK_SPEC): Ditto.
17192 2018-04-20 Martin Sebor <msebor@redhat.com>
17195 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17197 (gimple_fold_builtin_stxcpy_chk): Same.
17198 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17200 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
17203 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17204 __powikf2 when long double is IEEE 128-bit.
17206 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
17208 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17209 step to make sure stack always aligned.
17211 2018-04-20 Carl Love <cel@us.ibm.com>
17214 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17215 size check for arg0.
17217 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
17218 Tom de Vries <tom@codesourcery.com>
17221 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17222 Emit insns for calls too.
17223 (nvptx_find_par): Always look for worker-level predecessor insn.
17224 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
17226 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17227 (nvptx_process_pars): Propagate frames for calls.
17229 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
17232 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17234 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17235 (ix86_handle_option): Don't handle OPT_mibt.
17236 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17238 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17240 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17241 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17242 (ix86_target_macros): Define __CET__ with flag_cf_protection
17243 for -fcf-protection.
17244 * config/i386/i386.c (isa2_opts): Remove -mibt.
17245 * config/i386/i386.h (TARGET_IBT): Removed.
17246 (TARGET_IBT_P): Likewise.
17247 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17248 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17249 * config/i386/i386.opt (mcet): Update help message.
17250 (mshstk): Likewise.
17252 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
17253 -mcet as an alias for -mshstk.
17255 2018-04-20 Richard Biener <rguenther@suse.de>
17257 PR middle-end/85475
17258 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17259 complexity by forcing a single use of the multiply operand.
17261 2018-04-20 Martin Jambor <mjambor@suse.cz>
17264 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17265 recursion dependency to only apply to non-clones.
17267 2018-04-20 Martin Jambor <mjambor@suse.cz>
17270 * ipa-cp.c (create_specialized_node): Check that clones of
17271 self-recursive edges exist during IPA-CP.
17273 2018-04-19 Toon Moene <toon@moene.org>
17275 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17278 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17280 PR tree-optimization/85467
17281 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17282 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
17283 VECTOR_CST element to type.
17285 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17288 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17289 * config/i386/i386.md (builtin_setjmp_setup): Removed.
17290 (builtin_longjmp): Likewise.
17291 (save_stack_nonlocal): New pattern.
17292 (restore_stack_nonlocal): Likewise.
17294 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17297 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17298 Replace ASM_OUTPUT_LABEL with fprintf.
17300 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17303 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17304 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17305 * config/i386/i386-c.c (ix86_target_macros_internal): Also
17306 define __IBT__ and __SHSTK__ for -fcf-protection.
17307 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17309 (ix86_trampoline_init): Likewise.
17310 (x86_output_mi_thunk): Likewise.
17311 (ix86_notrack_prefixed_insn_p): Likewise.
17312 (ix86_option_override_internal): Don't disallow -fcf-protection.
17313 * config/i386/i386.md (rdssp<mode>): Also enable for
17315 (incssp<mode>): Likewise.
17316 (nop_endbr): Likewise.
17317 * config/i386/i386.opt (mcet): Change help message to built-in
17320 (mshstk): Likewise.
17321 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17322 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
17323 enable CET built-in functions.
17325 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
17327 * common/config/i386/i386-common.c
17328 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17329 OPTION_MASK_ISA_MOVDIRI_UNSET,
17330 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17331 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17332 * config.gcc (movdirintrin.h): New header.
17333 * config/i386/cpuid.h (bit_MOVDIRI,
17334 bit_MOVDIR64B): New bits.
17335 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17337 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17338 (VOID, PVOID, PCVOID)): New function types.
17339 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17340 __builtin_ia32_directstoreu_u64,
17341 __builtin_ia32_movdir64b): New builtins.
17342 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17343 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17345 (ix86_valid_target_attribute_inner_p): Ditto.
17346 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17347 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17348 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17349 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17350 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17351 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17352 (movdiri<mode>, movdir64b_<mode>): New.
17353 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17354 * config/i386/immintrin.h: Include movdirintrin.h.
17355 * config/i386/movdirintrin.h: New file.
17356 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17358 2018-04-19 Richard Biener <rguenther@suse.de>
17360 PR middle-end/85455
17361 * cfg.c (clear_bb_flags): When loop state says we have
17362 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17364 2018-04-19 Richard Biener <rguenther@suse.de>
17366 PR tree-optimization/84737
17367 * tree-vect-data-refs.c (vect_copy_ref_info): New function
17368 copying restrict info.
17369 (vect_setup_realignment): Use it.
17370 * tree-vectorizer.h (vect_copy_ref_info): Declare.
17371 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17372 the first DR to all generated stores.
17373 (vectorizable_load): Likewise for loads.
17375 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17377 PR tree-optimization/85446
17378 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17379 the integral and pointer types to have the same precision.
17381 * doc/install.texi: Document --disable-cet being the default and
17384 2018-04-18 Martin Liska <mliska@suse.cz>
17386 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17389 2018-04-18 Martin Liska <mliska@suse.cz>
17392 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17395 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17396 arguments if they are comparable.
17398 2018-04-18 Martin Liska <mliska@suse.cz>
17401 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17404 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17407 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
17410 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17411 ENDBR after calling __morestack.
17413 2018-04-18 David Malcolm <dmalcolm@redhat.com>
17416 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17417 by using gcc_base_ver to generate a gcc_driver_version, and use
17418 it when generating GCC_DRIVER_NAME.
17419 * configure: Regenerate.
17421 2018-04-18 Jakub Jelinek <jakub@redhat.com>
17424 * config.gcc: Obsolete powerpc*-*-*spe*.
17426 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17429 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17430 (stabstr_D): Change type of unum from unsigned int to
17431 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17434 2018-04-17 Jim Wilson <jimw@sifive.com>
17437 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17438 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17439 Set arg_pointer_offset after using pretend_args_size.
17441 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17443 PR rtl-optimization/85431
17444 * dse.c (record_store): Ignore zero width stores.
17447 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17448 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17449 __builtin_stack_restore rather than after it.
17450 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17451 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17452 argument instead of virtual_dynamic_stack_rtx.
17454 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17456 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17458 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17459 Add note to error message to explain internal mapping of overloaded
17460 built-in function name to non-overloaded built-in function name.
17461 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17464 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17467 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17468 where the inputs overlap with the output.
17470 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17472 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17473 (=v, v) alternative and explicit "memory" attribute.
17474 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17475 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17477 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17478 "sselog1" type instead of "sselog".
17479 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17480 "sselog". Remove explicit "memory" attribute.
17481 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17482 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17484 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17485 "sselog1" type instead of "sselog". Remove explicit "memory"
17487 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17488 use "sselog1" type instead of "sselog". Remove explicit "memory"
17490 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17491 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17493 (vec_extract_hi_v64qi): Merge all alternatives into one, use
17494 "sselog1" type instead of "sselog". Remove explicit "memory"
17496 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17497 use "sselog1" type instead of "sselog". Remove explicit "memory"
17501 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17503 PR middle-end/85414
17504 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17507 2018-04-17 Martin Jambor <mjambor@suse.cz>
17510 * ipa-cp.c (create_specialized_node): Call
17511 expand_all_artificial_thunks if necessary.
17513 2018-04-17 Martin Liska <mliska@suse.cz>
17516 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17517 in message, remote space in between '_G' and '('.
17519 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17522 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17523 avx512f_vmcmp<mode>3<round_saeonly_name>,
17524 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17525 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17526 avx512f_rndscale<mode><round_saeonly_name>,
17527 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17528 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17529 Use %<iptr>2 instead of %2 for -masm=intel.
17530 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17531 avx512f_vcvttss2usi<round_saeonly_name>,
17532 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17534 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17535 avx512f_vcvttsd2usi<round_saeonly_name>,
17536 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17537 Use %q1 instead of %1 for -masm=intel.
17538 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17539 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17540 of %3 for -masm=intel.
17541 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17543 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17545 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17547 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17548 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17550 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17552 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17553 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17554 %g1 and one with %0 and %1.
17555 (avx512er_vmrcp28<mode><round_saeonly_name>,
17556 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17557 %1 for -masm=intel.
17558 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17559 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17560 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17561 of %0 and %{%4%} for -masm=intel.
17562 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17563 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17564 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17565 order of %0 and %{%5%}%{z%} for -masm=intel.
17567 2018-04-17 Jan Hubicka <jh@suse.cz>
17570 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17572 2018-04-17 Martin Liska <mliska@suse.cz>
17575 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17576 for target_clone error message. Make default implementation
17577 clone to be a local declaration.
17578 (separate_attrs): Add new argument and check for an empty
17580 (expand_target_clones): Handle it.
17581 (ipa_target_clone): Make redirection just for target_clones
17584 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17585 Tom de Vries <tom@codesourcery.com>
17587 PR middle-end/84955
17588 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17589 tiled basic blocks without omp continue statements.
17591 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17594 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17595 vec_extract expression as having side effects to make sure it gets
17598 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17601 * config/i386/i386.c (get_builtin_code_for_version): Check
17604 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17607 * config.gcc: Support "skylake".
17608 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17610 * config/i386/i386.c (m_SKYLAKE): Define.
17611 (processor_target_table): Add "skylake".
17612 (ix86_option_override_internal): Add "skylake".
17613 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17614 PROCESSOR_CANNONLAKE.
17615 (get_builtin_code_for_version): Fix priority for
17616 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17617 PROCESSOR_SKYLAKE-AVX512.
17618 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17619 (processor_type): Add PROCESSOR_SKYLAKE.
17621 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17622 Jason Merrill <jason@redhat.com>
17625 * convert.c (convert_to_integer_1): Use direct recursion for
17626 enumeral types and types with a precision less than the number
17627 of bits in their mode.
17629 2018-04-16 Julia Koval <julia.koval@intel.com>
17632 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17633 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17635 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17638 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17639 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17640 and -mno-direct-move.
17642 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17645 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17646 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17647 Ensure negative shifts result in {0}.
17649 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17651 PR rtl-optimization/79916
17652 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17653 regs (if any) to define how to gnerate SD moves when LRA is in
17656 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17658 PR rtl-optimization/85393
17659 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17660 * except.c (expand_dw2_landing_pad_for_region): Make static.
17661 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17662 a label and unconditional jump to old_bb, rather than
17663 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17666 PR rtl-optimization/85376
17667 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17668 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17669 instead of a specific value.
17671 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17672 Bin Cheng <bin.cheng@arm.com>
17674 PR tree-optimization/82965
17675 PR tree-optimization/83991
17676 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17677 by_profile_only parameter.
17678 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17679 information if the loop was predicted to iterate too many times.
17680 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17682 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17685 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17688 2018-04-13 Martin Liska <mliska@suse.cz>
17689 Jakub Jelinek <jakub@redhat.com>
17691 PR middle-end/81657
17692 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17693 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17694 * builtins.c (expand_builtin_memory_copy_args): Use
17695 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17696 handle dest_addr == pc_rtx.
17698 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17701 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17702 asked to not generate direct moves.
17703 (fix_trunc<mode>si2_stfiwx): Similar.
17704 (fix_trunc<mode>si2_internal): Similar.
17706 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17709 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17710 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17711 lookup if dest in some wider mode is known to be const0_rtx and
17712 if so, record permanent equivalence for it to be ZERO_EXTEND of
17713 the narrower mode destination.
17715 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17717 * lto-streamer-out.c (output_function): Revert 259346.
17718 * omp-expand.c (expand_oacc_for): Likewise.
17720 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17722 PR rtl-optimization/85354
17723 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17724 * sel-sched.c (sel_global_init): ... here.
17726 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17729 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17730 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17731 mode for PE-COFF targets.
17732 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17733 (i386_pe_asm_lto_end): Likewise.
17734 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17735 (TARGET_ASM_LTO_END): Likewise.
17736 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17737 (i386_pe_asm_lto_start): New function.
17738 (i386_pe_asm_lto_end): Likewise.
17740 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17741 Richard Biener <rguenther@suse.de>
17743 PR middle-end/84955
17744 * lto-streamer-out.c (output_function): Fix CFG loop state before
17746 * omp-expand.c (expand_oacc_for): Handle calls to internal
17747 functions like regular functions.
17749 2018-04-12 Richard Biener <rguenther@suse.de>
17752 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17753 for the early LTO debug to properly generate references to it
17754 during DIE emission. Do not re-use that for the skeleton for
17756 (dwarf2out_early_finish): Likewise.
17758 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17761 * config/i386/sse.md
17762 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17763 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17764 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17765 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17766 and output is a reg, avoid creating invalid lowpart subreg, but
17767 instead split into a 512-bit move. Don't split if not AVX512VL,
17768 input is xmm16+ reg and output is a mem.
17769 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17770 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17771 xmm16+ reg and output is a mem.
17773 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17775 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17776 also for flag_dwarf2_cfi_asm.
17778 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17780 PR rtl-optimization/85342
17781 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17782 a bool scalar var inside of the loop instead. Don't try to update
17783 recog_data.operand after failed apply_change_group.
17785 2018-04-12 Tom de Vries <tom@codesourcery.com>
17788 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17789 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17790 array with flexible array member as array without given dimension.
17791 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17792 argument for undefined param to true.
17794 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17797 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17798 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17799 from PowerPC section.
17800 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17801 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17802 help text that is too long.
17803 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17804 help text that is too long.
17805 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17806 help text that is too long.
17808 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17810 * config/alpha/alpha.md (stack_probe_internal): Rename
17811 from "probe_stack". Update all callers.
17813 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17815 PR rtl-optimization/84566
17816 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17817 sched_macro_fuse_insns.
17819 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17822 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17823 (compute_block_dependences): ... from here.
17825 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17827 PR tree-optimization/85331
17828 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17829 from int to HOST_WIDE_INT.
17831 2018-04-11 Martin Jambor <mjambor@suse.cz>
17834 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17835 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17836 not the same as the source val.
17837 (cgraph_edge_brings_value_p): New parameter.
17838 (gather_edges_for_value): Pass destination value to
17839 cgraph_edge_brings_value_p.
17840 (perhaps_add_new_callers): Likewise.
17841 (get_info_about_necessary_edges): Likewise and exclude values brought
17842 only by self-recursive edges.
17843 (create_specialized_node): Redirect only clones of self-calling edges.
17844 (+self_recursive_pass_through_p): New function.
17845 (find_more_scalar_values_for_callers_subset): Use it.
17846 (find_aggregate_values_for_callers_subset): Likewise.
17847 (known_aggs_to_agg_replacement_list): Removed.
17848 (decide_whether_version_node): Re-calculate known constants for all
17849 remaining context clones.
17851 2018-04-11 Richard Biener <rguenther@suse.de>
17854 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17855 from early DWARF output.
17856 (dwarf2out_early_finish): Output line info unconditionally into
17857 early DWARF and add reference to it.
17859 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17862 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17863 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17864 other than V2DFmode using iptr mode attribute.
17865 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17867 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17869 PR rtl-optimization/84659
17870 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17872 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17875 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17877 (output_loc_list): Pass address of a dummy size variable even in the
17878 locview handling loop.
17879 (index_location_lists): Add comment on why skip_loc_list_entry can't
17882 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17885 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17888 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17891 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17892 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17893 and -mstring-compare-inline-limit.
17895 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17898 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17899 for stack clash protection in a register whenever we need it to be in
17902 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17904 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17905 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17907 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17910 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17912 (mlong-double-): Ditto.
17913 * config/rs6000/sysv4.opt (msdata=): Ditto.
17914 (mtls-size=): Ditto.
17916 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17918 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17919 erroneous entries for
17920 "vector int vec_ldl (int, long int *)", and
17921 "vector unsigned int vec_ldl (int, unsigned long int *)".
17922 Add comments and entries for
17923 "vector bool char vec_ldl (int, bool char *)",
17924 "vector bool short vec_ldl (int, bool short *)",
17925 "vector bool int vec_ldl (int, bool int *)",
17926 "vector bool long long vec_ldl (int, bool long long *)",
17927 "vector pixel vec_ldl (int, pixel *)",
17928 "vector long long vec_ldl (int, long long *)",
17929 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17930 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17931 type tree bool_long_long_type_node and correct definition of
17932 bool_V2DI_type_node to make reference to this new type tree.
17933 (rs6000_mangle_type): Replace erroneous reference to
17934 bool_long_type_node with bool_long_long_type_node.
17935 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17936 comments to emphasize sign distinctions for char and int types and
17937 replace RS6000_BTI_bool_long constant with
17938 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17939 use of RS6000_BTI_pixel.
17940 (bool_long_type_node): Remove this macro definition.
17941 (bool_long_long_type_node): New macro definition
17943 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17945 PR rtl-optimization/85300
17946 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17947 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17948 simplify_unary_operation fails.
17950 2018-04-10 Martin Liska <mliska@suse.cz>
17952 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17953 cgraph_edge and ipa_ref.
17955 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17959 * config/i386/sse.md
17960 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17961 computation of the VEC_MERGE selector from mask.
17962 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17963 Fix decoding of the VEC_MERGE selector into mask.
17965 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17967 PR tree-optimization/85286
17968 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17970 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17972 * final.c (final_1): Set insn_last_address as well as
17973 insn_current_address.
17975 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17978 * explow.c (emit_stack_probe): Call validize_mem on memory location
17979 before passing it to gen_probe_stack. Create address operand and
17980 legitimize it for the probe_stack_address case.
17982 2018-04-09 Jan Hubicka <jh@suse.cz>
17985 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17986 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17987 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17989 (free_lang_data): Rebuild type inheritance graph.
17991 2018-04-09 Martin Sebor <msebor@redhat.com>
17993 * invoke.texi (-finline-small-functions): Mention other optimization
17995 (-findirect-inlining, -fpartial-inlining): Same.
17996 (-finline-functions-called-once): Same.
17997 (-freorder-blocks-and-partition): Same.
17999 2018-04-09 Jan Hubicka <jh@suse.cz>
18002 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
18003 jumps; choose last target that matches the criteria (i.e.
18004 no partition changes for non-crossing jumps).
18005 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
18006 support for redirecting crossing jumps to non-crossing.
18008 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
18010 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
18011 also for naked functions.
18013 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
18015 * config/arc/arc.md (add_shift): New pattern.
18016 (add_shift2): Likewise.
18017 (sub_shift): Likewise.
18018 (sub_shift_cmp0_noout): Likewise.
18019 (compare_si_ashiftsi): Likewise.
18020 (xbfu_cmp0_noout): New combine pattern.
18021 (xbfu_cmp0"): Likewise.
18022 (movsi_set_cc_insn): Place the predicable variant first.
18023 (commutative_binary_cmp0_noout): Remove clobber.
18024 (commutative_binary_cmp0): New pattern.
18025 (noncommutative_binary_cmp0): Likewise.
18026 (noncommutative_binary_cmp0_noout): Likewise.
18027 (noncommutative_binary_comparison_result_used): Removed.
18028 (rsub_cmp0): New pattern.
18029 (rsub_cmp0_noout): Likewise.
18030 (extzvsi): Changed, keep only meaningful variants.
18031 (SQH, SEZ): New iterators.
18032 (SQH_postfix): New mode attribute.
18033 (SEZ_prefix): New code attribute.
18034 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
18035 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
18036 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
18037 of numerical value.
18038 (noncommutative_operator): Check the availability of barrel
18041 2018-04-09 Richard Biener <rguenther@suse.de>
18043 PR tree-optimization/85284
18044 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
18045 Only use the niter constraining form of simple_iv when the exit
18046 is always executed.
18048 2018-04-09 Tom de Vries <tom@codesourcery.com>
18051 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18052 (define_expand "*memory_barrier"): New define_expand.
18053 (define_insn "memory_barrier"): New insn.
18055 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18057 PR rtl-optimization/80463
18058 PR rtl-optimization/83972
18059 PR rtl-optimization/83480
18061 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
18062 correct producer for the insn.
18063 (tidy_control_flow): Fixup seqnos in case of debug insns.
18065 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18067 PR rtl-optimization/83913
18069 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
18070 different sched-times when merging exprs.
18072 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18074 PR rtl-optimization/83962
18076 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
18077 tidy_fallthru_edge and tidy_control_flow.
18079 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
18081 PR rtl-optimization/83530
18083 * sel-sched.c (force_next_insn): New global variable.
18084 (remove_insn_for_debug): When force_next_insn is true, also leave only
18085 next insn in the ready list.
18086 (sel_sched_region): When the region wasn't scheduled, make another pass
18087 over it with force_next_insn set to 1.
18089 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
18091 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18093 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18094 for interrupt control.
18095 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18096 functions for interrupt control.
18097 * config/nds32/nds32-intrinsic.md: Likewise.
18098 * config/nds32/nds32_intrinsic.h: Likewise.
18099 * config/nds32/nds32.h (nds32_builtins): Likewise.
18101 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
18103 * config/nds32/nds32.c (nds32_init_machine_status,
18104 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18105 strict_aligned_p field.
18106 (nds32_expand_to_rtl_hook): New function.
18107 (TARGET_EXPAND_TO_RTL_HOOK): Define.
18108 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18110 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18111 Chung-Ju Wu <jasonwucj@gmail.com>
18113 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18114 * config/nds32/nds32-n7.md: New file.
18115 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18116 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18118 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18119 * config/nds32/nds32.md (pipeline_model): Add n7.
18120 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18121 * config/nds32/pipelines.md: Include n7 settings.
18123 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18124 Chung-Ju Wu <jasonwucj@gmail.com>
18126 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18127 * config/nds32/nds32-e8.md: New file.
18128 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18129 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18131 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18132 * config/nds32/nds32.md (pipeline_model): Add e8.
18133 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18134 * config/nds32/pipelines.md: Include e8 settings.
18136 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18137 Chung-Ju Wu <jasonwucj@gmail.com>
18139 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18140 * config/nds32/nds32-n8.md: New file.
18141 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18142 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18144 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18145 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18146 * config/nds32/nds32.md (pipeline_model): Add n8.
18147 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18148 * config/nds32/pipelines.md: Include n8 settings.
18150 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
18151 Chung-Ju Wu <jasonwucj@gmail.com>
18153 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18154 * config/nds32/nds32-n9-2r1w.md: New file.
18155 * config/nds32/nds32-n9-3r2w.md: New file.
18156 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18157 nds32_register_ports): New or modify for cpu n9.
18158 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18160 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18161 * config/nds32/nds32-utils.c: New file.
18162 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18163 TARGET_MUL_SLOW): Define.
18164 * config/nds32/nds32.md (pipeline_model): New attribute.
18165 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18166 New options that support cpu n9.
18167 * config/nds32/pipelines.md: Include n9 settings.
18168 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18170 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
18172 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18173 information if necessary.
18174 (output_cond_branch_compare_zero): Likewise.
18175 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18176 (nds32_target_alignment): Refine for alignment.
18177 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18178 (FUNCTION_BOUNDARY): Modify.
18179 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18181 * config/nds32/nds32.opt (malways-align, malign-functions): New.
18183 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
18185 * config/nds32/constants.md (unspec_volatile_element): Add values for
18186 TLB operation and data prefetch.
18187 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18188 functions for TLB operation and data prefetch.
18189 * config/nds32/nds32-intrinsic.md: Likewise.
18190 * config/nds32/nds32_intrinsic.h: Likewise.
18191 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18192 (nds32_print_operand): Likewise.
18193 * config/nds32/nds32.h (nds32_builtins): Likewise.
18195 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
18196 Andrew Pinski <pinsika@gcc.gnu.org>
18198 PR middle-end/82976
18199 * match.pd: Use constant_boolean_node of correct type instead of
18200 boolean_true_node or boolean_false_node for simplifying
18201 pointer comparisons to zero.
18203 2018-04-07 Jakub Jelinek <jakub@redhat.com>
18205 PR tree-optimization/80021
18206 * tree.c (verify_type_variant): Make error call in verify_variant_match
18207 translatable and remove final full stop.
18209 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18211 * config/nds32/constants.md (unspec_volatile_element): Add
18212 UNSPEC_VOLATILE_EH_RETURN.
18213 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18214 nds32_output_stack_pop): Support dwarf exception handling process.
18215 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18216 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18217 exception handling process.
18218 (nds32_compute_stack_frame): Likewise.
18219 (nds32_return_addr_rtx): Likewise.
18220 (nds32_initial_elimination_offset): Likewise.
18221 (nds32_expand_prologue): Likewise.
18222 (nds32_expand_epilogue): Likewise.
18223 (nds32_dynamic_chain_address): New function.
18224 * config/nds32/nds32.h (machine_function): Add fields for dwarf
18225 exception handling.
18226 (DYNAMIC_CHAIN_ADDRESS): Define.
18227 (EH_RETURN_DATA_REGNO): Define.
18228 (EH_RETURN_STACKADJ_RTX): Define.
18229 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18230 patterns for dwarf exception handling.
18232 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18234 * config/nds32/nds32.h: Clean up obsolete macros.
18236 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18238 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18239 Add enum values for particular instructions.
18240 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18241 particular intrinsic functions.
18242 * config/nds32/nds32-intrinsic.md: Likewise.
18243 * config/nds32/nds32_intrinsic.h: Likewise.
18244 * config/nds32/nds32.h (nds32_builtins): Likewise.
18245 * config/nds32/nds32.md (type): Add pbsad and pbsada.
18246 (btst, ave): New patterns for particular instructions.
18248 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18250 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18251 Add enum values for atomic load/store and memory sync.
18252 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18254 * config/nds32/nds32-intrinsic.md: Likewise.
18255 * config/nds32/nds32_intrinsic.h: Likewise.
18256 * config/nds32/nds32.h (nds32_builtins): Likewise.
18258 2018-04-07 Jakub Jelinek <jakub@redhat.com>
18260 PR tree-optimization/85257
18261 * fold-const.c (native_encode_vector): If not all elts could fit
18262 and off is -1, return 0 rather than offset.
18263 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18264 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18265 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
18266 adjust buffer in native_interpret_expr call.
18268 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18270 * config/nds32/constants.md (unspec_volatile_element): Add cache
18271 control enum values.
18272 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18273 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18274 * config/nds32/nds32.c (nds32_cctl_names): New.
18275 (nds32_print_operand): Handle cache control register names.
18276 * config/nds32/nds32.h (nds32_builtins): New enum values.
18277 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18279 * config/nds32/nds32.md (type): Add mmu.
18280 * config/nds32/pipelines.md (simple_insn): Add mmu.
18282 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18284 * config/nds32/nds32.md (type): Remove call.
18285 * config/nds32/pipelines.md (simple_insn): Likewise.
18287 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18289 * config/nds32/constants.md (unspec_volatile_element): Add
18290 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18291 UNSPEC_VOLATILE_FMFCFG.
18292 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18293 description for fmfcfg and fmfcsr.
18294 (bdesc_1arg): Add fmtcsr.
18295 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18296 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18297 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18298 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18299 unspec_fmfcfg): New patterns.
18300 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18301 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18302 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18303 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18304 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18305 __nds32__fmfcfg): Define.
18307 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18309 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18310 intrinsic register names.
18311 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18312 intrinsic register enum values and macros.
18314 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18316 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18317 for load/store addressing form.
18318 (nds32_print_operand_address): Likewise.
18320 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
18323 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18324 based on LABEL_REF. Remove useless assertion.
18325 (pic_address_needs_scratch): Fix formatting.
18326 (sparc_legitimize_pic_address): Minor tweaks.
18327 (sparc_delegitimize_address): Adjust assertion accordingly.
18328 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18329 into symbolic_operand.
18330 (movsi_high_pic_label_ref): Likewise.
18331 (movsi_lo_sum_pic_label_ref): Likewise.
18332 (movdi_pic_label_ref): Likewise.
18333 (movdi_high_pic_label_ref): Likewise.
18334 (movdi_lo_sum_pic_label_ref): Likewise.
18336 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
18338 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18339 custom LIB_SPEC setup.
18341 2018-04-06 Ruslan Bukin <br@bsdpad.com>
18342 Kito Cheng <kito.cheng@gmail.com>
18344 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18345 * config/riscv/freebsd.h: New.
18347 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18349 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18350 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18353 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18354 Kito Cheng <kito.cheng@gmail.com>
18356 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18357 nds32_output_call, nds32_symbol_binds_local_p): New functions.
18358 * config/nds32/nds32-protos.h (nds32_output_call,
18359 nds32_output_return): Declare.
18360 * config/nds32/nds32.md: Refine all the call and return patterns.
18362 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18365 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18366 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18368 PR rtl-optimization/84872
18369 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18370 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18371 EDGE_CROSSING edge.
18373 2018-04-06 Tamar Christina <tamar.christina@arm.com>
18375 * expr.c (copy_blkmode_to_reg): Revert 254862.
18376 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18378 2018-04-06 Richard Biener <rguenther@suse.de>
18380 PR middle-end/85244
18381 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18382 after seeing a component reference with an adjacent field. Treat
18383 refs to arrays at struct end of external decls similar to
18384 refs to unconstrained commons.
18386 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18389 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18390 look through SAVE_EXPRs with non-side-effects argument. Adjust
18392 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18395 2018-04-06 Richard Biener <rguenther@suse.de>
18397 PR middle-end/85180
18398 * alias.c (find_base_term): New wrapper around find_base_term
18399 unwinding CSELIB_VAL_PTR changes.
18400 (find_base_term): Do not restore CSELIB_VAL_PTR during the
18403 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18405 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18407 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18408 constant definitions.
18409 ("nop"): lr 0,0 -> nopr r0
18410 ("nop_lr0", "nop_lr1"): New insn definitions.
18412 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18414 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18415 NDS32_V3PUSH_AVAILABLE_P macro.
18417 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
18418 Chung-Ju Wu <jasonwucj@gmail.com>
18420 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18421 (nds32*-*-*): Add float and fpu_config into supported_defaults.
18422 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18423 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18424 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18425 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18426 * config/nds32/constraints.md: New constraints and checking for hard
18427 float configuration.
18428 * config/nds32/iterators.md: New mode iterator and attribute for hard
18429 float configuration.
18430 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18432 * config/nds32/nds32-fpu.md: New file.
18433 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18434 deal with hard float code generation.
18435 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18437 (abi_type, float_reg_number): New enum type.
18438 * config/nds32/nds32-predicates.c: New predicates for hard float.
18439 * config/nds32/nds32-protos.h: Declare functions for hard float.
18440 * config/nds32/nds32.c: Implementation for hard float configuration.
18441 * config/nds32/nds32.h: Definitions for hard float configuration.
18442 * config/nds32/nds32.md: Include hard float machine description and
18443 modify patterns for hard float configuration.
18444 * config/nds32/nds32.opt: New options for hard float configuration.
18445 * config/nds32/predicates.md: New predicates for hard float
18448 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18450 * common/config/nds32/nds32-common.c
18451 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18453 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18455 PR middle-end/85195
18456 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18457 CONSTRUCTOR_ELT (ctor, ...)->value.
18459 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18462 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18464 2018-04-05 Tom de Vries <tom@codesourcery.com>
18467 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18470 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18471 Kito Cheng <kito.cheng@gmail.com>
18473 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18474 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18475 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18476 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18478 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18479 Kito Cheng <kito.cheng@gmail.com>
18481 * config/nds32/constraints.md (Ufe): New memory constraint.
18482 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18483 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18484 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18486 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18487 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18489 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18491 * config/nds32/nds32.md: Use optimize_size in the condition for
18492 alu-shift instructions.
18494 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18496 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18498 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18500 * config/nds32/nds32.md (negsi2): Refine pattern.
18502 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18503 Chung-Ju Wu <jasonwucj@gmail.com>
18505 * config/nds32/iterators.md (shift_rotate): New code iterator.
18506 (shift): New code attribute.
18507 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18508 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18509 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18510 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18511 bit-wise operations.
18512 (andsi3, *andsi3): Ditto.
18513 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18514 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18515 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18516 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18517 nds32_ior_operand, nds32_xor_operand): New predicates.
18519 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18521 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18522 (addsi3, subsi3): ... this.
18524 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18526 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18528 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18530 * config/nds32/nds32.md: Adjust indention.
18532 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18534 * config/nds32/nds32.md (feature): New attribute.
18536 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18538 * config/nds32/nds32.md (subtype): New attribute.
18540 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
18543 * config/arm/arm-builtins.c (arm_expand_builtin): Change
18544 expansion to perform a bitwise AND of the argument followed by a
18545 boolean negation of the result.
18547 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
18549 PR rtl-optimization/84878
18550 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18551 the basic block. Assert the use reference is not artificial and that
18552 it has an associated insn.
18554 2018-04-04 Michael Matz <matz@suse.de>
18556 * builtins.c (compute_objsize): Pass correct operand
18557 to array_at_struct_end_p.
18559 2018-04-04 Richard Biener <rguenther@suse.de>
18562 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18563 from contexts for DINFO_LEVEL_TERSE and below.
18565 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18567 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18568 resiter_operand condition.
18569 * config/nds32/nds32.md (*move<mode>): Ditto.
18571 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18572 Monk Chiang <sh.chiang04@gmail.com>
18574 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18576 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18578 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18580 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18581 Kito Cheng <kito.cheng@gmail.com>
18583 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18584 nds32_cond_code_str, output_cond_branch,
18585 output_cond_branch_compare_zero, nds32_expand_cbranch,
18586 nds32_expand_cstore, nds32_expand_movcc,
18587 nds32_output_cbranchsi4_equality_zero,
18588 nds32_output_cbranchsi4_equality_reg,
18589 nds32_output_cbranchsi4_equality_reg_or_const_int,
18590 nds32_output_cbranchsi4_greater_less_zero: New functions.
18591 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18592 nds32_expand_cstore, nds32_expand_movcc,
18593 nds32_output_cbranchsi4_equality_zero,
18594 nds32_output_cbranchsi4_equality_reg,
18595 nds32_output_cbranchsi4_equality_reg_or_const_int,
18596 nds32_output_cbranchsi4_greater_less_zero): Declare.
18597 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18598 nds32_rimm11s_operand): New predicates.
18599 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18600 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18603 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18605 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18606 * config/nds32/nds32.md: Ditto.
18607 * config/nds32/pipelines.md: Ditto.
18609 2018-04-04 Richard Biener <rguenther@suse.de>
18611 PR tree-optimization/85168
18612 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18613 propagating abnormals.
18615 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18617 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18619 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18620 Kito Cheng <kito.cheng@gmail.com>
18622 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18623 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18624 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18625 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18626 * config/nds32/nds32.md (sibcall_internal): New.
18627 (sibcall_register): Remove.
18628 (sibcall_immediate): Remove.
18629 (sibcall_value_internal): New.
18630 (sibcall_value_register): Remove.
18631 (sibcall_value_immediate): Remove.
18632 * config/nds32/predicates.md (nds32_general_register_operand): New.
18633 (nds32_call_address_operand): New.
18635 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18637 PR rtl-optimization/85167
18638 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18639 bb_defs if *split_p, instead preinitialize it to NULL.
18641 PR tree-optimization/85156
18642 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18643 evaluating the argument multiple times.
18645 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18647 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18649 (_mm_cvtpd_ps): Likewise.
18650 (_mm_cvttpd_epi32): Likewise.
18651 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18652 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18653 vector, pixel, and bool following altivec.h include.
18655 2018-04-03 Martin Sebor <msebor@redhat.com>
18657 * doc/extend.texi (Common Function Attributes): Clarify.
18658 (const attribute): Likewise.
18659 (pure attribute): Likewise.
18661 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18664 * config/i386/i386.c (ix86_expand_vector_set): Use
18665 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18667 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18669 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18670 instructions when changing rounding bits to preserve precision bits
18671 in the x87 control word.
18673 2018-04-03 Martin Liska <mliska@suse.cz>
18675 PR tree-optimization/82491
18676 * rtl.h (strip_offset_and_add): Replace += suboffset with
18677 poly_uint64 () + suboffset.
18679 2018-03-29 Martin Liska <mliska@suse.cz>
18680 Martin Jambor <mjambor@suse.cz>
18683 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18684 param_type is not an integral or pointer type.
18686 2018-04-03 Richard Biener <rguenther@suse.de>
18688 * sese.h (recompute_all_dominators): Remove.
18690 2018-04-02 Martin Sebor <msebor@redhat.com>
18692 * doc/invoke.texi (-Wrestrict): Fix typos.
18694 2018-04-02 Jim Wilson <jimw@sifive.com>
18696 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18697 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18698 (<optab>di3, <optab>si3_extend): Likewise.
18699 (<optab>si3_mask, <optab>si3_mask_1): New.
18700 (<optab>di3_mask, <optab>di3_mask_1): New.
18701 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18702 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18703 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18705 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18707 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18710 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18712 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18713 (nds32_canonicalize_comparison): New function.
18715 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18716 Kito Cheng <kito.cheng@gmail.com>
18717 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18719 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18720 * config/nds32/constants.md (unspec_volatile_element): Add
18721 UNSPEC_VOLATILE_RELAX_GROUP.
18722 * config/nds32/nds32-relax-opt.c: New file.
18723 * config/nds32/nds32-predicates.c
18724 (nds32_symbol_load_store_p): New function.
18725 * config/nds32/nds32-protos.h
18726 (nds32_symbol_load_store_p): Declare function.
18727 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18728 * config/nds32/nds32.c
18729 (nds32_register_pass): New function to register pass.
18730 (nds32_register_passes): New function to register passes.
18731 * config/nds32/nds32.md (relax_group): New pattern.
18732 * config/nds32/nds32.opt (mrelax-hint): New option.
18733 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18735 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18737 * config/nds32/t-nds32: Modify files dependency.
18739 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18741 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18742 (PROFILE_HOOK): Define its implementation.
18744 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18746 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18747 type and 32-bit size.
18749 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18751 PR middle-end/85090
18752 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18753 (V_128_256): New mode iterator.
18754 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18755 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18756 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18758 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18759 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18761 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18764 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18765 NaN inputs correctly.
18767 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18770 * config/rs6000/vsx.md (??r): New mode attribute.
18771 (*vsx_mov<mode>_64bit): Use it.
18772 (*vsx_mov<mode>_32bit): Likewise.
18774 2018-03-30 Martin Sebor <msebor@redhat.com>
18776 PR tree-optimization/84818
18777 * builtins.c (check_access): Use warning_n.
18779 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18782 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18784 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18787 2018-03-30 Julia Koval <julia.koval@intel.com>
18790 * x86-tune.def (movx, partial_reg_dependency): Enable for
18793 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18795 PR inline-asm/84985
18796 * lra-constraints.c (process_alt_operands): Move setting
18797 this_alternative_matches below.
18799 2018-03-29 Martin Liska <mliska@suse.cz>
18802 * doc/invoke.texi: Document how LTO works with debug info.
18803 Describe auto-load support of binutils. Mention 'x86-64'
18804 as valid option value of -march option.
18806 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18808 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18811 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18812 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18813 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18816 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18819 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18820 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18821 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18822 for RS6000_BTM_POWERPC64.
18823 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18824 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18825 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18828 (DIVDEU): Likewise.
18830 2018-03-28 Carl Love <cel@us.ibm.com>
18833 2017-09-27 Carl Love <cel@us.ibm.com>
18835 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18836 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18837 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18840 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18842 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18843 instead of __vector bool.
18844 (_mm_max_pu8): Likewise.
18845 (_mm_min_pi16): Likewise.
18847 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18850 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18851 (DIVWEUO): Likewise.
18852 (DIVDEO): Likewise.
18853 (DIVDEUO): Likewise.
18854 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18855 DIVWEUO and DIVDEUO.
18856 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18857 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18858 (div_extend): Likewise.
18859 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18861 (__builtin_divweuo): Likewise.
18862 (__builtin_divdeo): Likewise.
18863 (__builtin_divdeuo): Likewise.
18865 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18868 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18869 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18871 PR tree-optimization/82004
18872 * gimple-match-head.c (optimize_pow_to_exp): New function.
18873 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18874 Don't fold to exp if optimize_pow_to_exp is false.
18876 2018-03-28 Martin Liska <mliska@suse.cz>
18879 * calls.c (initialize_argument_information): Fix trailing space.
18880 * common.opt: Fix typo and provide better explanation for
18881 -fsanitize-coverage option.
18882 * config/i386/i386.opt: Fix typo.
18884 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18885 Martin Liska <mliska@suse.cz>
18888 * gimplify.c (asan_poison_variable): Don't do the check for
18889 gimplify_omp_ctxp here.
18890 (gimplify_decl_expr): Do it here.
18891 (gimplify_target_expr): Likewise.
18893 2018-03-28 Martin Liska <mliska@suse.cz>
18896 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18897 chkp_type_bounds_count if MPX is not enabled.
18899 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18901 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18903 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18906 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18907 function to create the function decl for complex long double
18908 multiply and divide for -mabi=ieeelongdouble.
18909 (init_float128_ieee): Call it.
18911 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18914 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18915 -fcf-protection=branch -mibt.
18916 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18918 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18921 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18922 arm_word_relocations.
18924 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18927 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18928 extern array declarations.
18930 2018-03-27 Richard Biener <rguenther@suse.de>
18932 PR middle-end/84067
18933 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18934 explicit single_use checks.
18936 2018-03-27 Richard Biener <rguenther@suse.de>
18938 PR tree-optimization/85082
18939 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18942 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18944 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18945 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18946 Turn on fasynchronous-unwind-tables and funwind-tables.
18948 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18951 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18952 (*bmi_blsr_<mode>_ccz): Ditto.
18954 2018-03-26 Tom de Vries <tom@codesourcery.com>
18956 PR tree-optimization/85063
18957 * omp-general.c (offloading_function_p): New function. Factor out
18959 * omp-offload.c (pass_omp_target_link::gate): ... here.
18960 * omp-general.h (offloading_function_p): Declare.
18961 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18962 with attribute omp declare target for offloading functions.
18964 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18966 PR tree-optimization/84005
18967 * tree-data-ref.h (get_base_for_alignment): Declare.
18968 * tree-data-ref.c (get_base_for_alignment_1): New function.
18969 (get_base_for_alignment): Likewise.
18970 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18971 get_base_for_alignment to find a suitable base object, instead
18972 of always using drb->base_address.
18974 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18976 PR inline-asm/85022
18977 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18978 known size by default.
18980 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18982 PR inline-asm/85030
18983 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18984 and non BLKmode operands.
18986 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18989 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18990 Clean up attributes.
18992 2018-03-23 Richard Biener <rguenther@suse.de>
18995 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18996 we are going to emit early debug for LTO.
18998 2018-03-23 Jakub Jelinek <jakub@redhat.com>
19000 PR inline-asm/85034
19001 * function.c (match_asm_constraints_1): Don't optimize if input
19002 doesn't satisfy general_operand predicate for output's mode.
19004 PR inline-asm/85022
19005 * alias.c (write_dependence_p): Don't require for x_canonicalized
19006 non-VOIDmode if x has VOIDmode.
19009 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
19010 just don't try to optimize it rather than assert it never happens.
19012 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
19014 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
19015 macro expansions for definition of ST_INTERNAL_<mode> and
19016 LD_INTERNAL_<mode> builtins.
19017 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
19019 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
19021 (altivec_expand_st_builtin): Likewise.
19022 (altivec_expand_builtin): Remove calls to deleted functions.
19023 (rs6000_address_for_altivec): Delete this function.
19024 * config/rs6000/vector.md: Remove expands for
19025 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
19027 2018-03-22 Sudakshina Das <sudi.das@arm.com>
19030 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
19031 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
19032 re-computing once computed.
19033 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
19034 (arm_init_machine_status): Initialize
19035 machine->static_chain_stack_bytes.
19037 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
19040 * doc/extend.texi: Add four new prototypes for vec_ld.
19041 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
19042 definitions for more logical presentation.
19043 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
19044 entries for V1TI variants of __builtin_altivec_ld builtin.
19045 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
19046 handling of V1TI variant of LVX icode pattern.
19047 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
19048 (rs6000_gimple_fold_builtin): Likewise.
19049 (altivec_init_builtins): Add code to define
19050 __builtin_altivec_lvx_v1ti function.
19052 2018-03-22 Jakub Jelinek <jakub@redhat.com>
19054 PR inline-asm/84941
19055 * function.c (match_asm_constraints_1): Don't do the optimization
19056 if input isn't a REG, SUBREG, MEM or constant.
19058 2018-03-22 Tom de Vries <tom@codesourcery.com>
19060 PR tree-optimization/84956
19061 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
19062 bb_has_abnormal_pred.
19064 2018-03-22 Jakub Jelinek <jakub@redhat.com>
19067 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
19068 DECL_INITIAL (decl) to decl at the end.
19069 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
19070 adjust the comment.
19072 2018-03-21 Joseph Myers <joseph@codesourcery.com>
19074 * doc/extend.texi (__builtin_tgmath): Document when complex
19075 integer types are treated as _Complex _Float64.
19077 2018-03-21 Tom de Vries <tom@codesourcery.com>
19079 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19081 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19083 PR tree-optimization/84960
19084 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19085 if it is ENTRY block, move them into single succ of ENTRY in that case.
19087 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
19089 PR tree-optimization/84811
19090 * poly-int.h (poly_span_traits): Remove the T3 parameter and
19091 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19092 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19093 (known_subrange_p): Update accordingly. Cast each value involved
19094 in the size comparison, rather than casting the result of the
19097 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19099 PR tree-optimization/84982
19100 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19101 by flipping the least significant bit rather than all bits from
19102 bitpos to bitpos + bitsize - 1.
19104 2018-03-21 Nathan Sidwell <nathan@acm.org>
19106 * doc/extend.texi (Deprecated Features): Remove mention of
19107 long-deleted deprecations.
19109 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19112 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19113 * configure: Regenerate.
19115 2018-03-21 Tom de Vries <tom@codesourcery.com>
19117 PR tree-optimization/83126
19118 * tree-parloops.c (num_phis): New function.
19119 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19121 2018-03-21 Nathan Sidwell <nathan@acm.org>
19123 * doc/extend.texi (Deprecated Features): Update deprecated flags,
19124 mention anon-struct/union members and trailing attributes.
19126 2018-03-21 Bin Cheng <bin.cheng@arm.com>
19128 PR tree-optimization/84969
19129 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19130 builtin memset partitions if they set different rhs values.
19132 2018-03-21 Jakub Jelinek <jakub@redhat.com>
19134 PR rtl-optimization/84989
19135 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19136 VEC_DUPLICATE with scalar result mode.
19138 2018-03-21 Martin Liska <mliska@suse.cz>
19141 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19142 not intended return statement.
19144 2018-03-21 Martin Liska <mliska@suse.cz>
19147 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19148 (chkp_find_bound_slots_1): Limit number of iterations.
19150 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
19153 * Minor grammar fixes for x86 options.
19155 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19158 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19159 holding REG_CFA_RESTORE notes, instead turn them into a USE.
19161 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
19164 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19165 (altivec_lvx_<mode>_1op): Likewise.
19166 (altivec_stvx_<mode>_2op): Likewise.
19167 (altivec_stvx_<mode>_1op): Likewise.
19168 (altivec_lvx_<VM2:mode>): New define_expand.
19169 (altivec_stvx_<VM2:mode>): Likewise.
19170 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19171 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19172 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19173 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19174 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19175 (rs6000_gen_lvx): Likewise.
19176 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19177 (altivec_expand_stv_builtin): Likewise.
19178 (altivec_expand_builtin): Likewise.
19179 * config/rs6000/vector.md: Likewise.
19181 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19184 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19187 2018-03-20 Richard Biener <rguenther@suse.de>
19190 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19191 sign-conversions as zero, fall back to standard scalar_stmt
19194 2018-03-20 Martin Liska <mliska@suse.cz>
19197 * predict.c (rebuild_frequencies): Handle case when we have
19198 PROFILE_ABSENT, but flag_guess_branch_prob is false.
19200 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19203 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19204 flag_section_anchors.
19205 * varasm.c (use_blocks_for_decl_p): Remove hack for
19206 dw2_force_const_mem.
19209 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19211 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
19212 be created, use lowpart_subreg of operands[0] rather than operands[0]
19214 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19215 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19216 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19217 and n constraint instead of aarch64_shift_imm_di and Usd.
19218 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19219 (*aarch64_<optab>_reg_minus<mode>3): ... this.
19221 2018-03-20 Sudakshina Das <sudi.das@arm.com>
19224 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19225 to favor GPR over NEON registers.
19226 (<shift>di3_neon): Likewise.
19228 2018-03-20 Tom de Vries <tom@codesourcery.com>
19231 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19232 (nvptx_process_pars): Emit bar.sync asap and alap.
19234 2018-03-20 Tom de Vries <tom@codesourcery.com>
19237 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19238 seen_label if seen_label is already set.
19240 2018-03-20 Jakub Jelinek <jakub@redhat.com>
19243 * config/i386/i386.c (fold_builtin_cpu): For features above 31
19244 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19245 Use 1U instead of 1. Formatting fixes.
19248 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19249 instead of TREE_TYPE (s1) for the return value.
19251 2018-03-19 Jakub Jelinek <jakub@redhat.com>
19253 PR tree-optimization/84946
19254 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19255 bitsize + bitsize in poly_uint64 rather than poly_int64.
19258 * dwarf2asm.c: Include fold-const.c.
19259 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19260 of decl rather than decl itself.
19262 PR rtl-optimization/84643
19263 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19265 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
19268 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19269 calling assemble_variable.
19271 2018-03-19 Sudakshina Das <sudi.das@arm.com>
19274 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19275 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19277 2018-03-19 Jim Wilson <jimw@sifive.com>
19280 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19281 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19282 (riscv_first_stack_step): Likewise.
19283 (riscv_option_override): Use STACK_BOUNDARY instead of
19284 MIN_STACK_BOUNDARY.
19285 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19286 MIN_STACK_BOUNDARY.
19287 (BIGGEST_ALIGNMENT): Set to 128.
19288 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19289 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19292 2018-03-19 Richard Biener <rguenther@suse.de>
19294 PR tree-optimization/84933
19295 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19296 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19298 2018-03-19 Richard Biener <rguenther@suse.de>
19300 PR tree-optimization/84859
19301 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19302 (cond_if_else_store_replacement): Perform sinking operation on
19303 single-store BBs regardless of MAX_STORES_TO_SINK setting.
19304 Generalize what a BB with a single eligible store is.
19306 2018-03-19 Richard Biener <rguenther@suse.de>
19308 PR tree-optimization/84929
19309 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19310 chrec_is_positive against non-chrec arg.
19312 2018-03-19 Tamar Christina <tamar.christina@arm.com>
19315 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19317 2018-03-18 Martin Liska <mliska@suse.cz>
19319 PR rtl-optimization/84635
19320 * regrename.c (build_def_use): Use matches_mode only when
19323 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
19325 PR tree-optimization/84913
19326 * tree-vect-loop.c (vectorizable_reduction): Don't try to
19327 vectorize chains of COND_EXPRs.
19329 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19331 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19333 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19335 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19337 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19339 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19341 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19342 Kito Cheng <kito.cheng@gmail.com>
19344 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19345 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19346 (nds32_adjust_reg_alloc_order): New function.
19347 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19349 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
19351 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19352 nds32_print_operand, nds32_print_operand_address): Use
19353 HOST_WIDE_INT_PRINT_DEC instead.
19355 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19357 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19359 2018-03-17 Jakub Jelinek <jakub@redhat.com>
19362 * config/i386/i386.c (initial_ix86_tune_features,
19363 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19364 unsigned long long.
19365 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19366 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19367 rather than 1u << ix86_tune. Formatting fix.
19368 (ix86_option_override_internal): Change ix86_arch_mask from
19369 unsigned int to unsigned HOST_WIDE_INT, initialize to
19370 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19371 (ix86_function_specific_restore): Likewise.
19373 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19376 * postreload.c (reload_combine_recognize_pattern): Perform
19377 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19378 truncate_int_for_mode the result for the destination's mode.
19381 * hsa-gen.c (mem_type_for_type): Fix comment typo.
19382 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19384 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19387 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
19390 * lra-assigns.c (lra_split_hard_reg_for): Don't use
19391 regno_allocno_class_array and sorted_pseudos.
19392 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19393 insns where regno is used.
19395 2018-03-16 Martin Liska <mliska@suse.cz>
19398 * multiple_target.c (create_dispatcher_calls): Redirect
19399 reference in the symbol table.
19401 2018-03-16 Martin Liska <mliska@suse.cz>
19404 * multiple_target.c (create_dispatcher_calls): Redirect also
19407 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19411 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19412 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19413 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19415 2018-03-16 Julia Koval <julia.koval@intel.com>
19417 * doc/invoke.texi (Skylake Server): Add CLWB.
19418 Cannonlake): Remove CLWB.
19420 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19422 PR tree-optimization/84841
19423 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19425 (FLOAT_ONE_CONST_TYPE): Define.
19426 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19427 (sort_by_operand_rank): Put entries with higher constant_type last
19428 rather than first to match comments.
19430 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19432 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19435 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19438 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19439 check and use address of target always.
19441 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19444 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19445 (indirect_thunk_bnd_needed): Likewise.
19446 (indirect_thunks_used): Likewise.
19447 (indirect_thunks_bnd_used): Likewise.
19448 (indirect_return_needed): New.
19449 (indirect_return_bnd_needed): Likewise.
19450 (output_indirect_thunk_function): Add a bool argument for
19452 (output_indirect_thunk_function): Don't generate alias for
19453 function return thunk.
19454 (ix86_code_end): Call output_indirect_thunk_function to generate
19455 function return thunks.
19456 (ix86_output_function_return): Set indirect_return_bnd_needed
19457 and indirect_return_needed instead of indirect_thunk_bnd_needed
19458 and indirect_thunk_needed.
19460 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19462 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19463 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19464 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19466 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19467 Paul Hua <paul.hua.gm@gmail.com>
19470 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19472 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19474 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19475 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19476 resp. SFmode cases.
19478 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19481 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19482 instead of GET_MODE_SIZE when comparing Units.
19484 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19487 * varasm.c (hash_section): Return an unchangeble hash value
19488 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19489 Return !aarch64_can_use_per_function_literal_pools_p ().
19491 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19494 * optabs.c (emit_conditional_move): Pass address of cmode's copy
19495 rather than address of cmode as last argument to prepare_cmp_insn.
19497 2018-03-15 Julia Koval <julia.koval@intel.com>
19499 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19500 F_AVX512VNNI, F_AVX512BITALG): New.
19502 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
19505 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
19506 insn for floating-point loads and stores.
19508 2018-03-14 Carl Love <cel@us.ibm.com>
19510 * config/rs6000/rs6000-c.c: Add macro definitions for
19511 ALTIVEC_BUILTIN_VEC_PERMXOR.
19512 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19513 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19514 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19515 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19517 * config/doc/extend.texi: Add prototypes for vec_permxor.
19519 2018-03-14 David Malcolm <dmalcolm@redhat.com>
19522 * diagnostic-show-locus.c (class layout_point): Convert m_line
19523 from int to linenum_type.
19524 (line_span::comparator): Use linenum "compare" function when
19525 comparing line numbers.
19526 (test_line_span): New function.
19527 (layout_range::contains_point): Convert param "row" from int to
19529 (layout_range::intersects_line_p): Likewise.
19530 (layout::will_show_line_p): Likewise.
19531 (layout::print_source_line): Likewise.
19532 (layout::should_print_annotation_line_p): Likewise.
19533 (layout::print_annotation_line): Likewise.
19534 (layout::print_leading_fixits): Likewise.
19535 (layout::annotation_line_showed_range_p): Likewise.
19536 (struct line_corrections): Likewise for field m_row.
19537 (line_corrections::line_corrections): Likewise for param "row".
19538 (layout::print_trailing_fixits): Likewise.
19539 (layout::get_state_at_point): Likewise.
19540 (layout::get_x_bound_for_row): Likewise.
19541 (layout::print_line): Likewise.
19542 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19543 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19544 * input.c (selftest::test_linenum_comparisons): New function.
19545 (selftest::input_c_tests): Call it.
19546 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19547 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19548 * selftest.h (ASSERT_GT): New macro.
19549 (ASSERT_GT_AT): New macro.
19550 (ASSERT_LT): New macro.
19551 (ASSERT_LT_AT): New macro.
19553 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19555 PR rtl-optimization/84780
19556 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19558 2018-03-14 Martin Liska <mliska@suse.cz>
19560 * tree.c (record_node_allocation_statistics): Use
19561 get_stats_node_kind.
19562 (get_stats_node_kind): New function extracted from
19563 record_node_allocation_statistics.
19564 (free_node): Use get_stats_node_kind.
19566 2018-03-14 Richard Biener <rguenther@suse.de>
19568 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19569 that the value-set of ANTIC_IN doesn't grow.
19572 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19574 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19575 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19577 2018-03-14 Julia Koval <julia.koval@intel.com>
19579 * config.gcc (icelake-client, icelake-server): New.
19581 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19582 (initial_ix86_arch_features): Ditto.
19583 (PTA_SKYLAKE): Add SGX.
19584 (PTA_ICELAKE): Remove.
19585 (PTA_ICELAKE_CLIENT): New.
19586 (PTA_ICELAKE_SERVER): New.
19587 (ix86_option_override_internal): Split up icelake on icelake client and
19589 (get_builtin_code_for_version): Ditto.
19590 (fold_builtin_cpu): Ditto.
19591 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19592 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19593 * config/i386/i386.h (processor_type): Ditto.
19594 * doc/invoke.texi: Ditto.
19596 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19599 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19600 INTEGER_CST offset, add it together with bitpos / 8 and
19601 sign extend based on POINTER_SIZE.
19605 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19608 * config/i386/constraints.md (Yc): New register constraint.
19609 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19610 Use Yc constraint for alternative 2 of operand 0. Remove
19611 preferred_for_speed attribute.
19613 2018-03-14 Richard Biener <rguenther@suse.de>
19615 PR tree-optimization/84830
19616 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19617 with the old one to avoid oscillations.
19619 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19622 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19624 (assign_by_spills): Return a flag of reload assignment failure.
19625 Do not process the reload assignment failures. Do not spill other
19626 reload pseudos if they has the same reg class. Update n if
19628 (lra_assign): Add a return arg. Set up from the result of
19629 assign_by_spills call.
19630 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19631 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19632 usage_insns if it is not NULL.
19633 (spill_hard_reg_in_range): New function.
19634 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19635 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19636 function prototypes.
19637 (lra_assign): Change prototype.
19638 * lra.c (lra): Add code to deal with fails by splitting hard reg
19641 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19643 * config/riscv/riscv.opt (mrelax): New option.
19644 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19645 "norelax" when riscv_mrelax is disabled.
19646 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19648 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19651 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19652 reassociation for int modes.
19654 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19656 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19657 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19659 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19660 * config/aarch64/aarch64-sve.md
19661 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19662 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19663 (*extend<mode><Vwide>2): Rename to...
19664 (aarch64_sve_extend<mode><Vwide>2): ...this.
19665 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19666 renaming the old pattern to...
19667 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19669 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19670 define_expand, renaming the old pattern to...
19671 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19672 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19673 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19674 account when deciding which SVE instruction the optab should use.
19675 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19677 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19679 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19680 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19681 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19682 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19683 (tlsdesc_small_<mode>): Turn a define_expand and use
19684 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19685 (tlsdesc_small_advsimd_<mode>): ...this.
19686 (tlsdesc_small_sve_<mode>): New pattern.
19688 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19690 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19691 (UNSPEC_UMUL_HIGHPART): New constants.
19692 (MUL_HIGHPART): New int iteraor.
19693 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19694 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19696 (*<su>mul<mode>3_highpart): New define_insn.
19698 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19701 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19704 2018-03-13 Martin Liska <mliska@suse.cz>
19707 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19709 (sem_item_optimizer::~sem_item_optimizer): Release it.
19710 (sem_item_optimizer::merge_classes): Register variable aliases.
19711 (sem_item_optimizer::fixup_pt_set): New function.
19712 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19713 * ipa-icf.h: Declare new variables and functions.
19715 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19717 PR middle-end/84834
19718 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19719 integer_pow2p@2 and test integer_pow2p in condition.
19720 (A < 0 ? C : 0): Similarly for @1.
19722 PR middle-end/84831
19723 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19724 characters starting at p contain '\0' character, don't look beyond
19728 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19729 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19732 * reg-stack.c (change_stack): Change update_end var from int to
19733 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19734 also call set_block_for_insn on the newly added insns and rescan.
19737 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19738 on the last operand.
19741 * tree.c (stabilize_reference_1): Return save_expr (e) for
19742 STATEMENT_LIST even if it doesn't have side-effects.
19744 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19746 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19748 2018-03-12 Renlin Li <renlin.li@arm.com>
19750 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19751 aarch64_output_scalar_simd_mov_immediate.
19753 2018-03-12 Martin Sebor <msebor@redhat.com>
19755 PR tree-optimization/83456
19756 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19757 for perfectly overlapping calls to memcpy.
19758 (gimple_fold_builtin_memory_chk): Same.
19759 (gimple_fold_builtin_strcpy): Handle no-warning.
19760 (gimple_fold_builtin_stxcpy_chk): Same.
19761 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19763 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19765 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19766 parameter. Use it for SFmode.
19767 (rs6000_function_arg_advance_1): Adjust.
19768 (rs6000_function_arg): Adjust.
19769 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19771 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19773 PR rtl-optimization/84169
19774 PR rtl-optimization/84780
19775 * combine.c (can_combine_p): Check for a 2-insn combination whether
19776 the destination register is used between the two insns, too.
19778 2018-03-12 Richard Biener <rguenther@suse.de>
19780 PR tree-optimization/84803
19781 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19782 for refs DR analysis didn't process.
19784 2018-03-12 Richard Biener <rguenther@suse.de>
19786 PR tree-optimization/84777
19787 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19788 force-vectorize loops ignore whether we are optimizing for size.
19790 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19792 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19793 (TARGET_MD_ASM_ADJUST): Define.
19795 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19796 Kito Cheng <kito.cheng@gmail.com>
19797 Chung-Ju Wu <jasonwucj@gmail.com>
19799 * config/nds32/nds32.c (nds32_compute_stack_frame,
19800 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19801 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19802 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19803 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19804 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19805 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19806 * config/nds32/nds32.md (prologue, epilogue): Use macro
19807 NDS32_V3PUSH_AVAILABLE_P to do checking.
19809 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19812 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19813 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19814 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19815 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19816 addition of most attributes on !orig_type_die or the attribute not
19817 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19819 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19820 Chung-Ju Wu <jasonwucj@gmail.com>
19822 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19823 __NDS32_VH__ macro.
19824 * config/nds32/nds32.opt (mvh): New option.
19826 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19827 Chung-Ju Wu <jasonwucj@gmail.com>
19829 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19831 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19832 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19835 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19836 Chung-Ju Wu <jasonwucj@gmail.com>
19838 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19840 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19841 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19843 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19844 Kito Cheng <kito.cheng@gmail.com>
19845 Chung-Ju Wu <jasonwucj@gmail.com>
19847 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19848 UNSPEC_FFMISM and UNSPEC_FLMISM.
19849 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19850 for ffb, ffmism and flmism.
19851 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19852 (unspec_ffmism): Ditto.
19853 (unspec_flmism): Ditto.
19854 (nds32_expand_builtin_impl): Check if string extension is available.
19855 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19856 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19858 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19861 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19864 * lra-assigns.c (assign_by_spills): Return a flag of reload
19865 assignment failure. Do not process the reload assignment
19866 failures. Do not spill other reload pseudos if they has the same
19868 (lra_assign): Add a return arg. Set up from the result of
19869 assign_by_spills call.
19870 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19871 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19872 usage_insns if it is not NULL.
19873 (spill_hard_reg_in_range): New function.
19874 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19875 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19876 function prototypes.
19877 (lra_assign): Change prototype.
19878 * lra.c (lra): Add code to deal with fails by splitting hard reg
19881 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19884 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19886 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19889 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19890 (dw_val_node): Add val_symbolic_view.
19891 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19892 (symview_upper_bound): New.
19893 (new_line_info_table): Initialize symviews_since_reset.
19894 (dwarf2out_source_line): Count symviews_since_reset and set
19895 symview_upper_bound.
19896 (dw_val_equal_p): Handle symview.
19897 (add_AT_symview): New.
19898 (print_dw_val): Handle symview.
19899 (attr_checksum, attr_checksum_ordered): Likewise.
19900 (same_dw_val_p, size_of_die): Likewise.
19901 (value_format, output_die): Likewise.
19902 (add_high_low_attributes): Use add_AT_symview for entry_view.
19903 (dwarf2out_finish): Reset symview_upper_bound, clear
19906 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19909 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19910 Add strict argument and use it.
19911 (rs6000_split_multireg_move): Update for new strict argument.
19912 (mem_operand_gpr): Disallow all non-offsettable addresses.
19913 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19915 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19918 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19919 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19920 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19923 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19924 decl, use remap_type if we want to use the type.
19926 2018-03-09 Martin Sebor <msebor@redhat.com>
19928 PR tree-optimization/84526
19929 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19931 (builtin_access::generic_overlap): Be prepared to handle non-array
19934 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19936 PR rtl-optimization/84682
19937 * lra-constraints.c (process_address_1): Check is_address flag
19938 for address constraints.
19939 (process_alt_operands): Likewise.
19940 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19941 preprocess_constraints.
19942 * recog.h (preprocess_constraints): Add oploc parameter.
19944 * recog.c (preprocess_constraints): Test address_operand for
19945 CT_ADDRESS constraints.
19947 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19950 * lra-assigns.c (assign_by_spills): Return a flag of reload
19951 assignment failure. Do not process the reload assignment
19952 failures. Do not spill other reload pseudos if they has the same
19954 (lra_assign): Add a return arg. Set up from the result of
19955 assign_by_spills call.
19956 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19957 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19958 usage_insns if it is not NULL.
19959 (spill_hard_reg_in_range): New function.
19960 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19961 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19962 function prototypes.
19963 (lra_assign): Change prototype.
19964 * lra.c (lra): Add code to deal with fails by splitting hard reg
19967 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19970 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19971 Accept complain bool parameter. Only emit errors if it is true.
19972 (arm_parse_cpu_option_name): Likewise.
19973 (arm_target_thumb_only): Adjust callers of the above.
19974 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19975 prototype to take a default true bool parameter.
19976 (arm_parse_arch_option_name): Likewise.
19978 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19979 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19983 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19984 * configure: Regenerate.
19985 * configure.ac ("linker --version-script option"): New.
19986 ("linker soname option"): New.
19988 2018-03-09 Richard Biener <rguenther@suse.de>
19990 PR tree-optimization/84775
19991 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19992 immediate uses of predicate stmts and mark them modified.
19995 PR tree-optimization/84178
19996 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19998 (version_loop_for_if_conversion): Delay update_ssa call.
19999 (tree_if_conversion): Delay update_ssa until after predicate
20002 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
20005 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
20006 when the function accesses prior frames.
20008 2018-03-08 Jakub Jelinek <jakub@redhat.com>
20011 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
20012 gen_llsym, otherwise call maybe_gen_llsym.
20014 PR inline-asm/84742
20015 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
20016 has ',' character inside of it.
20018 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20021 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
20022 as clobbering CC_REGNUM.
20024 2018-03-08 Richard Biener <rguenther@suse.de>
20026 PR middle-end/84552
20027 * tree-scalar-evolution.c: Include tree-into-ssa.h.
20028 (follow_copies_to_constant): Do not follow SSA names registered
20031 2018-03-08 Richard Biener <rguenther@suse.de>
20033 PR tree-optimization/84178
20034 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20036 (version_loop_for_if_conversion): Delay update_ssa call.
20037 (tree_if_conversion): Delay update_ssa until after predicate
20040 2018-03-08 David Malcolm <dmalcolm@redhat.com>
20042 PR tree-optimization/84178
20043 * tree-if-conv.c (release_bb_predicate): Remove the
20044 the assertion that the stmts have NULL use_ops.
20045 Discard the statements, asserting that they haven't
20046 yet been added to a BB.
20048 2018-03-08 Richard Biener <rguenther@suse.de>
20050 PR tree-optimization/84746
20051 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
20052 (phi_translate): Pass in destination ANTIC_OUT set.
20053 (phi_translate_1): Likewise. For a simplified result lookup
20054 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
20055 (phi_translate_set): Adjust.
20056 (do_pre_regular_insertion): Likewise.
20057 (do_pre_partial_partial_insertion): Likewise.
20059 2018-03-08 Martin Liska <mliska@suse.cz>
20061 PR gcov-profile/84735
20062 * doc/gcov.texi: Document usage of profile files.
20063 * gcov-io.h: Document changes in the format.
20065 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
20069 * dwarf2out.c (struct dw_line_info_table): Update comments for
20071 (FORCE_RESET_NEXT_VIEW): New.
20072 (FORCE_RESETTING_VIEW_P): New.
20073 (RESETTING_VIEW_P): Check for -1 too.
20074 (ZERO_VIEW_P): Likewise.
20075 (new_line_info_table): Force-reset next view.
20076 (dwarf2out_begin_function): Likewise.
20077 (dwarf2out_source_line): Simplify zero_view_p initialization.
20078 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
20079 view directly. Omit view when omitting .loc at line 0.
20081 2018-03-08 Jakub Jelinek <jakub@redhat.com>
20083 PR tree-optimization/84740
20084 * tree-switch-conversion.c (process_switch): Call build_constructors
20085 only if info.phi_count is non-zero.
20087 PR tree-optimization/84739
20088 * tree-tailcall.c (find_tail_calls): Check call arguments against
20089 DECL_ARGUMENTS (current_function_decl) rather than
20090 DECL_ARGUMENTS (func) when checking for tail recursion.
20092 2018-03-07 Jakub Jelinek <jakub@redhat.com>
20094 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20095 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20096 Volker Reichelt's entry and add entries for people that perform
20097 GCC fuzzy testing and report numerous bugs.
20099 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
20102 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20103 readonly data in sdata, if that is disabled.
20104 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20105 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20106 -mreadonly-in-sdata option.
20108 2018-03-07 Martin Sebor <msebor@redhat.com>
20110 PR tree-optimization/84468
20111 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20112 basic block when looking for nul assignment.
20114 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
20117 * except.h (output_function_exception_table): Adjust prototype.
20118 * except.c (output_function_exception_table): Remove FNNAME parameter
20119 and add SECTION parameter. Ouput one part of the table at a time.
20120 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20121 the first part of the exception table and emit unwind directives.
20122 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20123 (i386_pe_seh_cold_init): Likewise.
20124 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20125 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20126 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20127 (ix86_output_call_insn): Emit a nop in one more case for SEH.
20128 * config/i386/winnt.c: Include except.h.
20129 (struct seh_frame_state): Add reg_offset, after_prologue and
20130 in_cold_section fields.
20131 (i386_pe_seh_end_prologue): Set seh->after_prologue.
20132 (i386_pe_seh_cold_init): New function.
20133 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20134 to seh->in_cold_section.
20135 (seh_emit_push): Record the offset of the push.
20136 (seh_emit_save): Record the offet of the save.
20137 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20138 Test seh->after_prologue to disregard the epilogue.
20139 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20140 (i386_pe_end_cold_function): New function.
20142 2018-03-07 Jakub Jelinek <jakub@redhat.com>
20145 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20146 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20149 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20151 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20152 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20154 PR middle-end/84723
20155 * multiple_target.c: Include tree-inline.h and intl.h.
20156 (expand_target_clones): Diagnose and fail if node->definition and
20157 !tree_versionable_function_p (node->decl).
20159 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
20161 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20163 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20164 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20165 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20167 2018-03-06 Jakub Jelinek <jakub@redhat.com>
20170 * combine.c (try_combine): Use reg_or_subregno instead of handling
20171 just paradoxical SUBREGs and REGs.
20173 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
20175 * config/arc/arc.c (arc_finalize_pic): Remove function.
20176 (arc_must_save_register): We use single base PIC register, remove
20177 checks to save/restore the PIC register.
20178 (arc_expand_prologue): Likewise.
20179 * config/arc/arc-protos.h (arc_set_default_type_attributes):
20181 (arc_verify_short): Likewise.
20182 (arc_attr_type): Likewise.
20183 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20184 (walk_stores): Likewise.
20185 (arc_address_cost): Make it static.
20186 (arc_verify_short): Likewise.
20187 (branch_dest): Likewise.
20188 (arc_attr_type): Likewise.
20189 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20190 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20191 (arc_final_prescan_insn): Remove inserting the nops due to
20192 hardware hazards. It is done in reorg step.
20193 (insn_length_variant_t): Remove.
20194 (insn_length_parameters_t): Likewise.
20195 (arc_insn_length_parameters): Likewise.
20196 (arc_get_insn_variants): Likewise.
20197 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20199 2018-03-06 Jakub Jelinek <jakub@redhat.com>
20201 PR inline-asm/84683
20202 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20205 PR tree-optimization/84687
20206 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20208 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20210 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20212 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20213 Rename to ppc_speculation_barrier.
20214 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20215 __builtin_ppc_speculation_barrier.
20217 2018-03-05 Jakub Jelinek <jakub@redhat.com>
20220 * combine.c (combine_simplify_rtx): Don't try to simplify if
20221 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20224 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
20226 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20227 to 32 bytes when compiling for POWER9.
20229 2018-03-05 Jakub Jelinek <jakub@redhat.com>
20232 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20233 regparm >= 3 with no arg reg available also for calls with
20234 flag_force_indirect_call. Pass decl to ix86_function_regparm.
20237 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20239 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
20241 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
20244 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20246 2018-03-05 Richard Biener <rguenther@suse.de>
20248 PR tree-optimization/84486
20249 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20250 When inserting a __builtin_assume_aligned call set the LHS
20251 SSA name alignment info accordingly.
20253 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
20255 PR tree-optimization/84114
20256 * config/aarch64/aarch64.c (aarch64_reassociation_width)
20257 Avoid reassociation of FLOAT_MODE addition.
20259 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
20261 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20262 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20263 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20264 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20265 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20266 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20267 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20269 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20270 __builtin_ia32_wbinvd): New builtins.
20271 (SPECIAL_ARGS2): New.
20272 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20273 (SPECIAL_ARGS2): New.
20274 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20275 (ix86_valid_target_attribute_inner_p): Ditto.
20276 (ix86_init_mmx_sse_builtins): Add special_args2.
20277 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20278 TARGET_WBNOINVD_P): New.
20279 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20280 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20281 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20282 * config/i386/immintrin.h (_wbinvd): New intrinsic.
20283 * config/i386/pconfigintrin.h: New file.
20284 * config/i386/wbnoinvdintrin.h: Ditto.
20285 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20287 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20289 2018-03-05 Richard Biener <rguenther@suse.de>
20291 PR tree-optimization/84670
20292 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20294 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20295 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20296 (compute_antic_aux): Only assert the number of values in ANTIC_IN
20297 doesn't grow if all successors (recursively) were visited at least
20300 2018-03-05 Richard Biener <rguenther@suse.de>
20302 PR tree-optimization/84650
20303 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20304 if executed in the loop pipeline.
20306 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
20308 * doc/configfiles.texi (Configuration Files): Move info about
20309 conditionalizing $target-protos.h to...
20310 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
20311 differs from $target-protos.h.
20313 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
20314 Chung-Ju Wu <jasonwucj@gmail.com>
20316 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20317 * config/nds32/nds32-multiple.md (setmemsi): Define.
20318 * config/nds32/nds32-memory-manipulation.c
20319 (nds32_gen_dup_4_byte_to_word_value): New.
20320 (emit_setmem_word_loop): New.
20321 (emit_setmem_byte_loop): New.
20322 (nds32_expand_setmem_loop): New.
20323 (nds32_expand_setmem_loop_v3m): New.
20324 (nds32_expand_setmem_unroll): New.
20325 (nds32_expand_setmem): New.
20327 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20328 Chung-Ju Wu <jasonwucj@gmail.com>
20330 * config/nds32/nds32-memory-manipulation.c
20331 (nds32_emit_load_store): New.
20332 (nds32_emit_post_inc_load_store): New.
20333 (nds32_emit_mem_move): New.
20334 (nds32_emit_mem_move_block): New.
20335 (nds32_expand_movmemsi_loop_unknown_size): New.
20336 (nds32_expand_movmemsi_loop_known_size): New.
20337 (nds32_expand_movmemsi_loop): New.
20338 (nds32_expand_movmemsi_unroll): New.
20339 (nds32_expand_movmemqi): Rename ...
20340 (nds32_expand_movmemsi): ... to this.
20341 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20342 (movmemsi): ... to this.
20343 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20344 (nds32_expand_movmemsi): ... to this.
20346 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20347 Monk Chiang <sh.chiang04@gmail.com>
20348 Chung-Ju Wu <jasonwucj@gmail.com>
20350 * config/nds32/nds32-protos.h
20351 (nds32_expand_load_multiple): New arguments.
20352 (nds32_expand_store_multiple): Ditto.
20353 (nds32_valid_multiple_load_store): Rename ...
20354 (nds32_valid_multiple_load_store_p): ... to this.
20355 * config/nds32/nds32-memory-manipulation.c
20356 (nds32_expand_load_multiple): Refine implementation.
20357 (nds32_expand_store_multiple): Ditto.
20358 * config/nds32/nds32-multiple.md
20359 (load_multiple): Update nds32_expand_load_multiple interface.
20360 (store_multiple): Update nds32_expand_store_multiple interface.
20361 * config/nds32/nds32-predicates.c
20362 (nds32_valid_multiple_load_store): Rename ...
20363 (nds32_valid_multiple_load_store_p): ... to this and refine
20365 * config/nds32/predicates.md
20366 (nds32_load_multiple_and_update_address_operation): New predicate.
20367 (nds32_store_multiple_and_update_address_operation): New predicate.
20369 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20370 Chung-Ju Wu <jasonwucj@gmail.com>
20372 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20373 (combo): New attribute.
20374 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20376 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
20378 * config/nds32/nds32.opt: Change -mcmodel= default value.
20380 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
20381 Monk Chiang <sh.chiang04@gmail.com>
20382 Chung-Ju Wu <jasonwucj@gmail.com>
20384 * config/nds32/constants.md (unspec_element): New enum.
20385 * config/nds32/constraints.md (Umw): New constraint.
20386 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20387 * config/nds32/nds32-intrinsic.md: Likewise.
20388 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20389 (nds32_valid_smw_lwm_base_p): New.
20390 (nds32_output_smw_single_word): New.
20391 (nds32_output_lmw_single_word): New.
20392 (nds32_expand_unaligned_load): New.
20393 (nds32_expand_unaligned_store): New.
20394 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20395 (nds32_output_smw_single_word): Declare.
20396 (nds32_output_lmw_single_word): Declare.
20397 (nds32_expand_unaligned_load): Declare.
20398 (nds32_expand_unaligned_store): Declare.
20399 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20400 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20401 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20402 NDS32_BUILTIN_UASTORE_DW.
20403 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20406 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
20407 Kito Cheng <kito.cheng@gmail.com>
20408 Chung-Ju Wu <jasonwucj@gmail.com>
20410 * config/nds32/nds32-intrinsic.c
20411 (nds32_expand_builtin_null_ftype_reg): Delete.
20412 (nds32_expand_builtin_reg_ftype_imm): Ditto.
20413 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20414 (nds32_read_argument): New.
20415 (nds32_legitimize_target): Ditto.
20416 (nds32_legitimize_argument): Ditto.
20417 (nds32_check_constant_argument): Ditto.
20418 (nds32_expand_unop_builtin): Ditto.
20419 (nds32_expand_unopimm_builtin): Ditto.
20420 (nds32_expand_binop_builtin): Ditto.
20421 (nds32_builtin_decl_impl): Ditto.
20422 (builtin_description): Ditto.
20423 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20424 (nds32_init_builtins_impl): Ditto.
20425 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20426 (nds32_builtin_decl): New.
20427 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20428 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20430 2018-03-02 Jeff Law <law@redhat.com>
20432 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20433 (redundant_insn, fill_simple_delay_slots): Likewise.
20434 (fill_slots_from_thread): Likewise.
20435 * resource.c (mark_referenced_resources): Likewise.
20436 (mark_set_resources, find_dead_or_set_registers): Likewise.
20438 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20440 * substring-locations.h (format_warning_va): Formatting fix for
20441 ATTRIBUTE_GCC_DIAG.
20442 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20444 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20445 * substring-locations.c: Include intl.h.
20446 (format_warning_va): Turned into small wrapper around
20447 format_warning_n_va, renamed to ...
20448 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20449 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20451 (format_warning_at_substring_n): New function.
20452 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20453 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20454 format_warning_at_substring with just a shorter name instead of
20455 const function pointer.
20456 (fmtwarn_n): New function.
20457 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20458 appropriate, get rid of all the fmtstr temporaries, move conditionals
20459 with G_() wrapped string literals directly into fmtwarn arguments,
20460 cast dir.len to (int), formatting fixes.
20462 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20464 * doc/invoke.texi: Remove "Cilk Plus" references.
20466 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20467 Richard Biener <rguenther@suse.de>
20470 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20471 for error or warning attributes if CALL_FROM_THUNK_P is set.
20474 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20477 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20478 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20481 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20482 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20484 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20485 instead of -1U in last predictors element's probability member.
20487 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20490 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20491 arguments if they are comparable.
20493 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20495 PR tree-optimization/84634
20496 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20497 masks and masked_loop_p with a single loop_masks, making sure it's
20498 null for bb vectorization.
20500 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20502 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20503 (vect_analyze_data_ref_access): Use loop->safe_len rather than
20504 loop->force_vectorize to check whether there is no alias.
20506 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20509 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20511 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20513 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20514 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20515 instead of a loop around prev_real_insn.
20516 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20519 PR inline-asm/84625
20520 * config/i386/i386.c (ix86_print_operand): Use conditional
20521 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20524 2018-03-02 Richard Biener <rguenther@suse.de>
20526 PR tree-optimization/84427
20527 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20528 (bitmap_set_subtract_values): Rewrite to handle multiple
20531 (prune_clobbered_mems): Likewise.
20532 (phi_translate): Take edge instead of pred/phiblock.
20533 (phi_translate_1): Likewise.
20534 (phi_translate_set): Likewise. Insert all translated
20535 exprs for a value into the set, keeping possibly multiple
20536 expressions per value.
20537 (compute_antic_aux): Adjust for phi_translate changes.
20538 When intersecting union the expressions and prune those
20539 not in the final value set, keeping possibly multiple
20540 expressions per value. Do not use value-insertion
20541 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20542 all expressions. Add verification that the value-sets
20543 only shrink during iteration.
20544 (compute_partial_antic_aux): Adjust for the phi_translate changes.
20545 (do_pre_regular_insertion): Likewise.
20546 (do_pre_partial_partial_insertion): Likewise.
20548 2018-03-02 Richard Biener <rguenther@suse.de>
20551 * config/darwin.c (saved_debug_info_level): New static global.
20552 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20553 (darwin_asm_lto_end): Restore debug info generation settings.
20555 2018-03-01 Martin Liska <mliska@suse.cz>
20558 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20559 volatile arguments.
20561 2018-03-01 Richard Biener <rguenther@suse.de>
20564 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20565 type annotation with LTO when debug was disabled at compile-time.
20567 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20569 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20571 (mips_final_postscan_insn): Likewise.
20573 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20575 PR rtl-optimization/84528
20576 * alias.c (init_alias_target): Add commentary.
20577 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20578 a unique base value if the frame pointer is not eliminated
20579 to the stack pointer.
20581 2018-03-01 Tom de Vries <tom@codesourcery.com>
20583 PR rtl-optimization/83327
20584 * lra-int.h (hard_regs_spilled_into): Declare.
20585 * lra.c (hard_regs_spilled_into): Define.
20586 (init_reg_info): Init hard_regs_spilled_into.
20587 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20588 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20589 (process_bb_lives): Handle hard_regs_spilled_into.
20590 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20591 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20593 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20595 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20596 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20597 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20598 * config/rs6000/aix72.h: New file.
20600 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20602 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20603 instead of warning_at with conditional singular and plural messages
20607 * stor-layout.c (update_alignment_for_field): For
20608 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20609 && !DECL_PACKED (field), do the alignment update, just use
20610 only desired_align instead of MAX (type_align, desired_align)
20612 (place_field): Don't do known_align < desired_align handling
20613 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20614 is non-NULL, instead do it after rli->prev_field handling and
20615 only if not within a bitfield word. For DECL_PACKED (field)
20616 use type_align of BITS_PER_UNIT.
20618 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20620 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20621 superfluous parentheses and trailing spaces.
20623 2018-02-28 Richard Biener <rguenther@suse.de>
20625 PR tree-optimization/84584
20626 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20627 SCoPs with fake exit edge.
20629 2018-02-28 Martin Liska <mliska@suse.cz>
20632 * timevar.c (timer::print): Fix format to properly print 100%
20635 2018-02-28 Richard Biener <rguenther@suse.de>
20637 PR middle-end/84607
20638 * genmatch.c (capture_info::walk_match): Do not mark
20639 captured expressions without operands as expr_p given
20640 they act more like predicates and should be subject to
20641 "lost tail" side-effect preserving.
20643 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20645 PR rtl-optimization/81611
20646 * auto-inc-dec.c (attempt_change): Move dead note from
20647 mem_insn if it's the next use of regno
20648 (find_address): Take address use of reg holding
20649 non-incremented value. Add parm to limit search to the named
20651 (merge_in_block): Attempt to use a mem insn that is the next
20652 use of the original regno.
20654 2018-02-27 Martin Sebor <msebor@redhat.com>
20657 * doc/invoke.texi (-Wmissing-attributes): New option.
20658 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20660 2018-02-27 Martin Sebor <msebor@redhat.com>
20662 PR translation/84207
20663 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20664 n argument to unsigned HOST_WIDE_INT.
20665 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20666 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20667 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20668 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20670 2018-02-27 Richard Biener <rguenther@suse.de>
20672 PR tree-optimization/84512
20673 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20674 Do not use the estimate returned from record_stmt_cost for
20675 the scalar iteration cost but sum properly using add_stmt_cost.
20677 2018-02-27 Richard Biener <rguenther@suse.de>
20679 PR tree-optimization/84466
20680 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20681 Adjust last change to less strictly validate use operands.
20683 2018-02-27 Martin Liska <mliska@suse.cz>
20685 PR gcov-profile/84548
20686 * gcov.c (process_file): Allow partial overlap and consider it
20687 also as group functions.
20688 (output_lines): Properly calculate range of lines for a group.
20690 2018-02-27 Martin Liska <mliska@suse.cz>
20692 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20693 'ggc' suffixes. Change first column width.
20694 (timer::print): Fix formatting of the column.
20696 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20698 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20699 preserve inline entry blocks for the sake of debug inline
20700 entry point markers alone.
20701 (remove_unused_locals): Suggest in comments a better place to
20702 force the preservation of inline entry blocks that are
20703 otherwise unused, but do not preserve them.
20705 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20707 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20709 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20712 * config/i386/constraints.md (Bs): Replace
20713 ix86_indirect_branch_register with
20714 TARGET_INDIRECT_BRANCH_REGISTER.
20716 * config/i386/i386.md (indirect_jump): Likewise.
20717 (tablejump): Likewise.
20718 (*sibcall_memory): Likewise.
20719 (*sibcall_value_memory): Likewise.
20720 Peepholes of indirect call and jump via memory: Likewise.
20721 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20722 (*sibcall_value_GOT_32): Likewise.
20723 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20724 (GOT_memory_operand): Likewise.
20725 (call_insn_operand): Likewise.
20726 (sibcall_insn_operand): Likewise.
20727 (GOT32_symbol_operand): Likewise.
20728 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20730 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20732 PR rtl-optimization/83496
20733 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20734 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20735 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20736 redundant insn, if any.
20737 (relax_delay_slots): Likewise.
20738 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20740 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20742 PR tree-optimization/83965
20743 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20744 that grouped statements are part of a reduction chain. Return
20745 true if the statement is not marked as a reduction itself but
20746 is part of a group.
20747 (vect_recog_dot_prod_pattern): Don't check whether the statement
20748 is part of a group here.
20749 (vect_recog_sad_pattern): Likewise.
20750 (vect_recog_widen_sum_pattern): Likewise.
20752 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20755 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20757 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20760 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20762 (ix86_output_indirect_function_return): New prototype.
20763 (ix86_split_simple_return_pop_internal): Likewise.
20764 * config/i386/i386.c (indirect_return_via_cx): New.
20765 (indirect_return_via_cx_bnd): Likewise.
20766 (indirect_thunk_name): Handle return va CX_REG.
20767 (output_indirect_thunk_function): Create alias for
20768 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20769 (ix86_output_indirect_jmp): Remove the bool argument.
20770 (ix86_output_indirect_function_return): New function.
20771 (ix86_split_simple_return_pop_internal): Likewise.
20772 * config/i386/i386.md (*indirect_jump): Don't pass false
20773 to ix86_output_indirect_jmp.
20774 (*tablejump_1): Likewise.
20775 (simple_return_pop_internal): Change it to define_insn_and_split.
20776 Call ix86_split_simple_return_pop_internal to split it for
20777 -mfunction-return=.
20778 (simple_return_indirect_internal): Call
20779 ix86_output_indirect_function_return instead of
20780 ix86_output_indirect_jmp.
20782 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20785 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20786 memset and value initialization afterwards.
20788 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20790 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20792 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20795 * common/config/aarch64/aarch64-common.c
20796 (aarch_option_optimization_table[]): Switch
20797 off fomit-frame-pointer
20799 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20800 Chung-Ju Wu <jasonwucj@gmail.com>
20802 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20804 (store_multiple): Ditto.
20806 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20808 * config.gcc: Add --with-cpu support for nds32 target.
20809 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20810 * config/nds32/nds32.opt: Add -mcpu= option.
20812 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20814 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20815 isel=yes): Warn for these deprecated options.
20817 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20819 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20820 ISA_2_5_MASKS_EMBEDDED.
20822 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20824 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20825 p->max as pointers rather than using iterative_hash_expr.
20827 2018-02-23 Carl Love <cel@us.ibm.com>
20829 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20830 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20832 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20833 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20834 P8V_BUILTIN_VEC_VUNSIGNED2.
20836 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20839 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20840 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20842 * lra-constraints.c (curr_insn_transform): Set up
20843 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20845 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20846 * lra-eliminations.c (spill_pseudos): Ditto.
20847 (process_insn_for_elimination): Ditto.
20848 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20849 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20850 LRA_NON_CLOBBERED_ALT.
20852 2018-02-22 Martin Sebor <msebor@redhat.com>
20854 PR tree-optimization/84480
20855 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20856 to maybe_diag_stxncpy_trunc. Call it.
20857 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20858 from gimple_fold_builtin_strcpy. Print inlining stack.
20859 (handle_builtin_stxncpy): Print inlining stack.
20860 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20862 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20865 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20866 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20867 and -fcheck-pointer-bounds are used together.
20868 (indirect_thunk_prefix): New enum.
20869 (indirect_thunk_need_prefix): New function.
20870 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20871 "_nt" instead of "_bnd" for NOTRACK prefix.
20872 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20873 (output_indirect_thunk_function): Likewise.
20875 (ix86_code_end): Update output_indirect_thunk_function calls.
20876 (ix86_output_indirect_branch_via_reg): Replace
20877 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20878 (ix86_output_indirect_branch_via_push): Likewise.
20879 (ix86_output_function_return): Likewise.
20880 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20881 incompatible with -fcf-protection=branch and
20882 -fcheck-pointer-bounds.
20884 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20887 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20888 Change gcc_assert call to output_operand_lossage.
20890 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20892 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20894 2018-02-22 DJ Delorie <dj@redhat.com>
20895 Sebastian Perta <sebastian.perta@renesas.com>
20896 Oleg Endo <olegendo@gcc.gnu.org>
20898 * config/rx/rx.c (rx_rtx_costs): New function.
20899 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20901 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20903 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20905 2018-02-22 Martin Liska <mliska@suse.cz>
20908 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20909 Add "native" as a possible value.
20911 2018-02-22 Martin Liska <mliska@suse.cz>
20914 * config/i386/i386.c (ix86_option_override_internal):
20915 Add "native" as a possible value for -march and -mtune.
20917 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20920 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20921 to all type variants.
20923 PR tree-optimization/84503
20924 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20925 width as info->bitpos + info->bitsize - start.
20926 (merged_store_group::merge_overlapping): Simplify width computation.
20927 (check_no_overlap): New function.
20928 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20929 start + width and last_order of the group, fail if check_no_overlap
20931 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20932 to group if check_no_overlap fails.
20934 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20936 * config/rs6000/altivec.md: Delete contraint arguments to
20937 define_expand, define_split, and define_peephole2, and in
20938 define_insn_and_split if always unused.
20939 * config/rs6000/darwin.md: Ditto.
20940 * config/rs6000/dfp.md: Ditto.
20941 * config/rs6000/rs6000.md: Ditto.
20942 * config/rs6000/sync.md: Ditto.
20943 * config/rs6000/vector.md: Ditto.
20944 * config/rs6000/vsx.md: Ditto.
20946 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20948 * config/rs6000/altivec.md: Write output control strings as braced
20949 blocks instead of double-quoted strings.
20950 * config/rs6000/darwin.md: Ditto.
20951 * config/rs6000/rs6000.md: Ditto.
20952 * config/rs6000/vector.md: Ditto.
20953 * config/rs6000/vsx.md: Ditto.
20955 2018-02-21 Jason Merrill <jason@redhat.com>
20957 PR c++/84314 - ICE with templates and fastcall attribute.
20958 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20960 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20962 * ipa-cp.c (determine_versionability): Fix comment typos.
20964 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20967 * ipa-cp.c (determine_versionability): Do not version functions caling
20970 2018-02-21 Martin Liska <mliska@suse.cz>
20973 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20974 Add "native" as a possible value.
20975 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20976 the macro when native cpu detection is available.
20978 2018-02-21 Martin Liska <mliska@suse.cz>
20981 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20982 Add "native" as a possible value.
20983 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20984 when native cpu detection is available.
20986 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20987 Martin Sebor <msebor@redhat.com>
20989 PR tree-optimization/84478
20990 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20992 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20993 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20994 support which is conservatively correct, for 2 only stay conservative
20995 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20996 argument to the 2 argument get_range_strlen, adjust 6 arg
20997 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20999 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
21000 (gimple_fold_builtin_strlen): Pass true as last argument to
21003 2018-02-20 Martin Sebor <msebor@redhat.com>
21005 PR middle-end/84095
21006 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
21007 (builtin_memref::set_base_and_offset): Same. Handle inner references.
21008 (builtin_memref::builtin_memref): Factor out parts into
21009 set_base_and_offset and call it.
21011 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
21013 PR middle-end/84406
21014 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
21015 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
21016 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
21017 search at the associated MODE_INT.
21019 2018-02-20 Jeff Law <law@redhat.com>
21021 PR middle-end/82123
21022 PR tree-optimization/81592
21023 PR middle-end/79257
21024 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
21025 for range data rather than using global data.
21026 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
21027 range data rather than using global data.
21028 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
21029 pass it to children as needed.
21030 (struct directive::fmtresult): Similarly.
21031 (struct directive::set_width): Similarly.
21032 (struct directive::set_precision): Similarly.
21033 (format_integer, format_directive, parse_directive): Similarly.
21034 (format_none): Accept unnamed vr_values parameter.
21035 (format_percent, format_floating, format_character): Similarly.
21036 (format_string, format_plain): Similarly.
21037 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
21038 the EVRP range analyzer for range data rather than using global data.
21039 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
21040 gimple-ssa-evrp-analyze.h
21041 (class sprintf_dom_walker): Add after_dom_children member function.
21042 Add evrp_range_analyzer member.
21043 (sprintf_dom_walker::before_dom_children): Call into the EVRP
21044 range analyzer as needed.
21045 (sprintf_dom_walker::after_dom_children): New member function.
21046 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
21048 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
21049 (evrp_range_analyzer::pop_to_marker): Likewise.
21051 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
21053 PR tree-optimization/84419
21054 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
21055 with the required type if its current type is compatible but
21058 2018-02-20 Jakub Jelinek <jakub@redhat.com>
21060 PR middle-end/82004
21061 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
21062 after vectorization.
21064 2018-02-20 Martin Liska <mliska@suse.cz>
21067 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
21068 possible values if we don't have a hint.
21070 2018-02-20 Martin Liska <mliska@suse.cz>
21074 * final.c (shorten_branches): Build align_tab array with one
21076 * opts.c (finish_options): Add alignment option limit check.
21077 (MAX_CODE_ALIGN): Likewise.
21078 (MAX_CODE_ALIGN_VALUE): Likewise.
21079 * doc/invoke.texi: Document maximum allowed option value for
21080 all -falign-* options.
21082 2018-02-19 Jakub Jelinek <jakub@redhat.com>
21085 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21086 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21087 * var-tracking.c (emit_note_insn_var_location): Remove all references
21088 to NOTE_INSN_CALL_ARG_LOCATION.
21089 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21090 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21091 Use copy_rtx_if_shared.
21092 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21093 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21094 (dwarf2out_var_location): Remove handling of
21095 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21097 * final.c (final_scan_insn): Remove all references to
21098 NOTE_INSN_CALL_ARG_LOCATION.
21099 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
21100 before dumping final insns.
21101 * except.c (emit_note_eh_region_end): Remove all references to
21102 NOTE_INSN_CALL_ARG_LOCATION.
21103 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21104 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21105 * config/arc/arc.c (hwloop_optimize): Likewise.
21106 * config/arm/arm.c (create_fix_barrier): Likewise.
21107 * config/s390/s390.c (s390_chunkify_start): Likewise.
21108 * config/sh/sh.c (find_barrier): Likewise.
21109 * config/i386/i386.c (rest_of_insert_endbranch,
21110 ix86_seh_fixup_eh_fallthru): Likewise.
21111 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21112 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21113 * config/frv/frv.c (frv_function_prologue): Likewise.
21114 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
21116 (note_outside_basic_block_p): Remove all references to
21117 NOTE_INSN_CALL_ARG_LOCATION.
21118 * gengtype.c (adjust_field_rtx_def): Likewise.
21119 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21121 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21122 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21125 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21128 PR tree-optimization/84452
21129 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21130 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21133 2018-02-19 Martin Liska <mliska@suse.cz>
21136 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21138 2018-02-19 Martin Liska <mliska@suse.cz>
21139 Richard Sandiford <richard.sandiford@linaro.org>
21141 PR tree-optimization/82491
21142 * gimple-fold.c (get_base_constructor): Make earlier bail out
21145 2018-02-19 Carl Love <cel@us.ibm.com>
21147 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21148 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21150 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21151 P8V_BUILTIN_VEC_NEG.
21153 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
21155 * config/rl78/rl78.md (movdf): New define expand.
21157 2018-02-19 Martin Liska <mliska@suse.cz>
21160 * doc/invoke.texi: Fix typo.
21161 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21163 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
21165 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21166 handle rs6000_single_float and rs6000_double_float specially for
21169 2018-02-16 Jeff Law <law@redhat.com>
21171 * config/rx/rx.c (add_pop_cfi_notes): New function.;
21172 (pop_regs): Use it.
21174 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21177 * ipa-inline.c (inline_small_functions): Fix a typo.
21179 2018-02-16 Nathan Sidwell <nathan@acm.org>
21181 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21183 2018-02-16 Carl Love <cel@us.ibm.com>
21185 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21186 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21187 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21188 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21189 expansion to P8V_BUILTIN_VEC_FLOAT2.
21191 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
21193 PR rtl-optimization/70023
21194 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21195 src_regno into account.
21197 2018-02-16 Carl Love <cel@us.ibm.com>
21199 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21200 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21201 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21202 * config/rs6000/rs6000.c: Remove case statements for
21203 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21204 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21205 and P9V_BUILTIN_VEC_VINSERT4B.
21206 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21207 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21208 * config/rs6000/vsx.md:
21209 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21212 2018-02-16 Carl Love <cel@us.ibm.com>
21214 * config/rs6000/altivec.h: Add builtin names vec_extract4b
21216 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21218 * config/rs6000/rs6000-c.c: Add the definitions for
21219 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21220 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21221 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21222 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
21223 definition for insert4b and define insn *insert3b_internal.
21224 * doc/extend.texi: Add documentation for vec_extract4b.
21226 2018-02-16 Nathan Sidwell <nathan@acm.org>
21228 * doc/extend.texi (Backwards Compatibility): Mention friend
21229 injection. Note for-scope is deprecated.
21230 * doc/invoke.texi (-ffriend-injection): Deprecate.
21232 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
21234 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21235 that moved to I2, also allow destinations that are a paradoxical
21236 subreg (instead of a normal reg).
21238 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
21241 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21244 2018-02-16 Richard Biener <rguenther@suse.de>
21246 PR tree-optimization/84037
21247 PR tree-optimization/84016
21249 * config/i386/i386.c (ix86_builtin_vectorization_cost):
21250 Adjust vec_construct for the fact we need additional higher latency
21251 128bit inserts for AVX256 and AVX512 vector builds.
21252 (ix86_add_stmt_cost): Scale vector construction cost for
21255 2018-02-16 Richard Biener <rguenther@suse.de>
21257 PR tree-optimization/84417
21258 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21259 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21260 (non_rewritable_lvalue_p): Likewise, use poly-ints.
21262 2018-02-16 Martin Liska <mliska@suse.cz>
21265 * internal-fn.def (ASAN_CHECK): Set proper flags.
21266 (ASAN_MARK): Likewise.
21268 2018-02-16 Julia Koval <julia.koval@intel.com>
21270 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21271 from PTA_CANNONLAKE.
21273 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21276 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21277 Use ++iter rather than iter++ for std::list iterators.
21278 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
21279 defer deleting them until all nodes in the forest are processed. Do
21280 free even leaf nodes. Change to_process into auto_vec.
21283 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21284 * vec.h (vec_default_construct): Use memset instead of placement new
21285 if BROKEN_VALUE_INITIALIZATION is defined.
21286 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21287 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21290 PR rtl-optimization/83723
21291 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21292 * lra.c (lra_substitute_pseudo): Likewise. If true, use
21293 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
21295 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21297 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21299 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
21301 PR rtl-optimization/81443
21302 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21303 from inner REGs to paradoxical SUBREGs.
21305 2018-02-16 Richard Biener <rguenther@suse.de>
21307 PR tree-optimization/84399
21308 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21309 For operands we can analyze at their definition make sure we can
21310 analyze them at each use as well.
21312 2018-02-16 Richard Biener <rguenther@suse.de>
21314 PR tree-optimization/84190
21315 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21316 volatile accesses if the decl isn't volatile.
21318 2018-02-15 Jason Merrill <jason@redhat.com>
21320 PR c++/84314 - ICE with templates and fastcall attribute.
21321 * attribs.c (build_type_attribute_qual_variant): Don't clobber
21322 TYPE_CANONICAL on an existing type.
21324 2018-02-15 Jakub Jelinek <jakub@redhat.com>
21326 PR tree-optimization/84383
21327 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21328 dstoff nor call operand_equal_p if dstbase is NULL.
21330 PR tree-optimization/84334
21331 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21332 also a CONSTANT_CLASS_P, punt.
21334 2018-02-14 Jim Wilson <jimw@sifive.com>
21336 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21337 first SMALL_OPERAND check. New local min_second_step. Move assert
21338 to where locals are set. Add TARGET_RVC support.
21339 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21341 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
21343 * doc/invoke.texi: Correct -Wformat-overflow code sample.
21345 2018-02-14 Martin Sebor <msebor@redhat.com>
21347 PR tree-optimization/83698
21348 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21349 arrays constrain the offset range to their bounds.
21350 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21351 (builtin_access::overlap): Avoid setting the size of overlap if it's
21353 (maybe_diag_overlap): Also consider arrays when deciding what values
21354 of offsets to include in diagnostics.
21356 2018-02-14 Martin Sebor <msebor@redhat.com>
21359 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21360 that correspond to the kind of a declaration.
21362 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
21365 * config/pa/pa.md: Load address of PIC label using the linkage table
21366 if the label is nonlocal.
21368 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
21370 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21371 warning message if user requests -maltivec=be.
21372 * doc/invoke.texi: Document deprecation of -maltivec=be.
21374 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
21377 * config/rs6000/rs6000-c.c: Update definitions for
21378 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21379 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21381 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21384 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21385 add _get_ssp intrinsics. Remove argument from
21386 __builtin_ia32_rdssp[d|q].
21387 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21388 * config/i386/i386-builtin.def: Remove argument from
21389 __builtin_ia32_rdssp[d|q].
21390 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21391 ix86_expand_special_args_builtin for _rdssp[d|q].
21392 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21393 Clear register before usage.
21394 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21395 Add documentation for new _get_ssp and _inc_ssp intrinsics.
21397 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
21399 PR tree-optimization/84357
21400 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21401 operand 1 of an ARRAY_REF too.
21403 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
21406 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21407 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21409 (set_of_reg): New struct.
21410 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21411 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21412 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21414 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21415 Split into bitclr, bitset, bitinvert patterns if appropriate.
21416 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21417 use rx_fuse_in_memory_bitop.
21418 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21419 to named insn, correct maximum insn length.
21421 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
21424 * machmode.def: Define a complex mode for PARTIAL_INT.
21425 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21427 * doc/rtl.texi: Document CSPImode.
21428 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21430 (msp430_hard_regno_nregs_with_padding): Likewise.
21432 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21435 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21437 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21439 PR rtl-optimization/84169
21440 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21441 we generated a parallel as new i3 and we split that to new i2 and i3
21442 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21443 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21444 those to i2, not i1. Partially rewrite this scan code.
21446 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21449 * stor-layout.c (place_field): For variable length fields, adjust
21450 offset_align afterwards not just based on the field's alignment,
21451 but also on the size.
21453 PR middle-end/84309
21454 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21455 of exps and logs in the use_exp2 case.
21457 2018-02-13 Jeff Law <law@redhat.com>
21459 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21460 entry for "vector".
21462 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21465 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21469 * common.opt (gas-loc-support, gas-locview-support): New.
21470 (ginline-points, ginternal-reset-location-views): New.
21471 * doc/invoke.texi: Document them. Use @itemx where intended.
21472 (gvariable-location-views): Adjust.
21473 * target.def (reset_location_view): New.
21474 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21475 (TARGET_RESET_LOCATION_VIEW): New.
21476 * doc/tm.texi: Rebuilt.
21477 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21478 (dwarf2out_default_as_locview_support): New.
21479 (output_asm_line_debug_info): Use option variables.
21480 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21481 (output_loc_list): Likewise.
21482 (add_high_low_attributes): Check option variables.
21483 Don't output entry view attribute in strict mode.
21484 (gen_inlined_subroutine_die): Check option variables.
21485 (dwarf2out_inline_entry): Likewise.
21486 (init_sections_and_labels): Likewise.
21487 (dwarf2out_early_finish): Likewise.
21488 (maybe_reset_location_view): New, from...
21489 (dwarf2out_var_location): ... here. Call it.
21490 * debug.h (dwarf2out_default_as_loc_support): Declare.
21491 (dwarf2out_default_as_locview_support): Declare.
21492 * hooks.c (hook_int_rtx_insn_0): New.
21493 * hooks.h (hook_int_rtx_insn_0): Declare.
21494 * toplev.c (process_options): Take -gas-loc-support and
21495 -gas-locview-support from dwarf2out. Enable
21496 -gvariable-location-views by default only with locview
21497 assembler support. Enable -ginternal-reset-location-views by
21498 default only if the target defines the corresponding hook.
21499 Enable -ginline-points by default if location views are
21500 enabled; force it disabled if statement frontiers are
21502 * tree-inline.c (expand_call_inline): Check option variables.
21503 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21505 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
21507 PR tree-optimization/84321
21508 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21509 handling. Also check whether the anti-range contains any values
21510 that satisfy the mask; switch to a VR_RANGE if not.
21512 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
21515 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21517 2018-02-13 Martin Jambor <mjambor@suse.cz>
21520 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21521 of call statements, also set location of a load to a temporary.
21523 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
21525 * config/rl78/rl78.c (add_vector_labels): New function.
21526 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21527 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21528 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21529 which checks that no arguments are passed.
21530 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21531 * doc/extend.texi: Documentation for the new attribute.
21533 2018-02-13 Andreas Schwab <schwab@suse.de>
21535 * config/riscv/linux.h (CPP_SPEC): Define.
21537 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21540 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21541 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21542 OPTION_MASK_ISA_AES as first argument to def_builtin_const
21543 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21544 instead of OPTION_MASK_ISA_PCLMUL as first argument to
21545 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21546 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21547 temporarily for AES and PCLMUL builtins.
21549 PR tree-optimization/84339
21550 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21551 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21554 PR middle-end/84309
21555 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21556 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21557 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21559 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21561 * omp-simd-clone.h: New file.
21562 * omp-simd-clone.c: Include omp-simd-clone.h.
21563 (expand_simd_clones): No longer static.
21564 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21565 cgraph.h and omp-simd-clone.h.
21566 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21567 (vect_recog_widen_shift_pattern): Formatting fix.
21568 (vect_pattern_recog_1): Don't check optab for calls.
21571 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21572 operands[2] into a REG before using gen_lowpart on it.
21574 2018-02-12 Jeff Law <law@redhat.com>
21577 * config/sh/sh.c (find_barrier): Consider a sibling call
21580 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21581 successfully back substituting a reg.
21583 2018-02-12 Richard Biener <rguenther@suse.de>
21585 PR tree-optimization/84037
21586 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21587 parameter, move visited init to caller.
21588 (vect_slp_analyze_operations): Separate cost from validity
21589 check, initialize visited once for all instances.
21590 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21592 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21594 (vect_model_promotion_demotion_cost): Likewise.
21595 (vectorizable_bswap): Guard cost modeling with !slp_node
21596 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21598 (vectorizable_call): Likewise.
21599 (vectorizable_conversion): Likewise.
21600 (vectorizable_assignment): Likewise.
21601 (vectorizable_shift): Likewise.
21602 (vectorizable_operation): Likewise.
21603 (vectorizable_store): Likewise.
21604 (vectorizable_load): Likewise.
21605 (vectorizable_condition): Likewise.
21606 (vectorizable_comparison): Likewise.
21608 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21611 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21612 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21613 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21615 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21617 PR middle-end/83665
21618 * params.def (inline-min-speedup): Increase from 8 to 15.
21619 (max-inline-insns-auto): Decrease from 40 to 30.
21620 * ipa-split.c (consider_split): Add some buffer for function to
21621 be considered inlining candidate.
21622 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21625 2018-02-12 Richard Biener <rguenther@suse.de>
21627 PR tree-optimization/84037
21628 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21629 matched stmts if we cannot swap the non-matched ones.
21631 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21633 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21634 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21635 _mm_maskz_scalef_round_ss): New intrinsics.
21636 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21637 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21638 __builtin_ia32_scalefss_round): Remove.
21639 (__builtin_ia32_scalefsd_mask_round,
21640 __builtin_ia32_scalefss_mask_round): New intrinsics.
21641 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21642 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21643 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21644 "<round_constraint>")): Changed to ...
21645 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21646 "<round_scalar_constraint>")): ... this.
21647 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21648 %0, %1, %2<round_op3>}"): Changed to ...
21649 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21650 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21651 %2<round_scalar_mask_op3>}"): ... this.
21652 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21654 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21656 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21657 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21658 (_mm_maskz_sqrt_round_ss): New intrinsics.
21659 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21660 (__builtin_ia32_sqrtsd_mask_round)
21661 (__builtin_ia32_sqrtss_mask_round): New builtins.
21662 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21663 (__builtin_ia32_sqrtss_round): Remove.
21664 (__builtin_ia32_sqrtsd_mask_round)
21665 (__builtin_ia32_sqrtss_mask_round): New builtins.
21666 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21667 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21668 ((match_operand:VF_128 1 "vector_operand"
21669 "xBm,<round_constraint>")): Changed to ...
21670 ((match_operand:VF_128 1 "vector_operand"
21671 "xBm,<round_scalar_constraint>")): ... this.
21672 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21673 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21674 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21675 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21676 %<iptr>1<round_scalar_mask_op3>}): ... this.
21677 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21678 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21680 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21683 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21684 Cast vec_cmpeq result to correct type.
21685 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21686 Cast vec_cmpgt result to correct type.
21688 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21690 * final.c (final_scan_insn_1): Renamed from...
21691 (final_scan_insn): ... this. New wrapper, to recover
21692 seen from the outermost call in recursive ones.
21693 * config/sparc/sparc.c (output_return): Drop seen from call.
21694 (output_sibcall): Likewise.
21695 * config/visium/visium.c (output_branch): Likewise.
21697 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21699 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21702 2018-02-10 Alan Modra <amodra@gmail.com>
21705 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21706 Specify LR as an input.
21708 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21711 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21712 remove_member_access_dummy_vars): New functions.
21713 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21714 lower_omp_1, execute_lower_omp): Use them.
21716 PR rtl-optimization/84308
21717 * shrink-wrap.c (spread_components): Release todo vector.
21719 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21721 PR rtl-optimization/57193
21722 * ira-color.c (struct allocno_color_data): Add member
21723 conflict_allocno_hard_prefs.
21724 (update_conflict_allocno_hard_prefs): New.
21725 (bucket_allocno_compare_func): Add a preference based on
21726 conflict_allocno_hard_prefs.
21727 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21728 (color_allocnos): Remove a dead code. Initiate
21729 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21731 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21734 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21735 constraint from =wa to wa. Avoid a subreg on the output operand,
21736 instead use a pseudo and subreg it in a move.
21737 (p9_xxbrd_<mode>): Changed to ...
21738 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21739 (p9_xxbrd_v2df): New expander.
21740 (p9_xxbrw_<mode>): Changed to ...
21741 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21742 (p9_xxbrw_v4sf): New expander.
21744 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21746 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21748 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21751 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21752 multiply in 32-bit mode.
21753 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21754 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21757 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21759 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21760 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21761 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21762 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21764 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21767 * dwarf2out.c (is_trivial_indirect_ref): New function.
21768 (dwarf2out_late_global_decl): Do not generate a location
21769 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21770 and that are not defined in the current unit.
21772 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21774 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21775 instead of a libcall for UNORDERED.
21777 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21780 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21781 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21783 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21786 * config/s390/s390.c (s390_set_current_function): Invoke
21787 s390_indirect_branch_settings also if fndecl didn't change.
21789 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21791 * config/rs6000/rs6000.md (blockage): Set length to zero.
21793 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21795 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21797 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21800 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21801 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21805 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21806 PARALLEL incoming that failed vt_get_decl_and_offset check.
21808 PR middle-end/84237
21809 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21810 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21812 (get_variable_section): For decls in named .bss* sections pass true as
21813 second argument to bss_initializer_p.
21815 2018-02-09 Marek Polacek <polacek@redhat.com>
21816 Jakub Jelinek <jakub@redhat.com>
21819 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21820 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21821 Sync some changes from cxx_fold_indirect_ref.
21823 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21825 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21827 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21828 (BLOCK_INLINE_ENTRY_LABEL): New.
21829 (dwarf2out_var_location): Disregard inline entry markers.
21830 (inline_entry_data): New struct.
21831 (inline_entry_data_hasher): New hashtable type.
21832 (inline_entry_data_hasher::hash): New.
21833 (inline_entry_data_hasher::equal): New.
21834 (inline_entry_data_table): New variable.
21835 (add_high_low_attributes): Add DW_AT_entry_pc and
21836 DW_AT_GNU_entry_view attributes if a pending entry is found
21837 in inline_entry_data_table. Add old entry_pc attribute only
21838 if debug nonbinding markers are disabled.
21839 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21840 markers are enabled.
21841 (block_within_block_p, dwarf2out_inline_entry): New.
21842 (dwarf2out_finish): Check that no entries remained in
21843 inline_entry_data_table.
21844 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21845 (final_scan_insn, notice_source_line): Likewise.
21846 (rest_of_clean_state): Skip inline entry markers.
21847 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21849 * gimple.c (gimple_build_debug_inline_entry): New.
21850 * gimple.h (enum gimple_debug_subcode): Add
21851 GIMPLE_DEBUG_INLINE_ENTRY.
21852 (gimple_build_debug_inline_entry): Declare.
21853 (gimple_debug_inline_entry_p): New.
21854 (gimple_debug_nonbind_marker_p): Adjust.
21855 * insn-notes.def (INLINE_ENTRY): New.
21856 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21857 inline entry marker notes.
21858 (print_insn): Likewise.
21859 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21860 (INSN_DEBUG_MARKER_KIND): Likewise.
21861 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21862 * tree-inline.c (expand_call_inline): Build and insert
21863 debug_inline_entry stmt.
21864 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21865 inline entry blocks early, if nonbind markers are enabled.
21866 (dump_scope_block): Dump fragment info.
21867 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21868 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21869 (gimple_build_debug_inline_entry): New.
21870 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21871 Enable/disable inline entry points too.
21872 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21873 (DEBUG_INSN): Describe inline entry markers.
21875 * common.opt (gvariable-location-views): New.
21876 (gvariable-location-views=incompat5): New.
21877 * config.in: Rebuilt.
21878 * configure: Rebuilt.
21879 * configure.ac: Test assembler for view support.
21880 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21881 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21882 * dwarf2out.c (var_loc_view): New typedef.
21883 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21884 (dwarf2out_locviews_in_attribute): New.
21885 (dwarf2out_locviews_in_loclist): New.
21886 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21887 (enum dw_line_info_opcode): Add LI_adv_address.
21888 (struct dw_line_info_table): Add view.
21889 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21890 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21891 (zero_view_p): New variable.
21892 (ZERO_VIEW_P): New macro.
21893 (output_asm_line_debug_info): New.
21894 (struct var_loc_node): Add view.
21895 (add_AT_view_list, AT_loc_list): New.
21896 (add_var_loc_to_decl): Add view param. Test it against last.
21897 (new_loc_list): Add view params. Record them.
21898 (AT_loc_list_ptr): Handle loc and view lists.
21899 (view_list_to_loc_list_val_node): New.
21900 (print_dw_val): Handle dw_val_class_view_list.
21901 (size_of_die): Likewise.
21902 (value_format): Likewise.
21903 (loc_list_has_views): New.
21904 (gen_llsym): Set vl_symbol too.
21905 (maybe_gen_llsym, skip_loc_list_entry): New.
21906 (dwarf2out_maybe_output_loclist_view_pair): New.
21907 (output_loc_list): Output view list or entries too.
21908 (output_view_list_offset): New.
21909 (output_die): Handle dw_val_class_view_list.
21910 (output_dwarf_version): New.
21911 (output_compilation_unit_header): Use it.
21912 (output_skeleton_debug_sections): Likewise.
21913 (output_rnglists, output_line_info): Likewise.
21914 (output_pubnames, output_aranges): Update version comments.
21915 (output_one_line_info_table): Output view numbers in asm comments.
21916 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21917 Call maybe_gen_llsym.
21918 (loc_list_from_tree_1): Adjust.
21919 (add_AT_location_description): Create view list attribute if
21920 needed, check it's absent otherwise.
21921 (convert_cfa_to_fb_loc_list): Adjust.
21922 (maybe_emit_file): Call output_asm_line_debug_info for test.
21923 (dwarf2out_var_location): Reset views as needed. Precompute
21924 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21925 attribute. Set view.
21926 (new_line_info_table): Reset next view.
21927 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21928 (dwarf2out_source_line): Likewise. Output view resets and labels to
21929 the assembler, or select appropriate line info opcodes.
21930 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21931 (optimize_string_length): Catch it. Adjust.
21932 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21933 dw_val_class_view_list, and remove it if no longer needed.
21934 (hash_loc_list): Hash view numbers.
21935 (loc_list_hasher::equal): Compare them.
21936 (optimize_location_lists): Check whether a view list symbol is
21937 needed, and whether the locview attribute is present, and
21938 whether they match. Remove the locview attribute if no longer
21940 (index_location_lists): Call skip_loc_list_entry for test.
21941 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21942 Use output_dwarf_version.
21943 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21944 (struct dw_val_node): Add val_view_list.
21945 * final.c (SEEN_NEXT_VIEW): New.
21946 (set_next_view_needed): New.
21947 (clear_next_view_needed): New.
21948 (maybe_output_next_view): New.
21949 (final_start_function): Rename to...
21950 (final_start_function_1): ... this. Take pointer to FIRST,
21951 add SEEN parameter. Emit param bindings in the initial view.
21952 (final_start_function): Reintroduce SEEN-less interface.
21953 (final): Rename to...
21954 (final_1): ... this. Take SEEN parameter. Output final pending
21955 next view at the end.
21956 (final): Reintroduce seen-less interface.
21957 (final_scan_insn): Output pending next view before switching
21958 sections or ending a block. Mark the next view as needed when
21959 outputting variable locations. Notify debug backend of section
21960 changes, and of location view changes.
21961 (rest_of_handle_final): Adjust.
21962 * toplev.c (process_options): Autodetect value for debug variable
21963 location views option. Warn on incompat5 without -gdwarf-5.
21964 * doc/invoke.texi (gvariable-location-views): New.
21965 (gvariable-location-views=incompat5): New.
21966 (gno-variable-location-views): New.
21968 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21970 PR tree-optimization/84136
21971 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21972 that the result of find_edge is non-NULL.
21974 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21977 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21978 storing integer register in SImode. Fix cost of 256 and 512
21979 byte aligned SSE register store.
21981 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21983 * config/i386/i386.c (ix86_multiplication_cost): Fix
21984 multiplication cost for TARGET_AVX512DQ.
21986 2018-02-08 Marek Polacek <polacek@redhat.com>
21988 PR tree-optimization/84238
21989 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21992 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21994 PR tree-optimization/84265
21995 * tree-vect-stmts.c (vectorizable_store): Don't treat
21996 VMAT_CONTIGUOUS accesses as grouped.
21997 (vectorizable_load): Likewise.
21999 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
22001 PR tree-optimization/81635
22002 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
22003 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
22004 (test_round_for_mask): New functions.
22005 (wide_int_cc_tests): Call test_round_for_mask.
22006 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
22007 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
22008 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
22009 range returned by get_range_info.
22011 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22014 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
22015 * symtab.c: Include builtins.h
22016 (symtab_node::output_to_lto_symbol_table_p): Move here
22017 from lto-streamer-out.c:output_symbol_p.
22018 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
22019 (output_symbol_p): Move all logic to symtab.c
22020 (produce_symtab): Update.
22022 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22024 * config/s390/s390-opts.h (enum indirect_branch): Define.
22025 * config/s390/s390-protos.h (s390_return_addr_from_memory)
22026 (s390_indirect_branch_via_thunk)
22027 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
22028 (enum s390_indirect_branch_type): Define.
22029 * config/s390/s390.c (struct s390_frame_layout, struct
22030 machine_function): Remove.
22031 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
22032 (indirect_branch_table_label_no, indirect_branch_table_name):
22034 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
22035 (enum s390_indirect_branch_option): Define.
22036 (s390_return_addr_from_memory): New function.
22037 (s390_handle_string_attribute): New function.
22038 (s390_attribute_table): Add new attribute handler.
22039 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
22040 (s390_indirect_branch_via_thunk): New function.
22041 (s390_indirect_branch_via_inline_thunk): New function.
22042 (s390_function_ok_for_sibcall): When jumping via thunk disallow
22043 sibling call optimization for non z10 compiles.
22044 (s390_emit_call): Force indirect branch target to be a single
22045 register. Add r1 clobber for non-z10 compiles.
22046 (s390_emit_epilogue): Emit return jump via return_use expander.
22047 (s390_reorg): Handle JUMP_INSNs as execute targets.
22048 (s390_option_override_internal): Perform validity checks for the
22049 new command line options.
22050 (s390_indirect_branch_attrvalue): New function.
22051 (s390_indirect_branch_settings): New function.
22052 (s390_set_current_function): Invoke s390_indirect_branch_settings.
22053 (s390_output_indirect_thunk_function): New function.
22054 (s390_code_end): Implement target hook.
22055 (s390_case_values_threshold): Implement target hook.
22056 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
22058 * config/s390/s390.h (struct s390_frame_layout)
22059 (struct machine_function): Move here from s390.c.
22060 (TARGET_INDIRECT_BRANCH_NOBP_RET)
22061 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
22062 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
22063 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
22064 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
22065 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
22066 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
22067 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
22068 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
22069 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
22070 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
22071 (mnemonic attribute): Add values which aren't recognized
22073 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
22074 pattern for branch conversion. Fix mnemonic attribute.
22075 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
22076 indirect branch via thunk if requested.
22077 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
22078 ("*indirect_jump"): Disable for branch conversion using out of
22080 ("indirect_jump_via_thunk<mode>_z10")
22081 ("indirect_jump_via_thunk<mode>")
22082 ("indirect_jump_via_inlinethunk<mode>_z10")
22083 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22084 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22085 ("casesi_jump_via_inlinethunk<mode>_z10")
22086 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22087 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22088 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22089 ("*indirect2_jump"): Disable for branch conversion.
22090 ("casesi_jump"): Turn into expander and expand patterns for branch
22092 ("return_use"): New expander.
22093 ("*return"): Emit return via thunk and rename it to ...
22094 ("*return<mode>"): ... this one.
22095 * config/s390/s390.opt: Add new options and and enum for the
22098 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
22100 * lra-constraints.c (match_reload): Unconditionally use
22101 gen_lowpart_SUBREG, rather than selecting between that
22102 and equivalent gen_rtx_SUBREG code.
22104 2018-02-08 Richard Biener <rguenther@suse.de>
22106 PR tree-optimization/84233
22107 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22108 changed flag instead of boguously re-using phi_inserted.
22110 2018-02-08 Martin Jambor <mjambor@suse.cz>
22112 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22113 static local variables.
22115 2018-02-08 Richard Biener <rguenther@suse.de>
22117 PR tree-optimization/84278
22118 * tree-vect-stmts.c (vectorizable_store): When looking for
22119 smaller vector types to perform grouped strided loads/stores
22120 make sure the mode is supported by the target.
22121 (vectorizable_load): Likewise.
22123 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
22125 * config/aarch64/aarch64.c (aarch64_components_for_bb):
22126 Increase LDP/STP opportunities by adding adjacent callee-saves.
22128 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
22130 PR rtl-optimization/84068
22131 PR rtl-optimization/83459
22132 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22134 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
22136 PR tree-optimization/84224
22137 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22138 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22139 non-zero arguments.
22141 2018-02-07 Iain Sandoe <iain@codesourcery.com>
22144 * config/rs6000/altivec.md (*restore_world): Remove LR use.
22145 * config/rs6000/predicates.md (restore_world_operation): Adjust op
22146 count, remove one USE.
22148 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
22150 * doc/install.texi (Configuration): Document the
22151 --with-long-double-format={ibm,ieee} PowerPC configuration
22155 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22156 Convert from define_expand to be define_insn_and_split. Rework
22157 float/double/_Float128 conversions to QI/HI/SImode to work with
22158 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
22159 conversions to QI/HImode types did a store and then a load to
22160 truncate the value. For conversions to VSX registers, don't split
22161 the insn, instead emit the code directly. Use the code iterator
22162 any_fix to combine signed and unsigned conversions.
22163 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22164 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22165 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22166 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22167 (fix_<mode>di2_hw): Likewise.
22168 (fixuns_<mode>di2_hw): Likewise.
22169 (fix_<mode>si2_hw): Likewise.
22170 (fixuns_<mode>si2_hw): Likewise.
22171 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22172 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22173 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22174 fix<uns>_trunc<SFDF:mode>si2_p8.
22175 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22176 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22177 (fix<uns>_<mode>_mem): Likewise.
22178 (fctiw<u>z_<mode>_mem): Likewise.
22179 (fix<uns>_<mode>_mem): Likewise.
22180 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22181 the register allocator from doing a direct move to the GPRs to do
22182 a store, and instead use the ISA 3.0 store byte/half-word from
22183 vector register instruction. For IEEE 128-bit floating point,
22184 also optimize stores of 32-bit ints.
22185 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22187 2018-02-07 Alan Hayward <alan.hayward@arm.com>
22189 * genextract.c (push_pathstr_operand): New function to support
22191 (walk_rtx): Call push_pathstr_operand.
22192 (print_path): Support [a-zA-Z].
22194 2018-02-07 Richard Biener <rguenther@suse.de>
22196 PR tree-optimization/84037
22197 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22198 (cse_and_gimplify_to_preheader): Declare.
22199 (vect_get_place_in_interleaving_chain): Likewise.
22200 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22202 (_loop_vec_info::~_loop_vec_info): Delete it.
22203 (cse_and_gimplify_to_preheader): New function.
22204 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22205 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22206 (vectorizable_load): Likewise. For grouped stores always base
22207 the IV on the first element.
22208 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22209 condition before gimplifying.
22211 2018-02-07 Jakub Jelinek <jakub@redhat.com>
22213 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22214 *DIV_EXPR and *MOD_EXPR.
22216 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
22219 * config/i386/i386.c (ix86_option_override_internal): Mask out
22220 the CF_SET bit when checking -fcf-protection.
22222 2018-02-07 Tom de Vries <tom@codesourcery.com>
22225 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22228 2018-02-07 Richard Biener <rguenther@suse.de>
22230 PR tree-optimization/84204
22231 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22234 PR tree-optimization/84205
22235 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22236 special-case isl_ast_op_zdiv_r.
22238 PR tree-optimization/84223
22239 * graphite-scop-detection.c (gather_bbs::before_dom_children):
22240 Only add conditions from within the region.
22241 (gather_bbs::after_dom_children): Adjust.
22243 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
22246 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22247 * config/avr/avr.md: Only post-reload split REG-REG moves if
22248 either register is GENERAL_REG_P.
22250 2018-02-07 Jakub Jelinek <jakub@redhat.com>
22252 PR tree-optimization/84235
22253 * tree-ssa-scopedtables.c
22254 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22255 if the subtraction is performed in floating point type where NaNs are
22256 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22257 build 1. Formatting fix.
22259 2018-02-06 Jakub Jelinek <jakub@redhat.com>
22262 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22263 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22264 and skip it regardless of bb boundaries. Use CALL_P macro,
22265 don't test INSN_P (insn) together with CALL_P or JUMP_P check
22266 unnecessarily, formatting fix.
22268 2018-02-06 Michael Collison <michael.collison@arm.com>
22270 * config/arm/thumb2.md:
22271 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22272 (*thumb_mov_notscc): Ditto.
22274 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
22277 * config/rs6000/rs6000.md (su code attribute): Use "u" for
22278 unsigned_fix, not "s".
22280 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22282 * configure.ac (gcc_fn_eh_frame_ro): New function.
22283 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22284 correct .eh_frame permissions.
22285 * configure: Regenerate.
22287 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
22289 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22290 irrelevant options.
22292 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22294 * config/rs6000/rs6000.c (rs6000_option_override_internal):
22295 Display warning message for -mno-speculate-indirect-jumps.
22297 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
22299 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22301 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22303 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
22305 PR tree-optimization/84225
22306 * tree-eh.c (find_trapping_overflow): Only call
22307 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22309 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22312 * config/i386/i386.c: Reimplement the check of possible options
22313 -mibt/-mshstk conbination. Change error messages.
22314 * doc/invoke.texi: Fix a typo: remove extra '='.
22316 2018-02-06 Marek Polacek <polacek@redhat.com>
22318 PR tree-optimization/84228
22319 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22321 2018-02-06 Tamar Christina <tamar.christina@arm.com>
22324 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22325 emitted arch directives.
22326 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22327 __ARM_FEATURE_COPROC before changing architectures.
22329 2018-02-06 Richard Biener <rguenther@suse.de>
22331 * config/i386/i386.c (print_reg): Fix typo.
22332 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22334 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
22336 * configure: Regenerate.
22338 2018-02-05 Martin Sebor <msebor@redhat.com>
22340 PR tree-optimization/83369
22341 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22344 2018-02-05 Martin Liska <mliska@suse.cz>
22346 * doc/invoke.texi: Cherry-pick upstream r323995.
22348 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
22350 * ira.c (ira_init_register_move_cost): Adjust comment.
22352 2018-02-05 Martin Liska <mliska@suse.cz>
22354 PR gcov-profile/84137
22355 * doc/gcov.texi: Fix typo in documentation.
22357 2018-02-05 Martin Liska <mliska@suse.cz>
22359 PR gcov-profile/83879
22360 * doc/gcov.texi: Document necessity of --dynamic-list-data when
22361 using dlopen functionality.
22363 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
22365 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22366 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22367 _mm_maskz_range_ss, _mm_mask_range_round_ss,
22368 _mm_maskz_range_round_ss): New intrinsics.
22369 (__builtin_ia32_rangesd128_round)
22370 (__builtin_ia32_rangess128_round): Remove.
22371 (__builtin_ia32_rangesd128_mask_round,
22372 __builtin_ia32_rangess128_mask_round): New builtins.
22373 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22374 __builtin_ia32_rangess128_round): Remove.
22375 (__builtin_ia32_rangesd128_mask_round,
22376 __builtin_ia32_rangess128_mask_round): New builtins.
22377 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22378 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22379 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22380 "<round_saeonly_constraint>")): Changed to ...
22381 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22382 "<round_saeonly_scalar_constraint>")): ... this.
22383 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22384 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22385 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22386 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22387 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22389 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
22391 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22393 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22394 Remove all values except native, 8540 and 8548.
22396 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
22398 * config/i386/i386.c (ix86_output_function_return): Pass
22399 INVALID_REGNUM, instead of -1, as invalid register number to
22400 indirect_thunk_name and output_indirect_thunk.
22402 2018-02-02 Julia Koval <julia.koval@intel.com>
22404 * config.gcc: Add -march=icelake.
22405 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22406 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22407 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22408 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22409 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22410 (processor_target_table): Add icelake.
22411 (ix86_option_override_internal): Handle new PTAs.
22412 (get_builtin_code_for_version): Handle icelake.
22413 (M_INTEL_COREI7_ICELAKE): New.
22414 (fold_builtin_cpu): Handle icelake.
22415 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22416 * doc/invoke.texi: Add -march=icelake.
22418 2018-02-02 Julia Koval <julia.koval@intel.com>
22420 * config/i386/i386.c (ix86_option_override_internal): Change flags type
22421 to wide_int_bitmask.
22422 * wide-int-bitmask.h: New.
22424 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22427 * config/i386/i386.md: Replace Pmode with word_mode in
22428 builtin_setjmp_setup and builtin_longjmp to support x32.
22430 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22434 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22436 (rs6000_supported_cpu_names): New static variable.
22437 (linux_cpu_translation_table): Likewise.
22438 (elf_platform) <cpu>: Define new static variable and use it.
22439 Translate kernel AT_PLATFORM name to canonical name if needed.
22440 Error if platform name is unknown.
22442 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22445 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22447 2018-02-01 Jeff Law <law@redhat.com>
22450 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22451 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22452 the scratch if RELEASE_VIA_POP is false.
22453 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22454 If we have to save a temporary register, decrement SIZE appropriately.
22455 Pass new arguments to release_scratch_register_on_entry.
22456 (ix86_adjust_stack_and_probe): Likewise.
22457 (ix86_emit_probe_stack_range): Pass new arguments to
22458 release_scratch_register_on_entry.
22460 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22462 PR rtl-optimization/84157
22463 * combine.c (change_zero_ext): Use REG_P predicate in
22464 front of HARD_REGISTER_P predicate.
22466 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22468 * config/avr/avr.c (avr_option_override): Move disabling of
22469 -fdelete-null-pointer-checks to...
22470 * common/config/avr/avr-common.c (avr_option_optimization_table):
22473 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22475 PR tree-optimization/81635
22476 * tree-data-ref.c (split_constant_offset_1): For types that
22477 wrap on overflow, try to use range info to prove that wrapping
22480 2018-02-01 Renlin Li <renlin.li@arm.com>
22483 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22484 TAILCALL_ADDR_REGS.
22485 (aarch64_register_move_cost): Likewise.
22486 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22487 TAILCALL_ADDR_REGS.
22488 (REG_CLASS_NAMES): Likewise.
22489 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22490 TAILCALL_ADDR_REGS. Remove IP registers.
22491 * config/aarch64/aarch64.md (Ucs): Update register constraint.
22493 2018-02-01 Richard Biener <rguenther@suse.de>
22495 * domwalk.h (dom_walker::dom_walker): Add additional constructor
22496 for specifying RPO order and allow NULL for that.
22497 * domwalk.c (dom_walker::dom_walker): Likewise.
22498 (dom_walker::walk): Handle NULL RPO order.
22499 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22501 (rewrite_update_dom_walker): Likewise.
22502 (mark_def_dom_walker): Likewise.
22504 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22506 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22507 (aarch64_maybe_expand_sve_subreg_move): Declare.
22508 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22509 * config/aarch64/predicates.md (aarch64_any_register_operand): New
22511 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22512 that are semantically a reverse operation.
22513 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22514 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22515 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22517 (aarch64_can_change_mode_class): For big-endian, forbid changes
22518 between two SVE modes if they have different element sizes.
22520 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22522 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22523 the TImode handling for big-endian targets.
22525 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22527 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22528 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
22530 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22531 Remove BSWAP handing for big-endian targets and use the form of
22532 LD1RQ appropariate for the mode.
22534 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22536 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22537 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22538 duplicated element.
22540 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22543 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22544 check for operands that need to go through aarch64_sve_reload_be.
22546 2018-02-01 Jakub Jelinek <jakub@redhat.com>
22548 PR tree-optimization/81661
22549 PR tree-optimization/84117
22550 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22551 * tree-eh.c: Include gimplify.h.
22552 (find_trapping_overflow, replace_trapping_overflow,
22553 rewrite_to_non_trapping_overflow): New functions.
22554 * tree-vect-loop.c: Include tree-eh.h.
22555 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22556 * tree-data-ref.c: Include tree-eh.h.
22557 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22559 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22561 PR rtl-optimization/84123
22562 * combine.c (change_zero_ext): Check if hard register satisfies
22563 can_change_dest_mode before calling gen_lowpart_SUBREG.
22565 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22568 * ira.c (ira_init_register_move_cost): Remove assert.
22570 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22572 PR rtl-optimization/84071
22573 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22574 * doc/tm.texi: Regenerate.
22576 2018-01-31 Richard Biener <rguenther@suse.de>
22578 PR tree-optimization/84132
22579 * tree-data-ref.c (analyze_miv_subscript): Properly
22580 check whether evolution_function_is_affine_multivariate_p
22581 before calling gcd_of_steps_may_divide_p.
22583 2018-01-31 Julia Koval <julia.koval@intel.com>
22586 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22587 * config/i386/i386.md (rdpid_rex64) New.
22588 (rdpid): Make 32bit only.
22590 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22593 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22594 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22596 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22599 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22601 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22603 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22605 PR rtl-optimization/84071
22606 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22607 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22609 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22611 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22612 (arc_attribute_table): Add 'aux' attribute.
22613 (arc_in_small_data_p): Consider aux like variables.
22614 (arc_is_aux_reg_p): New function.
22615 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22616 (arc_get_aux_arg): New function.
22617 (prepare_move_operands): Handle aux-register access.
22618 (arc_handle_aux_attribute): New function.
22619 * doc/extend.texi (ARC Variable attributes): Add subsection.
22621 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22623 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22624 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22625 (arc_attribute_table): Add 'uncached' attribute.
22626 (arc_print_operand): Print '.di' flag for uncached memory
22628 (arc_in_small_data_p): Do not consider for small data the uncached
22630 (arc_is_uncached_mem_p): New function.
22631 * config/arc/predicates.md (compact_store_memory_operand): Check
22632 for uncached memory accesses.
22633 (nonvol_nonimm_operand): Likewise.
22634 * doc/extend.texi (ARC Type Attribute): New subsection.
22636 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22639 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22640 falign-loops=): Add Optimization flag.
22642 2018-01-30 Jeff Law <law@redhat.com>
22645 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22646 INT_REGISTERS_SAVED. Check it prior to calling
22647 get_scratch_register_on_entry.
22648 (ix86_adjust_stack_and_probe): Similarly.
22649 (ix86_emit_probe_stack_range): Similarly.
22650 (ix86_expand_prologue): Corresponding changes.
22652 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22655 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22656 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22658 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22661 * lra-constraints.c (curr_insn_transform): Process AND in the
22664 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22666 PR rtl-optimization/83986
22667 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22668 dependence against last_pending_memory_flush in addition to
22669 pending_jump_insns.
22671 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22673 PR tree-optimization/81611
22674 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22677 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22680 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22683 2018-01-30 Richard Biener <rguenther@suse.de>
22684 Jakub Jelinek <jakub@redhat.com>
22686 PR tree-optimization/84111
22687 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22688 inner loops added during recursion, as they don't have up-to-date
22691 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22694 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22695 (can_inline_edge_by_limits_p): ... here.
22696 (can_early_inline_edge_p, check_callers,
22697 update_caller_keys, update_callee_keys, recursive_inlining,
22698 add_new_edges_to_heap, speculation_useful_p,
22699 inline_small_functions,
22700 inline_small_functions, flatten_function,
22701 inline_to_all_callers_1): Update.
22703 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22705 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22708 2018-01-30 Richard Biener <rguenther@suse.de>
22710 PR tree-optimization/83008
22711 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22712 invariant and constant vector uses in stmts when they need
22713 more than one stmt.
22715 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22718 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22719 * configure: Regenerate.
22721 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22723 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22725 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22726 Use gen_rtx_REG rather than gen_lowpart.
22728 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22730 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22731 rather than 0 when creating partial subregs.
22733 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22735 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22738 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22741 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22742 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22743 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22744 flags. This restores the settings used before the 2017-07-24.
22745 Turning off pre increment/decrement/modify allows IVOPTS to
22746 optimize DF/SF loops where the index is an int.
22748 2018-01-29 Richard Biener <rguenther@suse.de>
22749 Kelvin Nilsen <kelvin@gcc.gnu.org>
22752 * tree-vect-stmts.c (vectorizable_call): Don't call
22753 targetm.vectorize_builtin_md_vectorized_function if callee is
22756 2018-01-22 Carl Love <cel@us.ibm.com>
22758 * doc/extend.tex: Fix typo in second arg in
22759 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22761 2018-01-29 Richard Biener <rguenther@suse.de>
22763 PR tree-optimization/84086
22764 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22765 (flush_ssaname_freelist): When SSA names were released reset
22766 the SCEV hash table.
22768 2018-01-29 Richard Biener <rguenther@suse.de>
22770 PR tree-optimization/84057
22771 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22772 removed paths when removing edges.
22774 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22776 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22777 -mfunction-return=@var{choice}.
22779 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22781 PR diagnostic/84034
22782 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22783 Handle CR like TAB.
22784 (layout::print_source_line): Likewise.
22785 (test_get_line_width_without_trailing_whitespace): Add test cases.
22787 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22789 PR middle-end/84040
22790 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22793 2018-01-26 Jim Wilson <jimw@sifive.com>
22795 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22797 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22800 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22802 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22803 and CMP + SUB-immediate -> SUBS.
22805 2018-01-26 Martin Sebor <msebor@redhat.com>
22807 PR tree-optimization/83896
22808 * tree-ssa-strlen.c (get_string_len): Rename...
22809 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22810 Avoid assuming length is constant.
22811 (handle_char_store): Use HOST_WIDE_INT for string length.
22813 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22816 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22817 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22819 2018-01-26 Richard Biener <rguenther@suse.de>
22821 PR rtl-optimization/84003
22822 * dse.c (record_store): Only record redundant stores when
22823 the earlier store aliases at least all accesses the later one does.
22825 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22827 PR rtl-optimization/83985
22828 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22829 REG_CFA_RESTORE insns.
22830 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22831 REG_CFA_RESTORE insns here.
22834 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22835 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22837 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22839 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22840 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22841 (arc_init): Likewise.
22842 (arc_override_options): Likewise.
22843 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22845 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22847 * config/arc/arc.h (TARGET_DBNZ): Define.
22848 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22849 properly set the tune attribute.
22850 (dbnz): Use TARGET_DBNZ guard.
22851 * config/arc/arc.opt (mtune): Add core3 option.
22853 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22855 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22856 recognize new pic like addresses.
22857 (arc_delegitimize_address): Clean up.
22859 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22861 * config/arc/arc-arches.def: Option mrf16 valid for all
22863 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22864 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22865 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22866 * config/arc/arc-tables.opt: Regenerate.
22867 * config/arc/arc.c (arc_conditional_register_usage): Handle
22868 reduced register file case.
22869 (arc_file_start): Set must have build attributes.
22870 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22871 mrf16 option value.
22872 * config/arc/arc.opt (mrf16): Add new option.
22873 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22874 * config/arc/genmultilib.awk: Handle new mrf16 option.
22875 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22876 * config/arc/t-multilib: Regenerate.
22877 * doc/invoke.texi (ARC Options): Document mrf16 option.
22879 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22881 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22882 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22883 (arc_attribute_table): Add 'secure_call' attribute.
22884 (arc_print_operand): Print secure call operand.
22885 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22887 (arc_is_secure_call_p): New function. * config/arc/arc.md
22888 (call_i): Add support for sjli instruction.
22889 (call_value_i): Likewise.
22890 * config/arc/constraints.md (Csc): New constraint.
22892 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22893 John Eric Martin <John.Martin@emmicro-us.com>
22895 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22896 * config/arc/arc.c (_arc_jli_section): New struct.
22897 (arc_jli_section): New type.
22898 (rc_jli_sections): New static variable.
22899 (arc_handle_jli_attribute): New function.
22900 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22901 (arc_file_end): New function.
22902 (TARGET_ASM_FILE_END): Define.
22903 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22904 (arc_add_jli_section): New function.
22905 (jli_call_scan): Likewise.
22906 (arc_reorg): Call jli_call_scan.
22907 (arc_output_addsi): Remove 'S' from printing asm operand.
22908 (arc_is_jli_call_p): New function.
22909 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22911 (movhi_insn): Likewise.
22912 (movsi_insn): Likewise.
22913 (movsi_set_cc_insn): Likewise.
22914 (loadqi_update): Likewise.
22915 (load_zeroextendqisi_update): Likewise.
22916 (load_signextendqisi_update): Likewise.
22917 (loadhi_update): Likewise.
22918 (load_zeroextendhisi_update): Likewise.
22919 (load_signextendhisi_update): Likewise.
22920 (loadsi_update): Likewise.
22921 (loadsf_update): Likewise.
22922 (movsicc_insn): Likewise.
22923 (bset_insn): Likewise.
22924 (bxor_insn): Likewise.
22925 (bclr_insn): Likewise.
22926 (bmsk_insn): Likewise.
22927 (bicsi3_insn): Likewise.
22928 (cmpsi_cc_c_insn): Likewise.
22929 (movsi_ne): Likewise.
22930 (movsi_cond_exec): Likewise.
22931 (clrsbsi2): Likewise.
22932 (norm_f): Likewise.
22942 (call_i): Remove 'S' asm letter, add jli instruction.
22943 (call_value_i): Likewise.
22944 * config/arc/arc.op (mjli-always): New option.
22945 * config/arc/constraints.md (Cji): New constraint.
22946 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22948 (subsf3_fpx): Likewise.
22949 (mulsf3_fpx): Likewise.
22950 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22952 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22953 function attrbutes.
22954 * doc/invoke.texi (ARC): Document mjli-always option.
22956 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22958 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22959 avoid addition with 0 and use incw and decw where possible.
22961 2018-01-26 Richard Biener <rguenther@suse.de>
22963 PR tree-optimization/81082
22964 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22965 association if it requires casting to unsigned.
22966 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22967 from fold_plusminus_mult_expr to catch important cases late when
22968 range info is available.
22970 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22972 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22973 * configure.ac (hidden_linkonce): New test.
22974 * configure: Regenerate.
22975 * config.in: Regenerate.
22977 2018-01-26 Julia Koval <julia.koval@intel.com>
22979 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22980 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22981 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22982 _mm_mask_bitshuffle_epi64_mask): Fix type.
22983 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22984 USI_FTYPE_V4DI_V4DI_USI): Remove.
22985 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22986 __builtin_ia32_vpshufbitqmb256_mask,
22987 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22988 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22989 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22991 2018-01-26 Alan Modra <amodra@gmail.com>
22994 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22995 UNSPEC_VBPERMQ. Sort other unspecs.
22997 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22999 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
23001 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
23003 PR middle-end/83055
23004 * predict.c (drop_profile): Do not push/pop cfun; update also
23006 (handle_missing_profiles): Fix logic looking for zero profiles.
23008 2018-01-25 Jakub Jelinek <jakub@redhat.com>
23010 PR middle-end/83977
23011 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
23012 on functions with #pragma omp declare simd or functions with simd
23014 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
23015 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
23016 Remove trailing \n from warning_at calls.
23018 2018-01-25 Tom de Vries <tom@codesourcery.com>
23021 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23022 for neutered workers.
23024 2018-01-24 Joseph Myers <joseph@codesourcery.com>
23027 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
23028 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
23030 2018-01-24 Jeff Law <law@redhat.com>
23033 * i386.c (get_probe_interval): Move to earlier point.
23034 (ix86_compute_frame_layout): If -fstack-clash-protection and
23035 the frame is larger than the probe interval, then use pushes
23036 to save registers rather than reg->mem moves.
23037 (ix86_expand_prologue): Remove conditional for int_registers_saved
23040 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
23043 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
23044 min/max for never referenced object.
23046 2018-01-24 Jakub Jelinek <jakub@redhat.com>
23048 PR middle-end/83977
23049 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
23051 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
23052 attributes from DECL_ATTRIBUTES (decl) without affecting
23053 DECL_ATTRIBUTES (current_function_decl).
23054 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
23055 functions with non-NULL DECL_ABSTRACT_ORIGIN.
23057 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
23059 PR tree-optimization/83979
23060 * fold-const.c (fold_comparison): Use constant_boolean_node
23061 instead of boolean_{true,false}_node.
23063 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
23065 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
23068 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23070 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23071 Simplify the clause that sets the length attribute.
23072 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23073 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
23074 clause that sets the length attribute.
23075 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23077 2018-01-24 Tom de Vries <tom@codesourcery.com>
23080 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23081 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23082 Add strict parameter.
23083 (prevent_branch_around_nothing): Insert dummy insn between branch to
23084 label and label with no ptx insn inbetween.
23085 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23087 2018-01-24 Tom de Vries <tom@codesourcery.com>
23090 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23091 for neutered threads in warp.
23092 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23094 2018-01-24 Richard Biener <rguenther@suse.de>
23096 PR tree-optimization/83176
23097 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23100 2018-01-24 Richard Biener <rguenther@suse.de>
23102 PR tree-optimization/82819
23103 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23104 code generating pluses that are no-ops in the target precision.
23106 2018-01-24 Richard Biener <rguenther@suse.de>
23108 PR middle-end/84000
23109 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23111 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23113 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23114 to merge probabilities.
23115 * predict.c (probably_never_executed): Also mark as cold functions
23116 with global 0 profile and guessed local profile.
23117 * profile-count.c (profile_probability::combine_with_count): New
23119 * profile-count.h (profile_probability::operator*,
23120 profile_probability::operator*=, profile_probability::operator/,
23121 profile_probability::operator/=): Reduce precision to adjusted
23122 and set value to guessed on contradictory divisions.
23123 (profile_probability::combine_with_freq): Remove.
23124 (profile_probability::combine_wiht_count): Declare.
23125 (profile_count::force_nonzero):: Set to adjusted.
23126 (profile_count::probability_in):: Set quality to adjusted.
23127 * tree-ssa-tail-merge.c (replace_block_by): Use
23128 combine_with_count.
23130 2018-01-23 Andrew Waterman <andrew@sifive.com>
23131 Jim Wilson <jimw@sifive.com>
23133 * config/riscv/riscv.c (riscv_stack_boundary): New.
23134 (riscv_option_override): Set riscv_stack_boundary. Handle
23135 riscv_preferred_stack_boundary_arg.
23136 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23137 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23138 (STACK_BOUNDARY): Set to riscv_stack_boundary.
23139 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23140 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23141 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23143 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
23146 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23147 of struct ix86_frame.
23148 (ix86_expand_epilogue): Likewise. Add a local variable for
23149 the reg_save_offset field in struct ix86_frame.
23151 2018-01-23 Bin Cheng <bin.cheng@arm.com>
23153 PR tree-optimization/82604
23154 * tree-loop-distribution.c (enum partition_kind): New enum item
23155 PKIND_PARTIAL_MEMSET.
23156 (partition_builtin_p): Support above new enum item.
23157 (generate_code_for_partition): Ditto.
23158 (compute_access_range): Differentiate cases that equality can be
23159 proven at all loops, the innermost loops or no loops.
23160 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23161 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
23162 (finalize_partitions, distribute_loop): Don't fuse partition of
23163 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23164 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23165 parloop is enabled.
23167 2018-01-23 Martin Liska <mliska@suse.cz>
23169 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23170 order to ignore the predictor.
23171 (PRED_POLYMORPHIC_CALL): Likewise.
23172 (PRED_RECURSIVE_CALL): Likewise.
23174 2018-01-23 Martin Liska <mliska@suse.cz>
23176 * tree-profile.c (tree_profiling): Print function header to
23177 aware reader which function we are working on.
23178 * value-prof.c (gimple_find_values_to_profile): Do not print
23179 not interesting value histograms.
23181 2018-01-23 Martin Liska <mliska@suse.cz>
23183 * profile-count.h (enum profile_quality): Add
23184 profile_uninitialized as the first value. Do not number values
23185 as they are zero based.
23186 (profile_count::verify): Update sanity check.
23187 (profile_probability::verify): Likewise.
23189 2018-01-23 Nathan Sidwell <nathan@acm.org>
23191 * doc/invoke.texi (ffor-scope): Deprecate.
23193 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23195 PR tree-optimization/83510
23196 * domwalk.c (set_all_edges_as_executable): New function.
23197 (dom_walker::dom_walker): Convert bool param
23198 "skip_unreachable_blocks" to enum reachability. Move setup of
23199 edge flags to set_all_edges_as_executable and only do it when
23200 reachability is REACHABLE_BLOCKS.
23201 * domwalk.h (enum dom_walker::reachability): New enum.
23202 (dom_walker::dom_walker): Convert bool param
23203 "skip_unreachable_blocks" to enum reachability.
23204 (set_all_edges_as_executable): New decl.
23205 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
23206 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23208 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23209 but converting true to REACHABLE_BLOCKS.
23210 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23212 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23213 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23214 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23216 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23217 if check_all_array_refs will be called.
23219 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23221 * tree.c (selftest::test_location_wrappers): Add more test
23224 2018-01-23 David Malcolm <dmalcolm@redhat.com>
23226 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23227 (selftest::test_bit_in_range): Likewise.
23229 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
23232 * doc/sourcebuild.texi (vect_float): Say that the selector
23233 only describes the situation when -funsafe-math-optimizations is on.
23234 (vect_float_strict): Document.
23236 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
23238 PR tree-optimization/83965
23239 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23240 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23241 instead of checking only for a reduction.
23242 (vect_recog_widen_sum_pattern): Likewise.
23244 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23246 * predict.c (probably_never_executed): Only use precise profile info.
23247 (compute_function_frequency): Skip after inlining hack since we now
23248 have quality checking.
23250 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
23252 * profile-count.h (profile_probability::very_unlikely,
23253 profile_probability::unlikely, profile_probability::even): Set
23254 precision to guessed.
23256 2018-01-23 Richard Biener <rguenther@suse.de>
23258 PR tree-optimization/83963
23259 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23260 Properly terminate dominator walk when crossing the exit edge not
23261 when visiting its source block.
23263 2018-01-23 Jakub Jelinek <jakub@redhat.com>
23266 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23267 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23269 2018-01-22 Jakub Jelinek <jakub@redhat.com>
23271 PR tree-optimization/83957
23272 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
23273 semicolon after for body surrounded by braces.
23275 PR tree-optimization/83081
23276 * profile-count.h (profile_probability::split): New method.
23277 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23278 Use profile_probability::split.
23279 (do_compare_rtx_and_jump): Fix adjustment of probabilities
23280 when splitting a single conditional jump into 2.
23282 2018-01-22 David Malcolm <dmalcolm@redhat.com>
23284 PR tree-optimization/69452
23285 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23288 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23290 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23291 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23292 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23294 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23296 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23298 * config/rl78/rl78.md (movdi): New define_expand.
23299 * config/rl78/rl78.c (rl78_split_movdi): New function.
23301 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
23304 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23306 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23307 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23308 128-bit to produce an UNSPEC move to get the double word with the
23309 signbit and then a shift directly to do signbit.
23310 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23311 implementation with a new version that just does either a direct
23312 move or a regular move. Move memory interface to separate insns.
23313 Move insns so they are next to the expander.
23314 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23315 with signbit move. Split big and little endian case.
23316 (signbit<mode>2_dm_mem_le): Likewise.
23317 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23318 (signbit<mode>2_dm2): Likewise.
23320 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23322 * config/rl78/rl78.md (anddi3): New define_expand.
23324 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23326 * config/rl78/rl78.md (umindi3): New define_expand.
23328 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23330 * config/rl78/rl78.md (smindi3): New define_expand.
23332 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23334 * config/rl78/rl78.md (smaxdi3): New define_expand.
23336 2018-01-22 Carl Love <cel@us.ibm.com>
23338 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23339 LVX_V1TI): Add macro expansion.
23340 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23341 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23342 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23343 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23344 Change check to determine if the instruction is a byte reversing
23345 entry. Fix typo in comment.
23346 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23347 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23348 Add def_builtin calls for new builtins.
23349 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23350 Add define_insn expansion.
23352 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23354 * config/rl78/rl78.md (umaxdi3): New define_expand.
23356 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23358 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23359 for non-QImode registers.
23361 2018-01-22 Richard Biener <rguenther@suse.de>
23363 PR tree-optimization/83963
23364 * graphite-scop-detection.c (scop_detection::get_sese): Delay
23365 including the loop exit block.
23366 (scop_detection::merge_sese): Likewise.
23367 (scop_detection::add_scop): Do it here instead.
23369 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23371 * doc/sourcebuild.texi (arm_softfloat): Document.
23373 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
23376 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23377 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23378 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23380 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23381 David Edelsohn <dje.gcc@gmail.com>
23384 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23385 Change "crset eq" to "crset 2".
23386 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23387 (*call_indirect_aix<mode>_nospec): Likewise.
23388 (*call_value_indirect_aix<mode>_nospec): Likewise.
23389 (*call_indirect_elfv2<mode>_nospec): Likewise.
23390 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23391 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23392 change assembly output from . to $.
23393 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23394 (indirect_jump<mode>_nospec): Change assembly output from . to $.
23395 (*tablejump<mode>_internal1_nospec): Likewise.
23397 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
23400 * config/sh/sh_optimize_sett_clrt.cc:
23401 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23403 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
23405 PR tree-optimization/83940
23406 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23407 offset_dt to vect_constant_def rather than vect_unknown_def_type.
23408 (vect_check_load_store_mask): Add a mask_dt_out parameter and
23409 use it to pass back the definition type.
23410 (vect_check_store_rhs): Likewise rhs_dt_out.
23411 (vect_build_gather_load_calls): Add a mask_dt argument and use
23412 it instead of a call to vect_is_simple_use.
23413 (vectorizable_store): Update calls to vect_check_load_store_mask
23414 and vect_check_store_rhs. Use the dt returned by the latter instead
23415 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
23416 instead of calls to vect_is_simple_use. Pass the scalar rather
23417 than the vector operand to vect_is_simple_use when handling
23418 second and subsequent copies of an rhs value.
23419 (vectorizable_load): Update calls to vect_check_load_store_mask
23420 and vect_build_gather_load_calls. Use the cached mask_dt and
23421 gs_info.offset_dt instead of calls to vect_is_simple_use.
23423 2018-01-20 Jakub Jelinek <jakub@redhat.com>
23425 PR middle-end/83945
23426 * tree-emutls.c: Include gimplify.h.
23427 (lower_emutls_2): New function.
23428 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23429 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23430 it before further processing.
23433 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23434 UINTVAL (trueop1) instead of INTVAL (op1).
23436 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23440 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23441 INCOMING_FRAME_SP_OFFSET if not defined.
23442 (scan_trace): Add ENTRY argument. If true and
23443 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23444 emit a note to adjust the CFA offset.
23445 (create_cfi_notes): Adjust scan_trace callers.
23446 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23447 INCOMING_FRAME_SP_OFFSET in the CIE.
23448 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23449 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23451 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23452 * doc/tm.texi: Regenerated.
23454 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23456 PR rtl-optimization/83147
23457 * lra-constraints.c (remove_inheritance_pseudos): Use
23458 lra_substitute_pseudo_within_insn.
23460 2018-01-19 Tom de Vries <tom@codesourcery.com>
23461 Cesar Philippidis <cesar@codesourcery.com>
23464 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23466 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23469 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23470 spaces for function labels.
23472 2018-01-19 Martin Liska <mliska@suse.cz>
23474 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23475 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23476 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23477 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23478 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23479 (PRED_CONST_RETURN): Change from 69 to 65.
23480 (PRED_NULL_RETURN): Change from 91 to 71.
23481 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23482 (PRED_LOOP_GUARD): Change from 66 to 73.
23484 2018-01-19 Martin Liska <mliska@suse.cz>
23486 * predict.c (predict_insn_def): Add new assert.
23487 (struct branch_predictor): Change type to signed integer.
23488 (test_prediction_value_range): Amend test to cover
23489 PROB_UNINITIALIZED.
23490 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23491 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23492 (PRED_LOOP_ITERATIONS_MAX): Likewise.
23493 (PRED_LOOP_IV_COMPARE): Likewise.
23494 * predict.h (PROB_UNINITIALIZED): Define new constant.
23496 2018-01-19 Martin Liska <mliska@suse.cz>
23498 * predict.c (dump_prediction): Add new format for
23499 analyze_brprob.py script which is enabled with -details
23501 * profile-count.h (precise_p): New function.
23503 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23505 PR tree-optimization/83922
23506 * tree-vect-loop.c (vect_verify_full_masking): Return false if
23507 there are no statements that need masking.
23508 (vect_active_double_reduction_p): New function.
23509 (vect_analyze_loop_operations): Use it when handling phis that
23510 are not in the loop header.
23512 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23514 PR tree-optimization/83914
23515 * tree-vect-loop.c (vectorizable_induction): Don't convert
23516 init_expr or apply the peeling adjustment for inductions
23517 that are nested within the vectorized loop.
23519 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23521 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23524 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23528 * function.h (gimplify_parameters): Add gimple_seq * argument.
23529 * function.c: Include gimple.h and options.h.
23530 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23531 for the added local temporaries if needed.
23532 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23533 if there are any parameter cleanups, wrap whole body into a
23534 try/finally with the cleanups.
23536 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
23539 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23540 Use GET_MODE_CLASS for scalar floating point.
23542 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23546 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23547 Fix call of call_cgraph_insertion_hooks.
23549 2018-01-18 Martin Sebor <msebor@redhat.com>
23551 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23553 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23556 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23559 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23562 * common.opt: (-ffile-prefix-map): New option.
23563 * opts.c (common_handle_option): Defer it.
23564 * opts-global.c (handle_common_deferred_options): Handle it.
23565 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23566 * file-prefix-map.h: New file.
23567 (remap_debug_filename, add_debug_prefix_map): ...here.
23568 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23569 * final.c (debug_prefix_map, add_debug_prefix_map
23570 remap_debug_filename): Move to...
23571 * file-prefix-map.c: New file.
23572 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23573 generalize, get rid of alloca(), use strrchr() instead of strchr().
23574 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23575 Implement in terms of add_prefix_map().
23576 (remap_macro_filename, remap_debug_filename): Implement in term of
23578 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23579 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23580 * dbxout.c: Include file-prefix-map.h.
23581 * varasm.c: Likewise.
23582 * vmsdbgout.c: Likewise.
23583 * xcoffout.c: Likewise.
23584 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23585 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23586 * doc/invoke.texi (-ffile-prefix-map): Document.
23587 (-fdebug-prefix-map): Update description.
23589 2018-01-18 Martin Liska <mliska@suse.cz>
23591 * config/i386/i386.c (indirect_thunk_name): Document that also
23593 (output_indirect_thunk): Document why both instructions
23594 (pause and lfence) are generated.
23596 2018-01-18 Richard Biener <rguenther@suse.de>
23598 PR tree-optimization/83887
23599 * graphite-scop-detection.c
23600 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23601 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23602 (scop_detection::merge_sese): Re-implement with a flood-fill
23603 algorithm that properly finds a SESE region if it exists.
23605 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23608 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23609 pointer_diff optimizations use view_convert instead of convert.
23611 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23613 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23614 Generate different code for -mno-speculate-indirect-jumps.
23615 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23616 (*call_indirect_aix<mode>): Disable for
23617 -mno-speculate-indirect-jumps.
23618 (*call_indirect_aix<mode>_nospec): New define_insn.
23619 (*call_value_indirect_aix<mode>): Disable for
23620 -mno-speculate-indirect-jumps.
23621 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23622 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23623 -mno-speculate-indirect-jumps.
23624 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23626 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23628 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23629 long double type, set the flags for noting the default long double
23630 type, even if we don't pass or return a long double type.
23632 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23635 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23638 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23640 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23641 support for merge[hl].
23642 (fold_mergehl_helper): New helper function.
23643 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23644 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23645 (altivec_vmrglw_direct): Add xxmrglw insn.
23647 2018-01-17 Andrew Waterman <andrew@sifive.com>
23649 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23650 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23652 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23655 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23656 call the lto_location_cache before reading the
23657 DECL_SOURCE_LOCATION of the types.
23659 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23660 Richard Sandiford <richard.sandiford@linaro.org>
23662 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23663 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23664 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23665 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23666 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23668 * config/aarch64/constraints.md (aarch64_movti_operand):
23670 * config/aarch64/predicates.md (Uti): Add new constraint.
23672 2018-01-17 Carl Love <cel@us.ibm.com>
23674 * config/rs6000/vsx.md (define_expand xl_len_r,
23675 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23676 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23678 (define_expand, define_insn): Move the shift left from the
23679 define_insn to the define_expand for lxvl and stxvl instructions.
23680 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23681 and XL_LEN_R definitions to PURE.
23683 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23685 * config/i386/i386.c (indirect_thunk_name): Declare regno
23686 as unsigned int. Compare regno with INVALID_REGNUM.
23687 (output_indirect_thunk): Ditto.
23688 (output_indirect_thunk_function): Ditto.
23689 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23690 in the call to output_indirect_thunk_function.
23692 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23694 PR middle-end/83884
23695 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23696 rather than the size of inner_type to determine the stack slot size
23697 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23699 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23702 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23705 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23707 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23708 endian Linux systems to optionally enable multilibs for selecting
23709 the long double type if the user configured an explicit type.
23710 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23711 have no long double multilibs if not defined.
23712 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23713 warn if the user used -mabi={ieee,ibm}longdouble and we built
23714 multilibs for long double.
23715 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23716 appropriate multilib option.
23717 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23719 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23720 for building long double multilibs.
23721 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23723 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23725 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23728 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23730 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23733 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23736 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23739 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23741 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23742 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23744 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23746 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23747 different rtl trees depending on TARGET_64BIT.
23748 (rs6000_gen_lvx): Likewise.
23750 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23752 * config/visium/visium.md (nop): Tweak comment.
23753 (hazard_nop): Likewise.
23755 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23757 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23758 -mspeculate-indirect-jumps.
23759 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23760 for -mno-speculate-indirect-jumps.
23761 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23762 (*call_value_indirect_elfv2<mode>): Disable for
23763 -mno-speculate-indirect-jumps.
23764 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23765 (indirect_jump): Emit different RTL for
23766 -mno-speculate-indirect-jumps.
23767 (*indirect_jump<mode>): Disable for
23768 -mno-speculate-indirect-jumps.
23769 (*indirect_jump<mode>_nospec): New define_insn.
23770 (tablejump): Emit different RTL for
23771 -mno-speculate-indirect-jumps.
23772 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23773 (tablejumpsi_nospec): New define_expand.
23774 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23775 (tablejumpdi_nospec): New define_expand.
23776 (*tablejump<mode>_internal1): Disable for
23777 -mno-speculate-indirect-jumps.
23778 (*tablejump<mode>_internal1_nospec): New define_insn.
23779 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23782 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23784 * caller-save.c (insert_save): Drop unnecessary parameter. All
23787 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23788 Richard Biener <rguenth@suse.de>
23791 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23792 return early, inline manually is_gimple_sizepos. Make sure if we
23793 call gimplify_expr we don't end up with a gimple constant.
23794 * tree.c (variably_modified_type_p): Don't return true for
23795 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23796 * gimplify.h (is_gimple_sizepos): Remove.
23798 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23800 PR tree-optimization/83857
23801 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23802 vectorizable_live_operation for pure SLP statements.
23803 (vectorizable_live_operation): Handle PHIs.
23805 2018-01-16 Richard Biener <rguenther@suse.de>
23807 PR tree-optimization/83867
23808 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23809 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23811 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23814 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23815 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23816 If off is not INTEGER_CST, issue a may not be aligned warning
23817 rather than isn't aligned. Use isn%'t rather than isn't.
23818 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23820 <case MULT_EXPR>: Improve the case when bottom and one of the
23821 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23822 operand, in that case check if the other operand is multiple of
23823 bottom divided by the INTEGER_CST operand.
23825 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23828 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23829 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23830 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23831 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23832 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23833 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23834 (pa_function_arg_size): New function.
23836 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23838 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23839 in a separate statement.
23841 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23843 PR tree-optimization/83847
23844 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23845 group gathers and scatters.
23847 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23849 PR rtl-optimization/86620
23850 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23852 PR rtl-optimization/83213
23853 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23854 to last if both are JUMP_INSNs.
23856 PR tree-optimization/83843
23857 * gimple-ssa-store-merging.c
23858 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23859 store_immediate_info for bswap/nop orig_stores.
23861 2018-01-15 Andrew Waterman <andrew@sifive.com>
23863 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23865 <UDIV>: Increase cost if !TARGET_DIV.
23867 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23869 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23870 (define_attr "cr_logical_3op"): New.
23871 (cceq_ior_compare): Adjust.
23872 (cceq_ior_compare_complement): Adjust.
23873 (*cceq_rev_compare): Adjust.
23874 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23875 (is_cracked_insn): Adjust.
23876 (insn_must_be_first_in_group): Adjust.
23877 * config/rs6000/40x.md: Adjust.
23878 * config/rs6000/440.md: Adjust.
23879 * config/rs6000/476.md: Adjust.
23880 * config/rs6000/601.md: Adjust.
23881 * config/rs6000/603.md: Adjust.
23882 * config/rs6000/6xx.md: Adjust.
23883 * config/rs6000/7450.md: Adjust.
23884 * config/rs6000/7xx.md: Adjust.
23885 * config/rs6000/8540.md: Adjust.
23886 * config/rs6000/cell.md: Adjust.
23887 * config/rs6000/e300c2c3.md: Adjust.
23888 * config/rs6000/e500mc.md: Adjust.
23889 * config/rs6000/e500mc64.md: Adjust.
23890 * config/rs6000/e5500.md: Adjust.
23891 * config/rs6000/e6500.md: Adjust.
23892 * config/rs6000/mpc.md: Adjust.
23893 * config/rs6000/power4.md: Adjust.
23894 * config/rs6000/power5.md: Adjust.
23895 * config/rs6000/power6.md: Adjust.
23896 * config/rs6000/power7.md: Adjust.
23897 * config/rs6000/power8.md: Adjust.
23898 * config/rs6000/power9.md: Adjust.
23899 * config/rs6000/rs64.md: Adjust.
23900 * config/rs6000/titan.md: Adjust.
23902 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23904 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23905 ix86_indirect_branch_register logic.
23907 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23909 * config/i386/constraints.md (Bs): Update
23910 ix86_indirect_branch_register check. Don't check
23911 ix86_indirect_branch_register with GOT_memory_operand.
23913 * config/i386/predicates.md (GOT_memory_operand): Don't check
23914 ix86_indirect_branch_register here.
23915 (GOT32_symbol_operand): Likewise.
23917 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23919 * config/i386/predicates.md (constant_call_address_operand):
23920 Rewrite ix86_indirect_branch_register logic.
23921 (sibcall_insn_operand): Likewise.
23923 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23925 * config/i386/constraints.md (Bs): Replace
23926 ix86_indirect_branch_thunk_register with
23927 ix86_indirect_branch_register.
23929 * config/i386/i386.md (indirect_jump): Likewise.
23930 (tablejump): Likewise.
23931 (*sibcall_memory): Likewise.
23932 (*sibcall_value_memory): Likewise.
23933 Peepholes of indirect call and jump via memory: Likewise.
23934 * config/i386/i386.opt: Likewise.
23935 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23936 (GOT_memory_operand): Likewise.
23937 (call_insn_operand): Likewise.
23938 (sibcall_insn_operand): Likewise.
23939 (GOT32_symbol_operand): Likewise.
23941 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23943 PR middle-end/83837
23944 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23945 type rather than type addr's type points to.
23946 (expand_omp_atomic_mutex): Likewise.
23947 (expand_omp_atomic): Likewise.
23949 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23952 * config/i386/i386.c (output_indirect_thunk_function): Use
23953 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23954 for __x86_return_thunk.
23956 2018-01-15 Richard Biener <rguenther@suse.de>
23958 PR middle-end/83850
23959 * expmed.c (extract_bit_field_1): Fix typo.
23961 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23964 * config/arm/iterators.md (VF): New mode iterator.
23965 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23966 Remove integer-related logic from pattern.
23967 (neon_vabd<mode>_3): Likewise.
23969 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23971 PR middle-end/82694
23972 * common.opt (fstrict-overflow): No longer an alias.
23973 (fwrapv-pointer): New option.
23974 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23975 also for pointer types based on flag_wrapv_pointer.
23976 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23977 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23978 opts->x_flag_wrapv got set.
23979 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23980 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23981 POINTER_TYPE_OVERFLOW_UNDEFINED.
23982 * match.pd: Likewise in address comparison pattern.
23983 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23985 2018-01-15 Richard Biener <rguenther@suse.de>
23988 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23989 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23990 Reset type names to their identifier if their TYPE_DECL doesn't
23991 have linkage (and thus is used for ODR and devirt).
23992 (save_debug_info_for_decl): Remove.
23993 (save_debug_info_for_type): Likewise.
23994 (add_tree_to_fld_list): Adjust.
23995 * tree-pretty-print.c (dump_generic_node): Make dumping of
23996 type names more robust.
23998 2018-01-15 Richard Biener <rguenther@suse.de>
24000 * BASE-VER: Bump to 8.0.1.
24002 2018-01-14 Martin Sebor <msebor@redhat.com>
24005 * builtins.c (check_access): Avoid warning when the no-warning bit
24008 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
24010 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
24011 * ira-color (allocno_hard_regs_compare): Likewise.
24013 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
24016 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
24017 Use .pushsection/.popsection.
24019 2018-01-14 Martin Sebor <msebor@redhat.com>
24022 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
24024 2018-01-14 Jakub Jelinek <jakub@redhat.com>
24026 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
24027 entry from extra_headers.
24028 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
24029 extra_headers, make the list bitwise identical to the i?86-*-* one.
24031 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24033 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
24034 -mcmodel=large with -mindirect-branch=thunk,
24035 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
24036 -mfunction-return=thunk-extern.
24037 * doc/invoke.texi: Document -mcmodel=large is incompatible with
24038 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
24039 -mfunction-return=thunk and -mfunction-return=thunk-extern.
24041 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24043 * config/i386/i386.c (print_reg): Print the name of the full
24044 integer register without '%'.
24045 (ix86_print_operand): Handle 'V'.
24046 * doc/extend.texi: Document 'V' modifier.
24048 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24050 * config/i386/constraints.md (Bs): Disallow memory operand for
24051 -mindirect-branch-register.
24053 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24054 (GOT_memory_operand): Likewise.
24055 (call_insn_operand): Likewise.
24056 (sibcall_insn_operand): Likewise.
24057 (GOT32_symbol_operand): Likewise.
24058 * config/i386/i386.md (indirect_jump): Call convert_memory_address
24059 for -mindirect-branch-register.
24060 (tablejump): Likewise.
24061 (*sibcall_memory): Likewise.
24062 (*sibcall_value_memory): Likewise.
24063 Disallow peepholes of indirect call and jump via memory for
24064 -mindirect-branch-register.
24065 (*call_pop): Replace m with Bw.
24066 (*call_value_pop): Likewise.
24067 (*sibcall_pop_memory): Replace m with Bs.
24068 * config/i386/i386.opt (mindirect-branch-register): New option.
24069 * doc/invoke.texi: Document -mindirect-branch-register option.
24071 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24073 * config/i386/i386-protos.h (ix86_output_function_return): New.
24074 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
24075 set function_return_type.
24076 (indirect_thunk_name): Add ret_p to indicate thunk for function
24078 (output_indirect_thunk_function): Pass false to
24079 indirect_thunk_name.
24080 (ix86_output_indirect_branch_via_reg): Likewise.
24081 (ix86_output_indirect_branch_via_push): Likewise.
24082 (output_indirect_thunk_function): Create alias for function
24083 return thunk if regno < 0.
24084 (ix86_output_function_return): New function.
24085 (ix86_handle_fndecl_attribute): Handle function_return.
24086 (ix86_attribute_table): Add function_return.
24087 * config/i386/i386.h (machine_function): Add
24088 function_return_type.
24089 * config/i386/i386.md (simple_return_internal): Use
24090 ix86_output_function_return.
24091 (simple_return_internal_long): Likewise.
24092 * config/i386/i386.opt (mfunction-return=): New option.
24093 (indirect_branch): Mention -mfunction-return=.
24094 * doc/extend.texi: Document function_return function attribute.
24095 * doc/invoke.texi: Document -mfunction-return= option.
24097 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
24099 * config/i386/i386-opts.h (indirect_branch): New.
24100 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24101 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24102 with local indirect jump when converting indirect call and jump.
24103 (ix86_set_indirect_branch_type): New.
24104 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24105 (indirectlabelno): New.
24106 (indirect_thunk_needed): Likewise.
24107 (indirect_thunk_bnd_needed): Likewise.
24108 (indirect_thunks_used): Likewise.
24109 (indirect_thunks_bnd_used): Likewise.
24110 (INDIRECT_LABEL): Likewise.
24111 (indirect_thunk_name): Likewise.
24112 (output_indirect_thunk): Likewise.
24113 (output_indirect_thunk_function): Likewise.
24114 (ix86_output_indirect_branch_via_reg): Likewise.
24115 (ix86_output_indirect_branch_via_push): Likewise.
24116 (ix86_output_indirect_branch): Likewise.
24117 (ix86_output_indirect_jmp): Likewise.
24118 (ix86_code_end): Call output_indirect_thunk_function if needed.
24119 (ix86_output_call_insn): Call ix86_output_indirect_branch if
24121 (ix86_handle_fndecl_attribute): Handle indirect_branch.
24122 (ix86_attribute_table): Add indirect_branch.
24123 * config/i386/i386.h (machine_function): Add indirect_branch_type
24124 and has_local_indirect_jump.
24125 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24127 (tablejump): Likewise.
24128 (*indirect_jump): Use ix86_output_indirect_jmp.
24129 (*tablejump_1): Likewise.
24130 (simple_return_indirect_internal): Likewise.
24131 * config/i386/i386.opt (mindirect-branch=): New option.
24132 (indirect_branch): New.
24135 (thunk-inline): Likewise.
24136 (thunk-extern): Likewise.
24137 * doc/extend.texi: Document indirect_branch function attribute.
24138 * doc/invoke.texi: Document -mindirect-branch= option.
24140 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
24143 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24145 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
24147 * ipa-inline.c (want_inline_small_function_p): Return false if
24148 inlining has already failed with CIF_FINAL_ERROR.
24149 (update_caller_keys): Call want_inline_small_function_p before
24151 (update_callee_keys): Likewise.
24153 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
24155 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24157 (rs6000_quadword_masked_address_p): Likewise.
24158 (quad_aligned_load_p): Likewise.
24159 (quad_aligned_store_p): Likewise.
24160 (const_load_sequence_p): Add comment to describe the outer-most loop.
24161 (mimic_memory_attributes_and_flags): New function.
24162 (rs6000_gen_stvx): Likewise.
24163 (replace_swapped_aligned_store): Likewise.
24164 (rs6000_gen_lvx): Likewise.
24165 (replace_swapped_aligned_load): Likewise.
24166 (replace_swapped_load_constant): Capitalize argument name in
24167 comment describing this function.
24168 (rs6000_analyze_swaps): Add a third pass to search for vector loads
24169 and stores that access quad-word aligned addresses and replace
24170 with stvx or lvx instructions when appropriate.
24171 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24172 New function prototype.
24173 (rs6000_quadword_masked_address_p): Likewise.
24174 (rs6000_gen_lvx): Likewise.
24175 (rs6000_gen_stvx): Likewise.
24176 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24177 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24178 when memory address is aligned.
24179 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24180 this split to select lvx instruction when memory address is aligned.
24181 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24182 instruction when memory address is aligned.
24183 (*vsx_le_perm_load_v16qi): Likewise.
24184 (four unnamed splitters): Modify to select the stvx instruction
24185 when memory is aligned.
24187 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
24189 * predict.c (determine_unlikely_bbs): Handle correctly BBs
24190 which appears in the queue multiple times.
24192 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24193 Alan Hayward <alan.hayward@arm.com>
24194 David Sherwood <david.sherwood@arm.com>
24196 * tree-vectorizer.h (vec_lower_bound): New structure.
24197 (_loop_vec_info): Add check_nonzero and lower_bounds.
24198 (LOOP_VINFO_CHECK_NONZERO): New macro.
24199 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24200 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24201 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24202 fields. Make seg_len the distance travelled, not including the
24204 (dr_direction_indicator): Declare.
24205 (dr_zero_step_indicator): Likewise.
24206 (dr_known_forward_stride_p): Likewise.
24207 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24209 (runtime_alias_check_p): Allow runtime alias checks with
24211 (operator ==): Compare access_size and align.
24212 (prune_runtime_alias_test_list): Rework for new distinction between
24213 the access_size and seg_len.
24214 (create_intersect_range_checks_index): Likewise. Cope with polynomial
24216 (get_segment_min_max): New function.
24217 (create_intersect_range_checks): Use it.
24218 (dr_step_indicator): New function.
24219 (dr_direction_indicator): Likewise.
24220 (dr_zero_step_indicator): Likewise.
24221 (dr_known_forward_stride_p): Likewise.
24222 * tree-loop-distribution.c (data_ref_segment_size): Return
24223 DR_STEP * (niters - 1).
24224 (compute_alias_check_pairs): Update call to the dr_with_seg_len
24226 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24227 (vect_preserves_scalar_order_p): New function, split out from...
24228 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
24229 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24230 (vect_vfa_access_size): New function.
24231 (vect_vfa_align): Likewise.
24232 (vect_compile_time_alias): Take access_size_a and access_b arguments.
24233 (dump_lower_bound): New function.
24234 (vect_check_lower_bound): Likewise.
24235 (vect_small_gap_p): Likewise.
24236 (vectorizable_with_step_bound_p): Likewise.
24237 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24238 depencies if the vectorization factor is 1. Convert the checks
24239 for nonzero steps into checks on the bounds of DR_STEP. Try using
24240 a bunds check for variable steps if the minimum required step is
24241 relatively small. Update calls to the dr_with_seg_len
24242 constructor and to vect_compile_time_alias.
24243 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24245 (vect_loop_versioning): Call it.
24246 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24248 (vect_estimate_min_profitable_iters): Account for any bounds checks.
24250 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24251 Alan Hayward <alan.hayward@arm.com>
24252 David Sherwood <david.sherwood@arm.com>
24254 * doc/sourcebuild.texi (vect_scatter_store): Document.
24255 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24257 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24259 * genopinit.c (main): Add supports_vec_scatter_store and
24260 supports_vec_scatter_store_cached to target_optabs.
24261 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24262 IFN_MASK_SCATTER_STORE.
24263 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24265 * internal-fn.h (internal_store_fn_p): Declare.
24266 (internal_fn_stored_value_index): Likewise.
24267 * internal-fn.c (scatter_store_direct): New macro.
24268 (expand_scatter_store_optab_fn): New function.
24269 (direct_scatter_store_optab_supported_p): New macro.
24270 (internal_store_fn_p): New function.
24271 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24272 IFN_MASK_SCATTER_STORE.
24273 (internal_fn_mask_index): Likewise.
24274 (internal_fn_stored_value_index): New function.
24275 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24276 for scatter stores.
24277 * optabs-query.h (supports_vec_scatter_store_p): Declare.
24278 * optabs-query.c (supports_vec_scatter_store_p): New function.
24279 * tree-vectorizer.h (vect_get_store_rhs): Declare.
24280 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24281 true for scatter stores.
24282 (vect_gather_scatter_fn_p): Handle scatter stores too.
24283 (vect_check_gather_scatter): Consider using scatter stores if
24284 supports_vec_scatter_store_p.
24285 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24286 scatter stores too.
24287 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24288 internal_fn_stored_value_index.
24289 (check_load_store_masking): Handle scatter stores too.
24290 (vect_get_store_rhs): Make public.
24291 (vectorizable_call): Use internal_store_fn_p.
24292 (vectorizable_store): Handle scatter store internal functions.
24293 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24294 when deciding whether the end of the group has been reached.
24295 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24296 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24297 (mask_scatter_store<mode>): New insns.
24299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24300 Alan Hayward <alan.hayward@arm.com>
24301 David Sherwood <david.sherwood@arm.com>
24303 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24304 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24305 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24307 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24308 Use vect_truncate_gather_scatter_offset if we can't treat the
24309 operation as a normal gather load or scatter store.
24310 (get_group_load_store_type): Take the gather_scatter_info
24311 as argument. Try using a gather load or scatter store for
24312 single-element groups.
24313 (get_load_store_type): Update calls to get_group_load_store_type
24314 and vect_use_strided_gather_scatters_p.
24316 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24317 Alan Hayward <alan.hayward@arm.com>
24318 David Sherwood <david.sherwood@arm.com>
24320 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24321 optional tree argument.
24322 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24324 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24325 but continue to use the current value as a fallback.
24326 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24327 to compare the updates.
24328 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24329 (get_load_store_type): Use it when handling a strided access.
24330 (vect_get_strided_load_store_ops): New function.
24331 (vect_get_data_ptr_increment): Likewise.
24332 (vectorizable_load): Handle strided gather loads. Always pass
24333 a step to vect_create_data_ref_ptr and bump_vector_ptr.
24335 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24336 Alan Hayward <alan.hayward@arm.com>
24337 David Sherwood <david.sherwood@arm.com>
24339 * doc/md.texi (gather_load@var{m}): Document.
24340 (mask_gather_load@var{m}): Likewise.
24341 * genopinit.c (main): Add supports_vec_gather_load and
24342 supports_vec_gather_load_cached to target_optabs.
24343 * optabs-tree.c (init_tree_optimization_optabs): Use
24344 ggc_cleared_alloc to allocate target_optabs.
24345 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24346 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24348 * internal-fn.h (internal_load_fn_p): Declare.
24349 (internal_gather_scatter_fn_p): Likewise.
24350 (internal_fn_mask_index): Likewise.
24351 (internal_gather_scatter_fn_supported_p): Likewise.
24352 * internal-fn.c (gather_load_direct): New macro.
24353 (expand_gather_load_optab_fn): New function.
24354 (direct_gather_load_optab_supported_p): New macro.
24355 (direct_internal_fn_optab): New function.
24356 (internal_load_fn_p): Likewise.
24357 (internal_gather_scatter_fn_p): Likewise.
24358 (internal_fn_mask_index): Likewise.
24359 (internal_gather_scatter_fn_supported_p): Likewise.
24360 * optabs-query.c (supports_at_least_one_mode_p): New function.
24361 (supports_vec_gather_load_p): Likewise.
24362 * optabs-query.h (supports_vec_gather_load_p): Declare.
24363 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24364 and memory_type field.
24365 (NUM_PATTERNS): Bump to 15.
24366 * tree-vect-data-refs.c: Include internal-fn.h.
24367 (vect_gather_scatter_fn_p): New function.
24368 (vect_describe_gather_scatter_call): Likewise.
24369 (vect_check_gather_scatter): Try using internal functions for
24370 gather loads. Recognize existing calls to a gather load function.
24371 (vect_analyze_data_refs): Consider using gather loads if
24372 supports_vec_gather_load_p.
24373 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24374 (vect_get_gather_scatter_offset_type): Likewise.
24375 (vect_convert_mask_for_vectype): Likewise.
24376 (vect_add_conversion_to_patterm): Likewise.
24377 (vect_try_gather_scatter_pattern): Likewise.
24378 (vect_recog_gather_scatter_pattern): New pattern recognizer.
24379 (vect_vect_recog_func_ptrs): Add it.
24380 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24381 internal_fn_mask_index and internal_gather_scatter_fn_p.
24382 (check_load_store_masking): Take the gather_scatter_info as an
24383 argument and handle gather loads.
24384 (vect_get_gather_scatter_ops): New function.
24385 (vectorizable_call): Check internal_load_fn_p.
24386 (vectorizable_load): Likewise. Handle gather load internal
24388 (vectorizable_store): Update call to check_load_store_masking.
24389 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24390 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24391 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24392 (aarch64_gather_scale_operand_d): New predicates.
24393 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24394 (mask_gather_load<mode>): New insns.
24396 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24397 Alan Hayward <alan.hayward@arm.com>
24398 David Sherwood <david.sherwood@arm.com>
24400 * optabs.def (fold_left_plus_optab): New optab.
24401 * doc/md.texi (fold_left_plus_@var{m}): Document.
24402 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24403 * internal-fn.c (fold_left_direct): Define.
24404 (expand_fold_left_optab_fn): Likewise.
24405 (direct_fold_left_optab_supported_p): Likewise.
24406 * fold-const-call.c (fold_const_fold_left): New function.
24407 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24408 * tree-parloops.c (valid_reduction_p): New function.
24409 (gather_scalar_reductions): Use it.
24410 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24411 (vect_finish_replace_stmt): Declare.
24412 * tree-vect-loop.c (fold_left_reduction_fn): New function.
24413 (needs_fold_left_reduction_p): New function, split out from...
24414 (vect_is_simple_reduction): ...here. Accept reductions that
24415 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24416 (vect_force_simple_reduction): Also store the reduction type in
24417 the assignment's STMT_VINFO_REDUC_TYPE.
24418 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24419 (merge_with_identity): New function.
24420 (vect_expand_fold_left): Likewise.
24421 (vectorize_fold_left_reduction): Likewise.
24422 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
24423 scalar phi in place for it. Check for target support and reject
24424 cases that would reassociate the operation. Defer the transform
24425 phase to vectorize_fold_left_reduction.
24426 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24427 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24428 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24432 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24433 call to ifc_temp_var.
24435 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24436 Alan Hayward <alan.hayward@arm.com>
24437 David Sherwood <david.sherwood@arm.com>
24439 * target.def (legitimize_address_displacement): Take the original
24440 offset as a poly_int.
24441 * targhooks.h (default_legitimize_address_displacement): Update
24443 * targhooks.c (default_legitimize_address_displacement): Likewise.
24444 * doc/tm.texi: Regenerate.
24445 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24446 as an argument, moving assert of ad->disp == ad->disp_term to...
24447 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24448 Try calling targetm.legitimize_address_displacement before expanding
24449 the address rather than afterwards, and adjust for the new interface.
24450 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24451 Match the new hook interface. Handle SVE addresses.
24452 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24453 new hook interface.
24455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24457 * Makefile.in (OBJS): Add early-remat.o.
24458 * target.def (select_early_remat_modes): New hook.
24459 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24460 * doc/tm.texi: Regenerate.
24461 * targhooks.h (default_select_early_remat_modes): Declare.
24462 * targhooks.c (default_select_early_remat_modes): New function.
24463 * timevar.def (TV_EARLY_REMAT): New timevar.
24464 * passes.def (pass_early_remat): New pass.
24465 * tree-pass.h (make_pass_early_remat): Declare.
24466 * early-remat.c: New file.
24467 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24469 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24472 Alan Hayward <alan.hayward@arm.com>
24473 David Sherwood <david.sherwood@arm.com>
24475 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24476 vfm1 with a bound_epilog parameter.
24477 (vect_do_peeling): Update calls accordingly, and move the prologue
24478 call earlier in the function. Treat the base bound_epilog as 0 for
24479 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24480 this base when peeling for gaps.
24481 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24482 with fully-masked loops.
24483 (vect_estimate_min_profitable_iters): Handle the single peeled
24484 iteration in that case.
24486 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24487 Alan Hayward <alan.hayward@arm.com>
24488 David Sherwood <david.sherwood@arm.com>
24490 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24491 single-element interleaving even if the size is not a power of 2.
24492 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24493 accesses for single-element interleaving if the group size is
24496 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24497 Alan Hayward <alan.hayward@arm.com>
24498 David Sherwood <david.sherwood@arm.com>
24500 * doc/md.texi (fold_extract_last_@var{m}): Document.
24501 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24502 * optabs.def (fold_extract_last_optab): New optab.
24503 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24504 * internal-fn.c (fold_extract_direct): New macro.
24505 (expand_fold_extract_optab_fn): Likewise.
24506 (direct_fold_extract_optab_supported_p): Likewise.
24507 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24508 * tree-vect-loop.c (vect_model_reduction_cost): Handle
24509 EXTRACT_LAST_REDUCTION.
24510 (get_initial_def_for_reduction): Do not create an initial vector
24511 for EXTRACT_LAST_REDUCTION reductions.
24512 (vectorizable_reduction): Leave the scalar phi in place for
24513 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
24514 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
24515 epilogue code for EXTRACT_LAST_REDUCTION and defer the
24516 transform phase to vectorizable_condition.
24517 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24519 (vect_finish_stmt_generation): ...here.
24520 (vect_finish_replace_stmt): New function.
24521 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24522 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24524 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24526 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24527 Alan Hayward <alan.hayward@arm.com>
24528 David Sherwood <david.sherwood@arm.com>
24530 * doc/md.texi (extract_last_@var{m}): Document.
24531 * optabs.def (extract_last_optab): New optab.
24532 * internal-fn.def (EXTRACT_LAST): New internal function.
24533 * internal-fn.c (cond_unary_direct): New macro.
24534 (expand_cond_unary_optab_fn): Likewise.
24535 (direct_cond_unary_optab_supported_p): Likewise.
24536 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24537 loops using EXTRACT_LAST.
24538 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24539 (extract_last_<mode>): ...this optab.
24540 (vec_extract<mode><Vel>): Update accordingly.
24542 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24543 Alan Hayward <alan.hayward@arm.com>
24544 David Sherwood <david.sherwood@arm.com>
24546 * target.def (empty_mask_is_expensive): New hook.
24547 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24548 * doc/tm.texi: Regenerate.
24549 * targhooks.h (default_empty_mask_is_expensive): Declare.
24550 * targhooks.c (default_empty_mask_is_expensive): New function.
24551 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24552 if the target says that empty masks are expensive.
24553 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24555 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
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 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24562 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24563 (vect_use_loop_mask_for_alignment_p): New function.
24564 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24565 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24566 niters_skip argument. Make sure that the first niters_skip elements
24567 of the first iteration are inactive.
24568 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24569 Update call to vect_set_loop_masks_directly.
24570 (get_misalign_in_elems): New function, split out from...
24571 (vect_gen_prolog_loop_niters): ...here.
24572 (vect_update_init_of_dr): Take a code argument that specifies whether
24573 the adjustment should be added or subtracted.
24574 (vect_update_init_of_drs): Likewise.
24575 (vect_prepare_for_masked_peels): New function.
24576 (vect_do_peeling): Skip prologue peeling if we're using a mask
24577 instead. Update call to vect_update_inits_of_drs.
24578 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24580 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24581 alignment. Do not include the number of peeled iterations in
24582 the minimum threshold in that case.
24583 (vectorizable_induction): Adjust the start value down by
24584 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24585 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24586 Take the number of skipped iterations into account when calculating
24588 * tree-vect-stmts.c (vect_gen_while_not): New function.
24590 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24591 Alan Hayward <alan.hayward@arm.com>
24592 David Sherwood <david.sherwood@arm.com>
24594 * doc/sourcebuild.texi (vect_fully_masked): Document.
24595 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24596 default value to 0.
24597 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24599 (vect_analyze_loop_2): ...here. Don't check the vectorization
24600 factor against the number of loop iterations if the loop is
24603 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24604 Alan Hayward <alan.hayward@arm.com>
24605 David Sherwood <david.sherwood@arm.com>
24607 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24608 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24609 (dump_groups): Update accordingly.
24610 (iv_use::mem_type): New member variable.
24611 (address_p): New function.
24612 (record_use): Add a mem_type argument and initialize the new
24614 (record_group_use): Add a mem_type argument. Use address_p.
24615 Remove obsolete null checks of base_object. Update call to record_use.
24616 (find_interesting_uses_op): Update call to record_group_use.
24617 (find_interesting_uses_cond): Likewise.
24618 (find_interesting_uses_address): Likewise.
24619 (get_mem_type_for_internal_fn): New function.
24620 (find_address_like_use): Likewise.
24621 (find_interesting_uses_stmt): Try find_address_like_use before
24622 calling find_interesting_uses_op.
24623 (addr_offset_valid_p): Use the iv mem_type field as the type
24624 of the addressed memory.
24625 (add_autoinc_candidates): Likewise.
24626 (get_address_cost): Likewise.
24627 (split_small_address_groups_p): Use address_p.
24628 (split_address_groups): Likewise.
24629 (add_iv_candidate_for_use): Likewise.
24630 (autoinc_possible_for_pair): Likewise.
24631 (rewrite_groups): Likewise.
24632 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24633 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24634 (get_alias_ptr_type_for_ptr_address): New function.
24635 (rewrite_use_address): Rewrite address uses in calls that were
24636 identified by find_address_like_use.
24638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24639 Alan Hayward <alan.hayward@arm.com>
24640 David Sherwood <david.sherwood@arm.com>
24642 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24644 * gimple-expr.h (is_gimple_addressable: Likewise.
24645 * gimple-expr.c (is_gimple_address): Likewise.
24646 * internal-fn.c (expand_call_mem_ref): New function.
24647 (expand_mask_load_optab_fn): Use it.
24648 (expand_mask_store_optab_fn): Likewise.
24650 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24651 Alan Hayward <alan.hayward@arm.com>
24652 David Sherwood <david.sherwood@arm.com>
24654 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24655 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24656 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24657 (cond_umax@var{mode}): Document.
24658 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24659 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24660 (cond_umin_optab, cond_umax_optab): New optabs.
24661 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24662 (COND_IOR, COND_XOR): New internal functions.
24663 * internal-fn.h (get_conditional_internal_fn): Declare.
24664 * internal-fn.c (cond_binary_direct): New macro.
24665 (expand_cond_binary_optab_fn): Likewise.
24666 (direct_cond_binary_optab_supported_p): Likewise.
24667 (get_conditional_internal_fn): New function.
24668 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24669 Cope with reduction statements that are vectorized as calls rather
24671 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24672 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24673 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24674 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24675 (UNSPEC_COND_EOR): New unspecs.
24676 (optab): Add mappings for them.
24677 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24678 (sve_int_op, sve_fp_op): New int attributes.
24680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24681 Alan Hayward <alan.hayward@arm.com>
24682 David Sherwood <david.sherwood@arm.com>
24684 * optabs.def (while_ult_optab): New optab.
24685 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24686 * internal-fn.def (WHILE_ULT): New internal function.
24687 * internal-fn.h (direct_internal_fn_supported_p): New override
24688 that takes two types as argument.
24689 * internal-fn.c (while_direct): New macro.
24690 (expand_while_optab_fn): New function.
24691 (convert_optab_supported_p): Likewise.
24692 (direct_while_optab_supported_p): New macro.
24693 * wide-int.h (wi::udiv_ceil): New function.
24694 * tree-vectorizer.h (rgroup_masks): New structure.
24695 (vec_loop_masks): New typedef.
24696 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24697 and fully_masked_p.
24698 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24699 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24700 (vect_max_vf): New function.
24701 (slpeel_make_loop_iterate_ntimes): Delete.
24702 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24703 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24704 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24705 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24706 internal-fn.h, stor-layout.h and optabs-query.h.
24707 (vect_set_loop_mask): New function.
24708 (add_preheader_seq): Likewise.
24709 (add_header_seq): Likewise.
24710 (interleave_supported_p): Likewise.
24711 (vect_maybe_permute_loop_masks): Likewise.
24712 (vect_set_loop_masks_directly): Likewise.
24713 (vect_set_loop_condition_masked): Likewise.
24714 (vect_set_loop_condition_unmasked): New function, split out from
24715 slpeel_make_loop_iterate_ntimes.
24716 (slpeel_make_loop_iterate_ntimes): Rename to..
24717 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24718 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24719 (vect_do_peeling): Update call accordingly.
24720 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24722 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24723 mask_compare_type, can_fully_mask_p and fully_masked_p.
24724 (release_vec_loop_masks): New function.
24725 (_loop_vec_info): Use it to free the loop masks.
24726 (can_produce_all_loop_masks_p): New function.
24727 (vect_get_max_nscalars_per_iter): Likewise.
24728 (vect_verify_full_masking): Likewise.
24729 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24730 retries, and free the mask rgroups before retrying. Check loop-wide
24731 reasons for disallowing fully-masked loops. Make the final decision
24732 about whether use a fully-masked loop or not.
24733 (vect_estimate_min_profitable_iters): Do not assume that peeling
24734 for the number of iterations will be needed for fully-masked loops.
24735 (vectorizable_reduction): Disable fully-masked loops.
24736 (vectorizable_live_operation): Likewise.
24737 (vect_halve_mask_nunits): New function.
24738 (vect_double_mask_nunits): Likewise.
24739 (vect_record_loop_mask): Likewise.
24740 (vect_get_loop_mask): Likewise.
24741 (vect_transform_loop): Handle the case in which the final loop
24742 iteration might handle a partial vector. Call vect_set_loop_condition
24743 instead of slpeel_make_loop_iterate_ntimes.
24744 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24745 (check_load_store_masking): New function.
24746 (prepare_load_store_mask): Likewise.
24747 (vectorizable_store): Handle fully-masked loops.
24748 (vectorizable_load): Likewise.
24749 (supportable_widening_operation): Use vect_halve_mask_nunits for
24751 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24752 (vect_gen_while): New function.
24753 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24754 (aarch64_uqdec<mode>): New insn.
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 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24761 (reduc_xor_scal_optab): New optabs.
24762 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24763 (reduc_xor_scal_@var{m}): Document.
24764 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24765 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24766 internal functions.
24767 * fold-const-call.c (fold_const_call): Handle them.
24768 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24769 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24770 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24771 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24772 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24773 (UNSPEC_XORV): New unspecs.
24774 (optab): Add entries for them.
24775 (BITWISEV): New int iterator.
24776 (bit_reduc_op): New int attributes.
24778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24779 Alan Hayward <alan.hayward@arm.com>
24780 David Sherwood <david.sherwood@arm.com>
24782 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24783 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24784 * optabs.def (vec_shl_insert_optab): New optab.
24785 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24786 (duplicate_and_interleave): Likewise.
24787 * tree-vect-loop.c: Include internal-fn.h.
24788 (neutral_op_for_slp_reduction): New function, split out from
24789 get_initial_defs_for_reduction.
24790 (get_initial_def_for_reduction): Handle option 2 for variable-length
24791 vectors by loading the neutral value into a vector and then shifting
24792 the initial value into element 0.
24793 (get_initial_defs_for_reduction): Replace the code argument with
24794 the neutral value calculated by neutral_op_for_slp_reduction.
24795 Use gimple_build_vector for constant-length vectors.
24796 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24797 but the first group_size elements have a neutral value.
24798 Use duplicate_and_interleave otherwise.
24799 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24800 Update call to get_initial_defs_for_reduction. Handle SLP
24801 reductions for variable-length vectors by creating one vector
24802 result for each scalar result, with the elements associated
24803 with other scalar results stubbed out with the neutral value.
24804 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24805 Require IFN_VEC_SHL_INSERT for double reductions on
24806 variable-length vectors, or SLP reductions that have
24807 a neutral value. Require can_duplicate_and_interleave_p
24808 support for variable-length unchained SLP reductions if there
24809 is no neutral value, such as for MIN/MAX reductions. Also require
24810 the number of vector elements to be a multiple of the number of
24811 SLP statements when doing variable-length unchained SLP reductions.
24812 Update call to vect_create_epilog_for_reduction.
24813 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24814 and remove initial values.
24815 (duplicate_and_interleave): Make public.
24816 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24817 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24819 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24820 Alan Hayward <alan.hayward@arm.com>
24821 David Sherwood <david.sherwood@arm.com>
24823 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24824 (can_duplicate_and_interleave_p): New function.
24825 (vect_get_and_check_slp_defs): Take the vector of statements
24826 rather than just the current one. Remove excess parentheses.
24827 Restriction rejectinon of vect_constant_def and vect_external_def
24828 for variable-length vectors to boolean types, or types for which
24829 can_duplicate_and_interleave_p is false.
24830 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24831 (duplicate_and_interleave): New function.
24832 (vect_get_constant_vectors): Use gimple_build_vector for
24833 constant-length vectors and suitable variable-length constant
24834 vectors. Use duplicate_and_interleave for other variable-length
24835 vectors. Don't defer the update when inserting new statements.
24837 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24838 Alan Hayward <alan.hayward@arm.com>
24839 David Sherwood <david.sherwood@arm.com>
24841 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24842 min_profitable_iters doesn't go negative.
24844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24845 Alan Hayward <alan.hayward@arm.com>
24846 David Sherwood <david.sherwood@arm.com>
24848 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24849 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24850 * optabs.def (vec_mask_load_lanes_optab): New optab.
24851 (vec_mask_store_lanes_optab): Likewise.
24852 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24853 (MASK_STORE_LANES): Likewise.
24854 * internal-fn.c (mask_load_lanes_direct): New macro.
24855 (mask_store_lanes_direct): Likewise.
24856 (expand_mask_load_optab_fn): Handle masked operations.
24857 (expand_mask_load_lanes_optab_fn): New macro.
24858 (expand_mask_store_optab_fn): Handle masked operations.
24859 (expand_mask_store_lanes_optab_fn): New macro.
24860 (direct_mask_load_lanes_optab_supported_p): Likewise.
24861 (direct_mask_store_lanes_optab_supported_p): Likewise.
24862 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24864 (vect_load_lanes_supported): Likewise.
24865 * tree-vect-data-refs.c (strip_conversion): New function.
24866 (can_group_stmts_p): Likewise.
24867 (vect_analyze_data_ref_accesses): Use it instead of checking
24868 for a pair of assignments.
24869 (vect_store_lanes_supported): Take a masked_p parameter.
24870 (vect_load_lanes_supported): Likewise.
24871 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24872 vect_store_lanes_supported and vect_load_lanes_supported.
24873 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24874 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24875 parameter. Don't allow gaps for masked accesses.
24876 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24877 and vect_load_lanes_supported.
24878 (get_load_store_type): Take a masked_p parameter and update
24879 call to get_group_load_store_type.
24880 (vectorizable_store): Update call to get_load_store_type.
24881 Handle IFN_MASK_STORE_LANES.
24882 (vectorizable_load): Update call to get_load_store_type.
24883 Handle IFN_MASK_LOAD_LANES.
24885 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24886 Alan Hayward <alan.hayward@arm.com>
24887 David Sherwood <david.sherwood@arm.com>
24889 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24891 * config/aarch64/aarch64-protos.h
24892 (aarch64_sve_struct_memory_operand_p): Declare.
24893 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24894 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24895 (VPRED, vpred): Handle SVE structure modes.
24896 * config/aarch64/constraints.md (Utx): New constraint.
24897 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24898 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24899 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24900 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24901 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24902 structure modes. Split into pieces after RA.
24903 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24904 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24906 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24907 SVE structure modes.
24908 (aarch64_classify_address): Likewise.
24909 (sizetochar): Move earlier in file.
24910 (aarch64_print_operand): Handle SVE register lists.
24911 (aarch64_array_mode): New function.
24912 (aarch64_sve_struct_memory_operand_p): Likewise.
24913 (TARGET_ARRAY_MODE): Redefine.
24915 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24916 Alan Hayward <alan.hayward@arm.com>
24917 David Sherwood <david.sherwood@arm.com>
24919 * target.def (array_mode): New target hook.
24920 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24921 * doc/tm.texi: Regenerate.
24922 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24923 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24924 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24925 targetm.array_mode.
24926 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24929 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24930 Alan Hayward <alan.hayward@arm.com>
24931 David Sherwood <david.sherwood@arm.com>
24933 * fold-const.c (fold_binary_loc): Check the argument types
24934 rather than the result type when testing for a vector operation.
24936 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24938 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24939 * doc/tm.texi: Regenerate.
24941 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24942 Alan Hayward <alan.hayward@arm.com>
24943 David Sherwood <david.sherwood@arm.com>
24945 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24946 (sve): Document new AArch64 extension.
24947 * doc/md.texi (w): Extend the description of the AArch64
24948 constraint to include SVE vectors.
24949 (Upl, Upa): Document new AArch64 predicate constraints.
24950 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24952 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24953 (msve-vector-bits=): New option.
24954 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24955 SVE when these are disabled.
24956 (sve): New extension.
24957 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24958 modes. Adjust their number of units based on aarch64_sve_vg.
24959 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24960 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24961 aarch64_addr_query_type.
24962 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24963 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24964 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24965 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24966 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24967 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24968 (aarch64_simd_imm_zero_p): Delete.
24969 (aarch64_check_zero_based_sve_index_immediate): Declare.
24970 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24971 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24972 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24973 (aarch64_sve_float_mul_immediate_p): Likewise.
24974 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24975 rather than an rtx.
24976 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24977 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24978 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24979 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24980 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24981 (aarch64_regmode_natural_size): Likewise.
24982 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24983 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24985 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24986 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24987 for VG and the SVE predicate registers.
24988 (V_ALIASES): Add a "z"-prefixed alias.
24989 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24990 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24991 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24992 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24993 (REG_CLASS_NAMES): Add entries for them.
24994 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24995 and the predicate registers.
24996 (aarch64_sve_vg): Declare.
24997 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24998 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24999 (REGMODE_NATURAL_SIZE): Define.
25000 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
25002 * config/aarch64/aarch64.c: Include cfgrtl.h.
25003 (simd_immediate_info): Add a constructor for series vectors,
25004 and an associated step field.
25005 (aarch64_sve_vg): New variable.
25006 (aarch64_dbx_register_number): Handle VG and the predicate registers.
25007 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
25008 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
25009 (VEC_ANY_DATA, VEC_STRUCT): New constants.
25010 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
25011 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
25012 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
25013 (aarch64_get_mask_mode): New functions.
25014 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
25015 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
25016 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
25017 predicate modes and predicate registers. Explicitly restrict
25018 GPRs to modes of 16 bytes or smaller. Only allow FP registers
25019 to store a vector mode if it is recognized by
25020 aarch64_classify_vector_mode.
25021 (aarch64_regmode_natural_size): New function.
25022 (aarch64_hard_regno_caller_save_mode): Return the original mode
25024 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
25025 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
25026 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
25027 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
25029 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
25030 does not overlap dest if the function is frame-related. Handle
25032 (aarch64_split_add_offset): New function.
25033 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
25034 them aarch64_add_offset.
25035 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
25036 and update call to aarch64_sub_sp.
25037 (aarch64_add_cfa_expression): New function.
25038 (aarch64_expand_prologue): Pass extra temporary registers to the
25039 functions above. Handle the case in which we need to emit new
25040 DW_CFA_expressions for registers that were originally saved
25041 relative to the stack pointer, but now have to be expressed
25042 relative to the frame pointer.
25043 (aarch64_output_mi_thunk): Pass extra temporary registers to the
25045 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
25046 IP0 and IP1 values for SVE frames.
25047 (aarch64_expand_vec_series): New function.
25048 (aarch64_expand_sve_widened_duplicate): Likewise.
25049 (aarch64_expand_sve_const_vector): Likewise.
25050 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
25051 Handle SVE constants. Use emit_move_insn to move a force_const_mem
25052 into the register, rather than emitting a SET directly.
25053 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
25054 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
25055 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
25056 (offset_9bit_signed_scaled_p): New functions.
25057 (aarch64_replicate_bitmask_imm): New function.
25058 (aarch64_bitmask_imm): Use it.
25059 (aarch64_cannot_force_const_mem): Reject expressions involving
25060 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
25061 (aarch64_classify_index): Handle SVE indices, by requiring
25062 a plain register index with a scale that matches the element size.
25063 (aarch64_classify_address): Handle SVE addresses. Assert that
25064 the mode of the address is VOIDmode or an integer mode.
25065 Update call to aarch64_classify_symbol.
25066 (aarch64_classify_symbolic_expression): Update call to
25067 aarch64_classify_symbol.
25068 (aarch64_const_vec_all_in_range_p): New function.
25069 (aarch64_print_vector_float_operand): Likewise.
25070 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
25071 "vN" for FP registers with SVE modes. Handle (const ...) vectors
25072 and the FP immediates 1.0 and 0.5.
25073 (aarch64_print_address_internal): Handle SVE addresses.
25074 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
25075 (aarch64_regno_regclass): Handle predicate registers.
25076 (aarch64_secondary_reload): Handle big-endian reloads of SVE
25078 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
25079 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
25080 (aarch64_convert_sve_vector_bits): New function.
25081 (aarch64_override_options): Use it to handle -msve-vector-bits=.
25082 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25083 rather than an rtx.
25084 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25085 Handle SVE vector and predicate modes. Accept VL-based constants
25086 that need only one temporary register, and VL offsets that require
25087 no temporary registers.
25088 (aarch64_conditional_register_usage): Mark the predicate registers
25089 as fixed if SVE isn't available.
25090 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25091 Return true for SVE vector and predicate modes.
25092 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25093 rather than an unsigned int. Handle SVE modes.
25094 (aarch64_preferred_simd_mode): Update call accordingly. Handle
25096 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25098 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25099 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25100 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25101 (aarch64_sve_float_mul_immediate_p): New functions.
25102 (aarch64_sve_valid_immediate): New function.
25103 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25104 Explicitly reject structure modes. Check for INDEX constants.
25105 Handle PTRUE and PFALSE constants.
25106 (aarch64_check_zero_based_sve_index_immediate): New function.
25107 (aarch64_simd_imm_zero_p): Delete.
25108 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25109 vector modes. Accept constants in the range of CNT[BHWD].
25110 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25111 ask for an Advanced SIMD mode.
25112 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25113 (aarch64_simd_vector_alignment): Handle SVE predicates.
25114 (aarch64_vectorize_preferred_vector_alignment): New function.
25115 (aarch64_simd_vector_alignment_reachable): Use it instead of
25117 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25118 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25120 (MAX_VECT_LEN): Delete.
25121 (expand_vec_perm_d): Add a vec_flags field.
25122 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25123 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25124 (aarch64_evpc_ext): Don't apply a big-endian lane correction
25126 (aarch64_evpc_rev): Rename to...
25127 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
25128 (aarch64_evpc_rev_global): New function.
25129 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25130 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25132 (aarch64_evpc_sve_tbl): New function.
25133 (aarch64_expand_vec_perm_const_1): Update after rename of
25134 aarch64_evpc_rev. Handle SVE permutes too, trying
25135 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25136 than aarch64_evpc_tbl.
25137 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25138 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25139 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25140 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25141 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25142 (aarch64_expand_sve_vcond): New functions.
25143 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25144 of aarch64_vector_mode_p.
25145 (aarch64_dwarf_poly_indeterminate_value): New function.
25146 (aarch64_compute_pressure_classes): Likewise.
25147 (aarch64_can_change_mode_class): Likewise.
25148 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25149 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25150 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25151 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25152 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25153 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25154 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25155 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25157 (Dn, Dl, Dr): Accept const as well as const_vector.
25158 (Dz): Likewise. Compare against CONST0_RTX.
25159 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25160 of "vector" where appropriate.
25161 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25162 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25163 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25164 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25165 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25166 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25167 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25168 (v_int_equiv): Extend to SVE modes.
25169 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25171 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25172 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25173 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25174 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25175 (SVE_COND_FP_CMP): New int iterators.
25176 (perm_hilo): Handle the new unpack unspecs.
25177 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25179 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25180 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25181 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25182 (aarch64_equality_operator, aarch64_constant_vector_operand)
25183 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25184 (aarch64_sve_nonimmediate_operand): Likewise.
25185 (aarch64_sve_general_operand): Likewise.
25186 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25187 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25188 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25189 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25190 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25191 (aarch64_sve_float_arith_immediate): Likewise.
25192 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25193 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25194 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25195 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25196 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25197 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25198 (aarch64_sve_float_arith_operand): Likewise.
25199 (aarch64_sve_float_arith_with_sub_operand): Likewise.
25200 (aarch64_sve_float_mul_operand): Likewise.
25201 (aarch64_sve_vec_perm_operand): Likewise.
25202 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25203 (aarch64_mov_operand): Accept const_poly_int and const_vector.
25204 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25205 as well as const_vector.
25206 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25207 in file. Use CONST0_RTX and CONSTM1_RTX.
25208 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
25209 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25210 Use aarch64_simd_imm_zero.
25211 * config/aarch64/aarch64-sve.md: New file.
25212 * config/aarch64/aarch64.md: Include it.
25213 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25214 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25215 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25216 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25217 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25218 (sve): New attribute.
25219 (enabled): Disable instructions with the sve attribute unless
25221 (movqi, movhi): Pass CONST_POLY_INT operaneds through
25222 aarch64_expand_mov_immediate.
25223 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25224 CNT[BHSD] immediates.
25225 (movti): Split CONST_POLY_INT moves into two halves.
25226 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25227 Split additions that need a temporary here if the destination
25228 is the stack pointer.
25229 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25230 (*add<mode>3_poly_1): New instruction.
25231 (set_clobber_cc): New expander.
25233 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25235 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25236 parameter and use it instead of GET_MODE_SIZE (innermode). Use
25237 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25238 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25239 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
25240 Change innermode from fixed_mode_size to machine_mode.
25241 (simplify_subreg): Update call accordingly. Handle a constant-sized
25242 subreg of a variable-length CONST_VECTOR.
25244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25245 Alan Hayward <alan.hayward@arm.com>
25246 David Sherwood <david.sherwood@arm.com>
25248 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25249 (add_offset_to_base): New function, split out from...
25250 (create_mem_ref): ...here. When handling a scale other than 1,
25251 check first whether the address is valid without the offset.
25252 Add it into the base if so, leaving the index and scale as-is.
25254 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25257 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25258 fold_for_warn before checking if arg2 is INTEGER_CST.
25260 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
25262 * config/rs6000/predicates.md (load_multiple_operation): Delete.
25263 (store_multiple_operation): Delete.
25264 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25265 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25266 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25267 guarded by TARGET_STRING.
25268 (rs6000_output_load_multiple): Delete.
25269 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25270 OPTION_MASK_STRING / TARGET_STRING handling.
25271 (print_operand) <'N', 'O'>: Add comment that these are unused now.
25272 (const rs6000_opt_masks) <"string">: Change mask to 0.
25273 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25274 (MASK_STRING): Delete.
25275 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25277 (load_multiple): Delete.
25284 (store_multiple): Delete.
25291 (movmemsi_8reg): Delete.
25292 (corresponding unnamed define_insn): Delete.
25293 (movmemsi_6reg): Delete.
25294 (corresponding unnamed define_insn): Delete.
25295 (movmemsi_4reg): Delete.
25296 (corresponding unnamed define_insn): Delete.
25297 (movmemsi_2reg): Delete.
25298 (corresponding unnamed define_insn): Delete.
25299 (movmemsi_1reg): Delete.
25300 (corresponding unnamed define_insn): Delete.
25301 * config/rs6000/rs6000.opt (mno-string): New.
25302 (mstring): Replace by deprecation warning stub.
25303 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25305 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25307 * regrename.c (regrename_do_replace): If replacing the same
25308 reg multiple times, try to reuse last created gen_raw_REG.
25311 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25312 main to workaround a bug in GDB.
25314 2018-01-12 Tom de Vries <tom@codesourcery.com>
25317 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25319 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
25321 PR rtl-optimization/80481
25322 * ira-color.c (get_cap_member): New function.
25323 (allocnos_conflict_by_live_ranges_p): Use it.
25324 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25325 (setup_slot_coalesced_allocno_live_ranges): Ditto.
25327 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
25330 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25331 (*saddl_se_1): Ditto.
25332 (*ssubsi_1): Ditto.
25333 (*ssubl_se_1): Ditto.
25335 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25337 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25338 rather than wi::to_widest for DR_INITs.
25339 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25340 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25341 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25343 (vect_analyze_group_access_1): Note that here.
25345 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25347 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25348 polynomial type sizes.
25350 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25352 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25353 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25354 (gimple_add_tmp_var): Likewise.
25356 2018-01-12 Martin Liska <mliska@suse.cz>
25358 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25359 (gimple_alloc_sizes): Likewise.
25360 (dump_gimple_statistics): Use PRIu64 in printf format.
25361 * gimple.h: Change uint64_t to int.
25363 2018-01-12 Martin Liska <mliska@suse.cz>
25365 * tree-core.h: Use uint64_t instead of int.
25366 * tree.c (tree_node_counts): Likewise.
25367 (tree_node_sizes): Likewise.
25368 (dump_tree_statistics): Use PRIu64 in printf format.
25370 2018-01-12 Martin Liska <mliska@suse.cz>
25372 * Makefile.in: As qsort_chk is implemented in vec.c, add
25373 vec.o to linkage of gencfn-macros.
25374 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25375 passing the info to record_node_allocation_statistics.
25376 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25378 * ggc-common.c (struct ggc_usage): Add operator== and use
25379 it in operator< and compare function.
25380 * mem-stats.h (struct mem_usage): Likewise.
25381 * vec.c (struct vec_usage): Remove operator< and compare
25382 function. Can be simply inherited.
25384 2018-01-12 Martin Jambor <mjambor@suse.cz>
25387 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25388 * tree-ssa-math-opts.c: Include domwalk.h.
25389 (convert_mult_to_fma_1): New function.
25390 (fma_transformation_info): New type.
25391 (fma_deferring_state): Likewise.
25392 (cancel_fma_deferring): New function.
25393 (result_of_phi): Likewise.
25394 (last_fma_candidate_feeds_initial_phi): Likewise.
25395 (convert_mult_to_fma): Added deferring logic, split actual
25396 transformation to convert_mult_to_fma_1.
25397 (math_opts_dom_walker): New type.
25398 (math_opts_dom_walker::after_dom_children): New method, body moved
25399 here from pass_optimize_widening_mul::execute, added deferring logic
25401 (pass_optimize_widening_mul::execute): Moved most of code to
25402 math_opts_dom_walker::after_dom_children.
25403 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25404 * config/i386/i386.c (ix86_option_override_internal): Added
25405 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25407 2018-01-12 Richard Biener <rguenther@suse.de>
25410 * dwarf2out.c (gen_variable_die): Do not reset old_die for
25411 inline instance vars.
25413 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
25416 * config/rx/rx.c (rx_is_restricted_memory_address):
25417 Handle SUBREG case.
25419 2018-01-12 Richard Biener <rguenther@suse.de>
25421 PR tree-optimization/80846
25422 * target.def (split_reduction): New target hook.
25423 * targhooks.c (default_split_reduction): New function.
25424 * targhooks.h (default_split_reduction): Declare.
25425 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25426 target requests first reduce vectors by combining low and high
25428 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25429 (get_vectype_for_scalar_type_and_size): Export.
25430 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25431 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25432 * doc/tm.texi: Regenerate.
25433 * config/i386/i386.c (ix86_split_reduction): Implement
25434 TARGET_VECTORIZE_SPLIT_REDUCTION.
25436 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25439 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25440 in PIC mode except for TARGET_VXWORKS_RTP.
25441 * config/sparc/sparc.c: Include cfgrtl.h.
25442 (TARGET_INIT_PIC_REG): Define.
25443 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25444 (sparc_pic_register_p): New predicate.
25445 (sparc_legitimate_address_p): Use it.
25446 (sparc_legitimize_pic_address): Likewise.
25447 (sparc_delegitimize_address): Likewise.
25448 (sparc_mode_dependent_address_p): Likewise.
25449 (gen_load_pcrel_sym): Remove 4th parameter.
25450 (load_got_register): Adjust call to above. Remove obsolete stuff.
25451 (sparc_expand_prologue): Do not call load_got_register here.
25452 (sparc_flat_expand_prologue): Likewise.
25453 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25454 (sparc_use_pseudo_pic_reg): New function.
25455 (sparc_init_pic_reg): Likewise.
25456 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25457 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25459 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25461 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25462 Add item for branch_cost.
25464 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25466 PR rtl-optimization/83565
25467 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25468 not extend the result to a larger mode for rotate operations.
25469 (num_sign_bit_copies1): Likewise.
25471 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25474 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25476 Use values-Xc.o for -pedantic.
25477 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25479 2018-01-12 Martin Liska <mliska@suse.cz>
25482 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25484 (possible_polymorphic_call_targets): Use it.
25485 (ipa_devirt): Likewise.
25487 2018-01-12 Martin Liska <mliska@suse.cz>
25489 * profile-count.h (enum profile_quality): Use 0 as invalid
25490 enum value of profile_quality.
25492 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
25494 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25495 -mext-string options.
25497 2018-01-12 Richard Biener <rguenther@suse.de>
25499 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25500 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25501 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25503 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25505 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
25507 * configure.ac (--with-long-double-format): Add support for the
25508 configuration option to change the default long double format on
25510 * config.gcc (powerpc*-linux*-*): Likewise.
25511 * configure: Regenerate.
25512 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25513 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25514 used without modification.
25516 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25518 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25519 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25520 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25521 MISC_BUILTIN_SPEC_BARRIER.
25522 (rs6000_init_builtins): Likewise.
25523 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25525 (speculation_barrier): New define_insn.
25526 * doc/extend.texi: Document __builtin_speculation_barrier.
25528 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25531 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25532 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25533 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25535 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
25536 integral modes instead of "ss" and "sd".
25537 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25538 vectors with 32-bit and 64-bit elements.
25539 (vecdupssescalarmodesuffix): New mode attribute.
25540 (vec_dup<mode>): Use it.
25542 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
25545 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25546 frame if argument is passed on stack.
25548 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25551 * ree.c (combine_reaching_defs): Optimize also
25552 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25553 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25555 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25557 PR middle-end/83189
25558 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25560 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25562 PR middle-end/83718
25563 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25564 after they are computed.
25566 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25568 PR tree-optimization/83695
25569 * gimple-loop-linterchange.cc
25570 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25571 reset cached scev information after interchange.
25572 (pass_linterchange::execute): Remove call to scev_reset_htab.
25574 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25576 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25577 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25578 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25579 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25580 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25581 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25582 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25583 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25584 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25585 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25586 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25587 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25588 (V_lane_reg): Likewise.
25589 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25591 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25592 (vfmal_lane_low<mode>_intrinsic,
25593 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25594 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25595 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25596 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25597 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25598 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25600 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25602 * config/arm/arm-cpus.in (fp16fml): New feature.
25603 (ALL_SIMD): Add fp16fml.
25604 (armv8.2-a): Add fp16fml as an option.
25605 (armv8.3-a): Likewise.
25606 (armv8.4-a): Add fp16fml as part of fp16.
25607 * config/arm/arm.h (TARGET_FP16FML): Define.
25608 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25610 * config/arm/arm-modes.def (V2HF): Define.
25611 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25612 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25613 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25614 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25615 vfmsl_low, vfmsl_high): New set of builtins.
25616 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25617 (vfml_op): New code attribute.
25618 (VFMLHALVES): New int iterator.
25619 (VFML, VFMLSEL): New mode attributes.
25620 (V_reg): Define mapping for V2HF.
25621 (V_hi, V_lo): New mode attributes.
25622 (VF_constraint): Likewise.
25623 (vfml_half, vfml_half_selector): New int attributes.
25624 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25626 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25627 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25629 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25630 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25631 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25632 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25634 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25635 Document new effective target and option set.
25637 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25639 * config/arm/arm-cpus.in (armv8_4): New feature.
25640 (ARMv8_4a): New fgroup.
25641 (armv8.4-a): New arch.
25642 * config/arm/arm-tables.opt: Regenerate.
25643 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25644 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25645 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25646 Add matching rules for -march=armv8.4-a and extensions.
25647 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25649 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25652 * config/rx/rx.md (BW): New mode attribute.
25653 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25655 2018-01-11 Richard Biener <rguenther@suse.de>
25657 PR tree-optimization/83435
25658 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25659 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25660 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25662 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25663 Alan Hayward <alan.hayward@arm.com>
25664 David Sherwood <david.sherwood@arm.com>
25666 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25668 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25669 (aarch64_print_address_internal): Use it to check for a zero offset.
25671 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25672 Alan Hayward <alan.hayward@arm.com>
25673 David Sherwood <david.sherwood@arm.com>
25675 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25676 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25677 Return a poly_int64 rather than a HOST_WIDE_INT.
25678 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25679 rather than a HOST_WIDE_INT.
25680 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25681 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25682 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25683 final_offset from HOST_WIDE_INT to poly_int64.
25684 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25685 to_constant when getting the number of units in an Advanced SIMD
25687 (aarch64_builtin_vectorized_function): Check for a constant number
25689 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25691 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25692 attribute instead of GET_MODE_NUNITS.
25693 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25694 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25695 GET_MODE_SIZE for fixed-size registers.
25696 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25697 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25698 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25699 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25700 (aarch64_print_operand, aarch64_print_address_internal)
25701 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25702 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25703 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25704 Handle polynomial GET_MODE_SIZE.
25705 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25706 wider than SImode without modification.
25707 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25708 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25709 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25710 passing and returning SVE modes.
25711 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25712 rather than GEN_INT.
25713 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25714 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25715 (aarch64_allocate_and_probe_stack_space): Likewise.
25716 (aarch64_layout_frame): Cope with polynomial offsets.
25717 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25718 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25719 polynomial offsets.
25720 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25721 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25722 poly_int64 rather than a HOST_WIDE_INT.
25723 (aarch64_get_separate_components, aarch64_process_components)
25724 (aarch64_expand_prologue, aarch64_expand_epilogue)
25725 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25726 (aarch64_anchor_offset): New function, split out from...
25727 (aarch64_legitimize_address): ...here.
25728 (aarch64_builtin_vectorization_cost): Handle polynomial
25729 TYPE_VECTOR_SUBPARTS.
25730 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25732 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25733 number of elements from the PARALLEL rather than the mode.
25734 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25735 rather than GET_MODE_BITSIZE.
25736 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25737 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25738 (aarch64_expand_vec_perm_const_1): Handle polynomial
25739 d->perm.length () and d->perm elements.
25740 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25741 Apply to_constant to d->perm elements.
25742 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25743 polynomial CONST_VECTOR_NUNITS.
25744 (aarch64_move_pointer): Take amount as a poly_int64 rather
25746 (aarch64_progress_pointer): Avoid temporary variable.
25747 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25748 the mode attribute instead of GET_MODE.
25750 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25751 Alan Hayward <alan.hayward@arm.com>
25752 David Sherwood <david.sherwood@arm.com>
25754 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25755 x exists before using it.
25756 (aarch64_add_constant_internal): Rename to...
25757 (aarch64_add_offset_1): ...this. Replace regnum with separate
25758 src and dest rtxes. Handle the case in which they're different,
25759 including when the offset is zero. Replace scratchreg with an rtx.
25760 Use 2 additions if there is no spare register into which we can
25761 move a 16-bit constant.
25762 (aarch64_add_constant): Delete.
25763 (aarch64_add_offset): Replace reg with separate src and dest
25764 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25765 Use aarch64_add_offset_1.
25766 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25767 an rtx rather than an int. Take the delta as a poly_int64
25768 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25769 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25770 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25771 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25772 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25773 and aarch64_add_sp.
25774 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25775 aarch64_add_constant.
25777 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25779 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25780 Use scalar_float_mode.
25782 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25784 * config/aarch64/aarch64-simd.md
25785 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25786 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25787 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25788 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25789 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25790 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25791 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25792 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25793 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25794 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25796 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25799 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25800 targ_options->x_arm_arch_string is non NULL.
25802 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25804 * config/aarch64/aarch64.h
25805 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25807 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25810 * expmed.c (emit_store_flag_force): Swap if const op0
25811 and change VOIDmode to mode of op0.
25813 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25815 PR rtl-optimization/83761
25816 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25817 than bytes to mode_for_size.
25819 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25821 PR middle-end/83189
25822 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25823 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25826 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25828 PR middle-end/83575
25829 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25830 when in layout mode.
25831 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25832 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25835 2018-01-10 Michael Collison <michael.collison@arm.com>
25837 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25838 * config/aarch64/aarch64-option-extension.def: Add
25839 AARCH64_OPT_EXTENSION of 'fp16fml'.
25840 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25841 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25842 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25843 * config/aarch64/constraints.md (Ui7): New constraint.
25844 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25845 (VFMLA_SEL_W): Ditto.
25848 (VFMLA16_LOW): New int iterator.
25849 (VFMLA16_HIGH): Ditto.
25850 (UNSPEC_FMLAL): New unspec.
25851 (UNSPEC_FMLSL): Ditto.
25852 (UNSPEC_FMLAL2): Ditto.
25853 (UNSPEC_FMLSL2): Ditto.
25854 (f16mac): New code attribute.
25855 * config/aarch64/aarch64-simd-builtins.def
25856 (aarch64_fmlal_lowv2sf): Ditto.
25857 (aarch64_fmlsl_lowv2sf): Ditto.
25858 (aarch64_fmlalq_lowv4sf): Ditto.
25859 (aarch64_fmlslq_lowv4sf): Ditto.
25860 (aarch64_fmlal_highv2sf): Ditto.
25861 (aarch64_fmlsl_highv2sf): Ditto.
25862 (aarch64_fmlalq_highv4sf): Ditto.
25863 (aarch64_fmlslq_highv4sf): Ditto.
25864 (aarch64_fmlal_lane_lowv2sf): Ditto.
25865 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25866 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25867 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25868 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25869 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25870 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25871 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25872 (aarch64_fmlal_lane_highv2sf): Ditto.
25873 (aarch64_fmlsl_lane_highv2sf): Ditto.
25874 (aarch64_fmlal_laneq_highv2sf): Ditto.
25875 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25876 (aarch64_fmlalq_lane_highv4sf): Ditto.
25877 (aarch64_fmlsl_lane_highv4sf): Ditto.
25878 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25879 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25880 * config/aarch64/aarch64-simd.md:
25881 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25882 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25883 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25884 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25885 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25886 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25887 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25888 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25889 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25890 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25891 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25892 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25893 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25894 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25895 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25896 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25897 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25898 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25899 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25900 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25901 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25902 (vfmlsl_low_u32): Ditto.
25903 (vfmlalq_low_u32): Ditto.
25904 (vfmlslq_low_u32): Ditto.
25905 (vfmlal_high_u32): Ditto.
25906 (vfmlsl_high_u32): Ditto.
25907 (vfmlalq_high_u32): Ditto.
25908 (vfmlslq_high_u32): Ditto.
25909 (vfmlal_lane_low_u32): Ditto.
25910 (vfmlsl_lane_low_u32): Ditto.
25911 (vfmlal_laneq_low_u32): Ditto.
25912 (vfmlsl_laneq_low_u32): Ditto.
25913 (vfmlalq_lane_low_u32): Ditto.
25914 (vfmlslq_lane_low_u32): Ditto.
25915 (vfmlalq_laneq_low_u32): Ditto.
25916 (vfmlslq_laneq_low_u32): Ditto.
25917 (vfmlal_lane_high_u32): Ditto.
25918 (vfmlsl_lane_high_u32): Ditto.
25919 (vfmlal_laneq_high_u32): Ditto.
25920 (vfmlsl_laneq_high_u32): Ditto.
25921 (vfmlalq_lane_high_u32): Ditto.
25922 (vfmlslq_lane_high_u32): Ditto.
25923 (vfmlalq_laneq_high_u32): Ditto.
25924 (vfmlslq_laneq_high_u32): Ditto.
25925 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25926 (AARCH64_FL_FOR_ARCH8_4): New.
25927 (AARCH64_ISA_F16FML): New ISA flag.
25928 (TARGET_F16FML): New feature flag for fp16fml.
25929 (doc/invoke.texi): Document new fp16fml option.
25931 2018-01-10 Michael Collison <michael.collison@arm.com>
25933 * config/aarch64/aarch64-builtins.c:
25934 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25935 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25936 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25937 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25938 (AARCH64_ISA_SHA3): New ISA flag.
25939 (TARGET_SHA3): New feature flag for sha3.
25940 * config/aarch64/iterators.md (sha512_op): New int attribute.
25941 (CRYPTO_SHA512): New int iterator.
25942 (UNSPEC_SHA512H): New unspec.
25943 (UNSPEC_SHA512H2): Ditto.
25944 (UNSPEC_SHA512SU0): Ditto.
25945 (UNSPEC_SHA512SU1): Ditto.
25946 * config/aarch64/aarch64-simd-builtins.def
25947 (aarch64_crypto_sha512hqv2di): New builtin.
25948 (aarch64_crypto_sha512h2qv2di): Ditto.
25949 (aarch64_crypto_sha512su0qv2di): Ditto.
25950 (aarch64_crypto_sha512su1qv2di): Ditto.
25951 (aarch64_eor3qv8hi): Ditto.
25952 (aarch64_rax1qv2di): Ditto.
25953 (aarch64_xarqv2di): Ditto.
25954 (aarch64_bcaxqv8hi): Ditto.
25955 * config/aarch64/aarch64-simd.md:
25956 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25957 (aarch64_crypto_sha512su0qv2di): Ditto.
25958 (aarch64_crypto_sha512su1qv2di): Ditto.
25959 (aarch64_eor3qv8hi): Ditto.
25960 (aarch64_rax1qv2di): Ditto.
25961 (aarch64_xarqv2di): Ditto.
25962 (aarch64_bcaxqv8hi): Ditto.
25963 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25964 (vsha512h2q_u64): Ditto.
25965 (vsha512su0q_u64): Ditto.
25966 (vsha512su1q_u64): Ditto.
25967 (veor3q_u16): Ditto.
25968 (vrax1q_u64): Ditto.
25969 (vxarq_u64): Ditto.
25970 (vbcaxq_u16): Ditto.
25971 * config/arm/types.md (crypto_sha512): New type attribute.
25972 (crypto_sha3): Ditto.
25973 (doc/invoke.texi): Document new sha3 option.
25975 2018-01-10 Michael Collison <michael.collison@arm.com>
25977 * config/aarch64/aarch64-builtins.c:
25978 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25979 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25980 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25981 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25982 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25983 (AARCH64_ISA_SM4): New ISA flag.
25984 (TARGET_SM4): New feature flag for sm4.
25985 * config/aarch64/aarch64-simd-builtins.def
25986 (aarch64_sm3ss1qv4si): Ditto.
25987 (aarch64_sm3tt1aq4si): Ditto.
25988 (aarch64_sm3tt1bq4si): Ditto.
25989 (aarch64_sm3tt2aq4si): Ditto.
25990 (aarch64_sm3tt2bq4si): Ditto.
25991 (aarch64_sm3partw1qv4si): Ditto.
25992 (aarch64_sm3partw2qv4si): Ditto.
25993 (aarch64_sm4eqv4si): Ditto.
25994 (aarch64_sm4ekeyqv4si): Ditto.
25995 * config/aarch64/aarch64-simd.md:
25996 (aarch64_sm3ss1qv4si): Ditto.
25997 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25998 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25999 (aarch64_sm4eqv4si): Ditto.
26000 (aarch64_sm4ekeyqv4si): Ditto.
26001 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
26002 (sm3part_op): Ditto.
26003 (CRYPTO_SM3TT): Ditto.
26004 (CRYPTO_SM3PART): Ditto.
26005 (UNSPEC_SM3SS1): New unspec.
26006 (UNSPEC_SM3TT1A): Ditto.
26007 (UNSPEC_SM3TT1B): Ditto.
26008 (UNSPEC_SM3TT2A): Ditto.
26009 (UNSPEC_SM3TT2B): Ditto.
26010 (UNSPEC_SM3PARTW1): Ditto.
26011 (UNSPEC_SM3PARTW2): Ditto.
26012 (UNSPEC_SM4E): Ditto.
26013 (UNSPEC_SM4EKEY): Ditto.
26014 * config/aarch64/constraints.md (Ui2): New constraint.
26015 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
26016 * config/arm/types.md (crypto_sm3): New type attribute.
26017 (crypto_sm4): Ditto.
26018 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
26019 (vsm3tt1aq_u32): Ditto.
26020 (vsm3tt1bq_u32): Ditto.
26021 (vsm3tt2aq_u32): Ditto.
26022 (vsm3tt2bq_u32): Ditto.
26023 (vsm3partw1q_u32): Ditto.
26024 (vsm3partw2q_u32): Ditto.
26025 (vsm4eq_u32): Ditto.
26026 (vsm4ekeyq_u32): Ditto.
26027 (doc/invoke.texi): Document new sm4 option.
26029 2018-01-10 Michael Collison <michael.collison@arm.com>
26031 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
26032 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
26033 (AARCH64_FL_FOR_ARCH8_4): New.
26034 (AARCH64_FL_V8_4): New flag.
26035 (doc/invoke.texi): Document new armv8.4-a option.
26037 2018-01-10 Michael Collison <michael.collison@arm.com>
26039 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26040 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
26041 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
26042 * config/aarch64/aarch64-option-extension.def: Add
26043 AARCH64_OPT_EXTENSION of 'sha2'.
26044 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
26045 (crypto): Disable sha2 and aes if crypto disabled.
26046 (crypto): Enable aes and sha2 if enabled.
26047 (simd): Disable sha2 and aes if simd disabled.
26048 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
26050 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
26051 (TARGET_SHA2): New feature flag for sha2.
26052 (TARGET_AES): New feature flag for aes.
26053 * config/aarch64/aarch64-simd.md:
26054 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
26055 conditional on TARGET_AES.
26056 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
26057 (aarch64_crypto_sha1hsi): Make pattern conditional
26059 (aarch64_crypto_sha1hv4si): Ditto.
26060 (aarch64_be_crypto_sha1hv4si): Ditto.
26061 (aarch64_crypto_sha1su1v4si): Ditto.
26062 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
26063 (aarch64_crypto_sha1su0v4si): Ditto.
26064 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
26065 (aarch64_crypto_sha256su0v4si): Ditto.
26066 (aarch64_crypto_sha256su1v4si): Ditto.
26067 (doc/invoke.texi): Document new aes and sha2 options.
26069 2018-01-10 Martin Sebor <msebor@redhat.com>
26071 PR tree-optimization/83781
26072 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
26075 2018-01-11 Martin Sebor <msebor@gmail.com>
26076 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26078 PR tree-optimization/83501
26079 PR tree-optimization/81703
26081 * tree-ssa-strlen.c (get_string_cst): Rename...
26082 (get_string_len): ...to this. Handle global constants.
26083 (handle_char_store): Adjust.
26085 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
26086 Jim Wilson <jimw@sifive.com>
26088 * config/riscv/riscv-protos.h (riscv_output_return): New.
26089 * config/riscv/riscv.c (struct machine_function): New naked_p field.
26090 (riscv_attribute_table, riscv_output_return),
26091 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26092 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26093 (riscv_compute_frame_info): Only compute frame->mask if not a naked
26095 (riscv_expand_prologue): Add early return for naked function.
26096 (riscv_expand_epilogue): Likewise.
26097 (riscv_function_ok_for_sibcall): Return false for naked function.
26098 (riscv_set_current_function): New.
26099 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26100 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26101 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26102 * doc/extend.texi (RISC-V Function Attributes): New.
26104 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
26106 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26107 check for 128-bit long double before checking TCmode.
26108 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26109 128-bit long doubles before checking TFmode or TCmode.
26110 (FLOAT128_IBM_P): Likewise.
26112 2018-01-10 Martin Sebor <msebor@redhat.com>
26114 PR tree-optimization/83671
26115 * builtins.c (c_strlen): Unconditionally return zero for the empty
26117 Use -Warray-bounds for warnings.
26118 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26119 for non-constant array indices with COMPONENT_REF, arrays of
26120 arrays, and pointers to arrays.
26121 (gimple_fold_builtin_strlen): Determine and set length range for
26122 non-constant character arrays.
26124 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
26126 PR middle-end/81897
26127 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26130 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
26132 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26134 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
26137 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26138 VECTOR_MEM_ALTIVEC_OR_VSX_P.
26139 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26140 indexed_or_indirect_operand predicate.
26141 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26142 (*vsx_le_perm_load_v8hi): Likewise.
26143 (*vsx_le_perm_load_v16qi): Likewise.
26144 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26145 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26146 (*vsx_le_perm_store_v8hi): Likewise.
26147 (*vsx_le_perm_store_v16qi): Likewise.
26148 (eight unnamed splitters): Likewise.
26150 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
26152 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26153 * config/rs6000/emmintrin.h: Likewise.
26154 * config/rs6000/mmintrin.h: Likewise.
26155 * config/rs6000/xmmintrin.h: Likewise.
26157 2018-01-10 David Malcolm <dmalcolm@redhat.com>
26160 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26162 * tree.c (tree_nop_conversion): Return true for location wrapper
26164 (maybe_wrap_with_location): New function.
26165 (selftest::check_strip_nops): New function.
26166 (selftest::test_location_wrappers): New function.
26167 (selftest::tree_c_tests): Call it.
26168 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26169 (maybe_wrap_with_location): New decl.
26170 (EXPR_LOCATION_WRAPPER_P): New macro.
26171 (location_wrapper_p): New inline function.
26172 (tree_strip_any_location_wrapper): New inline function.
26174 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
26177 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26178 stack_realign_offset for the largest alignment of stack slot
26180 (ix86_find_max_used_stack_alignment): New function.
26181 (ix86_finalize_stack_frame_flags): Use it. Set
26182 max_used_stack_alignment if we don't realign stack.
26183 * config/i386/i386.h (machine_function): Add
26184 max_used_stack_alignment.
26186 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
26188 * config/arm/arm.opt (-mbranch-cost): New option.
26189 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26192 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
26195 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26196 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26198 2018-01-10 Richard Biener <rguenther@suse.de>
26201 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26202 early out so it also covers the case where we have a non-NULL
26205 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
26207 PR tree-optimization/83753
26208 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26209 for non-strided grouped accesses if the number of elements is 1.
26211 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26214 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26215 * i386.h (TARGET_USE_GATHER): Define.
26216 * x86-tune.def (X86_TUNE_USE_GATHER): New.
26218 2018-01-10 Martin Liska <mliska@suse.cz>
26221 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26222 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26224 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26225 CLEANUP_NO_PARTITIONING is not set.
26227 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
26229 * doc/rtl.texi: Remove documentation of (const ...) wrappers
26230 for vectors, as a partial revert of r254296.
26231 * rtl.h (const_vec_p): Delete.
26232 (const_vec_duplicate_p): Don't test for vector CONSTs.
26233 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26234 * expmed.c (make_tree): Likewise.
26237 * common.md (E, F): Use CONSTANT_P instead of checking for
26239 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26240 checking for CONST_VECTOR.
26242 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26244 PR middle-end/83575
26245 * predict.c (force_edge_cold): Handle in more sane way edges
26246 with no prediction.
26248 2018-01-09 Carl Love <cel@us.ibm.com>
26250 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26252 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26253 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26254 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26255 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
26256 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26257 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
26258 * config/rs6000/rs6000-protos.h: Add extern defition for
26259 rs6000_generate_float2_double_code.
26260 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26262 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26263 (float2_v2df): Add define_expand.
26265 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
26268 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26269 op_mode in the force_to_mode call.
26271 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26273 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26274 instead of checking each element individually.
26275 (aarch64_evpc_uzp): Likewise.
26276 (aarch64_evpc_zip): Likewise.
26277 (aarch64_evpc_ext): Likewise.
26278 (aarch64_evpc_rev): Likewise.
26279 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26280 instead of checking each element individually. Return true without
26282 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26283 whether all selected elements come from the same input, instead of
26284 checking each element individually. Remove calls to gen_rtx_REG,
26285 start_sequence and end_sequence and instead assert that no rtl is
26288 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26290 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26291 order of HIGH and CONST checks.
26293 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26295 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26296 if the destination isn't an SSA_NAME.
26298 2018-01-09 Richard Biener <rguenther@suse.de>
26300 PR tree-optimization/83668
26301 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26303 (canonicalize_loop_form): ... here, renamed from ...
26304 (canonicalize_loop_closed_ssa_form): ... this and amended to
26305 swap successor edges for loop exit blocks to make us use
26306 the RPO order we need for initial schedule generation.
26308 2018-01-09 Joseph Myers <joseph@codesourcery.com>
26310 PR tree-optimization/64811
26311 * match.pd: When optimizing comparisons with Inf, avoid
26312 introducing or losing exceptions from comparisons with NaN.
26314 2018-01-09 Martin Liska <mliska@suse.cz>
26317 * asan.c (shadow_mem_size): Add gcc_assert.
26319 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
26321 Don't save registers in main().
26324 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26325 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26326 * config/avr/avr.c (avr_set_current_function): Don't error if
26327 naked, OS_task or OS_main are specified at the same time.
26328 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26330 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26332 * common/config/avr/avr-common.c (avr_option_optimization_table):
26333 Switch on -mmain-is-OS_task for optimizing compilations.
26335 2018-01-09 Richard Biener <rguenther@suse.de>
26337 PR tree-optimization/83572
26338 * graphite.c: Include cfganal.h.
26339 (graphite_transform_loops): Connect infinite loops to exit
26340 and remove fake edges at the end.
26342 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26344 * ipa-inline.c (edge_badness): Revert accidental checkin.
26346 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26349 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26350 symbols; not inline clones.
26352 2018-01-09 Jakub Jelinek <jakub@redhat.com>
26355 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26356 hard registers. Formatting fixes.
26358 PR preprocessor/83722
26359 * gcc.c (try_generate_repro): Pass
26360 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26361 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26364 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
26365 Kito Cheng <kito.cheng@gmail.com>
26367 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26368 (riscv_leaf_function_p): Delete.
26369 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26371 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26373 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26375 (do_ifelse): New function.
26376 (do_isel): New function.
26377 (do_sub3): New function.
26378 (do_add3): New function.
26379 (do_load_mask_compare): New function.
26380 (do_overlap_load_compare): New function.
26381 (expand_compare_loop): New function.
26382 (expand_block_compare): Call expand_compare_loop() when appropriate.
26383 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26384 option description.
26385 (-mblock-compare-inline-loop-limit): New option.
26387 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26390 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26391 Reverse order of second and third operands in first alternative.
26392 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26393 of first and second elements in UNSPEC_VPERMR vector.
26394 (altivec_expand_vec_perm_le): Likewise.
26396 2018-01-08 Jeff Law <law@redhat.com>
26398 PR rtl-optimizatin/81308
26399 * tree-switch-conversion.c (cfg_altered): New file scoped static.
26400 (process_switch): If group_case_labels makes a change, then set
26402 (pass_convert_switch::execute): If a switch is converted, then
26403 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
26405 PR rtl-optimization/81308
26406 * recog.c (split_all_insns): Conditionally cleanup the CFG after
26409 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
26411 PR target/83663 - Revert r255946
26412 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26413 generation for cases where splatting a value is not useful.
26414 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26415 across a vec_duplicate and a paradoxical subreg forming a vector
26416 mode to a vec_concat.
26418 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26420 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26421 -march=armv8.3-a variants.
26422 * config/arm/t-multilib: Likewise.
26423 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
26425 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26427 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26429 (cceq_ior_compare_complement): Give it a name so I can use it, and
26430 change boolean_or_operator predicate to boolean_operator so it can
26431 be used to generate a crand.
26432 (eqne): New code iterator.
26433 (bd/bd_neg): New code_attrs.
26434 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26435 a single define_insn.
26436 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26437 decrement (bdnzt/bdnzf/bdzt/bdzf).
26438 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26439 with the new names of the branch decrement patterns, and added the
26440 names of the branch decrement conditional patterns.
26442 2018-01-08 Richard Biener <rguenther@suse.de>
26444 PR tree-optimization/83563
26445 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26448 2018-01-08 Richard Biener <rguenther@suse.de>
26450 PR middle-end/83713
26451 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26453 2018-01-08 Richard Biener <rguenther@suse.de>
26455 PR tree-optimization/83685
26456 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26457 references to abnormals.
26459 2018-01-08 Richard Biener <rguenther@suse.de>
26462 * dwarf2out.c (output_indirect_strings): Handle empty
26463 skeleton_debug_str_hash.
26464 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26466 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26468 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26469 (emit_store_direct): Likewise.
26470 (arc_trampoline_adjust_address): Likewise.
26471 (arc_asm_trampoline_template): New function.
26472 (arc_initialize_trampoline): Use asm_trampoline_template.
26473 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26474 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26475 * config/arc/arc.md (flush_icache): Delete pattern.
26477 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26479 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26480 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26483 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26486 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26487 by not USED_FOR_TARGET.
26488 (make_pass_resolve_sw_modes): Likewise.
26490 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26492 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26495 2018-01-08 Richard Biener <rguenther@suse.de>
26497 PR middle-end/83580
26498 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26500 2018-01-08 Richard Biener <rguenther@suse.de>
26502 PR middle-end/83517
26503 * match.pd ((t * 2) / 2) -> t): Add missing :c.
26505 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
26507 PR middle-end/81897
26508 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26509 basic blocks with a small number of successors.
26510 (convert_control_dep_chain_into_preds): Improve handling of
26512 (dump_predicates): Split apart into...
26513 (dump_pred_chain): ...here...
26514 (dump_pred_info): ...and here.
26515 (can_one_predicate_be_invalidated_p): Add debugging printfs.
26516 (can_chain_union_be_invalidated_p): Improve check for invalidation
26518 (uninit_uses_cannot_happen): Avoid unnecessary if
26519 convert_control_dep_chain_into_preds yielded nothing.
26521 2018-01-06 Martin Sebor <msebor@redhat.com>
26523 PR tree-optimization/83640
26524 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26525 subtracting negative offset from size.
26526 (builtin_access::overlap): Adjust offset bounds of the access to fall
26527 within the size of the object if possible.
26529 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
26531 PR rtl-optimization/83699
26532 * expmed.c (extract_bit_field_1): Restrict the vector usage of
26533 extract_bit_field_as_subreg to cases in which the extracted
26534 value is also a vector.
26536 * lra-constraints.c (process_alt_operands): Test for the equivalence
26537 substitutions when detecting a possible reload cycle.
26539 2018-01-06 Jakub Jelinek <jakub@redhat.com>
26542 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26543 by default if flag_selective_schedling{,2}. Formatting fixes.
26545 PR rtl-optimization/83682
26546 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26547 if it has non-VECTOR_MODE element mode.
26548 (vec_duplicate_p): Likewise.
26550 PR middle-end/83694
26551 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26552 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26554 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26557 * config/i386/i386-builtin.def
26558 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26559 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26560 Require also OPTION_MASK_ISA_AVX512F in addition to
26561 OPTION_MASK_ISA_GFNI.
26562 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26563 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26564 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26565 to OPTION_MASK_ISA_GFNI.
26566 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26567 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26568 OPTION_MASK_ISA_AVX512BW.
26569 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26570 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26571 addition to OPTION_MASK_ISA_GFNI.
26572 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26573 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26574 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26575 to OPTION_MASK_ISA_GFNI.
26576 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26577 a requirement for all ISAs rather than any of them with a few
26579 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26581 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26582 bitmasks to be enabled with 3 exceptions, instead of requiring any
26583 enabled ISA with lots of exceptions.
26584 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26585 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26586 Change avx512bw in isa attribute to avx512f.
26587 * config/i386/sgxintrin.h: Add license boilerplate.
26588 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26589 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26590 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26591 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26593 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26594 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26595 temporarily sse2 rather than sse if not enabled already.
26598 * config/i386/sse.md (VI248_VLBW): Rename to ...
26599 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26600 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26601 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26602 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26603 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26604 mode iterator instead of VI248_VLBW.
26606 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26608 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26609 (record_modified): Skip clobbers; add debug output.
26610 (param_change_prob): Use sreal frequencies.
26612 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26614 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26615 punt for user-aligned variables.
26617 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26619 * tree-chrec.c (chrec_contains_symbols): Return true for
26622 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26625 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26626 of (x|y) == x for BICS pattern.
26628 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26630 PR tree-optimization/83605
26631 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26632 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26635 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26637 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26638 * config/epiphany/rtems.h: New file.
26640 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26641 Uros Bizjak <ubizjak@gmail.com>
26644 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26645 QIreg_operand instead of register_operand predicate.
26646 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26647 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26648 comments instead of -fmitigate[-_]rop.
26650 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26653 * cgraphunit.c (symbol_table::compile): Switch to text_section
26654 before calling assembly_start debug hook.
26655 * run-rtl-passes.c (run_rtl_passes): Likewise.
26658 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26660 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26661 range_int_cst_p rather than !symbolic_range_p before calling
26662 extract_range_from_multiplicative_op_1.
26664 2018-01-04 Jeff Law <law@redhat.com>
26666 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26667 redundant test in assertion.
26669 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26671 * doc/rtl.texi: Document machine_mode wrapper classes.
26673 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26675 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26676 using tree_to_uhwi.
26678 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26680 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26681 the VEC_PERM_EXPR fold to fail.
26683 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26686 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26687 to switched_sections.
26689 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26692 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26693 test for d.testing.
26695 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26698 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26699 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26701 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26704 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26705 is BLKmode and bitpos not zero or mode change is needed.
26707 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26710 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26713 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26716 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26717 instead of MULT rtx. Update all corresponding splitters.
26718 (*saddl_se): Ditto.
26719 (*ssub<modesuffix>): Ditto.
26720 (*ssubl_se): Ditto.
26721 (*cmp_sadd_di): Update split patterns.
26722 (*cmp_sadd_si): Ditto.
26723 (*cmp_sadd_sidi): Ditto.
26724 (*cmp_ssub_di): Ditto.
26725 (*cmp_ssub_si): Ditto.
26726 (*cmp_ssub_sidi): Ditto.
26727 * config/alpha/predicates.md (const23_operand): New predicate.
26728 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26729 Look for ASHIFT, not MULT inner operand.
26730 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26732 2018-01-04 Martin Liska <mliska@suse.cz>
26734 PR gcov-profile/83669
26735 * gcov.c (output_intermediate_file): Add version to intermediate
26737 * doc/gcov.texi: Document new field 'version' in intermediate
26738 file format. Fix location of '-k' option of gcov command.
26740 2018-01-04 Martin Liska <mliska@suse.cz>
26743 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26745 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26747 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26749 2018-01-03 Martin Sebor <msebor@redhat.com>
26751 PR tree-optimization/83655
26752 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26753 checking calls with invalid arguments.
26755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26757 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26758 (vectorizable_mask_load_store): Delete.
26759 (vectorizable_call): Return false for masked loads and stores.
26760 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26761 instead of gimple_assign_rhs1.
26762 (vectorizable_load): Handle IFN_MASK_LOAD.
26763 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26765 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26767 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26769 (vectorizable_mask_load_store): ...here.
26770 (vectorizable_load): ...and here.
26772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26774 * tree-vect-stmts.c (vect_build_all_ones_mask)
26775 (vect_build_zero_merge_argument): New functions, split out from...
26776 (vectorizable_load): ...here.
26778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26780 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26782 (vectorizable_mask_load_store): ...here.
26783 (vectorizable_store): ...and here.
26785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26787 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26789 (vectorizable_mask_load_store): ...here.
26791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26793 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26794 (vect_model_store_cost): Take a vec_load_store_type instead of a
26796 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26797 (vect_model_store_cost): Take a vec_load_store_type instead of a
26799 (vectorizable_mask_load_store): Update accordingly.
26800 (vectorizable_store): Likewise.
26801 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26805 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26806 IFN_MASK_LOAD calls here rather than...
26807 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26810 Alan Hayward <alan.hayward@arm.com>
26811 David Sherwood <david.sherwood@arm.com>
26813 * expmed.c (extract_bit_field_1): For vector extracts,
26814 fall back to extract_bit_field_as_subreg if vec_extract
26817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26818 Alan Hayward <alan.hayward@arm.com>
26819 David Sherwood <david.sherwood@arm.com>
26821 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26822 they are variable or constant sized.
26823 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26824 slots for constant-sized data.
26826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26827 Alan Hayward <alan.hayward@arm.com>
26828 David Sherwood <david.sherwood@arm.com>
26830 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26831 handling COND_EXPRs with boolean comparisons, try to find a better
26832 basis for the mask type than the boolean itself.
26834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26836 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26837 is calculated and how it can be overridden.
26838 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26839 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26841 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26845 Alan Hayward <alan.hayward@arm.com>
26846 David Sherwood <david.sherwood@arm.com>
26848 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26849 Remove the mode argument.
26850 (aarch64_simd_valid_immediate): Remove the mode and inverse
26852 * config/aarch64/iterators.md (bitsize): New iterator.
26853 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26854 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26855 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26856 aarch64_simd_valid_immediate.
26857 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26858 (aarch64_reg_or_bic_imm): Likewise.
26859 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26860 with an insn_type enum and msl with a modifier_type enum.
26861 Replace element_width with a scalar_mode. Change the shift
26862 to unsigned int. Add constructors for scalar_float_mode and
26863 scalar_int_mode elements.
26864 (aarch64_vect_float_const_representable_p): Delete.
26865 (aarch64_can_const_movi_rtx_p)
26866 (aarch64_simd_scalar_immediate_valid_for_move)
26867 (aarch64_simd_make_constant): Update call to
26868 aarch64_simd_valid_immediate.
26869 (aarch64_advsimd_valid_immediate_hs): New function.
26870 (aarch64_advsimd_valid_immediate): Likewise.
26871 (aarch64_simd_valid_immediate): Remove mode and inverse
26872 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26873 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26874 and aarch64_float_const_representable_p on the result.
26875 (aarch64_output_simd_mov_immediate): Remove mode argument.
26876 Update call to aarch64_simd_valid_immediate and use of
26877 simd_immediate_info.
26878 (aarch64_output_scalar_simd_mov_immediate): Update call
26881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26882 Alan Hayward <alan.hayward@arm.com>
26883 David Sherwood <david.sherwood@arm.com>
26885 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26886 (mode_nunits): Likewise CONST_MODE_NUNITS.
26887 * machmode.def (ADJUST_NUNITS): Document.
26888 * genmodes.c (mode_data::need_nunits_adj): New field.
26889 (blank_mode): Update accordingly.
26890 (adj_nunits): New variable.
26891 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26893 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26894 listed in adj_nunits.
26895 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26896 listed in adj_nunits. Don't emit case statements for such modes.
26897 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26898 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26899 nothing if adj_nunits is nonnull.
26900 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26901 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26902 (emit_mode_fbit): Update use of print_maybe_const_decl.
26903 (emit_move_size): Likewise. Treat the array as non-const
26905 (emit_mode_adjustments): Handle adj_nunits.
26907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26909 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26910 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26911 (VECTOR_MODES): Use it.
26912 (make_vector_modes): Take the prefix as an argument.
26914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26915 Alan Hayward <alan.hayward@arm.com>
26916 David Sherwood <david.sherwood@arm.com>
26918 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26919 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26920 for MODE_VECTOR_BOOL.
26921 * machmode.def (VECTOR_BOOL_MODE): Document.
26922 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26923 (make_vector_bool_mode): New function.
26924 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26926 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26927 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26929 * stor-layout.c (int_mode_for_mode): Likewise.
26930 * tree.c (build_vector_type_for_mode): Likewise.
26931 * varasm.c (output_constant_pool_2): Likewise.
26932 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26933 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26934 for MODE_VECTOR_BOOL.
26935 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26936 of mode class checks.
26937 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26938 instead of a list of mode class checks.
26939 (expand_vector_scalar_condition): Likewise.
26940 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26943 Alan Hayward <alan.hayward@arm.com>
26944 David Sherwood <david.sherwood@arm.com>
26946 * machmode.h (mode_size): Change from unsigned short to
26948 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26949 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26950 or if measurement_type is not polynomial.
26951 (fixed_size_mode::includes_p): Check for constant-sized modes.
26952 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26953 return a poly_uint16 rather than an unsigned short.
26954 (emit_mode_size): Change the type of mode_size from unsigned short
26955 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26956 (emit_mode_adjustments): Cope with polynomial vector sizes.
26957 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26959 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26961 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26962 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26963 * caller-save.c (setup_save_areas): Likewise.
26964 (replace_reg_with_saved_mem): Likewise.
26965 * calls.c (emit_library_call_value_1): Likewise.
26966 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26967 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26968 (gen_lowpart_for_combine): Likewise.
26969 * convert.c (convert_to_integer_1): Likewise.
26970 * cse.c (equiv_constant, cse_insn): Likewise.
26971 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26972 (cselib_subst_to_values): Likewise.
26973 * dce.c (word_dce_process_block): Likewise.
26974 * df-problems.c (df_word_lr_mark_ref): Likewise.
26975 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26976 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26977 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26978 (rtl_for_decl_location): Likewise.
26979 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26980 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26981 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26982 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26983 (expand_expr_real_1): Likewise.
26984 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26985 (pad_below): Likewise.
26986 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26987 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26988 * ira.c (get_subreg_tracking_sizes): Likewise.
26989 * ira-build.c (ira_create_allocno_objects): Likewise.
26990 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26991 (ira_sort_regnos_for_alter_reg): Likewise.
26992 * ira-costs.c (record_operand_costs): Likewise.
26993 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26994 (resolve_simple_move): Likewise.
26995 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26996 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26997 (lra_constraints): Likewise.
26998 (CONST_POOL_OK_P): Reject variable-sized modes.
26999 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
27000 (add_pseudo_to_slot, lra_spill): Likewise.
27001 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27002 * optabs-query.c (get_best_extraction_insn): Likewise.
27003 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27004 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
27005 (expand_mult_highpart, valid_multiword_target_p): Likewise.
27006 * recog.c (offsettable_address_addr_space_p): Likewise.
27007 * regcprop.c (maybe_mode_change): Likewise.
27008 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
27009 * regrename.c (build_def_use): Likewise.
27010 * regstat.c (dump_reg_info): Likewise.
27011 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
27012 (find_reloads, find_reloads_subreg_address): Likewise.
27013 * reload1.c (eliminate_regs_1): Likewise.
27014 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
27015 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
27016 (simplify_binary_operation_1, simplify_subreg): Likewise.
27017 * targhooks.c (default_function_arg_padding): Likewise.
27018 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
27019 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
27020 (verify_gimple_assign_ternary): Likewise.
27021 * tree-inline.c (estimate_move_cost): Likewise.
27022 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27023 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
27024 (get_address_cost_ainc): Likewise.
27025 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
27026 (vect_supportable_dr_alignment): Likewise.
27027 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27028 (vectorizable_reduction): Likewise.
27029 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
27030 (vectorizable_operation, vectorizable_load): Likewise.
27031 * tree.c (build_same_sized_truth_vector_type): Likewise.
27032 * valtrack.c (cleanup_auto_inc_dec): Likewise.
27033 * var-tracking.c (emit_note_insn_var_location): Likewise.
27034 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
27035 (ADDR_VEC_ALIGN): Likewise.
27037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27038 Alan Hayward <alan.hayward@arm.com>
27039 David Sherwood <david.sherwood@arm.com>
27041 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
27043 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27044 or if measurement_type is polynomial.
27045 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
27046 * combine.c (make_extraction): Likewise.
27047 * dse.c (find_shift_sequence): Likewise.
27048 * dwarf2out.c (mem_loc_descriptor): Likewise.
27049 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
27050 (extract_bit_field, extract_low_bits): Likewise.
27051 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
27052 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
27053 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
27054 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
27055 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27056 * reload.c (find_reloads): Likewise.
27057 * reload1.c (alter_reg): Likewise.
27058 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
27059 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
27060 * tree-if-conv.c (predicate_mem_writes): Likewise.
27061 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
27062 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
27063 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
27064 * valtrack.c (dead_debug_insert_temp): Likewise.
27065 * varasm.c (mergeable_constant_section): Likewise.
27066 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
27068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27069 Alan Hayward <alan.hayward@arm.com>
27070 David Sherwood <david.sherwood@arm.com>
27072 * expr.c (expand_assignment): Cope with polynomial mode sizes
27073 when assigning to a CONCAT.
27075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27076 Alan Hayward <alan.hayward@arm.com>
27077 David Sherwood <david.sherwood@arm.com>
27079 * machmode.h (mode_precision): Change from unsigned short to
27081 (mode_to_precision): Return a poly_uint16 rather than an unsigned
27083 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27084 or if measurement_type is not polynomial.
27085 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
27086 in which the mode is already known to be a scalar_int_mode.
27087 * genmodes.c (emit_mode_precision): Change the type of mode_precision
27088 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
27090 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27091 for GET_MODE_PRECISION.
27092 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27093 for GET_MODE_PRECISION.
27094 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27096 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27097 (expand_field_assignment, make_extraction): Likewise.
27098 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27099 (get_last_value): Likewise.
27100 * convert.c (convert_to_integer_1): Likewise.
27101 * cse.c (cse_insn): Likewise.
27102 * expr.c (expand_expr_real_1): Likewise.
27103 * lra-constraints.c (simplify_operand_subreg): Likewise.
27104 * optabs-query.c (can_atomic_load_p): Likewise.
27105 * optabs.c (expand_atomic_load): Likewise.
27106 (expand_atomic_store): Likewise.
27107 * ree.c (combine_reaching_defs): Likewise.
27108 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27109 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27110 * tree.h (type_has_mode_precision_p): Likewise.
27111 * ubsan.c (instrument_si_overflow): Likewise.
27113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27114 Alan Hayward <alan.hayward@arm.com>
27115 David Sherwood <david.sherwood@arm.com>
27117 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27118 polynomial numbers of units.
27119 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27120 (valid_vector_subparts_p): New function.
27121 (build_vector_type): Remove temporary shim and take the number
27122 of units as a poly_uint64 rather than an int.
27123 (build_opaque_vector_type): Take the number of units as a
27124 poly_uint64 rather than an int.
27125 * tree.c (build_vector_from_ctor): Handle polynomial
27126 TYPE_VECTOR_SUBPARTS.
27127 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27128 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27129 (build_vector_from_val): If the number of units is variable,
27130 use build_vec_duplicate_cst for constant operands and
27131 VEC_DUPLICATE_EXPR otherwise.
27132 (make_vector_type): Remove temporary is_constant ().
27133 (build_vector_type, build_opaque_vector_type): Take the number of
27134 units as a poly_uint64 rather than an int.
27135 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27137 * cfgexpand.c (expand_debug_expr): Likewise.
27138 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27139 (store_constructor, expand_expr_real_1): Likewise.
27140 (const_scalar_mask_from_tree): Likewise.
27141 * fold-const-call.c (fold_const_reduction): Likewise.
27142 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27143 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27144 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27145 (fold_relational_const): Likewise.
27146 (native_interpret_vector): Likewise. Change the size from an
27147 int to an unsigned int.
27148 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27149 TYPE_VECTOR_SUBPARTS.
27150 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27151 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27152 duplicating a non-constant operand into a variable-length vector.
27153 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27154 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27155 * ipa-icf.c (sem_variable::equals): Likewise.
27156 * match.pd: Likewise.
27157 * omp-simd-clone.c (simd_clone_subparts): Likewise.
27158 * print-tree.c (print_node): Likewise.
27159 * stor-layout.c (layout_type): Likewise.
27160 * targhooks.c (default_builtin_vectorization_cost): Likewise.
27161 * tree-cfg.c (verify_gimple_comparison): Likewise.
27162 (verify_gimple_assign_binary): Likewise.
27163 (verify_gimple_assign_ternary): Likewise.
27164 (verify_gimple_assign_single): Likewise.
27165 * tree-pretty-print.c (dump_generic_node): Likewise.
27166 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27167 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27168 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27169 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27170 (vect_shift_permute_load_chain): Likewise.
27171 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27172 (expand_vector_condition, optimize_vector_constructor): Likewise.
27173 (lower_vec_perm, get_compute_type): Likewise.
27174 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27175 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27176 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27177 (vect_recog_mask_conversion_pattern): Likewise.
27178 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27179 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27180 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27181 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27182 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27183 (vectorizable_shift, vectorizable_operation, vectorizable_store)
27184 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27185 (supportable_widening_operation): Likewise.
27186 (supportable_narrowing_operation): Likewise.
27187 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27189 * varasm.c (output_constant): Likewise.
27191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27192 Alan Hayward <alan.hayward@arm.com>
27193 David Sherwood <david.sherwood@arm.com>
27195 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27196 so that both the length == 3 and length != 3 cases set up their
27197 own permute vectors. Add comments explaining why we know the
27198 number of elements is constant.
27199 (vect_permute_load_chain): Likewise.
27201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27202 Alan Hayward <alan.hayward@arm.com>
27203 David Sherwood <david.sherwood@arm.com>
27205 * machmode.h (mode_nunits): Change from unsigned char to
27207 (ONLY_FIXED_SIZE_MODES): New macro.
27208 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27209 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27210 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27212 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27213 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27214 or if measurement_type is not polynomial.
27215 * genmodes.c (ZERO_COEFFS): New macro.
27216 (emit_mode_nunits_inline): Make mode_nunits_inline return a
27218 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27219 Use ZERO_COEFFS when emitting initializers.
27220 * data-streamer.h (bp_pack_poly_value): New function.
27221 (bp_unpack_poly_value): Likewise.
27222 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27223 for GET_MODE_NUNITS.
27224 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27225 for GET_MODE_NUNITS.
27226 * tree.c (make_vector_type): Remove temporary shim and make
27227 the real function take the number of units as a poly_uint64
27228 rather than an int.
27229 (build_vector_type_for_mode): Handle polynomial nunits.
27230 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27231 * emit-rtl.c (const_vec_series_p_1): Likewise.
27232 (gen_rtx_CONST_VECTOR): Likewise.
27233 * fold-const.c (test_vec_duplicate_folding): Likewise.
27234 * genrecog.c (validate_pattern): Likewise.
27235 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27236 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27237 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27238 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27239 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27240 * rtlanal.c (subreg_get_info): Likewise.
27241 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27242 (vect_grouped_load_supported): Likewise.
27243 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27244 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27245 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27246 (simplify_const_unary_operation, simplify_binary_operation_1)
27247 (simplify_const_binary_operation, simplify_ternary_operation)
27248 (test_vector_ops_duplicate, test_vector_ops): Likewise.
27249 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27250 instead of CONST_VECTOR_NUNITS.
27251 * varasm.c (output_constant_pool_2): Likewise.
27252 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27253 explicit-encoded elements in the XVEC for variable-length vectors.
27255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27257 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27260 Alan Hayward <alan.hayward@arm.com>
27261 David Sherwood <david.sherwood@arm.com>
27263 * coretypes.h (fixed_size_mode): Declare.
27264 (fixed_size_mode_pod): New typedef.
27265 * builtins.h (target_builtins::x_apply_args_mode)
27266 (target_builtins::x_apply_result_mode): Change type to
27267 fixed_size_mode_pod.
27268 * builtins.c (apply_args_size, apply_result_size, result_vector)
27269 (expand_builtin_apply_args_1, expand_builtin_apply)
27270 (expand_builtin_return): Update accordingly.
27272 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27274 * cse.c (hash_rtx_cb): Hash only the encoded elements.
27275 * cselib.c (cselib_hash_rtx): Likewise.
27276 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27277 CONST_VECTOR encoding.
27279 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27280 Jeff Law <law@redhat.com>
27283 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27284 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27285 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27286 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27289 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27290 explicitly probe *sp in a noreturn function if there were any callee
27291 register saves or frame pointer is needed.
27293 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27296 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27297 BLKmode for ternary, binary or unary expressions.
27300 * var-tracking.c (delete_vta_debug_insn): New inline function.
27301 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27302 insns from get_insns () to NULL instead of each bb separately.
27303 Use delete_vta_debug_insn. No longer static.
27304 (vt_debug_insns_local, variable_tracking_main_1): Adjust
27305 delete_vta_debug_insns callers.
27306 * rtl.h (delete_vta_debug_insns): Declare.
27307 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27308 instead of variable_tracking_main.
27310 2018-01-03 Martin Sebor <msebor@redhat.com>
27312 PR tree-optimization/83603
27313 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27314 arguments past the endof the argument list in functions declared
27315 without a prototype.
27316 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27317 Avoid checking when arguments are null.
27319 2018-01-03 Martin Sebor <msebor@redhat.com>
27322 * doc/extend.texi (attribute const): Fix a typo.
27323 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27324 issuing -Wsuggest-attribute for void functions.
27326 2018-01-03 Martin Sebor <msebor@redhat.com>
27328 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27329 offset_int::from instead of wide_int::to_shwi.
27330 (maybe_diag_overlap): Remove assertion.
27331 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27332 * gimple-ssa-sprintf.c (format_directive): Same.
27333 (parse_directive): Same.
27334 (sprintf_dom_walker::compute_format_length): Same.
27335 (try_substitute_return_value): Same.
27337 2018-01-03 Jeff Law <law@redhat.com>
27339 PR middle-end/83654
27340 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27341 non-constant residual for zero at runtime and avoid probing in
27342 that case. Reorganize code for trailing problem to mirror handling
27345 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27347 PR tree-optimization/83501
27348 * tree-ssa-strlen.c (get_string_cst): New.
27349 (handle_char_store): Call get_string_cst.
27351 2018-01-03 Martin Liska <mliska@suse.cz>
27353 PR tree-optimization/83593
27354 * tree-ssa-strlen.c: Include tree-cfg.h.
27355 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27356 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27357 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27359 (strlen_dom_walker::before_dom_children): Call
27360 gimple_purge_dead_eh_edges. Dump tranformation with details
27362 (strlen_dom_walker::before_dom_children): Update call by adding
27363 new argument cleanup_eh.
27364 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27366 2018-01-03 Martin Liska <mliska@suse.cz>
27369 * cif-code.def (VARIADIC_THUNK): New enum value.
27370 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27373 2018-01-03 Jan Beulich <jbeulich@suse.com>
27375 * sse.md (mov<mode>_internal): Tighten condition for when to use
27376 vmovdqu<ssescalarsize> for TI and OI modes.
27378 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27380 Update copyright years.
27382 2018-01-03 Martin Liska <mliska@suse.cz>
27385 * ipa-visibility.c (function_and_variable_visibility): Skip
27386 functions with noipa attribure.
27388 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27390 * gcc.c (process_command): Update copyright notice dates.
27391 * gcov-dump.c (print_version): Ditto.
27392 * gcov.c (print_version): Ditto.
27393 * gcov-tool.c (print_version): Ditto.
27394 * gengtype.c (create_file): Ditto.
27395 * doc/cpp.texi: Bump @copying's copyright year.
27396 * doc/cppinternals.texi: Ditto.
27397 * doc/gcc.texi: Ditto.
27398 * doc/gccint.texi: Ditto.
27399 * doc/gcov.texi: Ditto.
27400 * doc/install.texi: Ditto.
27401 * doc/invoke.texi: Ditto.
27403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27405 * vector-builder.h (vector_builder::m_full_nelts): Change from
27406 unsigned int to poly_uint64.
27407 (vector_builder::full_nelts): Update prototype accordingly.
27408 (vector_builder::new_vector): Likewise.
27409 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27410 (vector_builder::operator ==): Likewise.
27411 (vector_builder::finalize): Likewise.
27412 * int-vector-builder.h (int_vector_builder::int_vector_builder):
27413 Take the number of elements as a poly_uint64 rather than an
27415 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27416 from unsigned int to poly_uint64.
27417 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27418 (vec_perm_indices::new_vector): Likewise.
27419 (vec_perm_indices::length): Likewise.
27420 (vec_perm_indices::nelts_per_input): Likewise.
27421 (vec_perm_indices::input_nelts): Likewise.
27422 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27423 number of elements per input as a poly_uint64 rather than an
27424 unsigned int. Use the original encoding for variable-length
27425 vectors, rather than clamping each individual element.
27426 For the second and subsequent elements in each pattern,
27427 clamp the step and base before clamping their sum.
27428 (vec_perm_indices::series_p): Handle polynomial element counts.
27429 (vec_perm_indices::all_in_range_p): Likewise.
27430 (vec_perm_indices_to_tree): Likewise.
27431 (vec_perm_indices_to_rtx): Likewise.
27432 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27433 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27434 (tree_vector_builder::new_binary_operation): Handle polynomial
27435 element counts. Return false if we need to know the number
27436 of elements at compile time.
27437 * fold-const.c (fold_vec_perm): Punt if the number of elements
27438 isn't known at compile time.
27440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27442 * vec-perm-indices.h (vec_perm_builder): Change element type
27443 from HOST_WIDE_INT to poly_int64.
27444 (vec_perm_indices::element_type): Update accordingly.
27445 (vec_perm_indices::clamp): Handle polynomial element_types.
27446 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27447 (vec_perm_indices::all_in_range_p): Likewise.
27448 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27450 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27451 polynomial vec_perm_indices element types.
27452 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27453 * fold-const.c (fold_vec_perm): Likewise.
27454 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27455 * tree-vect-generic.c (lower_vec_perm): Likewise.
27456 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27457 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27458 element type to HOST_WIDE_INT.
27460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27461 Alan Hayward <alan.hayward@arm.com>
27462 David Sherwood <david.sherwood@arm.com>
27464 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27465 rather than an int. Use plus_constant.
27466 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27467 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27470 Alan Hayward <alan.hayward@arm.com>
27471 David Sherwood <david.sherwood@arm.com>
27473 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27474 a HOST_WIDE_INT to a poly_int64.
27476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27477 Alan Hayward <alan.hayward@arm.com>
27478 David Sherwood <david.sherwood@arm.com>
27480 * calls.c (load_register_parameters): Cope with polynomial
27481 mode sizes. Require a constant size for BLKmode parameters
27482 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27483 forces a parameter to be padded at the lsb end in order to
27484 fill a complete number of words, require the parameter size
27485 to be ordered wrt UNITS_PER_WORD.
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 * reload1.c (spill_stack_slot_width): Change element type
27492 from unsigned int to poly_uint64_pod.
27493 (alter_reg): Treat mode sizes as polynomial.
27495 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27496 Alan Hayward <alan.hayward@arm.com>
27497 David Sherwood <david.sherwood@arm.com>
27499 * reload.c (complex_word_subreg_p): New function.
27500 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
27507 operands whose sizes aren't ordered.
27508 (match_reload): Refer to this check here.
27510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27511 Alan Hayward <alan.hayward@arm.com>
27512 David Sherwood <david.sherwood@arm.com>
27514 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27515 that the mode size is in the set {1, 2, 4, 8, 16}.
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 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27522 Use plus_constant instead of gen_rtx_PLUS.
27524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27525 Alan Hayward <alan.hayward@arm.com>
27526 David Sherwood <david.sherwood@arm.com>
27528 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27529 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27530 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27531 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27532 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27533 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27534 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27535 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27536 * config/i386/i386.c (ix86_push_rounding): ...this new function.
27537 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27539 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27540 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27541 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27542 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27543 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27544 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27545 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27546 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27547 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27548 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27550 * expr.c (emit_move_resolve_push): Treat the input and result
27551 of PUSH_ROUNDING as a poly_int64.
27552 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27553 (emit_push_insn): Likewise.
27554 * lra-eliminations.c (mark_not_eliminable): Likewise.
27555 * recog.c (push_operand): Likewise.
27556 * reload1.c (elimination_effects): Likewise.
27557 * rtlanal.c (nonzero_bits1): Likewise.
27558 * calls.c (store_one_arg): Likewise. Require the padding to be
27559 known at compile time.
27561 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27562 Alan Hayward <alan.hayward@arm.com>
27563 David Sherwood <david.sherwood@arm.com>
27565 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27566 Use plus_constant instead of gen_rtx_PLUS.
27568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27569 Alan Hayward <alan.hayward@arm.com>
27570 David Sherwood <david.sherwood@arm.com>
27572 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27573 rather than an int.
27575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27576 Alan Hayward <alan.hayward@arm.com>
27577 David Sherwood <david.sherwood@arm.com>
27579 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27580 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27581 via stack temporaries. Treat the mode size as polynomial too.
27583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27584 Alan Hayward <alan.hayward@arm.com>
27585 David Sherwood <david.sherwood@arm.com>
27587 * expr.c (expand_expr_real_2): When handling conversions involving
27588 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27589 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27590 as a poly_uint64 too.
27592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27593 Alan Hayward <alan.hayward@arm.com>
27594 David Sherwood <david.sherwood@arm.com>
27596 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27599 Alan Hayward <alan.hayward@arm.com>
27600 David Sherwood <david.sherwood@arm.com>
27602 * combine.c (can_change_dest_mode): Handle polynomial
27603 REGMODE_NATURAL_SIZE.
27604 * expmed.c (store_bit_field_1): Likewise.
27605 * expr.c (store_constructor): Likewise.
27606 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27607 and polynomial REGMODE_NATURAL_SIZE.
27608 (gen_lowpart_common): Likewise.
27609 * reginfo.c (record_subregs_of_mode): Likewise.
27610 * rtlanal.c (read_modify_subreg_p): Likewise.
27612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27613 Alan Hayward <alan.hayward@arm.com>
27614 David Sherwood <david.sherwood@arm.com>
27616 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27617 numbers of elements.
27619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27620 Alan Hayward <alan.hayward@arm.com>
27621 David Sherwood <david.sherwood@arm.com>
27623 * match.pd: Cope with polynomial numbers of vector elements.
27625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27626 Alan Hayward <alan.hayward@arm.com>
27627 David Sherwood <david.sherwood@arm.com>
27629 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27630 in a POINTER_PLUS_EXPR.
27632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27633 Alan Hayward <alan.hayward@arm.com>
27634 David Sherwood <david.sherwood@arm.com>
27636 * omp-simd-clone.c (simd_clone_subparts): New function.
27637 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27638 (ipa_simd_modify_function_body): Likewise.
27640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27641 Alan Hayward <alan.hayward@arm.com>
27642 David Sherwood <david.sherwood@arm.com>
27644 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27645 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27646 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27647 (expand_vector_condition, vector_element): Likewise.
27648 (subparts_gt): New function.
27649 (get_compute_type): Use subparts_gt.
27650 (count_type_subparts): Delete.
27651 (expand_vector_operations_1): Use subparts_gt instead of
27652 count_type_subparts.
27654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27655 Alan Hayward <alan.hayward@arm.com>
27656 David Sherwood <david.sherwood@arm.com>
27658 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27659 (vect_compile_time_alias): ...this new function. Do the calculation
27660 on poly_ints rather than trees.
27661 (vect_prune_runtime_alias_test_list): Update call accordingly.
27663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27664 Alan Hayward <alan.hayward@arm.com>
27665 David Sherwood <david.sherwood@arm.com>
27667 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27669 (vect_schedule_slp_instance): Likewise.
27671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27672 Alan Hayward <alan.hayward@arm.com>
27673 David Sherwood <david.sherwood@arm.com>
27675 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27676 constant and extern definitions for variable-length vectors.
27677 (vect_get_constant_vectors): Note that the number of units
27678 is known to be constant.
27680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27681 Alan Hayward <alan.hayward@arm.com>
27682 David Sherwood <david.sherwood@arm.com>
27684 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27685 of units as polynomial. Choose between WIDE and NARROW based
27688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27689 Alan Hayward <alan.hayward@arm.com>
27690 David Sherwood <david.sherwood@arm.com>
27692 * tree-vect-stmts.c (simd_clone_subparts): New function.
27693 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27695 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27696 Alan Hayward <alan.hayward@arm.com>
27697 David Sherwood <david.sherwood@arm.com>
27699 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27700 vectors as polynomial. Use build_index_vector for
27701 IFN_GOMP_SIMD_LANE.
27703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27704 Alan Hayward <alan.hayward@arm.com>
27705 David Sherwood <david.sherwood@arm.com>
27707 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27708 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27709 for variable-length vectors.
27710 (vectorizable_mask_load_store): Treat the number of units as
27711 polynomial, asserting that it is constant if the condition has
27712 already been enforced.
27713 (vectorizable_store, vectorizable_load): Likewise.
27715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27716 Alan Hayward <alan.hayward@arm.com>
27717 David Sherwood <david.sherwood@arm.com>
27719 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27720 of units as polynomial. Punt if we can't tell at compile time
27721 which vector contains the final result.
27723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27724 Alan Hayward <alan.hayward@arm.com>
27725 David Sherwood <david.sherwood@arm.com>
27727 * tree-vect-loop.c (vectorizable_induction): Treat the number
27728 of units as polynomial. Punt on SLP inductions. Use an integer
27729 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27730 cast of such a series for variable-length floating-point
27733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27734 Alan Hayward <alan.hayward@arm.com>
27735 David Sherwood <david.sherwood@arm.com>
27737 * tree.h (build_index_vector): Declare.
27738 * tree.c (build_index_vector): New function.
27739 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27740 of units as polynomial, forcibly converting it to a constant if
27741 vectorizable_reduction has already enforced the condition.
27742 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27743 to create a {1,2,3,...} vector.
27744 (vectorizable_reduction): Treat the number of units as polynomial.
27745 Choose vectype_in based on the largest scalar element size rather
27746 than the smallest number of units. Enforce the restrictions
27749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27750 Alan Hayward <alan.hayward@arm.com>
27751 David Sherwood <david.sherwood@arm.com>
27753 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27754 number of units as polynomial.
27756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27757 Alan Hayward <alan.hayward@arm.com>
27758 David Sherwood <david.sherwood@arm.com>
27760 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27761 * target.def (autovectorize_vector_sizes): Return the vector sizes
27762 by pointer, using vector_sizes rather than a bitmask.
27763 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27764 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27765 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27767 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27768 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27769 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27770 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27771 * omp-general.c (omp_max_vf): Likewise.
27772 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27773 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27774 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27775 * tree-vect-slp.c (vect_slp_bb): Likewise.
27776 * doc/tm.texi: Regenerate.
27777 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27779 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27780 the vector size as a poly_uint64 rather than an unsigned int.
27781 (current_vector_size): Change from an unsigned int to a poly_uint64.
27782 (get_vectype_for_scalar_type): Update accordingly.
27783 * tree.h (build_truth_vector_type): Take the size and number of
27784 units as a poly_uint64 rather than an unsigned int.
27785 (build_vector_type): Add a temporary overload that takes
27786 the number of units as a poly_uint64 rather than an unsigned int.
27787 * tree.c (make_vector_type): Likewise.
27788 (build_truth_vector_type): Take the number of units as a poly_uint64
27789 rather than an unsigned int.
27791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27792 Alan Hayward <alan.hayward@arm.com>
27793 David Sherwood <david.sherwood@arm.com>
27795 * target.def (get_mask_mode): Take the number of units and length
27796 as poly_uint64s rather than unsigned ints.
27797 * targhooks.h (default_get_mask_mode): Update accordingly.
27798 * targhooks.c (default_get_mask_mode): Likewise.
27799 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27800 * doc/tm.texi: Regenerate.
27802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27803 Alan Hayward <alan.hayward@arm.com>
27804 David Sherwood <david.sherwood@arm.com>
27806 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27807 * omp-general.c (omp_max_vf): Likewise.
27808 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27809 (expand_omp_simd): Handle polynomial safelen.
27810 * omp-low.c (omplow_simd_context): Add a default constructor.
27811 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27812 (lower_rec_simd_input_clauses): Update accordingly.
27813 (lower_rec_input_clauses): Likewise.
27815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27816 Alan Hayward <alan.hayward@arm.com>
27817 David Sherwood <david.sherwood@arm.com>
27819 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27820 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27821 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27822 (vect_analyze_slp_cost): Likewise.
27823 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27824 (vect_model_load_cost): Likewise.
27826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27827 Alan Hayward <alan.hayward@arm.com>
27828 David Sherwood <david.sherwood@arm.com>
27830 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27831 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27832 from an unsigned int * to a poly_uint64_pod *.
27833 (calculate_unrolling_factor): New function.
27834 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27837 Alan Hayward <alan.hayward@arm.com>
27838 David Sherwood <david.sherwood@arm.com>
27840 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27841 from an unsigned int to a poly_uint64.
27842 (_loop_vec_info::slp_unrolling_factor): Likewise.
27843 (_loop_vec_info::vectorization_factor): Change from an int
27845 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27846 (vect_get_num_vectors): New function.
27847 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27848 (vect_get_num_copies): Use vect_get_num_vectors.
27849 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27850 to an unsigned int *.
27851 (vect_analyze_data_refs): Change min_vf from an int * to a
27853 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27854 than an unsigned HOST_WIDE_INT.
27855 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27856 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27857 to an unsigned int *.
27858 (vect_analyze_data_ref_dependences): Likewise.
27859 (vect_compute_data_ref_alignment): Handle polynomial vf.
27860 (vect_enhance_data_refs_alignment): Likewise.
27861 (vect_prune_runtime_alias_test_list): Likewise.
27862 (vect_shift_permute_load_chain): Likewise.
27863 (vect_supportable_dr_alignment): Likewise.
27864 (dependence_distance_ge_vf): Take the vectorization factor as a
27865 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27866 (vect_analyze_data_refs): Change min_vf from an int * to a
27868 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27869 vfm1 as a poly_uint64 rather than an int. Make the same change
27870 for the returned bound_scalar.
27871 (vect_gen_vector_loop_niters): Handle polynomial vf.
27872 (vect_do_peeling): Likewise. Update call to
27873 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27874 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27876 * tree-vect-loop.c (vect_determine_vectorization_factor)
27877 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27878 (vect_get_known_peeling_cost): Likewise.
27879 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27880 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27881 (vect_transform_loop): Likewise. Use the lowest possible VF when
27882 updating the upper bounds of the loop.
27883 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27884 rather than an int.
27885 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27886 polynomial unroll factors.
27887 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27888 (vect_make_slp_decision): Likewise.
27889 (vect_supported_load_permutation_p): Likewise, and polynomial
27891 (vect_analyze_slp_cost): Handle polynomial vf.
27892 (vect_slp_analyze_node_operations): Likewise.
27893 (vect_slp_analyze_bb_1): Likewise.
27894 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27895 than an unsigned HOST_WIDE_INT.
27896 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27897 (vectorizable_load): Handle polynomial vf.
27898 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27900 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27903 Alan Hayward <alan.hayward@arm.com>
27904 David Sherwood <david.sherwood@arm.com>
27906 * match.pd: Handle bit operations involving three constants
27907 and try to fold one pair.
27909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27911 * tree-vect-loop-manip.c: Include gimple-fold.h.
27912 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27913 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27914 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27915 Add a path that uses a step of VF instead of 1, but disable it
27917 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27918 and niters_no_overflow parameters. Update calls to
27919 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27920 Create a new SSA name if the latter choses to use a ste other
27921 than zero, and return it via niters_vector_mult_vf_var.
27922 * tree-vect-loop.c (vect_transform_loop): Update calls to
27923 vect_do_peeling, vect_gen_vector_loop_niters and
27924 slpeel_make_loop_iterate_ntimes.
27925 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27926 (vect_gen_vector_loop_niters): Update declarations after above changes.
27928 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27930 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27931 128-bit round to integer instructions.
27932 (ceil<mode>2): Likewise.
27933 (btrunc<mode>2): Likewise.
27934 (round<mode>2): Likewise.
27936 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27938 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27939 unaligned VSX load/store on P8/P9.
27940 (expand_block_clear): Allow the use of unaligned VSX
27941 load/store on P8/P9.
27943 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27945 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27947 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27948 swap associated with both a load and a store.
27950 2018-01-02 Andrew Waterman <andrew@sifive.com>
27952 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27953 * config/riscv/riscv.md (clear_cache): Use it.
27955 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27957 * web.c: Remove out-of-date comment.
27959 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27961 * expr.c (fixup_args_size_notes): Check that any existing
27962 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27963 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27964 (emit_single_push_insn): ...here.
27966 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27968 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27969 (const_vector_encoded_nelts): New function.
27970 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27971 (const_vector_int_elt, const_vector_elt): Declare.
27972 * emit-rtl.c (const_vector_int_elt_1): New function.
27973 (const_vector_elt): Likewise.
27974 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27975 of CONST_VECTOR_ELT.
27977 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27979 * expr.c: Include rtx-vector-builder.h.
27980 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27981 directly on the tree encoding.
27982 (const_vector_from_tree): Likewise.
27983 * optabs.c: Include rtx-vector-builder.h.
27984 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27985 sequence of "u" values.
27986 * vec-perm-indices.c: Include rtx-vector-builder.h.
27987 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27988 directly on the vec_perm_indices encoding.
27990 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27992 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27993 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27994 * rtx-vector-builder.h: New file.
27995 * rtx-vector-builder.c: Likewise.
27996 * rtl.h (rtx_def::u2): Add a const_vector field.
27997 (CONST_VECTOR_NPATTERNS): New macro.
27998 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27999 (CONST_VECTOR_DUPLICATE_P): Likewise.
28000 (CONST_VECTOR_STEPPED_P): Likewise.
28001 (CONST_VECTOR_ENCODED_ELT): Likewise.
28002 (const_vec_duplicate_p): Check for a duplicated vector encoding.
28003 (unwrap_const_vec_duplicate): Likewise.
28004 (const_vec_series_p): Check for a non-duplicated vector encoding.
28005 Say that the function only returns true for integer vectors.
28006 * emit-rtl.c: Include rtx-vector-builder.h.
28007 (gen_const_vec_duplicate_1): Delete.
28008 (gen_const_vector): Call gen_const_vec_duplicate instead of
28009 gen_const_vec_duplicate_1.
28010 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
28011 (gen_const_vec_duplicate): Use rtx_vector_builder.
28012 (gen_const_vec_series): Likewise.
28013 (gen_rtx_CONST_VECTOR): Likewise.
28014 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
28015 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28016 Build a new vector rather than modifying a CONST_VECTOR in-place.
28017 (handle_special_swappables): Update call accordingly.
28018 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
28019 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28020 Build a new vector rather than modifying a CONST_VECTOR in-place.
28021 (handle_special_swappables): Update call accordingly.
28023 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28025 * simplify-rtx.c (simplify_const_binary_operation): Use
28026 CONST_VECTOR_ELT instead of XVECEXP.
28028 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28030 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
28031 the selector elements to be different from the data elements
28032 if the selector is a VECTOR_CST.
28033 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
28034 ssizetype for the selector.
28036 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28038 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
28039 before testing each element individually.
28040 * tree-vect-generic.c (lower_vec_perm): Likewise.
28042 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28044 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
28045 * selftest-run-tests.c (selftest::run_tests): Call it.
28046 * vector-builder.h (vector_builder::operator ==): New function.
28047 (vector_builder::operator !=): Likewise.
28048 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
28049 (vec_perm_indices::all_from_input_p): New function.
28050 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28051 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
28052 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
28053 instead of reading the VECTOR_CST directly. Detect whether both
28054 vector inputs are the same before constructing the vec_perm_indices,
28055 and update the number of inputs argument accordingly. Use the
28056 utility functions added above. Only construct sel2 if we need to.
28058 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28060 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
28061 the broadcast of the low byte.
28062 (expand_mult_highpart): Use an explicit encoding for the permutes.
28063 * optabs-query.c (can_mult_highpart_p): Likewise.
28064 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
28065 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28066 (vectorizable_bswap): Likewise.
28067 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
28068 explicit encoding for the power-of-2 permutes.
28069 (vect_permute_store_chain): Likewise.
28070 (vect_grouped_load_supported): Likewise.
28071 (vect_permute_load_chain): Likewise.
28073 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28075 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
28076 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
28077 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
28078 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28079 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
28080 (vect_gen_perm_mask_any): Likewise.
28082 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28084 * int-vector-builder.h: New file.
28085 * vec-perm-indices.h: Include int-vector-builder.h.
28086 (vec_perm_indices): Redefine as an int_vector_builder.
28087 (auto_vec_perm_indices): Delete.
28088 (vec_perm_builder): Redefine as a stand-alone class.
28089 (vec_perm_indices::vec_perm_indices): New function.
28090 (vec_perm_indices::clamp): Likewise.
28091 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28092 (vec_perm_indices::new_vector): New function.
28093 (vec_perm_indices::new_expanded_vector): Update for new
28094 vec_perm_indices class.
28095 (vec_perm_indices::rotate_inputs): New function.
28096 (vec_perm_indices::all_in_range_p): Operate directly on the
28097 encoded form, without computing elided elements.
28098 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28099 encoding. Update for new vec_perm_indices class.
28100 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28101 the given vec_perm_builder.
28102 (expand_vec_perm_var): Update vec_perm_builder constructor.
28103 (expand_mult_highpart): Use vec_perm_builder instead of
28104 auto_vec_perm_indices.
28105 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28106 vec_perm_indices instead of auto_vec_perm_indices. Use a single
28107 or double series encoding as appropriate.
28108 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28109 vec_perm_indices instead of auto_vec_perm_indices.
28110 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28111 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28112 (vect_permute_store_chain): Likewise.
28113 (vect_grouped_load_supported): Likewise.
28114 (vect_permute_load_chain): Likewise.
28115 (vect_shift_permute_load_chain): Likewise.
28116 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28117 (vect_transform_slp_perm_load): Likewise.
28118 (vect_schedule_slp_instance): Likewise.
28119 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28120 (vectorizable_mask_load_store): Likewise.
28121 (vectorizable_bswap): Likewise.
28122 (vectorizable_store): Likewise.
28123 (vectorizable_load): Likewise.
28124 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28125 vec_perm_indices instead of auto_vec_perm_indices. Use
28126 tree_to_vec_perm_builder to read the vector from a tree.
28127 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28128 vec_perm_builder instead of a vec_perm_indices.
28129 (have_whole_vector_shift): Use vec_perm_builder and
28130 vec_perm_indices instead of auto_vec_perm_indices. Leave the
28131 truncation to calc_vec_perm_mask_for_shift.
28132 (vect_create_epilog_for_reduction): Likewise.
28133 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28134 from auto_vec_perm_indices to vec_perm_indices.
28135 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28136 instead of changing individual elements.
28137 (aarch64_vectorize_vec_perm_const): Use new_vector to install
28138 the vector in d.perm.
28139 * config/arm/arm.c (expand_vec_perm_d::perm): Change
28140 from auto_vec_perm_indices to vec_perm_indices.
28141 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28142 instead of changing individual elements.
28143 (arm_vectorize_vec_perm_const): Use new_vector to install
28144 the vector in d.perm.
28145 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28146 Update vec_perm_builder constructor.
28147 (rs6000_expand_interleave): Likewise.
28148 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28149 (rs6000_expand_interleave): Likewise.
28151 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28153 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28154 to qimode could truncate the indices.
28155 * optabs.c (expand_vec_perm_var): Likewise.
28157 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28159 * Makefile.in (OBJS): Add vec-perm-indices.o.
28160 * vec-perm-indices.h: New file.
28161 * vec-perm-indices.c: Likewise.
28162 * target.h (vec_perm_indices): Replace with a forward class
28164 (auto_vec_perm_indices): Move to vec-perm-indices.h.
28165 * optabs.h: Include vec-perm-indices.h.
28166 (expand_vec_perm): Delete.
28167 (selector_fits_mode_p, expand_vec_perm_var): Declare.
28168 (expand_vec_perm_const): Declare.
28169 * target.def (vec_perm_const_ok): Replace with...
28170 (vec_perm_const): ...this new hook.
28171 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28172 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28173 * doc/tm.texi: Regenerate.
28174 * optabs.def (vec_perm_const): Delete.
28175 * doc/md.texi (vec_perm_const): Likewise.
28176 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28177 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28178 expand_vec_perm for constant permutation vectors. Assert that
28179 the mode of variable permutation vectors is the integer equivalent
28180 of the mode that is being permuted.
28181 * optabs-query.h (selector_fits_mode_p): Declare.
28182 * optabs-query.c: Include vec-perm-indices.h.
28183 (selector_fits_mode_p): New function.
28184 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28185 is defined, instead of checking whether the vec_perm_const_optab
28186 exists. Use targetm.vectorize.vec_perm_const instead of
28187 targetm.vectorize.vec_perm_const_ok. Check whether the indices
28188 fit in the vector mode before using a variable permute.
28189 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28190 vec_perm_indices instead of an rtx.
28191 (expand_vec_perm): Replace with...
28192 (expand_vec_perm_const): ...this new function. Take the selector
28193 as a vec_perm_indices rather than an rtx. Also take the mode of
28194 the selector. Update call to shift_amt_for_vec_perm_mask.
28195 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28196 Use vec_perm_indices::new_expanded_vector to expand the original
28197 selector into bytes. Check whether the indices fit in the vector
28198 mode before using a variable permute.
28199 (expand_vec_perm_var): Make global.
28200 (expand_mult_highpart): Use expand_vec_perm_const.
28201 * fold-const.c: Includes vec-perm-indices.h.
28202 * tree-ssa-forwprop.c: Likewise.
28203 * tree-vect-data-refs.c: Likewise.
28204 * tree-vect-generic.c: Likewise.
28205 * tree-vect-loop.c: Likewise.
28206 * tree-vect-slp.c: Likewise.
28207 * tree-vect-stmts.c: Likewise.
28208 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28210 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28211 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28212 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28213 (aarch64_vectorize_vec_perm_const): ...this new function.
28214 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28215 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28216 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28217 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28218 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28219 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28220 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28222 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
28223 check for NEON modes.
28224 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28225 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28226 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28227 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28229 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
28230 the old VEC_PERM_CONST conditions.
28231 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28232 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28233 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28234 (ia64_vectorize_vec_perm_const_ok): Merge into...
28235 (ia64_vectorize_vec_perm_const): ...this new function.
28236 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28237 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28238 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28239 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28240 * config/mips/mips.c (mips_expand_vec_perm_const)
28241 (mips_vectorize_vec_perm_const_ok): Merge into...
28242 (mips_vectorize_vec_perm_const): ...this new function.
28243 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28244 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28245 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28246 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28247 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28248 (rs6000_expand_vec_perm_const): Delete.
28249 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28251 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28252 (altivec_expand_vec_perm_const_le): Take each operand individually.
28253 Operate on constant selectors rather than rtxes.
28254 (altivec_expand_vec_perm_const): Likewise. Update call to
28255 altivec_expand_vec_perm_const_le.
28256 (rs6000_expand_vec_perm_const): Delete.
28257 (rs6000_vectorize_vec_perm_const_ok): Delete.
28258 (rs6000_vectorize_vec_perm_const): New function.
28259 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28260 an element count and rtx array.
28261 (rs6000_expand_extract_even): Update call accordingly.
28262 (rs6000_expand_interleave): Likewise.
28263 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28264 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28265 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28266 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28267 (rs6000_expand_vec_perm_const): Delete.
28268 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28269 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28270 (altivec_expand_vec_perm_const_le): Take each operand individually.
28271 Operate on constant selectors rather than rtxes.
28272 (altivec_expand_vec_perm_const): Likewise. Update call to
28273 altivec_expand_vec_perm_const_le.
28274 (rs6000_expand_vec_perm_const): Delete.
28275 (rs6000_vectorize_vec_perm_const_ok): Delete.
28276 (rs6000_vectorize_vec_perm_const): New function. Remove stray
28277 reference to the SPE evmerge intructions.
28278 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28279 an element count and rtx array.
28280 (rs6000_expand_extract_even): Update call accordingly.
28281 (rs6000_expand_interleave): Likewise.
28282 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28283 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28285 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28287 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28289 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28290 vector mode and that that mode matches the mode of the data
28292 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28293 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
28294 directly using expand_vec_perm_1 when forcing selectors into
28296 (expand_vec_perm_var): New function, split out from expand_vec_perm.
28298 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28300 * optabs-query.h (can_vec_perm_p): Delete.
28301 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28302 * optabs-query.c (can_vec_perm_p): Split into...
28303 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28304 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28305 particular selector is valid.
28306 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28307 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28308 (vect_grouped_load_supported): Likewise.
28309 (vect_shift_permute_load_chain): Likewise.
28310 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28311 (vect_transform_slp_perm_load): Likewise.
28312 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28313 (vectorizable_bswap): Likewise.
28314 (vect_gen_perm_mask_checked): Likewise.
28315 * fold-const.c (fold_ternary_loc): Likewise. Don't take
28316 implementations of variable permutation vectors into account
28317 when deciding which selector to use.
28318 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28319 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28320 with a false third argument.
28321 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28322 to test whether the constant selector is valid and can_vec_perm_var_p
28323 to test whether a variable selector is valid.
28325 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28327 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28328 * optabs-query.c (can_vec_perm_p): Likewise.
28329 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28330 instead of vec_perm_indices.
28331 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28332 (vect_gen_perm_mask_checked): Likewise,
28333 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28334 (vect_gen_perm_mask_checked): Likewise,
28336 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28338 * optabs-query.h (qimode_for_vec_perm): Declare.
28339 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28340 (qimode_for_vec_perm): ...this new function.
28341 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28343 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28345 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28346 does not have a conditional at the top.
28348 2018-01-02 Richard Biener <rguenther@suse.de>
28350 * ipa-inline.c (big_speedup_p): Fix expression.
28352 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28355 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28358 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28362 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28363 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28364 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28365 cond_taken_branch_cost 3->4.
28367 2018-01-01 Jakub Jelinek <jakub@redhat.com>
28369 PR tree-optimization/83581
28370 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28371 TODO_cleanup_cfg if any changes have been made.
28373 PR middle-end/83608
28374 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28375 convert_modes if target mode has the right side, but different mode
28378 PR middle-end/83609
28379 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28380 last argument when extracting from CONCAT. If either from_real or
28381 from_imag is NULL, use expansion through memory. If result is not
28382 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28383 the parts directly to inner mode, if even that fails, use expansion
28386 PR middle-end/83623
28387 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28388 check for bswap in mode rather than HImode and use that in expand_unop
28391 Copyright (C) 2018 Free Software Foundation, Inc.
28393 Copying and distribution of this file, with or without modification,
28394 are permitted in any medium without royalty provided the copyright
28395 notice and this notice are preserved.