1 2018-08-02 Tom de Vries <tdevries@suse.de>
4 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5 function. Return UI_TARGET unconditionally.
6 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11 * genemit.c (print_overload_test): Fix typo.
13 2018-08-02 Richard Biener <rguenther@suse.de>
16 * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
17 to the CLASSTYPE_AS_BASE.
19 2018-08-02 Richard Biener <rguenther@suse.de>
21 PR tree-optimization/86816
22 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
23 which checks for value availability before querying it.
24 (gvn_uses_equal): Use it.
25 (same_succ_hash): Likewise.
26 (gimple_equal_p): Likewise.
28 2018-08-02 Nick Clifton <nickc@redhat.com>
31 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
32 Define to speculation_safe_value_not_needed.
35 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
36 Define to speculation_safe_value_not_needed.
39 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
40 Define to speculation_safe_value_not_needed.
43 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
44 Define to speculation_safe_value_not_needed.
47 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
48 Define to speculation_safe_value_not_needed.
51 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
52 Define to speculation_safe_value_not_needed.
55 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
56 Define to speculation_safe_value_not_needed.
59 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
60 Define to speculation_safe_value_not_needed.
63 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
64 speculation_safe_value_not_needed.
67 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
68 to speculation_safe_value_not_needed.
70 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
72 * doc/md.texi: Expand the documentation of instruction names
73 to mention port-local uses. Document '@' in pattern names.
74 * read-md.h (overloaded_instance, overloaded_name): New structs.
76 (md_reader::handle_overloaded_name): New member function.
77 (md_reader::get_overloads): Likewise.
78 (md_reader::m_first_overload): New member variable.
79 (md_reader::m_next_overload_ptr): Likewise.
80 (md_reader::m_overloads_htab): Likewise.
81 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
82 m_next_overload_ptr and m_overloads_htab.
83 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
84 (get_mode_token, get_code_token, get_int_token): New functions.
85 (map_attr_string): Add an optional argument that passes back
86 the associated iterator.
87 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
88 (md_reader::handle_overloaded_name, add_overload_instance): New
90 (apply_iterators): Handle '@' names. Report an error if '@'
91 is used without iterators.
92 (initialize_iterators): Initialize the new iterator_group fields.
93 * genopinit.c (handle_overloaded_code_for)
94 (handle_overloaded_gen): New functions.
95 (main): Use them to print declarations of maybe_code_for_* and
96 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
97 * genemit.c (print_overload_arguments, print_overload_test)
98 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
99 (main): Use it to print definitions of maybe_code_for_* and
100 maybe_gen_* functions.
101 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
102 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
103 instead of explicit mode checks.
104 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
105 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
106 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
107 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
108 (aarch64_expand_compare_and_swap): Likewise
109 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
110 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
111 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
112 (aarch64_constant_pool_reload_icode): Delete.
113 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
114 instead of aarch64_constant_pool_reload_icode. Use
115 code_for_aarch64_reload_mov instead of explicit mode checks.
116 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
117 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
118 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
119 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
120 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
121 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
122 (aarch64_atomic_load_op_code): Delete.
123 (aarch64_emit_atomic_load_op): Likewise.
124 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
125 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
126 instead of aarch64_emit_atomic_load_op.
127 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
128 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
129 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
130 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
131 character before the pattern name.
132 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
133 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
134 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
135 (aarch64_frecps<mode>): Likewise.
136 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
137 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
138 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
139 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
140 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
142 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
144 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
145 Allow HFmode constants if TARGET_FP_F16INST.
147 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
150 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
151 No longer check last store for clobber of address register.
153 2018-08-02 Martin Liska <mliska@suse.cz>
155 PR gcov-profile/86817
156 * gcov.c (process_all_functions): New function.
158 (process_file): Move functions processing to
159 process_all_functions.
161 2018-08-02 David Malcolm <dmalcolm@redhat.com>
163 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
164 "const" to the "gimple *" and "rtx_insn *" parameters.
165 * dumpfile.h (dump_user_location_t::dump_user_location_t):
167 (dump_location_t::dump_location_t): Likewise.
169 2018-08-01 Martin Sebor <msebor@redhat.com>
171 PR tree-optimization/86650
172 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
173 rather than a "gcall *". Directly pass the data of interest
174 to percent_K_format, rather than building a temporary CALL_EXPR
176 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
177 (gimple_fold_builtin_strncat): Adjust.
178 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
179 gcall* argument with gimple*.
180 * gimple-ssa-warn-restrict.c (check_call): Same.
181 (wrestrict_dom_walker::before_dom_children): Same.
182 (builtin_access::builtin_access): Same.
183 (check_bounds_or_overlap): Same
184 (maybe_diag_overlap): Same.
185 (maybe_diag_offset_bounds): Same.
186 * tree-diagnostic.c (default_tree_printer): Move usage of
187 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
189 * tree-pretty-print.c (percent_K_format): Add argument.
190 * tree-pretty-print.h: Add argument.
191 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
192 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
193 (maybe_diag_stxncpy_trunc): Same.
194 (handle_builtin_stxncpy): Same.
195 (handle_builtin_strcat): Same.
197 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
199 * match.pd: Optimise pointer range checks.
201 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
203 PR tree-optimization/86758
204 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
205 to remove pattern statements.
207 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
209 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
210 result of dfs_enumerate_from when constructing stmt_vec_infos,
211 instead of additionally calling get_loop_body.
213 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
215 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
217 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
218 When creating an iv, assert that the step is not known to be zero.
219 (vect_setup_realignment): Update call accordingly.
220 * tree-vect-stmts.c (vectorizable_store): Likewise.
221 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
223 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
225 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
226 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
227 (vectorizable_reduction): Likewise.
228 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
229 (vect_detect_hybrid_slp_stmts): Likewise.
230 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
232 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
234 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
235 (wide_int_set_zero_nonzero_bits): ...this.
236 (zero_nonzero_bits_from_vr): Rename to...
237 (vrp_set_zero_nonzero_bits): ...this.
238 (extract_range_from_multiplicative_op_1): Abstract wide int
240 (wide_int_range_multiplicative_op): ...here.
241 (extract_range_from_binary_expr_1): Extract wide int binary
242 operations into their own functions.
243 (wide_int_range_lshift): New.
244 (wide_int_range_can_optimize_bit_op): New.
245 (wide_int_range_shift_undefined_p): New.
246 (wide_int_range_bit_xor): New.
247 (wide_int_range_bit_ior): New.
248 (wide_int_range_bit_and): New.
249 (wide_int_range_trunc_mod): New.
250 (extract_range_into_wide_ints): New.
251 (vrp_shift_undefined_p): New.
252 (extract_range_from_multiplicative_op): New.
253 (vrp_can_optimize_bit_op): New.
254 * tree-vrp.h (value_range::dump): New.
255 (wide_int_range_multiplicative_op): New.
256 (wide_int_range_lshift):New.
257 (wide_int_range_shift_undefined_p): New.
258 (wide_int_range_bit_xor): New.
259 (wide_int_range_bit_ior): New.
260 (wide_int_range_bit_and): New.
261 (wide_int_range_trunc_mod): New.
262 (zero_nonzero_bits_from_bounds): Rename to...
263 (wide_int_set_zero_nonzero_bits): ...this.
264 (zero_nonzero_bits_from_vr): Rename to...
265 (vrp_set_zero_nonzero_bits): ...this.
266 (range_easy_mask_min_max): Rename to...
267 (wide_int_range_can_optimize_bit_op): this.
268 * vr-values.c (simplify_bit_ops_using_ranges): Rename
269 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
271 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
273 * tree-vectorizer.h (vect_orig_stmt): New function.
274 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
275 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
276 (vect_create_epilog_for_reduction): Likewise.
277 (vectorizable_live_operation): Likewise.
278 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
279 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
280 * tree-vect-stmts.c (vectorizable_call): Likewise.
281 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
283 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
285 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
287 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
288 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
289 (vect_transform_loop): Likewise.
290 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
292 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
294 * tree-vectorizer.h (vect_schedule_slp): Return void.
295 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
296 (vect_schedule_slp): Likewise.
298 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
300 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
302 (vect_transform_loop): Update calls accordingly. Schedule SLP
303 instances before the main loop, if any exist.
305 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
307 PR tree-optimization/86749
308 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
309 If the lhs is used in a COND_EXPR, check that it is being used
310 as the "then" or "else" value.
312 2018-08-01 Tom de Vries <tdevries@suse.de>
315 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
316 speculation_safe_value_not_needed.
318 2018-08-01 Richard Biener <rguenther@suse.de>
320 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
323 2018-08-01 Martin Liska <mliska@suse.cz>
325 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
326 format how successful transformation is dumped.
327 (gimple_mod_pow2_value_transform): Likewise.
328 (gimple_mod_subtract_transform): Likewise.
329 (gimple_stringops_transform): Likewise.
331 2018-08-01 Martin Liska <mliska@suse.cz>
334 * value-prof.c (interesting_stringop_to_profile_p):
335 Simplify the code and add BUILT_IN_MEMMOVE.
336 (gimple_stringops_transform): Likewise.
338 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
340 * config/aarch64/aarch64-simd.md
341 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
342 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
343 use GPI iterator instead of SI mode.
345 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
347 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
348 rs6000_speculation_barrier.
349 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
350 new barrier pattern name.
352 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
354 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
355 (speculation_barrier): New insn.
357 2018-08-01 Richard Biener <rguenther@suse.de>
360 * graphite.h: Include isl/id.h and isl/space.h to allow build
363 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
366 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
367 mode for COFF targets.
368 * defaults.h (TARGET_COFF): Define.
369 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
370 TARGET_COFF): Define.
371 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
372 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
373 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
375 2018-07-31 Alexandre Oliva <oliva@adacore.com>
377 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
378 * gimple-streamer-out.c (output_bb): Save it.
379 * lto-streamer-in.c (input_struct_function_base): Restore
380 instance discriminator if available. Create map on demand.
381 * lto-streamer-out.c (output_struct_function_base): Save it if
383 * final.c (decl_to_instance_map): Document LTO strategy.
385 2018-07-31 Alexandre Oliva <oliva@adacore.com>
386 Olivier Hainque <hainque@adacore.com>
388 * debug.h (decl_to_instance_map_t): New type.
389 (decl_to_instance_map): Declare.
390 (maybe_create_decl_to_instance_map): New inline function.
391 * final.c (bb_discriminator, last_bb_discriminator): New statics,
392 to track basic block discriminators.
393 (final_start_function_1): Initialize them.
394 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
396 (decl_to_instance_map): New variable.
397 (map_decl_to_instance, maybe_set_discriminator): New functions.
398 (notice_source_line): Set discriminator.
400 2018-07-31 Ian Lance Taylor <iant@golang.org>
402 * targhooks.c (default_have_speculation_safe_value): Add
405 2018-07-31 David Malcolm <dmalcolm@redhat.com>
407 * dump-context.h: Include "pretty-print.h".
408 (dump_context::refresh_dumps_are_enabled): New decl.
409 (dump_context::emit_item): New decl.
410 (class dump_context): Add fields "m_test_pp" and
412 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
413 (temp_dump_context::get_dumped_text): New decl.
414 (class temp_dump_context): Add field "m_pp".
415 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
416 (dump_context::refresh_dumps_are_enabled): ...and add a test for
418 (set_dump_file): Update for above change.
419 (set_alt_dump_file): Likewise.
420 (dump_loc): New overload, taking a pretty_printer *.
421 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
422 to any test pretty-printer.
423 (make_item_for_dump_gimple_stmt): New function, adapted from
424 optinfo::add_gimple_stmt.
425 (dump_context::dump_gimple_stmt): Call it, and use the result,
426 eliminating the direct usage of dump_file and alt_dump_file in
427 favor of indirectly using them via emit_item.
428 (make_item_for_dump_gimple_expr): New function, adapted from
429 optinfo::add_gimple_expr.
430 (dump_context::dump_gimple_expr): Call it, and use the result,
431 eliminating the direct usage of dump_file and alt_dump_file in
432 favor of indirectly using them via emit_item.
433 (make_item_for_dump_generic_expr): New function, adapted from
435 (dump_context::dump_generic_expr): Call it, and use the result,
436 eliminating the direct usage of dump_file and alt_dump_file in
437 favor of indirectly using them via emit_item.
438 (make_item_for_dump_printf_va): New function, adapted from
439 optinfo::add_printf_va.
440 (make_item_for_dump_printf): New function.
441 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
442 and use the result, eliminating the direct usage of dump_file and
443 alt_dump_file in favor of indirectly using them via emit_item.
444 (make_item_for_dump_dec): New function.
445 (dump_context::dump_dec): Call it, and use the result,
446 eliminating the direct usage of dump_file and alt_dump_file in
447 favor of indirectly using them via emit_item.
448 (make_item_for_dump_symtab_node): New function, adapted from
449 optinfo::add_symtab_node.
450 (dump_context::dump_symtab_node): Call it, and use the result,
451 eliminating the direct usage of dump_file and alt_dump_file in
452 favor of indirectly using them via emit_item.
453 (dump_context::begin_scope): Reimplement, avoiding direct usage
454 of dump_file and alt_dump_file in favor of indirectly using them
456 (dump_context::emit_item): New member function.
457 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
458 Set up test pretty-printer on the underlying context. Call
459 refresh_dumps_are_enabled.
460 (temp_dump_context::~temp_dump_context): Call
461 refresh_dumps_are_enabled.
462 (temp_dump_context::get_dumped_text): New member function.
463 (selftest::verify_dumped_text): New function.
464 (ASSERT_DUMPED_TEXT_EQ): New macro.
465 (selftest::test_capture_of_dump_calls): Run all tests twice, with
466 and then without optinfo enabled. Add uses of
467 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
468 * dumpfile.h: Update comment for the dump_* API.
469 * optinfo-emit-json.cc
470 (selftest::test_building_json_from_dump_calls): Update for new
471 param for temp_dump_context ctor.
472 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
474 (optinfo_item::~optinfo_item): Likewise.
475 (optinfo::add_item): New member function.
476 (optinfo::emit): Update comment.
477 (optinfo::add_string): Delete.
478 (optinfo::add_printf): Delete.
479 (optinfo::add_printf_va): Delete.
480 (optinfo::add_gimple_stmt): Delete.
481 (optinfo::add_gimple_expr): Delete.
482 (optinfo::add_tree): Delete.
483 (optinfo::add_symtab_node): Delete.
484 (optinfo::add_dec): Delete.
485 * optinfo.h (class dump_context): New forward decl.
486 (optinfo::add_item): New decl.
487 (optinfo::add_string): Delete.
488 (optinfo::add_printf): Delete.
489 (optinfo::add_printf_va): Delete.
490 (optinfo::add_gimple_stmt): Delete.
491 (optinfo::add_gimple_expr): Delete.
492 (optinfo::add_tree): Delete.
493 (optinfo::add_symtab_node): Delete.
494 (optinfo::add_dec): Delete.
495 (optinfo::add_poly_int): Delete.
496 (optinfo_item::optinfo_item): Remove "owned" param.
497 (class optinfo_item): Remove field "m_owned".
499 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
502 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
503 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
504 requested variable alignment.
505 (expand_one_ssa_partition): Likewise.
506 (expand_one_var): Likewise.
508 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
510 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
511 to speculation_safe_value_not_needed.
513 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
515 * targhooks.h (speculation_safe_value_not_needed): New prototype.
516 * targhooks.c (speculation_safe_value_not_needed): New function.
517 * target.def (have_speculation_safe_value): Update documentation.
518 * doc/tm.texi: Regenerated.
520 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
522 * config/aarch64/iterators.md (ALLI_TI): New iterator.
523 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
525 (despeculate_copy<ALLI:mode>_insn): New insn.
526 (despeculate_copyti_insn): New insn.
527 (despeculate_simple<ALLI:mode>): New insn
528 (despeculate_simpleti): New insn.
529 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
531 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
532 aarch64_speculation_safe_value.
533 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
535 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
537 * config/aarch64/aarch64-speculation.cc: New file.
538 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
539 before pass_reorder_blocks.
540 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
542 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
543 X14 and X15 when tracking speculation.
544 * config/aarch64/aarch64.md (register name constants): Add
545 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
546 (unspec): Add UNSPEC_SPECULATION_TRACKER.
547 (speculation_barrier): New insn attribute.
548 (cmp<mode>): Allow SP in comparisons.
549 (speculation_tracker): New insn.
550 (speculation_barrier): Add speculation_barrier attribute.
551 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
552 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
553 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
555 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
557 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
558 aarch64_track_speculation is true.
559 (tb<optab><mode>1): Likewise.
560 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
561 generate CB[N]Z when tracking speculation.
562 (aarch64_split_compare_and_swap): Likewise.
563 (aarch64_split_atomic_op): Likewise.
565 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
567 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
569 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
571 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
572 (speculation_barrier): New insn.
574 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
576 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
577 * config/arm/arm.md (speculation_barrier): New expand.
578 (speculation_barrier_insn): New pattern.
580 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
582 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
583 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
584 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
585 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
587 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
588 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
589 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
590 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
591 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
592 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
593 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
594 * builtins.c (expand_speculation_safe_value): New function.
595 (expand_builtin): Call it.
596 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
597 * doc/extend.texi: Document __builtin_speculation_safe_value.
598 * doc/md.texi: Document "speculation_barrier" pattern.
599 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
600 TARGET_HAVE_SPECULATION_SAFE_VALUE.
601 * doc/tm.texi: Regenerated.
602 * target.def (have_speculation_safe_value, speculation_safe_value): New
604 * targhooks.c (default_have_speculation_safe_value): New function.
605 (default_speculation_safe_value): New function.
606 * targhooks.h (default_have_speculation_safe_value): Add prototype.
607 (default_speculation_safe_value): Add prototype.
609 2018-07-31 David Malcolm <dmalcolm@redhat.com>
611 * dump-context.h (dump_context::dump_loc): New decl.
612 * dumpfile.c (dump_context::dump_loc): New member function.
613 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
614 and dump_gimple_stmt.
615 (dump_context::dump_gimple_expr_loc): Likewise, using
617 (dump_context::dump_generic_expr_loc): Likewise, using
619 (dump_context::dump_printf_loc_va): Likewise, using
621 (dump_context::begin_scope): Explicitly using the global function
622 "dump_loc", rather than the member function.
624 2018-07-31 Martin Sebor <msebor@redhat.com>
626 PR tree-optimization/86741
627 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
629 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
631 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
632 depend on whether prefetch instructions will be emitted or not.
633 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
634 will be emitted or not.
635 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
636 (TARGET_SETMEM_PFD): New macros.
638 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
640 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
641 (NULL_STMT_VEC_INFO): Delete.
642 (stmt_vec_info::operator*): Likewise.
643 (stmt_vec_info::operator gimple *): Likewise.
644 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
645 of NULL_STMT_VEC_INFO.
646 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
647 (vect_reassociating_reduction_p): Likewise.
648 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
649 (vectorizable_store): Likewise.
650 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
651 (vec_info::free_stmt_vec_infos): Likewise.
653 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
655 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
656 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
660 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
661 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
662 (vec_info::free_stmt_vec_info): New private member functions.
663 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
664 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
665 * tree-parloops.c (gather_scalar_reductions): Remove calls to
666 set_stmt_vec_info_vec and free_stmt_vec_infos.
667 * tree-vect-loop.c (_loop_vec_info): Remove call to
668 set_stmt_vec_info_vec.
669 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
670 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
671 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
672 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
673 (vec_info::free_stmt_vec_info): ...these new functions. Remove
674 assignments in {vec_info::,}new_stmt_vec_info that are redundant
675 with the clearing in the xcalloc.
676 (stmt_vec_info_vec): Delete.
677 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
678 (vectorize_loops): Likewise.
679 (vec_info::~vec_info): Remove argument from call to
681 (vec_info::add_stmt): Remove vinfo argument from call to
684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
686 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
687 rather than a gimple stmt.
688 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
689 information for pattern statements when passed the original
690 statement; instead wait to be passed the pattern statement itself.
691 Don't call set_vinfo_for_stmt here.
692 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
693 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
695 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
696 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
697 stmt_vec_infos entry.
699 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
701 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
702 * tree-vectorizer.c (vec_info::replace_stmt): New function.
703 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
704 * tree-vect-stmts.c (vectorizable_call): Likewise.
705 (vectorizable_simd_clone_call): Likewise.
707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
709 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
710 * tree-vectorizer.c (vec_info::remove_stmt): New function.
711 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
712 * tree-vect-loop.c (vect_transform_loop): Likewise.
713 * tree-vect-slp.c (vect_schedule_slp): Likewise.
714 * tree-vect-stmts.c (vect_remove_stores): Likewise.
716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
718 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
719 (vect_dr_stmt): Delete.
720 * tree-vectorizer.c (vec_info::lookup_dr): New function.
721 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
723 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
724 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
725 (vect_verify_datarefs_alignment, vect_peeling_supportable)
726 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
727 (vect_analyze_data_refs): Likewise.
728 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
730 (vect_find_same_alignment_drs): Likewise.
731 (vect_slp_analyze_node_dependences): Update calls accordingly.
732 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
733 instead of DR_VECT_AUX.
734 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
735 of a vector data references. Use vec_info::lookup_dr instead of
737 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
738 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
739 instead of DR_VECT_AUX.
741 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
743 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
745 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
747 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
748 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
749 (vect_gen_prolog_loop_niters): Likewise.
751 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
753 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
754 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
755 (vect_known_alignment_in_bytes, vect_dr_behavior)
756 (vect_get_scalar_dr_size): Take references as dr_vec_infos
757 instead of data_references. Update calls to other routines for
758 which the same change has been made.
759 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
760 dr_vec_infos instead of stmt_vec_infos.
761 (vect_analyze_data_ref_dependence): Update call accordingly.
762 (vect_slp_analyze_data_ref_dependence)
763 (vect_record_base_alignments): Use DR_VECT_AUX.
764 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
765 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
766 (vector_alignment_reachable_p, vect_get_data_access_cost)
767 (vect_peeling_supportable, vect_analyze_group_access_1)
768 (vect_analyze_group_access, vect_analyze_data_ref_access)
769 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
770 (vect_compile_time_alias, vect_small_gap_p)
771 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
772 (vect_supportable_dr_alignment): Take references as dr_vec_infos
773 instead of data_references. Update calls to other routines for
774 which the same change has been made.
775 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
776 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
777 (vect_slp_analyze_and_verify_node_alignment)
778 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
779 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
780 (vect_setup_realignment): Use dr_vec_infos. Update calls after
782 (_vect_peel_info::dr): Replace with...
783 (_vect_peel_info::dr_info): ...this new field.
784 (vect_peeling_hash_get_most_frequent)
785 (vect_peeling_hash_choose_best_peeling): Update accordingly.
786 (vect_peeling_hash_get_lowest_cost):
787 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
788 routines for which the same change has been made.
789 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
791 * tree-vect-loop-manip.c (get_misalign_in_elems)
792 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
794 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
795 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
796 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
797 (get_group_load_store_type, get_negative_load_store_type)
798 (vect_get_data_ptr_increment, vectorizable_store)
799 (vectorizable_load): Likewise.
800 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
801 Update calls to other routines for which the same change has been made.
803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
805 * tree-vectorizer.h (vec_info::move_dr): New member function.
806 (dataref_aux): Rename to...
807 (dr_vec_info): ...this and add "dr" and "stmt" fields.
808 (_stmt_vec_info::dr_aux): Update accordingly.
809 (_stmt_vec_info::data_ref_info): Delete.
810 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
811 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
812 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
813 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
815 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
816 (STMT_VINFO_DR_INFO): New macro.
817 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
818 (set_dr_misalignment): Update after rename of dataref_aux.
819 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
820 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
821 initialization of STMT_VINFO_DATA_REF.
822 * tree-vectorizer.c (vec_info::move_dr): New function.
823 * tree-vect-patterns.c (vect_recog_bool_pattern)
824 (vect_recog_mask_conversion_pattern)
825 (vect_recog_gather_scatter_pattern): Use it.
826 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
827 the "dr" and "stmt" fields of dr_vec_info instead of
830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
832 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
833 (is_pattern_stmt_p): Use it.
834 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
835 on pattern statements.
837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
839 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
840 original stmt as a stmt_vec_info rather than a gimple stmt.
841 (vect_pattern_recog_1): Take the statement directly as a
842 stmt_vec_info, rather than via a gimple_stmt_iterator.
843 Update call to vect_mark_pattern_stmts.
844 (vect_pattern_recog): Update calls accordingly.
846 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
848 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
849 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
850 a vect_def_type for the first argument.
851 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
852 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
853 operand if it isn't defined by a vectorized statement.
854 (vect_build_gather_load_calls): Remove the mask_dt argument and
855 update calls to vect_get_vec_def_for_stmt_copy.
856 (vectorizable_bswap): Likewise the dt argument.
857 (vectorizable_call): Update calls to vectorizable_bswap and
858 vect_get_vec_def_for_stmt_copy.
859 (vectorizable_simd_clone_call, vectorizable_assignment)
860 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
861 (vectorizable_comparison): Update calls to
862 vect_get_vec_def_for_stmt_copy.
863 (vectorizable_store): Likewise. Remove now-unnecessary calls to
865 (vect_get_loop_based_defs): Remove dt argument and update call
866 to vect_get_vec_def_for_stmt_copy.
867 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
868 and vect_get_vec_def_for_stmt_copy.
869 (vectorizable_load): Update calls to vect_build_gather_load_calls
870 and vect_get_vec_def_for_stmt_copy.
871 * tree-vect-loop.c (vect_create_epilog_for_reduction)
872 (vectorizable_reduction, vectorizable_live_operation): Update calls
873 to vect_get_vec_def_for_stmt_copy.
875 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
877 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
878 and gimple stmt arguments with a stmt_vec_info.
879 (vect_record_base_alignments): Update calls accordingly.
880 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
881 and gimple stmt arguments with a stmt_vec_info.
882 (vect_build_slp_tree_1): Remove vinfo argument and update call
883 to vect_record_max_nunits.
884 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
885 and vect_record_max_nunits.
887 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
889 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
890 file and take a stmt_vec_info instead of a gimple stmt.
891 (supportable_widening_operation, vect_finish_replace_stmt)
892 (vect_finish_stmt_generation, vect_get_store_rhs)
893 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
894 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
895 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
896 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
897 (vect_create_data_ref_ptr, bump_vector_ptr)
898 (vect_permute_store_chain, vect_setup_realignment)
899 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
900 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
901 (vectorizable_reduction, vectorizable_induction)
902 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
903 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
904 than gimple stmts as arguments.
905 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
906 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
907 (can_group_stmts_p, vect_check_gather_scatter)
908 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
909 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
910 (vect_permute_load_chain, vect_shift_permute_load_chain)
911 (vect_transform_grouped_load)
912 (vect_record_grouped_load_vectors): Likewise.
913 * tree-vect-loop.c (vect_fixup_reduc_chain)
914 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
915 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
916 (vectorizable_reduction, vectorizable_induction)
917 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
918 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
919 (vect_get_load_store_mask): Likewise.
920 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
921 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
922 * tree-vect-stmts.c (vect_mark_relevant)
923 (is_simple_and_all_uses_invariant)
924 (exist_non_indexing_operands_for_use_p, process_use)
925 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
926 (vect_get_vec_def_for_operand, vect_get_vec_defs)
927 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
928 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
929 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
930 (get_negative_load_store_type, get_load_store_type)
931 (vect_check_load_store_mask, vect_check_store_rhs)
932 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
933 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
934 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
935 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
936 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
937 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
938 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
939 (supportable_widening_operation): Likewise.
941 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
943 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
944 a stmt_vec_info instead of a gcall.
945 (vect_check_gather_scatter): Update call accordingly.
946 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
948 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
949 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
950 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
951 instead of a gimple stmt.
952 (vect_transform_loop): Update calls accordingly.
953 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
954 stmt_vec_infos instead of gimple stmts.
955 (vect_analyze_slp_instance): Update use accordingly.
956 * tree-vect-stmts.c (read_vector_array, write_vector_array)
957 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
958 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
959 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
960 (vect_gen_widened_results_half, vect_get_loop_based_defs)
961 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
962 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
967 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
968 of the worklist from a vector of gimple stmts to a vector of
970 * tree-vect-stmts.c (vect_mark_relevant, process_use)
971 (vect_mark_stmts_to_be_vectorized): Likewise
973 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
975 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
976 statement before passing it to vect_analyze_stmt.
977 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
978 the chain of phi vector definitions. Track the exit phi via its
980 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
981 STMT_VINFO_REDUC_DEF.
982 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
983 stmt_vec_infos to handle the statement chains.
984 (vect_get_slp_defs): Record the first statement in the node
985 using a stmt_vec_info.
986 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
987 statements here and pass their stmt_vec_info down to subroutines.
988 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
989 down to vect_finish_stmt_generation.
990 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
991 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
992 stmt_vec_infos to subroutines.
993 (vect_remove_stores): Use stmt_vec_infos to handle the statement
996 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
998 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
999 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1000 (vect_permute_store_chain, vect_setup_realignment)
1001 (vect_permute_load_chain, vect_shift_permute_load_chain)
1002 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1003 stmts internally, and when passing values to other vectorizer routines.
1004 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1005 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1006 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1007 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1008 (vectorizable_reduction, vectorizable_induction)
1009 (vectorizable_live_operation, vect_transform_loop_stmt)
1010 (vect_transform_loop): Likewise.
1011 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1012 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1013 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1014 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1015 (vect_slp_analyze_node_operations_1): Likewise.
1016 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1017 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1018 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1019 (vect_finish_stmt_generation_1, get_group_load_store_type)
1020 (get_load_store_type, vect_build_gather_load_calls)
1021 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1022 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1023 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1024 (vectorizable_store, vectorizable_load, vectorizable_condition)
1025 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1026 (supportable_widening_operation): Likewise.
1027 (vect_get_vector_types_for_stmt): Likewise.
1028 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1030 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1032 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1033 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1034 (vect_permute_store_chain, vect_permute_load_chain)
1035 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1036 repeated stmt_vec_info lookups.
1037 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1038 (vect_update_ivs_after_vectorizer): Likewise.
1039 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1040 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1041 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1042 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1043 (vect_bb_slp_scalar_cost): Likewise.
1044 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1046 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1048 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1049 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1050 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1051 to get gassigns and gcalls, rather than operating on generc gimple
1053 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1054 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1055 (vectorizable_load, vect_analyze_stmt): Likewise.
1056 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1058 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1060 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1061 return stmt_vec_infos rather than gimple stmts. Do not accept
1063 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1065 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1066 Update use of get_later_stmt.
1067 (vect_get_constant_vectors): Update call accordingly.
1068 (vect_schedule_slp_instance): Likewise
1069 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1070 (vect_slp_analyze_instance_dependence): Likewise.
1071 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1073 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1075 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1076 (stmt_info_for_cost::stmt_info): ...this new field.
1077 (add_stmt_costs): Update accordingly.
1078 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1079 (vect_get_known_peeling_cost): Likewise.
1080 (vect_estimate_min_profitable_iters): Likewise.
1081 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1083 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1085 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1086 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1087 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1089 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1091 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1093 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1094 a gimple stmt to a stmt_vec_info.
1095 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1097 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1099 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1100 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1101 (_loop_vec_info::reduction_chains): Likewise.
1102 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1104 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1108 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1109 a gimple stmt to a stmt_vec_info.
1110 (_stmt_vec_info::next_element): Likewise.
1111 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1112 (vect_slp_analyze_and_verify_node_alignment)
1113 (vect_analyze_group_access_1, vect_analyze_group_access)
1114 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1115 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1116 (vect_supportable_dr_alignment): Update accordingly.
1117 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1118 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1119 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1120 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1121 * tree-vect-slp.c (vect_build_slp_tree_1)
1122 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1123 (vect_split_slp_store_group, vect_analyze_slp_instance)
1124 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1125 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1126 (get_group_load_store_type, get_load_store_type)
1127 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1128 (vect_transform_stmt, vect_remove_stores): Likewise.
1130 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1132 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1134 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1135 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1136 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1137 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1138 (vector_alignment_reachable_p, vect_get_data_access_cost)
1139 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1140 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1141 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1142 (vect_analyze_group_access_1, vect_analyze_group_access)
1143 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1144 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1145 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1146 result of vect_dr_stmt and use the stmt_vec_info instead of
1147 the associated gimple stmt.
1148 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1149 (vect_gen_prolog_loop_niters): Likewise.
1150 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1154 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1155 to a vec<stmt_vec_info>.
1156 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1157 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1159 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1160 to a vec<stmt_vec_info>.
1161 (bst_traits::value_type, bst_traits::value_type): Likewise.
1162 (bst_traits::hash): Update accordingly.
1163 (vect_get_and_check_slp_defs): Change the stmts parameter from
1164 a vec<gimple *> to a vec<stmt_vec_info>.
1165 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1166 (vect_build_slp_tree): Likewise.
1167 (vect_build_slp_tree_2): Likewise. Update uses of
1168 SLP_TREE_SCALAR_STMTS.
1169 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1170 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1171 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1172 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1173 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1174 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1175 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1176 (vect_get_constant_vectors, vect_get_slp_defs)
1177 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1178 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1179 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1180 instead of gimple stmts.
1181 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1182 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1183 (vect_slp_analyze_instance_dependence): Update uses of
1184 SLP_TREE_SCALAR_STMTS.
1185 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1186 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1187 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1188 (get_initial_defs_for_reduction): Likewise.
1189 (vect_create_epilog_for_reduction): Likewise.
1190 (vectorize_fold_left_reduction): Likewise.
1191 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1192 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1193 (can_vectorize_live_stmts): Likewise.
1195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1197 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1198 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1199 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1201 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1203 (gather_scalar_reductions): Update after above interface changes.
1204 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1205 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1207 (vect_force_simple_reduction): Likewise.
1208 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1209 LOOP_VINFO_REDUCTIONS.
1210 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1214 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1215 a gimple stmt to a stmt_vec_info.
1216 * tree-vect-loop.c (vect_active_double_reduction_p)
1217 (vect_force_simple_reduction, vectorizable_reduction): Update
1220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1222 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1223 vec<gimple *> to a vec<stmt_vec_info>.
1224 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1225 the reduction_phis argument from a vec<gimple *> to a
1227 (vectorizable_reduction): Likewise the phis local variable that
1228 is passed to vect_create_epilog_for_reduction. Update for new type
1229 of SLP_TREE_VEC_STMTS.
1230 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1231 (vectorizable_live_operation): Likewise.
1232 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1233 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1237 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1238 a gimple stmt to a stmt_vec_info.
1239 (vectorizable_condition, vectorizable_live_operation)
1240 (vectorizable_reduction, vectorizable_induction): Pass back the
1241 vectorized statement as a stmt_vec_info.
1242 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1243 use of STMT_VINFO_VEC_STMT.
1244 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1245 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1246 as stmt_vec_infos rather than gimple stmts.
1247 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1249 (vectorizable_live_operation): Likewise.
1250 (vectorizable_reduction, vectorizable_induction): Likewise,
1251 updating use of STMT_VINFO_VEC_STMT.
1252 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1253 of STMT_VINFO_VEC_STMT.
1254 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1255 (vectorizable_simd_clone_call, vectorizable_conversion)
1256 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1257 (vectorizable_store, vectorizable_load, vectorizable_condition)
1258 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1259 from a gimple stmt to a stmt_vec_info.
1260 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1261 pointer to a stmt_vec_info to the vectorizable_* routines.
1263 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1265 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1266 a gimple stmt to a stmt_vec_info.
1267 (is_pattern_stmt_p): Update accordingly.
1268 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1269 (vect_record_grouped_load_vectors): Likewise.
1270 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1271 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1272 (vect_model_reduction_cost): Likewise.
1273 (vect_create_epilog_for_reduction): Likewise.
1274 (vectorizable_reduction, vectorizable_induction): Likewise.
1275 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1276 Return the stmt_vec_info for the pattern statement.
1277 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1278 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1279 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1280 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1281 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1282 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1283 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1284 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1286 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1288 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1289 (vect_finish_stmt_generation): Likewise.
1290 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1291 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1292 (vect_build_gather_load_calls): Use the return value of the above
1293 functions instead of a separate call to vinfo_for_stmt. Use narrow
1294 scopes for the input gimple stmt and wider scopes for the associated
1295 stmt_vec_info. Use vec_info::lookup_def when setting these
1296 stmt_vec_infos from an SSA_NAME definition.
1297 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1298 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1299 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1300 (vectorizable_store, vectorizable_load, vectorizable_condition)
1301 (vectorizable_comparison): Likewise.
1302 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1303 (vectorizable_reduction): Likewise.
1305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1307 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1308 stmt_vec_info * parameter before the optional gimple **.
1309 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1310 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1311 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1312 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1313 (vectorizable_live_operation): Likewise.
1314 * tree-vect-patterns.c (type_conversion_p): Likewise.
1315 (vect_look_through_possible_promotion): Likewise.
1316 (vect_recog_rotate_pattern): Likewise.
1317 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1319 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1321 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1322 a typedef to a wrapper class.
1323 (NULL_STMT_VEC_INFO): New macro.
1324 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1325 (stmt_vec_info::operator*): New function.
1326 (stmt_vec_info::operator gimple *): Likewise.
1327 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1328 (add_stmt_costs): Likewise.
1329 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1330 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1331 (vect_get_known_peeling_cost): Likewise.
1332 (vect_estimate_min_profitable_iters): Likewise.
1333 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1334 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1335 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1336 (vectorizable_store, free_stmt_vec_infos): Likewise.
1337 (new_stmt_vec_info): Change return type of xcalloc to
1340 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1342 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1343 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1344 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1345 a single_imm_use-based sequence.
1346 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1350 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1351 * tree-vectorizer.c (vec_info::lookup_def): New function.
1352 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1353 (vect_widened_op_tree): Likewise.
1354 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1355 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1356 (vectorizable_reduction): Likewise.
1357 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1359 (vect_is_slp_reduction): Update calls accordingly. Use
1360 vec_info::lookup_def.
1361 (vect_is_simple_reduction): Likewise
1362 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1364 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1366 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1367 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1368 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1370 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1371 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1372 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1373 (vect_is_slp_reduction, vectorizable_induction)
1374 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1375 * tree-vect-patterns.c (vect_init_pattern_stmt):
1376 (vect_determine_min_output_precision_1, vect_determine_precisions)
1377 (vect_pattern_recog): Likewise.
1378 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1379 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1380 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1381 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1382 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1383 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1384 info field from a loop to a loop_vec_info.
1386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1388 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1389 (vec_info::add_stmt): Declare.
1390 * tree-vectorizer.c (vec_info::add_stmt): New function.
1391 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1392 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1393 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1394 (vectorizable_induction): Likewise.
1395 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1396 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1397 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1398 (vectorizable_load): Likewise.
1399 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1400 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1401 (vect_recog_gather_scatter_pattern): Likewise.
1402 (append_pattern_def_seq): Likewise. Remove a check that is
1403 performed by add_stmt itself.
1405 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1407 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1408 which make_ssa_name was called with new_stmt before new_stmt
1411 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1413 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1415 (vect_is_slp_reduction): ...here...
1416 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1417 that are already known to be false.
1419 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1421 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1422 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1423 STMT_VINFO_NUM_SLP_USES when it's true.
1424 (vect_free_slp_instance): Add a final_p parameter and pass it to
1426 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1427 (vect_analyze_slp_instance): Likewise.
1428 (vect_slp_analyze_operations): Likewise.
1429 (vect_slp_analyze_bb_1): Likewise.
1430 * tree-vectorizer.c (vec_info): Likewise.
1431 * tree-vect-loop.c (vect_transform_loop): Likewise.
1433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1435 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1436 function is not called for second and subsequent members of
1439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1441 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1442 cases for nested loops from here to ...
1443 (vect_create_epilog_for_reduction): ...here. Only call
1444 vect_is_simple_use for inner-loop reductions.
1446 2018-07-31 Martin Liska <mliska@suse.cz>
1448 PR gcov-profile/85338
1449 PR gcov-profile/85350
1450 PR gcov-profile/85372
1451 * profile.c (struct location_triplet): New.
1452 (struct location_triplet_hash): Likewise.
1453 (output_location): Do not output a BB that
1454 is already recorded for a line.
1455 (branch_prob): Use streamed_locations.
1457 2018-07-31 Martin Liska <mliska@suse.cz>
1459 PR gcov-profile/85370
1460 * coverage.c (coverage_begin_function): Do not mark target
1461 clones as artificial functions.
1463 2018-07-31 Martin Liska <mliska@suse.cz>
1465 PR gcov-profile/83813
1466 PR gcov-profile/84758
1467 PR gcov-profile/85217
1468 PR gcov-profile/85332
1469 * profile.c (branch_prob): Do not record GOTO expressions
1470 for GIMPLE statements which locations are already streamed.
1472 2018-07-31 Olivier Hainque <hainque@adacore.com>
1474 * gcc.c (handle_spec_function): Accept a soft_matched_part
1475 argument, as do_spec_1. Pass it down to ...
1476 (eval_spec_function): Accept a soft_matched_part argument,
1477 and pass it down to ...
1478 (do_spec_2): Accept a soft_matched_part argument, and pass
1479 it down to do_spec_1.
1480 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1481 (handle_braces): Update call to handle_spec_function.
1482 (driver::set_up_specs): Update calls to do_spec_2.
1483 (compare_debug_dump_opt_spec_function): Likewise.
1484 (compare_debug_self_opt_spec_function): Likewise.
1486 2018-07-31 Olivier Hainque <hainque@adacore.com>
1488 * common.opt (nolibc): New option.
1489 * doc/invoke.texi (Link Options): Document it.
1490 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1491 * config/alpha/linux.h: Likewise.
1492 * config/arc/elf.h: Likewise.
1493 * config/arm/uclinux-elf.h: Likewise.
1494 * config/arm/unknown-elf.h: Likewise.
1495 * config/avr/avrlibc.h: Likewise.
1496 * config/bfin/bfin.h: Likewise.
1497 * config/bfin/linux.h: Likewise.
1498 * config/bfin/uclinux.h: Likewise.
1499 * config/darwin.h: Likewise.
1500 * config/darwin10.h: Likewise.
1501 * config/darwin12.h: Likewise.
1502 * config/gnu-user.h: Likewise.
1503 * config/lm32/uclinux-elf.h: Likewise.
1504 * config/pa/pa-hpux11.h: Likewise.
1505 * config/pa/pa64-hpux.h: Likewise.
1506 * config/sparc/sparc.h: Likewise.
1508 2018-07-31 Olivier Hainque <hainque@adacore.com>
1510 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1511 undefined variables.
1513 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1516 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1519 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1521 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1522 terminated string literal.
1524 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1526 PR rtl-optimization/85160
1527 * combine.c (is_just_move): New function.
1528 (try_combine): Allow combining two instructions into two if neither of
1529 the original instructions was a move.
1531 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1534 * doc/extend.texi (Global Register Variables): Discourage use of type
1536 (Local Register Variables): Likewise.
1538 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1540 PR tree-optimization/86506
1541 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1543 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1546 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1547 hard_regno, make sure no insn between `from` and `to` clobbers it.
1549 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1550 Tom de Vries <tdevries@suse.de>
1552 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1553 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1554 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1555 PTX_DEFAULT_RUNTIME_DIM.
1556 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1558 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1560 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1561 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1562 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1564 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1566 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1568 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1569 predicate to reflect toc fusion has been deleted.
1570 (toc_fusion_mem_raw): Delete, no longer used.
1571 (toc_fusion_mem_wrapped): Likewise.
1572 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1574 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1575 Delete, no longer used.
1576 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1577 meant to be used for toc fusion.
1578 (rs6000_debug_print_mode): Delete toc fusion debugging.
1579 (rs6000_debug_reg_global): Likewise.
1580 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1581 fusion and secondary reload support that were never used.
1582 (rs6000_option_override_internal): Delete TOC fusion, that was only
1583 partially defined, and it did not work unless you also used the
1585 (rs6000_legitimate_address_p): Delete TOC fusion support.
1586 (rs6000_opt_masks): Likewise.
1587 (fusion_wrap_memory_address): Delete function, no longer used.
1588 (fusion_split_address); Delete TOC fusion support.
1589 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1590 longer used with toc fusion being deleted.
1591 (TARGET_TOC_FUSION_FP): Likewise.
1592 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1594 (toc fusion spliter): Delete TOC fusion support.
1595 (toc_fusionload_<mode>): Likewise.
1596 (toc_fusionload_di): Likewise.
1597 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1598 longer needs to be named. Rename predicate to delete TOC fusion.
1599 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1600 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1601 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1602 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1603 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1605 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1607 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1608 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1609 __int128 in built-in function prototypes.
1610 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1611 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1613 2018-07-27 Martin Sebor <msebor@redhat.com>
1615 PR tree-optimization/86696
1616 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1617 types, including enums.
1618 (handle_char_store): Be prepared for the above function to fail.
1620 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1622 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1623 when optimization level is lower than 2 or optimize for size.
1625 2018-07-26 Martin Sebor <msebor@redhat.com>
1627 PR tree-optimization/86043
1628 PR tree-optimization/86042
1629 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1630 (get_string_cst_length): Rename...
1631 (get_min_string_length): ...to this. Add argument.
1632 (handle_char_store): Extend to handle multi-character stores by
1634 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1635 * tree.h (initializer_zerop): Add argument.
1637 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1640 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1641 declare target to variables if they have always,{to,from,tofrom} map
1644 2018-07-26 Martin Liska <mliska@suse.cz>
1647 * lto-wrapper.c: Add linker_output as prefix
1648 for ltrans_output_file.
1650 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1652 PR rtl-optimization/85805
1653 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1654 value for hard registers if that was written in the same mode.
1656 2018-07-26 Martin Liska <mliska@suse.cz>
1658 PR gcov-profile/86536
1659 * gcov.c (format_gcov): Use printf format %.*f directly
1660 and do not handle special values.
1662 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1664 * common/config/arc/arc-common.c (arc_option_optimization_table):
1665 Update default optimizations for size.
1667 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1669 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1670 * config/arc/constraints.md (CfZ): New constraint.
1671 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1672 (subsf3_fpu): Likewise.
1673 (cmpsf_fpu): Likewise.
1674 (cmpsf_fpu_uneq): Likewise.
1676 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1678 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1680 (arc_is_uncached_mem_p): uncached applies to both the variable and
1683 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1685 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1688 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1690 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1691 field "m_scopes" from vec to auto_vec.
1693 2018-07-25 Martin Liska <mliska@suse.cz>
1695 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1698 2018-07-25 Richard Biener <rguenther@suse.de>
1701 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1702 special wrt context_die late.
1703 (gen_subprogram_die): Re-use DIEs in local scope.
1705 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1707 PR tree-optimization/86644
1708 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1710 2018-07-25 Martin Liska <mliska@suse.cz>
1713 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1714 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1716 2018-07-25 Martin Liska <mliska@suse.cz>
1719 * params.def: Explain ASan abbreviation and provide
1720 a documentation link.
1722 2018-07-24 Martin Sebor <msebor@redhat.com>
1724 PR tree-optimization/86622
1725 PR tree-optimization/86532
1726 * builtins.h (string_length): Declare.
1727 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1728 (check_access): Be prepared for non-constant length ranges.
1729 (string_length): Make extern.
1730 * expr.c (string_constant): Only handle the minor non-constant
1731 array index. Use string_constant to compute the length of
1732 a generic string constant.
1734 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1736 PR tree-optimization/86618
1737 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1738 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1740 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1742 PR tree-optimization/86636
1743 * json.cc (json::object::set): Fix comment. Add assertions.
1744 (json::array::append): Move here from json.h. Add comment and an
1746 (json::string::string): Likewise.
1747 * json.h (json::array::append): Move to json.cc.
1748 (json::string::string): Likewise.
1749 * optinfo-emit-json.cc
1750 (optrecord_json_writer::impl_location_to_json): Assert that we
1751 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1752 wrapper around it. Expand the location once, rather than three
1754 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1755 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1757 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1758 places. Fix some overlong lines.
1760 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1762 * config/aarch64/aarch64-simd.md
1763 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1764 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1765 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1766 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1767 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1768 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1769 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1770 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1771 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1773 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1776 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1777 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1778 and abs_d == d, do the power of two handling if profitable.
1780 2018-07-24 Richard Biener <rguenther@suse.de>
1782 * match.pd: Add BIT_FIELD_REF canonicalizations.
1784 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1787 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1789 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1791 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1792 terminated STRING_CST object.
1794 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1796 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1798 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1800 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1801 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1802 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1803 the elements into a register.
1804 (rs6000_split_v4si_init_di_reg): Delete.
1805 (rs6000_split_v4si_init): Delete.
1806 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1807 (vsx_init_v4si): Rewrite as a define_expand.
1809 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1811 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1812 zero_extend argument from memory): New.
1814 2018-07-22 Martin Sebor <msebor@redhat.com>
1817 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1818 diagnosing calls with unknown arguments unless -Walloca-larger-than
1819 is restricted to less than PTRDIFF_MAX bytes.
1821 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1823 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1825 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1827 * pretty-print.c (text_info::set_location): Remove redundant
1828 "line_table" parameter from call to rich_location::set_range.
1830 2018-07-20 Martin Sebor <msebor@redhat.com>
1833 * builtins.c (expand_builtin_alloca): Adjust.
1834 * calls.c (alloc_max_size): Simplify.
1835 * cgraphunit.c (cgraph_node::expand): Adjust.
1836 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1838 (frame_larger_than_size): Same.
1839 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1840 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1842 * doc/invoke.texi (GCC Command Options): Document option arguments.
1843 Explain byte-size arguments and suffixes.
1844 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1845 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1846 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1847 * doc/options.texi (UInteger): Expand.
1848 (Host_Wide_Int, ByteSize): Document new properties.
1849 * final.c (final_start_function_1): Include sizes in an error message.
1850 * function.c (frame_offset_overflow): Same.
1851 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1852 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1853 Diagnose unbounded alloca calls only for limits of less than
1855 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1856 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1858 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1859 only for limits of less than PTRDIFF_MAX.
1860 * langhooks-def.h (lhd_handle_option): Change function argument
1862 * langhooks.c (lhd_handle_option): Same.
1863 * langhooks.h (handle_option): Same.
1864 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1866 (var_type, var_type_struct): Same.
1867 (var_set): Handle ByteSize flag.
1868 * optc-gen.awk: Add comments to output to ease debugging. Make
1869 use of HOST_WIDE_INT where appropriate.
1870 * opts-gen-save.awk: Use %lx to format unsigned long.
1871 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1872 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1873 arguments. Parse bytes-size suffixes.
1874 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1875 (enum_value_to_arg): Same.
1876 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1877 (handle_option): Adjust.
1878 (generate_option): Change function argument to HOST_WIDE_INT.
1879 (cmdline_handle_error): Adjust.
1880 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1881 (set_option): Change function argument to HOST_WIDE_INT.
1882 (option_enabled): Handle cl_host_wide_int.
1883 (get_option_state): Handle CLVC_SIZE.
1884 (control_warning_option): Same.
1885 * opts.c (common_handle_option): Change function argument to
1886 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1887 OPT_Wvla_larger_than_.
1888 * opts.h (enum cl_var_type): Add an enumerator.
1889 * stor-layout.c (layout_decl): Print a more meaningful warning.
1890 * toplev.c (output_stack_usage): Adjust.
1892 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1894 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1895 call to inline_expand_builtin_string_cmp.
1896 (expand_builtin_strcmp): Likewise.
1897 (expand_builtin_strncmp): Likewise.
1898 (inline_string_cmp): Delete the last parameter, change char_type_node
1899 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1901 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1902 the inlining expansion on target where the type of the call has same or
1903 narrower precision than unsigned char.
1905 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1907 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1908 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1909 * common.opt (fsave-optimization-record): New option.
1910 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1911 * doc/invoke.texi (-fsave-optimization-record): New option.
1912 * dumpfile.c: Include "optinfo-emit-json.h".
1913 (struct kv_pair): Move to coretypes.h.
1914 (optgroup_options): Make non-static.
1915 (dump_context::end_scope): Call
1916 optimization_records_maybe_pop_dump_scope.
1917 * dumpfile.h (optgroup_options): New decl.
1918 * json.cc: New file.
1920 * optinfo-emit-json.cc: New file.
1921 * optinfo-emit-json.h: New file.
1922 * optinfo.cc: Include "optinfo-emit-json.h".
1923 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1924 (optinfo_enabled_p): Check optimization_records_enabled_p.
1925 (optinfo_wants_inlining_info_p): Likewise.
1926 * optinfo.h: Update comment.
1927 * profile-count.c (profile_quality_as_string): New function.
1928 * profile-count.h (profile_quality_as_string): New decl.
1929 (profile_count::quality): New accessor.
1930 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1931 and optinfo_emit_json_cc_tests.
1932 * selftest.h (selftest::json_cc_tests): New decl.
1933 (selftest::optinfo_emit_json_cc_tests): New decl.
1934 * toplev.c: Include "optinfo-emit-json.h".
1935 (compile_file): Call optimization_records_finish.
1936 (do_compile): Call optimization_records_start.
1937 * tree-ssa-live.c: Include optinfo.h.
1938 (remove_unused_scope_block_p): Retain inlining information if
1939 optinfo_wants_inlining_info_p returns true.
1941 2018-07-20 Richard Biener <rguenther@suse.de>
1944 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1945 to cover -flto-partition=none.
1947 2018-07-20 Martin Liska <mliska@suse.cz>
1949 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1950 (get_decl_source_range): Remove unused function.
1952 2018-07-20 Richard Biener <rguenther@suse.de>
1954 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1955 (struct vn_phi_s): Likewise.
1956 (struct vn_reference_s): Likewise.
1957 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1958 for searching the slot of an entry known to be in the hash itself.
1959 (vn_phi_hasher::equal): Likewise.
1960 (vn_reference_hasher::equal): Likewise.
1961 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1963 (optimistic_info, current_info): Remove, keeping only valid_info.
1964 (vn_reference_lookup_1): Remove fallback lookup.
1965 (vn_reference_lookup_2): Likewise.
1966 (vn_nary_op_lookup_1): Likewise.
1967 (vn_phi_lookup): Likewise.
1968 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1970 (vn_reference_insert): Adjust, chain the inserted hash element
1971 at last_inserted_ref.
1972 (vn_reference_insert_pieces): Likewise.
1973 (visit_reference_op_call): Likewise.
1974 (vn_nary_op_insert_into): Chain the inserted hash element at
1976 (vn_nary_op_insert_pieces): Adjust.
1977 (vn_nary_op_insert): Likewise.
1978 (vn_nary_op_insert_stmt): Likewise.
1979 (vn_phi_insert): Adjust, chain the inserted hash element at
1981 (process_scc): Remove clearing and copying the optimistic
1982 table. Instead remove elements inserted during an optimistic
1983 iteration from the single table we maintain.
1984 (init_scc_vn): Adjust.
1985 (free_scc_vn): Likewise.
1986 (sccvn_dom_walker::record_cond): Likewise.
1987 (sccvn_dom_walker::after_dom_children): Likewise.
1989 2018-07-19 Martin Sebor <msebor@redhat.com>
1991 PR tree-optimization/84047
1992 PR tree-optimization/83776
1993 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1994 (check_array_bounds): Call it.
1996 2018-07-19 Martin Sebor <msebor@redhat.com>
1998 * align.h (align_flags): Use member initialization.
2000 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2002 * Makefile.in (OBJS): Add optinfo.o.
2003 * coretypes.h (class symtab_node): New forward decl.
2004 (struct cgraph_node): New forward decl.
2005 (class varpool_node): New forward decl.
2006 * dump-context.h: New file.
2007 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2009 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2010 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2011 (set_alt_dump_file): Likewise.
2012 (dump_context::~dump_context): New dtor.
2013 (dump_gimple_stmt): Move implementation to...
2014 (dump_context::dump_gimple_stmt): ...this new member function.
2015 Add the stmt to any pending optinfo, creating one if need be.
2016 (dump_gimple_stmt_loc): Move implementation to...
2017 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2018 Start a new optinfo and add the stmt to it.
2019 (dump_gimple_expr): Move implementation to...
2020 (dump_context::dump_gimple_expr): ...this new member function.
2021 Add the stmt to any pending optinfo, creating one if need be.
2022 (dump_gimple_expr_loc): Move implementation to...
2023 (dump_context::dump_gimple_expr_loc): ...this new member function.
2024 Start a new optinfo and add the stmt to it.
2025 (dump_generic_expr): Move implementation to...
2026 (dump_context::dump_generic_expr): ...this new member function.
2027 Add the tree to any pending optinfo, creating one if need be.
2028 (dump_generic_expr_loc): Move implementation to...
2029 (dump_context::dump_generic_expr_loc): ...this new member
2030 function. Add the tree to any pending optinfo, creating one if
2032 (dump_printf): Move implementation to...
2033 (dump_context::dump_printf_va): ...this new member function. Add
2034 the text to any pending optinfo, creating one if need be.
2035 (dump_printf_loc): Move implementation to...
2036 (dump_context::dump_printf_loc_va): ...this new member function.
2037 Start a new optinfo and add the stmt to it.
2038 (dump_dec): Move implementation to...
2039 (dump_context::dump_dec): ...this new member function. Add the
2040 value to any pending optinfo, creating one if need be.
2041 (dump_context::dump_symtab_node): New member function.
2042 (dump_context::get_scope_depth): New member function.
2043 (dump_context::begin_scope): New member function.
2044 (dump_context::end_scope): New member function.
2045 (dump_context::ensure_pending_optinfo): New member function.
2046 (dump_context::begin_next_optinfo): New member function.
2047 (dump_context::end_any_optinfo): New member function.
2048 (dump_context::s_current): New global.
2049 (dump_context::s_default): New global.
2050 (dump_scope_depth): Delete global.
2051 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2052 (dump_symtab_node): New function.
2053 (get_dump_scope_depth): Reimplement in terms of dump_context.
2054 (dump_begin_scope): Likewise.
2055 (dump_end_scope): Likewise.
2056 (selftest::temp_dump_context::temp_dump_context): New ctor.
2057 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2058 (selftest::verify_item): New function.
2059 (ASSERT_IS_TEXT): New macro.
2060 (ASSERT_IS_TREE): New macro.
2061 (ASSERT_IS_GIMPLE): New macro.
2062 (selftest::test_capture_of_dump_calls): New test.
2063 (selftest::dumpfile_c_tests): Call it.
2064 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2065 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2066 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2067 descriptive comment.
2068 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2069 (dump_node, dump_bb): Move these unrelated decls.
2070 (class dump_manager): Add leading comment.
2071 * optinfo.cc: New file.
2072 * optinfo.h: New file.
2074 2018-07-19 Michael Collison <michael.collison@arm.com>
2075 Richard Henderson <rth@redhat.com>
2077 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2078 (subti): Handle op1 zero.
2079 (subvti4, usub4ti4): New.
2080 (*sub<GPI>3_compare1_imm): New.
2081 (sub<GPI>3_carryinCV): New.
2082 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2083 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2085 2018-07-19 Michael Collison <michael.collison@arm.com>
2086 Richard Henderson <rth@redhat.com>
2088 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2089 (addti3): Create simpler code if low part is already known to be 0.
2090 (addvti4, uaddvti4): New.
2091 (*add<GPI>3_compareC_cconly_imm): New.
2092 (*add<GPI>3_compareC_cconly): New.
2093 (*add<GPI>3_compareC_imm): New.
2094 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2095 handle constants within this pattern..
2096 (*add<GPI>3_compareV_cconly_imm): New.
2097 (*add<GPI>3_compareV_cconly): New.
2098 (*add<GPI>3_compareV_imm): New.
2099 (add<GPI>3_compareV): New.
2100 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2101 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2102 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2103 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2104 with 'comparison' operator.
2105 (*add<GPI>3_compareV_cconly_imm): Ditto.
2106 (*add<GPI>3_compareV_cconly): Ditto.
2107 (*add<GPI>3_compareV_imm): Ditto.
2108 (add<GPI>3_compareV): Ditto.
2109 (add<mode>3_carryinC): Ditto.
2110 (*add<mode>3_carryinC_zero): Ditto.
2111 (*add<mode>3_carryinC): Ditto.
2112 (add<mode>3_carryinV): Ditto.
2113 (*add<mode>3_carryinV_zero): Ditto.
2114 (*add<mode>3_carryinV): Ditto.
2116 2018-07-19 Michael Collison <michael.collison@arm.com>
2117 Richard Henderson <rth@redhat.com>
2119 * config/aarch64/aarch64-modes.def (CC_V): New.
2120 * config/aarch64/aarch64-protos.h
2121 (aarch64_addti_scratch_regs): Declare
2122 (aarch64_subvti_scratch_regs): Declare.
2123 (aarch64_expand_subvti): Declare.
2124 (aarch64_gen_unlikely_cbranch): Declare
2125 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2126 for signed overflow using CC_Vmode.
2127 (aarch64_get_condition_code_1): Handle CC_Vmode.
2128 (aarch64_gen_unlikely_cbranch): New function.
2129 (aarch64_addti_scratch_regs): New function.
2130 (aarch64_subvti_scratch_regs): New function.
2131 (aarch64_expand_subvti): New function.
2133 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2135 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2137 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2138 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2141 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2144 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2145 address check not strict.
2147 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2149 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2151 (store_pair_lanes<mode>): Likewise.
2152 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2153 enum value 'ADDR_QUERY_LDP_STP_N'.
2154 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2155 (aarch64_print_address_internal): Add declaration.
2156 (aarch64_print_ldpstp_address): Remove.
2157 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2158 (aarch64_print_operand): Change printing of 'y'.
2159 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2160 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2161 'true' rather than '1'.
2162 * config/aarch64/constraints.md (Uml): Likewise.
2163 (Uml): Rename to Umn.
2166 2018-07-19 Richard Biener <rguenther@suse.de>
2168 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2170 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2171 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2172 (vn_reference_hasher): Likewise.
2173 (struct vn_tables_s): Remove obstack and alloc-pool members.
2174 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2175 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2176 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2177 (vn_reference_insert_pieces): Likewise.
2178 (alloc_vn_nary_op_noinit): Adjust.
2179 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2180 (vn_phi_eq): Adjust.
2181 (shared_lookup_phiargs): Remove.
2182 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2183 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2184 (visit_reference_op_call): Likewise.
2185 (copy_nary, copy_phi, copy_reference): Remove.
2186 (process_scc): Rewind the obstack when iterating. Do not
2187 copy the elements to valid_info but just move them from one
2188 hashtable to the other.
2189 (allocate_vn_table): Adjust.
2190 (free_vn_table): Likewise.
2191 (init_scc_vn): Likewise.
2192 (free_scc_vn): Likewise.
2194 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2197 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2198 indirect_return as function type attribute.
2199 (ix86_attribute_table): Change indirect_return to function
2201 * doc/extend.texi: Update indirect_return attribute.
2203 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2205 * wide-int.h (widest2_int): New.
2206 * gimple-fold.c (arith_overflowed_p): Use it.
2207 * tree.h (widest2_int_cst): New.
2208 * tree-vrp.c (wide_int_binop_overflow): Rename from
2209 vrp_int_const_binop.
2210 Rewrite to work on trees.
2211 (extract_range_from_multiplicative_op_1): Abstract code to...
2212 (wide_int_range_min_max): ...here.
2213 (wide_int_range_cross_product): ...and here.
2214 (extract_range_from_binary_expr_1): Abstract overflow code to...
2215 (wide_int_range_mult_wrapping): ...here.
2216 * tree-vrp.h (wide_int_range_cross_product): New.
2217 (wide_int_range_mult_wrapping): New.
2219 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2220 Julia Koval <julia.koval@intel.com>
2222 * config/i386/x86-tune-costs.h (skylake_memcpy,
2223 skylake_memset): Replace rep_prefix with unrolling for size 512.
2225 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2228 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2231 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2233 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2234 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2235 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2236 previously known as "PowerPC AltiVec Built-in Functions". Move
2237 some material to new subsubsections "PowerPC AltiVec Built-in
2238 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2240 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2241 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2242 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2243 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2245 2018-07-18 Richard Biener <rguenther@suse.de>
2247 PR tree-optimization/86557
2248 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2251 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2253 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2255 2018-07-17 Jeff Law <law@redhat.com>
2257 * config/arm/arm.c (get_label_padding): Update for recent
2258 changes to label_to_alignment.
2260 PR tree-optimization/86010
2261 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2263 * config/mips/mips.c (vr4130_align_insns): Update for recent
2264 changes to label_to_alignment.
2266 * config/frv/frv.c (frv_label_align): Update for recent changes
2267 to label_to_alignment.
2269 * config/nios2/nios2.c (nios2_label_align): Update for recent
2270 changes which dropped ALIGN_LABELS_LOG.
2272 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2274 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2275 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2277 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2279 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2280 deprecated align_labels_log.
2282 2018-07-17 Richard Biener <rguenther@suse.de>
2285 * dwarf2out.c (init_sections_and_labels): Always generate
2286 a debug_line_str_section for early LTO debug.
2287 (dwarf2out_finish): Reset debug_line_str_hash output early.
2288 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2290 (dwarf2out_early_finish): Output debug_line_str.
2292 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2294 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2295 index register on z196 or later.
2297 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2299 * config/s390/s390.c (s390_default_align): Set default function
2301 (s390_override_options_after_change): Call s390_default align.
2302 (s390_option_override_internal): Call s390_default_align.
2303 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2305 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2308 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2309 to _looptemp_ clauses, other than the first two.
2311 2018-07-17 Martin Liska <mliska@suse.cz>
2313 * opts.c: Do not enable OPT_falign_* for -Os.
2315 2018-07-17 Martin Liska <mliska@suse.cz>
2317 * align.h (MAX_CODE_ALIGN): New.
2318 (MAX_CODE_ALIGN_VALUE): New.
2319 * common/config/i386/i386-common.c (ix86_handle_option):
2320 (MAX_CODE_ALIGN): Moved to align.h.
2321 * final.c (MAX_CODE_ALIGN): Likewise.
2322 * opts.c (parse_and_check_align_values):
2323 (MAX_CODE_ALIGN): Likewise.
2324 (MAX_CODE_ALIGN_VALUE): Likewise.
2326 2018-07-17 Martin Liska <mliska@suse.cz>
2328 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2329 in order to fulfil coding style.
2330 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2331 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2332 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2333 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2334 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2335 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2336 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2337 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2338 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2340 2018-07-17 Martin Liska <mliska@suse.cz>
2342 * align.h: New file.
2343 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2344 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2345 align_flags of label_to_alignment.
2346 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2348 * config/m68k/m68k.c: Do not use removed align_labels_value and
2350 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2351 (LOOP_ALIGN): Likewise.
2352 (LABEL_ALIGN): Likewise.
2353 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2354 Remove not used macro.
2355 (rs6000_loop_align): Change return type to align_flags.
2356 (rs6000_loop_align_max_skip): Remove.
2357 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2358 Change return type to align_flags.
2359 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2360 Remove not used macro.
2361 (rs6000_loop_align): Change return type to align_flags.
2362 (rs6000_loop_align_max_skip): Remove.
2363 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2364 * config/rx/rx-protos.h (rx_align_for_label): Make it
2366 * config/rx/rx.c (rx_align_for_label): Change return type
2368 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2370 into align_flags class.
2371 (LABEL_ALIGN): Likewise.
2372 (LOOP_ALIGN): Likewise.
2373 * config/s390/s390.c (s390_label_align): Use align_flags
2375 (s390_asm_output_function_label): Likewise.
2376 * config/sh/sh.c (sh_override_options_after_change):
2377 Use align_flags class directly without macros.
2378 (find_barrier): Likewise.
2379 (barrier_align): Likewise.
2380 (sh_loop_align): Likewise.
2381 * config/spu/spu.c (spu_option_override):
2382 Use align_flags_tuple::get_value instead of removed macros.
2383 (spu_sched_init): Likewise.
2384 * config/spu/spu.h (GTY): Likewise.
2385 * config/visium/visium.c (visium_option_override):
2386 Set "8" as default secondary alignment.
2387 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2388 in order to guarantee secondary alignment of 8.
2389 * coretypes.h: Include align.h header file.
2390 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2391 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2392 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2393 * doc/tm.texi.in: Likewise.
2394 * final.c (struct label_alignment): Remove not used structure.
2395 (LABEL_ALIGN): Change type to align_flags.
2396 (LOOP_ALIGN): Likewise.
2397 (JUMP_ALIGN): Likewise.
2398 (default_loop_align_max_skip): Remove.
2399 (default_label_align_max_skip): Likewise.
2400 (default_jump_align_max_skip): Likewise.
2401 (default_label_align_after_barrier_max_skip):
2402 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2403 (LABEL_TO_MAX_SKIP): Remove.
2404 (label_to_alignment): Return align_flags type instead of integer.
2405 (label_to_max_skip): Remove.
2406 (align_fuzz): Use align_flags type.
2407 (compute_alignments): Use align_flags type and use align_flags::max
2408 to combine multiple alignments.
2409 (grow_label_align): Grow vec instead of C array.
2410 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2411 (shorten_branches): Use align_flags type and use align_flags::max
2412 to combine multiple alignments.
2413 (final_scan_insn_1): Remove usage of secondary alignment that comes
2414 from label alignment, but instead use proper secondary alignment
2415 which is computed in grow_label_align.
2416 * flags.h (struct align_flags_tuple): Move to align.h.
2417 (struct align_flags): Likewise.
2418 (state_align_loops): Rename to align_loops.
2419 (state_align_jumps): Rename to align_jumps.
2420 (state_align_labels): Rename to align_labels.
2421 (state_align_functions): Rename to align_functions.
2422 (align_loops_log): Remove.
2423 (align_jumps_log): Remove.
2424 (align_labels_log): Remove.
2425 (align_functions_log): Remove.
2426 (align_loops_max_skip): Remove.
2427 (align_jumps_max_skip): Remove.
2428 (align_labels_max_skip): Remove.
2429 (align_functions_max_skip): Remove.
2430 (align_loops_value): Remove.
2431 (align_jumps_value): Remove.
2432 (align_labels_value): Remove.
2433 (align_functions_value): Remove.
2434 * output.h (label_to_alignment): Change return type to align_flags.
2435 (label_to_max_skip): Remove.
2436 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2437 jump_align_max_skip macros.
2438 * targhooks.h (default_loop_align_max_skip): Remove.
2439 (default_label_align_max_skip): Likewise.
2440 (default_jump_align_max_skip): Likewise.
2441 (default_label_align_after_barrier_max_skip): Remove.
2442 * toplev.c (read_log_maxskip): Use ::normalize function.
2443 (parse_N_M): Remove not used argument and also call ::normalize.
2444 (parse_alignment_opts): Do not pass unused arguments.
2445 * varasm.c (assemble_start_function): Use directly align_functions
2446 instead of removed macros.
2447 * system.h: Do not poison removed macros.
2449 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2452 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2453 and cond temporaries don't have reference type if iterator has
2454 pointer type. For init use &for_pre_body instead of pre_p if
2455 for_pre_body is non-empty.
2457 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2459 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2460 double-double modes to SFmode directly directly.
2461 (trunc<mode>sf2_fprs): Delete.
2463 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2465 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2466 for conversions between IFmode and the decimal floating point modes.
2467 (init_float128_ieee): Use the correct names for conversions between
2468 KFmode and the decimal floating point modes.
2470 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2472 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2473 for the conversions between TDmode and IFmode.
2474 (init_float128_ieee): Use more correct names for the conversions
2475 between TDmode and KFmode.
2477 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2479 PR tree-optimization/86526
2480 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2481 (inline_expand_builtin_string_cmp): Likewise.
2482 (inline_string_cmp): Likewise. Use c_readstr instead of
2483 builtin_memcpy_read_str. Add unit_mode temporary.
2485 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2488 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2489 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2491 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2493 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2494 Alphabetize prototypes of built-in functions, separating out
2495 built-in functions that are listed in this section but should be
2496 described elsewhere.
2498 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2501 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2502 conditional move when trapping comparison was split to a
2503 non-trapping one (and vice versa).
2505 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2507 * config/s390/s390.c (s390_function_profiler): Generate nops
2508 instead of profiler call sequences.
2509 * config/s390/s390.opt: Add the new option.
2511 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2513 * config/s390/s390.c (s390_function_profiler): Generate
2514 __mcount_loc section.
2515 * config/s390/s390.opt: Add the new option.
2517 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2519 * common.opt: Add the new warning.
2520 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2521 %r0,__fentry__" when -mfentry is specified.
2522 (s390_option_override_internal): Disallow -mfentry for 31-bit
2524 * config/s390/s390.opt: Add the new option.
2526 2018-07-16 Richard Biener <rguenther@suse.de>
2529 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2530 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2532 2018-07-16 Martin Liska <mliska@suse.cz>
2535 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2538 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2540 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2542 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2544 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2546 * config/arc/arc-cpus.def (hs4x): New cpu.
2548 * config/arc/arc-tables.opt: Regenerate.
2549 * config/arc/arc.c (arc_sched_issue_rate): New function.
2550 (TARGET_SCHED_ISSUE_RATE): Define.
2551 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2552 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2554 (attr tune): Add ARCHS4x tune values.
2555 (attr tune_dspmpy): Define.
2556 (*tst): Correct instruction type.
2557 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2558 * config/arc/arcHS4x.md: New file.
2559 * config/arc/fpu.md: Update instruction type attributes.
2560 * config/arc/t-multilib: Regenerate.
2562 2018-07-16 Tom de Vries <tdevries@suse.de>
2565 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2567 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2569 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2572 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2574 PR tree-optimization/86514
2575 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2576 conversion to a boolean type from a type with greater precision.
2578 2018-07-16 Tom de Vries <tdevries@suse.de>
2580 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2581 dump_flags request TDF_SLIM.
2583 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2585 * fold-const.c (int_const_binop_1): Abstract...
2586 (wide_int_binop): ...wide int code here.
2587 (poly_int_binop): ...poly int code here.
2588 Abstract the rest of int_const_binop_1 into int_const_binop.
2589 * fold-const.h (wide_int_binop): New.
2590 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2591 Remove useless PLUS/MINUS_EXPR case.
2592 (zero_nonzero_bits_from_vr): Move wide int code...
2593 (zero_nonzero_bits_from_bounds): ...here.
2594 (extract_range_from_binary_expr_1): Move mask optimization code...
2595 (range_easy_mask_min_max): ...here.
2596 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2597 (range_easy_mask_min_max): New.
2599 2018-07-15 Jeff Law <law@redhat.com>
2602 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2605 2018-07-14 Jim Wilson <jimw@sifive.com>
2607 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2609 2018-07-14 Paul Koning <ni1d@arrl.net>
2611 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2613 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2615 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2618 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2619 Steve Munroe <munroesj52@gmail.com>
2621 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2622 (_mm_andnot_si128): Likewise.
2623 (_mm_or_si128): Likewise.
2624 (_mm_xor_si128): Likewise.
2626 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2629 * builtins.c (expand_builtin_memcmp): Inline the calls first
2630 when result_eq is false.
2631 (expand_builtin_strcmp): Inline the calls first.
2632 (expand_builtin_strncmp): Likewise.
2633 (inline_string_cmp): New routine. Expand a string compare
2634 call by using a sequence of char comparison.
2635 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2636 a call to str(n)cmp/memcmp.
2637 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2639 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2641 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2643 * config/arm/driver-arm.c: Include arm-native.h.
2644 (host_detect_local_cpu): Use auto-generated data tables.
2645 (vendors, arm_cpu_table): Delete. Move part information to ...
2646 * config/arm/arm-cpus.in: ... here.
2647 * config/arm/parsecpu.awk (gen_native): New function.
2648 (vendor, part): New CPU fields.
2649 (END): Add support for building the native CPU detection tables.
2650 * config/arm/t-arm (arm-native.h): Add build rule.
2651 (driver-arm.o): Add dependency on arm-native.h.
2653 2018-07-13 Richard Biener <rguenther@suse.de>
2656 * match.pd (addr1 - addr2): Allow either of the operand to
2659 2018-07-13 Tom de Vries <tdevries@suse.de>
2661 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2664 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2666 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2667 arrays instead of numbered variables.
2669 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2671 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2672 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2674 2018-07-13 Richard Biener <rguenther@suse.de>
2677 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2678 instead of get_context_die.
2680 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2681 Richard Biener <rguenther@suse.de>
2684 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2685 that the loop latch destination where phi is defined.
2687 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2689 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2690 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2691 (riscv_set_current_function): Extract getting interrupt type to new
2693 (riscv_get_interrupt_type): New function.
2694 (riscv_merge_decl_attributes): New function, checking interrupt type is
2696 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2698 2018-07-12 Paul Koning <ni1d@arrl.net>
2700 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2703 2018-07-12 Paul Koning <ni1d@arrl.net>
2705 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2706 zero reference, add doloop_end instead.
2707 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2708 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2709 detail for doloop_end.
2711 2018-07-12 Martin Sebor <msebor@redhat.com>
2714 * attribs.c (decl_attributes): Reject conflicting attributes before
2715 calling attribute handlers.
2717 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2719 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2721 (gcc::dump_manager::get_dump_file_name): likewise.
2722 (dump_begin): Likewise.
2723 * dumpfile.h (dump_begin): Update prototype.
2724 (gcc::dump_manager::get_dump_file_name,
2725 gcc::dump_manager::get_dump_file_name): Update prototype.
2727 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2729 * internal-fn.h (vectorizable_internal_fn_p): New function.
2730 * tree-vect-slp.c (compatible_calls_p): Likewise.
2731 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2732 to internal functions.
2733 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2735 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2737 * fold-const.h (inverse_conditions_p): Declare.
2738 * fold-const.c (inverse_conditions_p): New function.
2739 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2740 that test the inverse condition of a conditional internal function.
2741 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2742 * internal-fn.c (internal_fn_mask_index): Handle conditional
2744 (vectorized_internal_fn_supported_p): New function.
2745 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2746 (any_pred_load_store): Replace with...
2747 (need_to_predicate): ...this new variable.
2748 (redundant_ssa_names): New variable.
2749 (ifcvt_can_use_mask_load_store): Move initial checks to...
2750 (ifcvt_can_predicate): ...this new function. Handle tree codes
2751 for which a conditional internal function exists.
2752 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2753 instead of ifcvt_can_use_mask_load_store. Update after variable
2755 (predicate_load_or_store): New function, split out from
2756 predicate_mem_writes.
2757 (check_redundant_cond_expr): New function.
2758 (value_available_p): Likewise.
2759 (predicate_rhs_code): Likewise.
2760 (predicate_mem_writes): Rename to...
2761 (predicate_statements): ...this. Use predicate_load_or_store
2762 and predicate_rhs_code.
2763 (combine_blocks, tree_if_conversion): Update after above name changes.
2764 (ifcvt_local_dce): Handle redundant_ssa_names.
2765 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2766 general conditional functions.
2767 * tree-vect-stmts.c (vectorizable_call): Likewise.
2769 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2770 Alan Hayward <alan.hayward@arm.com>
2771 David Sherwood <david.sherwood@arm.com>
2773 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2774 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2775 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2776 plus and minus and convert them into IFN_COND_FMA-based sequences.
2777 (convert_mult_to_fma): Handle conditional plus and minus.
2779 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2781 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2782 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2783 (cond_fnms_optab): New optabs.
2784 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2786 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2787 * internal-fn.h (get_conditional_internal_fn): Declare.
2788 (get_unconditional_internal_fn): Likewise.
2789 * internal-fn.c (cond_ternary_direct): New macro.
2790 (expand_cond_ternary_optab_fn): Likewise.
2791 (direct_cond_ternary_optab_supported_p): Likewise.
2792 (FOR_EACH_COND_FN_PAIR): Likewise.
2793 (get_conditional_internal_fn): New function.
2794 (get_unconditional_internal_fn): Likewise.
2795 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2796 (gimple_match_op::gimple_match_op): Add a new overload for 5
2798 (gimple_match_op::set_op): Likewise.
2799 (gimple_resimplify5): Declare.
2800 * genmatch.c (decision_tree::gen): Generate simplifications for
2802 * gimple-match-head.c (gimple_simplify): Define an overload for
2803 5 operands. Handle calls with 5 arguments in the top-level overload.
2804 (convert_conditional_op): Handle conversions from unconditional
2805 internal functions to conditional ones.
2806 (gimple_resimplify5): New function.
2807 (build_call_internal): Pass a fifth operand.
2808 (maybe_push_res_to_seq): Likewise.
2809 (try_conditional_simplification): Try converting conditional
2810 internal functions to unconditional internal functions.
2811 Handle 3-operand unconditional forms.
2812 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2813 Define ternary equivalents of the current rules for binary conditional
2815 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2817 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2818 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2819 (optab): Handle them.
2820 (SVE_COND_FP_TERNARY): New int iterator.
2821 (sve_fmla_op, sve_fmad_op): New int attributes.
2822 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2823 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2824 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2826 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2828 * target.def (preferred_else_value): New target hook.
2829 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2830 * doc/tm.texi: Regenerate.
2831 * targhooks.h (default_preferred_else_value): Declare.
2832 * targhooks.c (default_preferred_else_value): New function.
2833 * internal-fn.h (conditional_internal_fn_code): Declare.
2834 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2835 (get_conditional_internal_fn): Use it.
2836 (conditional_internal_fn_code): New function.
2837 * gimple-match.h (gimple_match_cond): New struct.
2838 (gimple_match_op): Add a cond member function.
2839 (gimple_match_op::gimple_match_op): Update all forms to take a
2841 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2842 for the suboperation, but don't specify a particular else_value.
2843 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2844 (visit_nary_op, visit_reference_op_load): Pass
2845 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2846 * gimple-match-head.c: Include tree-eh.h
2847 (convert_conditional_op): New function.
2848 (maybe_resimplify_conditional_op): Likewise.
2849 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2850 (gimple_resimplify2): Likewise.
2851 (gimple_resimplify3): Likewise.
2852 (gimple_resimplify4): Likewise.
2853 (maybe_push_res_to_seq): Return null for conditional operations.
2854 (try_conditional_simplification): New function.
2855 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2857 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2859 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2861 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2863 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2865 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2867 (hash_tree): Do not hash DECL_FCONTEXT
2868 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2869 Do not stream DECL_FCONTEXT.
2870 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2871 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2873 2018-07-12 Richard Biener <rguenther@suse.de>
2876 * dwarf2out.c (gen_block_die): Only output blocks when they have
2877 at least one !DECL_IGNORED_P variable.
2879 2018-07-12 Richard Biener <rguenther@suse.de>
2882 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2883 Remove -mieee-fp handling.
2885 2018-07-12 Richard Biener <rguenther@suse.de>
2887 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2888 left-over from last patch.
2890 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2892 PR tree-optimization/86492
2893 * gimple-ssa-store-merging.c
2894 (imm_store_chain_info::coalesce_immediate_stores): Call
2895 check_no_overlap even for the merge_overlapping case. Formatting fix.
2897 2018-07-12 Richard Biener <rguenther@suse.de>
2900 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2901 move possibly trapping operations into the conditional.
2903 2018-07-12 Richard Biener <rguenther@suse.de>
2905 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2906 (vn_lookup_simplify_result): Remove recursion limit applied
2908 (vn_nary_build_or_lookup_1): Adjust.
2909 (try_to_simplify): Likewise.
2910 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2912 (gimple_resimplify2): Likewise.
2913 (gimple_resimplify3): Likewise.
2914 (gimple_resimplify4): Likewise.
2916 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2918 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2919 Use __mmask64 type instead of __mmask8 for __M argument.
2920 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2921 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2923 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2924 __mmask16 for __M argument.
2925 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2926 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2927 to __mmask16 instead of __mmask8.
2928 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2929 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2930 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2931 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2932 instead of __mmask16 for __U argument.
2933 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2934 __mmask16 instead of __mmask8 for __U argument.
2935 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2937 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2939 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2941 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2943 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2945 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2947 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2949 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2951 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2953 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2955 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2956 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2957 return type as well as __M argument type and all casts from __mmask8
2959 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2960 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2961 return type as well as __M argument type and all casts from __mmask8
2963 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2964 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2965 return type as well as __M argument type and all casts from __mmask8
2967 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2968 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2969 return type as well as __M argument type and all casts from __mmask8
2971 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2972 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2975 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2977 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2978 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2981 2018-07-11 Paul Koning <ni1d@arrl.net>
2983 * doc/md.texi (define_subst): Document how multiple occurrences of
2984 the same argument in the replacement pattern are handled.
2986 2018-07-11 Paul Koning <ni1d@arrl.net>
2988 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2990 (Common Type Attributes): Add "mode" attribute.
2992 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2994 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2995 stream DECL_ORIGINAL_TYPE.
2996 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2997 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2998 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2999 Do not walk original type.
3000 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3002 (write_ts_decl_non_common_tree_pointers): Do not stream
3004 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3005 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3007 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3009 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3010 thread twice from the same starting edge.
3012 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3014 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3015 * gimple.c (gimple_call_nonnull_result_p): ...here...
3016 (gimple_call_nonnull_arg): ...and here.
3017 * gimple.h (gimple_call_nonnull_result_p): New.
3018 (gimple_call_nonnull_arg): New.
3020 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3022 * config/arm/arm-cpus.in: Move information from fpu field of each
3023 cpu definition to the isa field.
3024 * config/arm/parsecpu.awk (fpu): Delete match rule.
3025 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3027 2018-07-11 Richard Biener <rguenther@suse.de>
3030 * dwarf2out.c (init_sections_and_labels): Use
3031 output_asm_line_debug_info consistently.
3032 (dwarf2out_early_finish): Likewise.
3033 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3036 2018-07-11 Richard Biener <rguenther@suse.de>
3038 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3039 Rework father_bb setting in a way to avoid propagating constants
3040 multiple times on a loop body.
3042 2018-07-10 Mark Wielaard <mark@klomp.org>
3045 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3047 2018-07-10 Richard Biener <rguenther@suse.de>
3049 * hash-map.h (hash_map::iterator::operator*): Return
3050 references to key and value.
3052 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3055 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3056 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3057 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3058 (gimplify_omp_for): For composite loops, move outer
3059 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3060 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3061 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3062 TREE_LIST for both the original class iterator and the "last" helper
3063 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3064 loop, remember has_decl_expr from outer composite loops for the
3065 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3067 2018-07-09 Martin Sebor <msebor@redhat.com>
3071 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3072 accessing implicitly initialized array elements.
3073 * expr.c (string_constant): Handle string initializers of
3074 character arrays within aggregates.
3075 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3076 Store element offset. As a special case, handle zero size.
3077 (fold_nonarray_ctor_reference): Same.
3078 (fold_ctor_reference): Add argument. Store subobject offset.
3079 * gimple-fold.h (fold_ctor_reference): Add argument.
3081 2018-07-09 Paul Koning <ni1d@arrl.net>
3083 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3084 (pdp11_insn_cost): New function.
3085 (pdp11_md_asm_adjust): New function.
3086 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3087 (pdp11_rtx_costs): Update to match machine better.
3088 (output_addr_const_pdp11): Correct format mismatch warnings.
3089 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3090 * config/pdp11/pdp11.md: General change to add base_cost and/or
3091 length attributes for use by new pdp11_insn_cost function.
3092 (MIN_BRANCH): Correct definition.
3094 (doloop_end): Use standard pattern name for looping pattern.
3095 (doloop_end_nocc): New.
3096 (movsf): Add another constraint alternative.
3097 (zero_extendqihi2): Add constraint alternatives for not in place
3099 (zero_extendhisi2): Remove.
3100 (shift patterns): Add CC handling variants.
3104 (define_peephole2): New peephole to recognize mov that sets CC for
3107 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3109 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3110 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3113 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3116 * real.c (real_nextafter): Return true if result is denormal.
3118 2018-07-09 Martin Liska <mliska@suse.cz>
3120 * common.opt: Add back wrongly removed attribute.
3122 2018-07-09 Richard Biener <rguenther@suse.de>
3125 * dwarf2out.c (gen_block_die): For an early generated DIE
3126 always output high/low PC attributes.
3128 2018-07-09 Tom de Vries <tdevries@suse.de>
3130 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3131 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3132 onto VAR_DECL with abstract origin.
3134 2018-07-07 Jim Wilson <jimw@sifive.com>
3136 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3138 2018-07-07 Tom de Vries <tdevries@suse.de>
3140 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3142 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3144 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3146 (combine_bound): Use wide-int overflow calculation instead of
3148 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3150 * fold-const.c (int_const_binop_2): Same.
3151 (extract_muldiv_1): Same.
3152 (fold_div_compare): Same.
3153 (fold_abs_const): Same.
3155 * poly-int.h (add): Same.
3159 * predict.c (predict_iv_comparison): Same.
3160 * profile-count.c (slow_safe_scale_64bit): Same.
3161 * simplify-rtx.c (simplify_const_binary_operation): Same.
3162 * tree-chrec.c (tree_fold_binomial): Same.
3163 * tree-data-ref.c (split_constant_offset_1): Same.
3164 * tree-if-conv.c (idx_within_array_bound): Same.
3165 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3166 * tree-ssa-phiopt.c (minmax_replacement): Same.
3167 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3168 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3169 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3170 * wide-int.cc (wi::add_large): Same.
3171 (wi::mul_internal): Same.
3172 (wi::sub_large): Same.
3173 (wi::divmod_internal): Same.
3174 * wide-int.h: Change overflow type to overflow_type for neg, add,
3175 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3176 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3177 mul_internal, divmod_internal.
3178 (overflow_type): New enum.
3179 (accumulate_overflow): New.
3181 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3183 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3184 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3186 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3188 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3189 argument is checked for zero before entering loop, avoid checking again.
3191 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3193 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3194 * gimplify.h (generic_expr_could_trap_p): Likwise.
3195 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3197 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3199 PR tree-optimization/86401
3200 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3201 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3202 (fold_bit_and_mask): ... here. New helper function for match.pd.
3203 * fold-const.h (fold_bit_and_mask): Declare.
3204 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3206 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3209 * target.def (translate_mode_attribute): New hook.
3210 * targhooks.h (default_translate_mode_attribute): Declare.
3211 * targhooks.c (default_translate_mode_attribute): New function.
3212 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3213 * doc/tm.texi: Regenerate.
3214 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3215 (rs6000_translate_mode_attribute): New function.
3217 2018-07-06 Paul Koning <ni1d@arrl.net>
3219 * doc/md.texi (define_split): Document DONE and FAIL.
3220 (define_peephole2): Ditto.
3222 2018-07-05 Jeff Law <law@redhat.com>
3224 PR tree-optimization/86010
3225 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3226 both the head and tail of mem* and str* calls.
3228 2018-07-05 Jim Wilson <jimw@sifive.com>
3230 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3232 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3234 * config/aarch64/aarch64-simd.md: correct flags text for
3235 MIN_EXPR replacement.
3237 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3239 * configure: Regenerated.
3241 2018-07-05 Carl Love <cel@us.ibm.com>
3243 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3244 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3245 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3246 VSX_BUILTIN_DOUBLEL_V4SF.
3248 2018-07-05 Martin Sebor <msebor@redhat.com>
3251 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3252 than its domain to compute its the upper bound of a char array.
3254 2018-07-05 Nathan Sidwell <nathan@acm.org>
3256 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3257 * doc/cpp.texi: Update comment.
3258 * doc/tm.texi: Rebuilt.
3259 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3260 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3261 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3262 headers affected by extern "C".
3263 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3264 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3265 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3266 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3267 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3268 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3269 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3270 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3271 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3272 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3273 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3274 config/sparc/sp64-elf.h, config/spu/spu.h,
3275 config/stormy16/stormy16.h, config/v850/v850.h,
3276 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3277 define NO_IMPLICIT_EXTERN_C.
3278 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3280 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3283 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3284 instead of GET_MODE_SIZE when comparing Units.
3286 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3289 * rtlanal.c (set_noop_p): Constrain on mode change,
3290 include hard-reg-set.h
3292 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3294 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3296 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3299 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3302 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3304 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3306 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3309 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3311 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3313 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3316 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3318 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3320 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3321 neg_*_op* variables.
3323 2018-07-04 Martin Liska <mliska@suse.cz>
3325 * tree-switch-conversion.c: Define
3326 max_ratio_for_speed and max_ratio_for_size constants.
3328 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3329 Martin Liska <mliska@suse.cz>
3334 * common.opt: Rename align options with 'str_' prefix.
3335 * common/config/i386/i386-common.c (set_malign_value): New
3337 (ix86_handle_option): Use it to set -falign-* options/
3338 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3339 type from int to string.
3340 * config/aarch64/aarch64.c: Update default values from int
3342 * config/alpha/alpha.c (alpha_override_options_after_change):
3344 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3345 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3346 max skip conditionally.
3347 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3348 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3349 max skip conditionally.
3350 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3351 max skip conditionally.
3352 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3353 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3354 max skip conditionally.
3355 * config/i386/i386.c (struct ptt): Change type from int to
3357 (ix86_default_align): Set default values.
3358 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3359 max skip conditionally.
3360 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3361 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3362 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3363 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3364 max skip conditionally.
3365 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3366 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3367 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3368 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3369 max skip conditionally.
3370 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3371 * config/ia64/ia64.c (ia64_option_override): Set default values
3372 for alignment options.
3373 * config/m68k/m68k.c: Handle new str_align_* options.
3374 * config/mips/mips.c (mips_set_compression_mode): Change
3376 (mips_option_override): Set default values for options.
3377 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3379 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3381 * config/rx/rx.c (rx_option_override): Likewise.
3382 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3383 (LABEL_ALIGN): Use align_labels_log.
3384 (LOOP_ALIGN): Use align_loops_align.
3385 * config/s390/s390.c (s390_asm_output_function_label): Use new
3387 * config/sh/sh.c (sh_override_options_after_change):
3388 Change type of constants.
3389 * config/spu/spu.c (spu_sched_init): Likewise.
3390 * config/sparc/sparc.c (sparc_option_override): Set default
3392 * config/visium/visium.c (visium_option_override): Likewise.
3393 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3394 emit p2align format with last argument if it's not needed.
3395 * doc/invoke.texi: Document extended format of -falign-*.
3396 * final.c: Use align_labels alignment.
3397 * flags.h (struct target_flag_state): Change type to use
3399 (struct align_flags_tuple): New.
3400 (struct align_flags): Likewise.
3401 (align_loops_log): Redefine macro to use new types.
3402 (align_loops_max_skip): Redefine macro to use new types.
3403 (align_jumps_log): Redefine macro to use new types.
3404 (align_jumps_max_skip): Redefine macro to use new types.
3405 (align_labels_log): Redefine macro to use new types.
3406 (align_labels_max_skip): Redefine macro to use new types.
3407 (align_functions_log): Redefine macro to use new types.
3408 (align_loops): Redefine macro to use new types.
3409 (align_jumps): Redefine macro to use new types.
3410 (align_labels): Redefine macro to use new types.
3411 (align_functions): Redefine macro to use new types.
3412 (align_functions_max_skip): Redefine macro to use new types.
3413 (align_loops_value): New macro.
3414 (align_jumps_value): New macro.
3415 (align_labels_value): New macro.
3416 (align_functions_value): New macro.
3417 * function.c (invoke_set_current_function_hook): Propagate
3418 alignment values from flags to global variables default in
3420 * ipa-icf.c (sem_function::equals_wpa): Use
3421 cl_optimization_option_eq instead of memcmp.
3422 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3424 (cl_optimization_stream_in): Likewise.
3425 * optc-save-gen.awk: Support strings in cl_optimization.
3426 * opth-gen.awk: Likewise.
3427 * opts.c (finish_options): Remove error checking of invalid
3429 (MAX_CODE_ALIGN): Remove.
3430 (MAX_CODE_ALIGN_VALUE): Likewise.
3431 (parse_and_check_align_values): New function.
3432 (check_alignment_argument): Likewise.
3433 (common_handle_option): Use check_alignment_argument.
3434 * opts.h (parse_and_check_align_values): Declare.
3435 * toplev.c (init_alignments): Remove.
3436 (read_log_maxskip): New.
3437 (parse_N_M): Likewise.
3438 (parse_alignment_opts): Likewise.
3439 (backend_init_target): Remove usage of init_alignments.
3440 * toplev.h (parse_alignment_opts): Declare.
3441 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3443 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3444 * tree.c (cl_option_hasher::equal): New.
3445 * varasm.c: Use new global macros.
3447 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3449 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3450 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3451 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3452 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3453 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3454 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3455 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3456 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3457 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3458 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3459 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3460 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3461 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3463 2018-07-04 Martin Liska <mliska@suse.cz>
3464 Jonathan Wakely <jwakely@redhat.com>
3466 * coverage.c: Use correct type.
3467 * doc/invoke.texi: Language correction.
3469 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3472 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3473 ENDBRANCH for non-tail call which may return via indirect branch.
3474 * doc/extend.texi: Document indirect_return attribute.
3476 2018-07-03 Martin Sebor <msebor@redhat.com>
3478 PR tree-optimization/86274
3479 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3481 (format_floating): Correct handling of infinities and NaNs.
3483 2018-07-03 Martin Sebor <msebor@redhat.com>
3485 * print-tree.c (print_real_cst): New function.
3486 (print_node_brief): Call it.
3487 (print_node): Ditto.
3489 2018-07-03 Jeff Law <law@redhat.com>
3491 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3492 into a single pattern.
3494 * config/h8300/h8300.md (ors code_iterator): New.
3495 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3496 a single pattern and single splitter.
3497 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3498 (iorqi3_1, xorqi3_1): Likewise.
3499 (iorqi3, xorqi3 expanders): Similarly.
3501 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3502 (movmd_internal) into a single pattern using the P mode iterator.
3503 (movmd splitters): Similarly.
3504 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3505 (movsd splitters): Similarly.
3507 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3508 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3509 right table based on the size of the operand.
3510 * config/h8300/h8300.md (length_table): Corresponding changes. All
3511 references to "addb", "addw" and "addl" changed to "add".
3512 (btst patterns): Merge two variants into a single pattern.
3513 (tstqi, tsthi): Likewise.
3514 (addhi3_incdec, addsi3_incdec): Likewise.
3515 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3516 (mulhi3, mulsi3): Likewise.
3517 (udivhi3, udivsi3): Likewise.
3518 (divhi3, divsi3): Likewise.
3519 (andorqi3, andorhi3, andorsi3): Likewise.
3521 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3524 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3525 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3527 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3529 PR tree-optimization/85694
3530 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3531 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3533 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3534 (<u>avg<mode>3_ceil): New patterns.
3536 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3538 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3539 scan-tree-dump directive.
3540 * gcc.dg/vect/slp-perm-2.c: Likewise.
3541 * gcc.dg/vect/slp-perm-3.c: Likewise.
3542 * gcc.dg/vect/slp-perm-5.c: Likewise.
3543 * gcc.dg/vect/slp-perm-6.c: Likewise.
3544 * gcc.dg/vect/slp-perm-7.c: Likewise.
3545 * gcc.dg/vect/slp-perm-8.c: Likewise.
3547 2018-07-03 Marek Polacek <polacek@redhat.com>
3550 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3552 2018-07-03 Richard Biener <rguenther@suse.de>
3555 * tree-ssa-structalias.c (find_func_clobbers): Properly
3556 handle indirect calls.
3558 2018-07-03 Jeff Law <law@redhat.com>
3560 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3561 (shifts): New code iterator.
3562 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3563 expander. Fix HImode handling on H8/SX.
3564 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3565 (subqi3, subhi3, subsi3 expanders): Likewise.
3566 (andqi3, andhi3, andsi3 expanders): Likewise.
3567 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3568 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3569 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3570 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3571 (zero_extendqihi2, zero_extendqisi2): Likewise.
3572 (extendqihi2, extendqisi2): Likewise.
3573 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3574 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3575 (rotlqi3_1, rotlhi3_1): Likewise.
3576 (logicalhi3_sn, logicalsi3_sn): Likewise.
3577 (logicalhi3, logicalsi3): Likewise.
3579 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3581 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3582 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3583 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3584 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3585 type to append_pattern_def_seq instead of creating a stmt_vec_info
3587 (build_mask_conversion): Likewise. Remove vinfo argument.
3588 (vect_add_conversion_to_patterm): Likewise, renaming to...
3589 (vect_add_conversion_to_pattern): ...this.
3590 (vect_recog_mask_conversion_pattern): Update call to
3591 build_mask_conversion. Pass the vector type to
3592 append_pattern_def_seq here too.
3593 (vect_recog_gather_scatter_pattern): Update call to
3594 vect_add_conversion_to_pattern.
3596 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3598 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3599 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3600 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3601 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3602 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3603 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3604 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3605 append_pattern_def_seq instead of new_pattern_def_seq.
3606 (vect_recog_divmod_pattern): Do both of the above.
3607 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3610 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3612 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3613 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3614 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3615 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3616 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3617 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3618 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3619 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3620 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3621 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3622 parameter with a single stmt_vec_info.
3623 (vect_recog_func_ptr): Likewise.
3624 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3625 (vect_try_gather_scatter_pattern): ...this.
3626 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3627 the stmt_vec_info of the statement to be matched. Don't clear
3628 STMT_VINFO_RELATED_STMT.
3629 (vect_pattern_recog): Update call accordingly.
3631 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3633 PR tree-optimization/85694
3634 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3635 (uavgM3_ceil): Document new optabs.
3636 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3637 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3639 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3640 (savg_ceil_optab): New optabs.
3641 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3642 (vect_vect_recog_func_ptrs): Add it.
3643 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3644 constant directly from the associated lhs.
3646 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3648 * tree-vect-patterns.c (vect_split_statement): New function.
3649 (vect_convert_input): Use it to try to split an existing cast.
3651 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3653 * poly-int.h (print_hex): New function.
3654 * dumpfile.h (dump_dec, dump_hex): Declare.
3655 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3656 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3657 min_input_precision, operation_precision and operation_sign.
3658 * tree-vect-patterns.c (vect_get_range_info): New function.
3659 (vect_same_loop_or_bb_p, vect_single_imm_use)
3660 (vect_operation_fits_smaller_type): Delete.
3661 (vect_look_through_possible_promotion): Add an optional
3662 single_use_p parameter.
3663 (vect_recog_over_widening_pattern): Rewrite to use new
3664 stmt_vec_info infomration. Handle one operation at a time.
3665 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3666 (vect_truncatable_operation_p, vect_set_operation_type)
3667 (vect_set_min_input_precision): New functions.
3668 (vect_determine_min_output_precision_1): Likewise.
3669 (vect_determine_min_output_precision): Likewise.
3670 (vect_determine_precisions_from_range): Likewise.
3671 (vect_determine_precisions_from_users): Likewise.
3672 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3673 (vect_vect_recog_func_ptrs): Put over_widening first.
3675 (vect_pattern_recog): Call vect_determine_precisions.
3677 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3679 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3680 statements that have been replaced by further pattern statements.
3681 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3683 2018-07-03 Richard Biener <rguenther@suse.de>
3685 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3686 always set *dt. Dump vectype in vectype overload.
3687 * dumpfile.h (dump_gimple_expr): New function.
3688 (dump_gimple_expr_loc): Likewise.
3689 * dumpfile.c (dump_gimple_expr): New function.
3690 (dump_gimple_expr_loc): Likewise.
3692 2018-07-02 Jeff Law <law@redhat.com>
3694 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3695 the H8/300, H8/300H and H8/S variants into a single pattern.
3696 (movhi_h8300, movqi_h8300hs): Similarly.
3697 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3698 (QHI mode iterator): New.
3700 * config/h8300/h8300.md: Remove trailing whitespace.
3702 2018-07-02 Jim Wilson <jimw@sifive.com>
3704 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3705 instead of emit_insn for interrupt returns.
3706 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3707 (riscv_sret, riscv_uret): Likewise.
3709 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3711 * pretty-print.c (selftest::test_pp_format): Move save and restore
3712 of quotes to class auto_fix_quotes, and add an instance.
3713 * selftest.c: Include "intl.h".
3714 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3715 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3716 * selftest.h (selftest::auto_fix_quotes): New class.
3718 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3720 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3721 (aarch64_sve_prepare_conditional_op): Remove.
3722 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3723 Allow aarch64_simd_reg_or_zero as select operand; remove
3724 the aarch64_sve_prepare_conditional_op call.
3725 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3726 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3727 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3728 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3729 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3730 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3731 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3732 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3733 and a splitters to match all of the *_any patterns.
3734 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3736 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3737 (SVE_COND_FP_BINARY_REV): Remove.
3738 (sve_int_op_rev, sve_fp_op_rev): New.
3739 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3740 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3741 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3742 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3743 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3744 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3745 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3746 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3747 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3749 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3750 Remove match_dup 1 from the inner unspec.
3751 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3753 * config/aarch64/aarch64.md (movprfx): New attr.
3754 (length): Default movprfx to 8.
3755 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3756 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3757 (*<su>mul<SVE_I>3_highpart): Likewise.
3758 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3759 (*v<ASHIFT><SVE_I>3): Likewise.
3760 (*<su><MAXMIN><SVE_I>3): Likewise.
3761 (*<su><MAXMIN><SVE_F>3): Likewise.
3762 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3763 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3764 (*div<SVE_F>4): Likewise.
3766 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3768 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3771 2018-07-02 Richard Biener <rguenther@suse.de>
3773 PR tree-optimization/86363
3774 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3775 memset argument refers to a non-variable address.
3777 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3779 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3780 {PLUS,MINUS}_EXPR code to...
3781 (adjust_symbolic_bound): ...here,
3782 (combine_bound): ...here,
3783 (set_value_range_with_overflow): ...and here.
3785 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3787 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3789 (extract_range_from_abs_expr): ...here.
3791 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3793 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3794 -fno-omit-frame-pointer when not optimizing.
3796 2018-07-02 Martin Liska <mliska@suse.cz>
3799 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3800 (propagate_nothrow): Likewise.
3802 2018-07-02 Martin Liska <mliska@suse.cz>
3805 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3807 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3809 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3810 function in r262149, changing "loc" param from source_location to
3811 const dump_location_t &.
3812 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3813 declaration, as above.
3815 2018-07-01 Paul Koning <ni1d@arrl.net>
3817 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3818 -munit-asm, -mgnu-asm, -mdec-asm.
3819 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3820 (pdp11_output_labelref): New.
3821 (pdp11_output_def): New.
3822 (pdp11_output_addr_vec_elt): New.
3823 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3824 %# and %@ format codes.
3825 (pdp11_option_override): New.
3826 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3827 (pdp11_output_ident): New.
3828 (pdp11_asm_named_section): New.
3829 (pdp11_asm_init_sections): New.
3830 (pdp11_file_start): New.
3831 (pdp11_file_end): New.
3832 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3833 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3834 %o, like %c but octal.
3835 (pdp11_option_override): New.
3836 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3838 (DATA_SECTION_ASM_OP): Ditto.
3839 (READONLY_DATA_SECTION_ASM_OP): New.
3840 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3841 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3842 (ASM_OUTPUT_LABELREF): Ditto.
3843 (ASM_OUTPUT_DEF): Ditto.
3844 (ASM_OUTPUT_EXTERNAL): New.
3845 (ASM_OUTPUT_SOURCE_FILENAME): New.
3846 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3847 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3848 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3849 %# and %@ format codes.
3850 * config/pdp11/pdp11.opt (mgnu-asm): New.
3851 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3852 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3853 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3855 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3857 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3858 dereferencing path[] beyond its length.
3860 (debug_all_paths): New.
3861 (rewire_first_differing_edge): New.
3862 (adjust_paths_after_duplication): New.
3863 (duplicate_thread_path): Call adjust_paths_after_duplication.
3865 (thread_through_all_blocks): Add new argument to
3866 duplicate_thread_path.
3868 2018-06-30 Jim Wilson <jimw@sifive.com>
3870 * config/riscv/predicates.md (p2m1_shift_operand): New.
3871 (high_mask_shift_operand): New.
3872 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3873 pattern using p2m1_shift_operand.
3874 (lshsi3_zero_extend_3+2): New combiner pattern using
3875 high_mask_shift_operand.
3877 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3879 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3881 (vect_recog_rotate_pattern): ...here.
3882 (vect_convert_input): Try to insert casts of invariants in the
3884 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3885 preheader to be empty.
3887 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3889 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3890 vector type. If given, install it in the new statement's
3892 (vect_element_precision): New function.
3893 (vect_unpromoted_value): New struct.
3894 (vect_unpromoted_value::vect_unpromoted_value): New function.
3895 (vect_unpromoted_value::set_op): Likewise.
3896 (vect_look_through_possible_promotion): Likewise.
3897 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3898 (vect_widened_op_tree, vect_convert_input): Likewise.
3899 (vect_convert_inputs, vect_convert_output): Likewise.
3900 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3901 to handle the optional cast of the multiplication result and
3902 vect_widened_op_tree to detect the widened multiplication itself.
3903 Do not require the input and output of promotion casts to have
3904 the same sign, but base the signedness of the operation on the
3905 input rather than the result. If the pattern includes two
3906 promotions, check that those promotions have the same sign.
3907 Do not restrict the MULT_EXPR handling to a double-width result;
3908 handle quadruple-width results and wider. Use vect_convert_inputs
3909 to convert the inputs to the common type.
3910 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3911 to handle the optional cast of the ABS result. Also allow a sign
3912 change or a sign extension between the ABS and MINUS.
3913 Use vect_widened_op_tree to detect the widened subtraction and use
3914 vect_convert_inputs to convert the inputs to the common type.
3915 (vect_handle_widen_op_by_const): Delete.
3916 (vect_recog_widen_op_pattern): New function.
3917 (vect_recog_widen_mult_pattern): Use it.
3918 (vect_recog_widen_shift_pattern): Likewise.
3919 (vect_recog_widen_sum_pattern): Use
3920 vect_look_through_possible_promotion to handle the promoted
3923 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3925 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3926 the containing gimple_seq *.
3927 * gimple-iterator.h (gsi_for_stmt): Declare it.
3928 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3929 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3930 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3931 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3932 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3934 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3936 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3937 statement being replaced is part of an existing pattern
3938 definition sequence, inserting the new pattern statements before
3940 (vect_pattern_recog_1): Don't return a bool. If the statement
3941 is already part of a pattern, instead apply pattern matching
3942 to the pattern definition statements. Don't clear the
3943 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3944 (vect_pattern_recog): Don't break after the first match;
3945 continue processing the pattern definition statements instead.
3946 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3948 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3950 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3951 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3952 (vect_recog_widen_sum_pattern): Use it.
3954 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3956 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3957 phi is not a pattern statement and has not been replaced by
3958 a pattern statement.
3959 * tree-vect-patterns.c (type_conversion_p): Don't check
3960 STMT_VINFO_IN_PATTERN_P.
3961 (vect_recog_vector_vector_shift_pattern): Likewise.
3962 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3963 the pattern statement rather than the original statement; check
3964 directly for a WIDEN_MULT_EXPR here.
3965 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3966 vect_is_simple_use to return the pattern statement rather
3967 than the original statement; use is_pattern_stmt_p to check
3968 for such a pattern statement.
3969 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3970 to return the pattern statement rather than the original statement;
3971 don't do the same transformation here.
3972 (vect_is_simple_use): If the defining statement has been replaced
3973 by a pattern statement, return the pattern statement instead.
3974 Remove the corresponding (local) transformation from the vectype
3977 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3979 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3980 end and default to null.
3981 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3982 (vectorizable_reduction): Update calls accordingly, dropping the
3983 gimple ** argument if the passed-back statement isn't needed.
3984 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3985 (vect_recog_rotate_pattern): Likewise.
3986 (vect_recog_mask_conversion_pattern): Likewise.
3987 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3988 (vect_mask_constant_operand_p): Likewise.
3989 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3990 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3991 (get_group_load_store_type, get_load_store_type): Likewise.
3992 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3993 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3994 (vectorizable_conversion, vectorizable_assignment): Likewise.
3995 (vectorizable_shift, vectorizable_operation): Likewise.
3996 (vectorizable_store, vect_is_simple_cond): Likewise.
3997 (vectorizable_condition, vectorizable_comparison): Likewise.
3998 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3999 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4000 and move it to the end. Cope with null def_stmt_outs.
4002 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4004 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4006 2018-06-29 Jeff Law <law@redhat.com>
4008 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4009 displacements for TARGET_V850E2V3 and newer.
4010 (TARGET_LRA_P): Remove. Defaults to LRA now.
4011 * config/v850/v850.md (sign23byte_load): Remove.
4012 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4013 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4015 2018-06-29 Martin Liska <mliska@suse.cz>
4018 * coverage.c (coverage_init): Mangle full path name.
4019 * doc/invoke.texi: Document the change.
4020 * gcov-io.c (mangle_path): New.
4021 * gcov-io.h (mangle_path): Likewise.
4022 * gcov.c (mangle_name): Use mangle_path for path mangling.
4024 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4026 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4027 if starting source register is not even.
4029 2018-06-29 Martin Liska <mliska@suse.cz>
4031 PR tree-optimization/86263
4032 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4033 Make edge redirection.
4035 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4037 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4038 (dump_scope_depth): New variable.
4039 (get_dump_scope_depth): New function.
4040 (dump_begin_scope): New function.
4041 (dump_end_scope): New function.
4042 * dumpfile.h (get_dump_scope_depth): New declaration.
4043 (dump_begin_scope): New declaration.
4044 (dump_end_scope): New declaration.
4045 (class auto_dump_scope): New class.
4046 (AUTO_DUMP_SCOPE): New macro.
4047 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4050 2018-06-29 Richard Biener <rguenther@suse.de>
4052 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4053 compute_all_dependences succeeds.
4054 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4055 exceed --param loop-max-datarefs-for-datadeps.
4057 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4059 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4061 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4064 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4065 alternative 0 in preferred_for_speed attribute.
4067 2018-06-28 Paul Koning <ni1d@arrl.net>
4069 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4070 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4071 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4072 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4073 for shift insn patterns.
4075 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4077 * cgraph.c (cgraph_node::get_body): Replace assignments to
4078 "dump_file" with calls to set_dump_file.
4079 * dumpfile.c (alt_dump_file): Make static, and group with...
4080 (alt_flags): ...this definition.
4081 (dumps_are_enabled): New variable.
4082 (refresh_dumps_are_enabled): New function.
4083 (set_dump_file): New function.
4084 (set_alt_dump_file): New function.
4085 (gcc::dump_manager::dump_start): Replace assignments to
4086 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4088 (gcc::dump_manager::dump_finish): Likewise.
4089 * dumpfile.h (alt_dump_file): Delete decl.
4090 (dumps_are_enabled): New variable decl.
4091 (set_dump_file): New function decl.
4092 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4094 * tree-nested.c (lower_nested_functions): Replace assignments to
4095 "dump_file" with calls to set_dump_file.
4097 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4099 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4100 goto_locus of each outgoing edge of each basic block.
4102 2018-06-28 Richard Biener <rguenther@suse.de>
4104 * dwarf2out.c (decl_scope_table): Remove.
4105 (push_decl_scope): Likewise.
4106 (pop_decl_scope): Likewise.
4107 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4108 (gen_struct_or_union_type_die): Likewise.
4109 (gen_tagged_type_die): Likewise.
4110 (dwarf2out_init): Do not initialize decl_scope_table.
4111 (dwarf2out_c_finalize): Do not free it.
4113 2018-06-28 Richard Biener <rguenther@suse.de>
4115 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4116 deciding whether to not re-use a DIE.
4118 2018-06-28 Richard Biener <rguenther@suse.de>
4120 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4121 DW_AT_abstract_origin attribute.
4123 2018-06-28 Martin Liska <mliska@suse.cz>
4125 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4126 Use newly introduced constants.
4127 * tree-switch-conversion.h (struct jump_table_cluster):
4128 Define max_ratio_for_size and max_ratio_for_speed.
4130 2018-06-28 Martin Liska <mliska@suse.cz>
4132 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4133 Add new checking assert to catch invalid state.
4134 (jump_table_cluster::can_be_handled): Handle single case
4136 (jump_table_cluster::is_beneficial): Bail out for such case.
4137 (bit_test_cluster::find_bit_tests):
4138 Add new checking assert to catch invalid state.
4139 (bit_test_cluster::can_be_handled): Handle single case
4141 (bit_test_cluster::is_beneficial): Bail out for such case.
4142 (switch_decision_tree::analyze_switch_statement):
4145 2018-06-28 Martin Liska <mliska@suse.cz>
4147 * common.opt: Introduce -completion option.
4148 * gcc.c (driver_handle_option): Handle it.
4149 (driver::main): Print completions if completion
4151 * opt-suggestions.c (option_proposer::get_completions):
4153 (option_proposer::suggest_completion): Likewise.
4154 (option_proposer::find_param_completions): Likewise.
4155 (verify_autocompletions): Likewise.
4156 (test_completion_valid_options): Likewise.
4157 (test_completion_valid_params): Likewise.
4158 (in_completion_p): Likewise.
4159 (empty_completion_p): Likewise.
4160 (test_completion_partial_match): Likewise.
4161 (test_completion_garbage): Likewise.
4162 (opt_proposer_c_tests): Likewise.
4163 * opt-suggestions.h: Declare new functions.
4164 * opts.c (common_handle_option): Handle OPT__completion_.
4165 * selftest-run-tests.c (selftest::run_tests): Add
4166 opt_proposer_c_tests.
4167 * selftest.c (assert_str_startswith): New.
4168 * selftest.h (assert_str_startswith): Likewise.
4169 (opt_proposer_c_tests): New.
4170 (ASSERT_STR_STARTSWITH): Likewise.
4172 2018-06-28 Martin Liska <mliska@suse.cz>
4174 * Makefile.in: Add opt-suggestions.o.
4175 * gcc-main.c: Include opt-suggestions.h.
4176 * gcc.c (driver::driver): Likewise.
4177 (driver::~driver): Remove m_option_suggestions.
4178 (driver::build_option_suggestions): Moved to option_proposer.
4179 (driver::suggest_option): Likewise.
4180 (driver::handle_unrecognized_options): Use option_proposer.
4181 * gcc.h (class driver): Add new memver m_option_proposer.
4182 * opt-suggestions.c: New file.
4183 * opt-suggestions.h: New file.
4185 2018-06-28 Martin Liska <mliska@suse.cz>
4187 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4188 (auto_string_vec::~auto_string_vec): Likewise.
4190 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4192 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4193 prevent_decl_creation_for_types fields up and add reset_location field.
4194 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4195 statement if id->reset_location is true.
4196 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4197 id->reset_location is true.
4198 (copy_phis_for_bb): Force input_location on the arguments if
4199 id->reset_location is true.
4200 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4201 is set on the function to be inlined.
4203 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4205 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4207 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4209 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4210 registers for Pmode.
4211 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4212 hard registers for the clobbered pseudo.
4214 2018-06-27 Paul Koning <ni1d@arrl.net>
4216 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4217 mutually exclusive options.
4218 * config/pdp11/constraints.md (h): New constraint.
4219 (O): Update definition to match shift code generation.
4220 (D): New constraint.
4221 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4223 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4225 (output_jump): Change arguments.
4226 (pdp11_fixed_cc_regs): New function.
4227 (pdp11_cc_mode): Ditto.
4228 (pdp11_expand_shift): Ditto.
4229 (pdp11_assemble_shift): Ditto.
4230 (pdp11_small_shift): Ditto.
4231 (pdp11_branch_cost): Remove.
4232 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4234 (pdp11_register_move_cost): Update for CC registers.
4235 (pdp11_rtx_costs): Add case for LSHIFTRT.
4236 (pdp11_output_jump): Add CCNZ mode conditional branches.
4237 (notice_update_cc_on_set): Remove.
4238 (pdp11_cc_mode): New function.
4239 (simple_memory_operand): Correct pre/post decrement case.
4240 (no_side_effect_operand): New function.
4241 (pdp11_regno_reg_class): Add CC_REGS class.
4242 (pdp11_fixed_cc_regs): New function.
4243 (pdp11_small_shift): New function.
4244 (pdp11_expand_shift): New function to expand shift insns.
4245 (pdp11_assemble_shift): New function to output shifts.
4246 (pdp11_branch_cost): Remove.
4247 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4248 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4249 (WCHAR_TYPE): Ditto.
4250 (PTRDIFF_TYPE): Ditto.
4251 (ADJUST_INSN_LENGTH): New macro.
4252 (FIXED_REGISTERS): Add CC registers.
4253 (CALL_USED_REGISTERS): Ditto.
4255 (REG_CLASS_NAMES): Ditto.
4256 (REG_CLASS_CONTENTS): Ditto.
4257 (SELECT_CC_MODE): Use new function.
4258 (TARGET_FLAGS_REGNUM): New macro.
4259 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4260 (cc0_reg_rtx): Remove.
4261 (CC_STATUS_MDEP): Remove.
4262 (CC_STATUS_MDEFP_INIT): Remove.
4263 (CC_IN_FPU): Remove.
4264 (NOTICE_UPDATE_CC): Remove.
4265 (REGISTER_NAMES): Add CC registers.
4266 (BRANCH_COST): Change to constant 1.
4267 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4269 * config/pdp11/pdp11.opt (mbcopy): Remove.
4270 (mbcopy-builtin): Remove.
4271 (mbranch-cheap): Remove.
4272 (mbranch-expensive): Remove.
4273 * config/pdp11/predicates.md (expand_shift_operand): Update to
4274 match shift code generation.
4275 (ccnz_operator): New predicate.
4276 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4277 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4278 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4280 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4281 description of O constraint.
4283 2018-06-27 Jeff Law <law@redhat.com>
4284 Austin Law <austinklaw@gmail.com>
4286 * config/v850/v850.md (addsi3_set_flags): New pattern.
4287 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4288 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4289 (zero_extendhisi2_v850_set_flags): Likewise.
4290 (zero_extendqisi2_v850_set_flags): Likewise.
4291 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4292 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4293 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4295 * config/v850/v850-protos.h (notice_update_cc): Remove.
4296 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4297 (v850_print_operand): Handle 'D' and "d".
4298 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4299 Add handling of arithmetic/logical operations compared against zero.
4300 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4301 Do not look at v850_compare_op, instead get mode from last argument.
4302 (v850_gen_compare): Remove
4303 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4304 after reload for prologue insns.
4305 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4307 (construct_save_jarl): Likewise.
4308 (TARGET_FLAGS_REGNUM): Define.
4309 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4310 (NOTICE_UPDATE_CC): Remove.
4311 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4312 than cc0. Conditionalize on reload_completed.
4313 (cmpsi_insn, setfcc_insn): Likewise.
4314 (tst1 splitter): Turn into define_and_split which sets the flags
4316 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4317 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4318 (cstoresf4, cstoredf4): Clobber the flags.
4319 (cmpsi, cmpsf, cmpdf): Remove expanders.
4320 (setf_insn): Remove pattern.
4321 (addsi3): Turn into define_and_split which clobbers the flags after
4322 reload and a suitable pattern (addsi3_clobber_flags) for use after
4324 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4325 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4326 (ashrsi3, ashrsi3_v850e2): Likewise.
4327 (bins): Clobber the flags.
4328 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4329 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4330 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4331 (call_value_internal_short, call_value_internal_long): Likewise.
4332 (callt_save_interrupt, callt_return_interrupt): Likewise.
4333 (save_interrupt, return_interrupt): Likewise.
4334 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4335 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4336 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4337 (All FP comparisons): Only allow after reload has completed.
4339 (divh, divhu): Tweak output template.
4340 (branch_z_normal, branch_z_invert): Remove
4341 (branch_nz_normal, branch_nz_invert): Likewise.
4342 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4344 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4345 * config/v850/v850.c (notice_update_cc): Remove.
4346 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4347 (CC_NO_CARRY): Likewise.
4348 (NOTICE_UPDATE_CC): Define to nothing.
4349 * config/v850/v850.md: Remove block comment on cc0 handling
4350 Remove "cc" attribute from all patterns. Remove cc_status handling
4351 from all patterns. Minor formatting fixes.
4353 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4355 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4356 (cortex-a76.cortex-a55): Likewise.
4357 * config/aarch64/aarch64-tune.md: Regenerate.
4358 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4359 cortex-a76.cortex-a55.
4361 2018-06-27 Jeff Law <law@redhat.com>
4363 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4364 (MULTILIB_DIRNAMES): Similarly.
4366 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4368 * gimple.h (gimple_return_retbnd): Delete.
4369 (gimple_return_set_retbnd): Likewise.
4370 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4371 gimple_return_set_retbnd.
4372 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4373 gimple_return_retbnd and adjust.
4374 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4375 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4376 Explicitly return NULL in a couple more cases. Move assertion
4377 on debug statements and remove unreachable code.
4378 (reset_debug_binding): Do not test id->retbnd.
4379 (expand_call_inline): Do not set it.
4381 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4383 * configure.ac: Add --disable-gcov option.
4384 * configure: Regenerate.
4385 * Makefile.in: Honour @enable_gcov@.
4386 * doc/install.texi: Document --disable-gcov.
4388 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4390 * config/arm/arm-cpus.in (cortex-a76): New entry.
4391 (cortex-a76.cortex-a55): Likewise.
4392 * config/arm/arm-tables.opt: Regenerate.
4393 * config/arm/arm-tune.md: Likewise.
4394 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4395 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4396 cortex-a76.cortex-a55.
4398 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4401 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4403 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4405 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4407 (EPILOGUE_USES): Likewise.
4409 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4411 * tree-inline.c (remap_location): New function extracted from...
4412 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4413 (copy_phis_for_bb): ...here. Call remap_location.
4414 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4416 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4418 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4419 unaligned vsx for 16B memset.
4421 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4424 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4425 ieee128_float_type_node to long_double_type_node unless
4426 TARGET_LONG_DOUBLE_128 is set.
4428 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4430 * cfgloop.c (get_loop_location): Convert return type from
4431 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4432 by implicit construction from rtx_insn *, and using
4433 dump_user_location_t::from_function_decl for the fallback case.
4434 * cfgloop.h (get_loop_location): Convert return type from
4435 location_t to dump_user_location_t.
4436 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4437 dump_printf_loc to pass in a dump_location_t rather than a
4438 location_t, via the gimple stmt.
4439 * coverage.c (get_coverage_counts): Update calls to
4440 dump_printf_loc to pass in dump_location_t rather than a
4442 * doc/optinfo.texi (Dump types): Convert example of
4443 dump_printf_loc from taking "locus" to taking "insn". Update
4444 description of the "_loc" calls to cover dump_location_t.
4445 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4447 (dump_user_location_t::dump_user_location_t): New constructors,
4448 from gimple *stmt and rtx_insn *.
4449 (dump_user_location_t::from_function_decl): New function.
4450 (dump_loc): Make static.
4451 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4452 const dump_location_t &.
4453 (dump_generic_expr_loc): Delete.
4454 (dump_printf_loc): Convert param "loc" from location_t to
4455 const dump_location_t &.
4456 (selftest::test_impl_location): New function.
4457 (selftest::dumpfile_c_tests): New function.
4458 * dumpfile.h: Include "profile-count.h".
4459 (class dump_user_location_t): New class.
4460 (struct dump_impl_location_t): New struct.
4461 (class dump_location_t): New class.
4462 (dump_printf_loc): Convert 2nd param from source_location to
4463 const dump_location_t &.
4464 (dump_generic_expr_loc): Delete.
4465 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4466 const dump_location_t &.
4467 * gimple-fold.c (fold_gimple_assign): Update call to
4468 dump_printf_loc to pass in a dump_location_t rather than a
4469 location_t, via the gimple stmt.
4470 (gimple_fold_call): Likewise.
4471 * gimple-loop-interchange.cc
4472 (loop_cand::analyze_iloop_reduction_var): Update for change to
4473 check_reduction_path.
4474 (tree_loop_interchange::interchange): Update for change to
4476 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4477 change in return-type of find_loop_location.
4478 (graphite_regenerate_ast_isl): Likewise.
4479 * graphite-optimize-isl.c (optimize_isl): Likewise.
4480 * graphite.c (graphite_transform_loops): Likewise.
4481 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4482 pass in a dump_location_t rather than a location_t, via the
4484 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4485 * ipa.c (walk_polymorphic_call_targets): Likewise.
4486 * loop-unroll.c (report_unroll): Convert "locus" param from
4487 location_t to dump_location_t.
4488 (decide_unrolling): Update for change to get_loop_location's
4490 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4491 location_t to dump_user_location_t.
4492 (grid_find_single_omp_among_assignments_1): Updates calls to
4493 dump_printf_loc to pass in a dump_location_t rather than a
4494 location_t, via the gimple stmt.
4495 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4496 location_t to dump_location_t. Updates calls to dump_printf_loc
4497 to pass in a dump_location_t rather than a location_t, via the
4499 (grid_inner_loop_gridifiable_p): Likewise.
4500 (grid_dist_follows_simple_pattern): Likewise.
4501 (grid_gfor_follows_tiling_pattern): Likewise.
4502 (grid_target_follows_gridifiable_pattern): Likewise.
4503 (grid_attempt_target_gridification): Convert initialization
4504 of local "grid" from memset to zero-initialization; FIXME: does
4505 this require C++11? Update call to dump_printf_loc to pass in a
4506 optinfo_location rather than a location_t, via the gimple stmt.
4507 * profile.c (read_profile_edge_counts): Updates call to
4508 dump_printf_loc to pass in a dump_location_t rather than a
4510 (compute_branch_probabilities): Likewise.
4511 * selftest-run-tests.c (selftest::run_tests): Call
4513 * selftest.h (dumpfile_c_tests): New decl.
4514 * tree-loop-distribution.c (pass_loop_distribution::execute):
4515 Update for change in return type of find_loop_location.
4516 * tree-parloops.c (parallelize_loops): Likewise.
4517 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4518 "locus" from location_t to dump_user_location_t.
4519 (canonicalize_loop_induction_variables): Likewise.
4520 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4521 for change in return type of find_loop_location.
4522 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4523 to dump_printf_loc to pass in a dump_location_t rather than a
4524 location_t, via the stmt.
4525 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4527 * tree-vect-loop-manip.c (find_loop_location): Convert return
4528 type from source_location to dump_user_location_t.
4529 (vect_do_peeling): Update for above change.
4530 (vect_loop_versioning): Update for change in type of
4532 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4533 from location_t to dump_user_location_t.
4534 (vect_estimate_min_profitable_iters): Update for change in type
4536 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4537 location_t to dump_location_t.
4538 (vect_slp_bb): Update for change in type of vect_location.
4539 * tree-vectorizer.c (vect_location): Convert from source_location
4540 to dump_user_location_t.
4541 (try_vectorize_loop_1): Update for change in vect_location's type.
4542 (vectorize_loops): Likewise.
4543 (increase_alignment): Likewise.
4544 * tree-vectorizer.h (vect_location): Convert from source_location
4545 to dump_user_location_t.
4546 (find_loop_location): Convert return type from source_location to
4547 dump_user_location_t.
4548 (check_reduction_path): Convert 1st param from location_t to
4549 dump_user_location_t.
4550 * value-prof.c (check_counter): Update call to dump_printf_loc to
4551 pass in a dump_user_location_t rather than a location_t; update
4552 call to error_at for change in type of "locus".
4553 (check_ic_target): Update call to dump_printf_loc to
4554 pass in a dump_user_location_t rather than a location_t, via the
4557 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4559 * config/s390/s390.h (enum processor_flags): Do not use
4560 default tune parameter when -march was specified.
4562 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4565 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4566 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4569 2018-06-26 Richard Biener <rguenther@suse.de>
4571 PR tree-optimization/86287
4573 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4574 (vect_analyze_loop): Initialize n_stmts.
4576 2018-06-26 Richard Biener <rguenther@suse.de>
4579 * fold-const.c (fold_convertible_p): Pointer extension
4582 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4585 * dwarf2out.c (loc_list_has_views): Adjust comments.
4586 (dw_loc_list): Split single cross-partition range with
4589 2018-06-25 Jeff Law <law@redhat.com>
4591 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4592 on -mbig-switch by default.
4594 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4596 (const_float_0_operand): Remove unused predicate.
4597 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4598 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4599 (recipsf2): New expander. Original pattern now called
4601 (recipdf2, recipdf2_insn): Similarly.
4602 (rsqrtsf2, rsqrtsf2_insn): Similarly
4603 (rsqrtdf2, rsqrtdf2_insn): Similarly
4605 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4607 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4608 Simplify logic for FreeBSD (twice).
4610 2018-06-25 Martin Sebor <msebor@redhat.com>
4612 PR tree-optimization/86204
4613 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4614 a strnlen result if it's less than the length of the string.
4616 2018-06-25 Martin Sebor <msebor@redhat.com>
4618 PR tree-optimization/85700
4619 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4620 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4621 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4623 2018-06-25 Martin Sebor <msebor@redhat.com>
4625 * doc/extend.texi (Zero-length arrays): Update and clarify.
4627 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4629 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4630 added IEEE/IBM long double multilib support on PowerPC little
4631 endian Linux systems.
4632 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4633 (MULTILIB_DEFAULTS): Likewise.
4634 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4636 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4637 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4638 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4640 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4643 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4644 (REORDER_45): Likewise.
4646 2018-06-25 Jeff Law <law@redhat.com>
4648 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4649 dividend to 32 bits. Adjust length.
4650 (udivmodhi4): Cleanup output template. Fix length.
4652 2018-06-25 Carl Love <cel@us.ibm.com>
4654 * config/rs6000/vsx.md: Change word selector to prefered location.
4656 2018-06-25 Richard Biener <rguenther@suse.de>
4658 PR tree-optimization/86304
4659 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4660 epilogue-if-converted loops as well.
4662 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4664 * lto-section-out.c (lto_begin_section): Do not print section
4665 name for noaddr and unnumbered dumps.
4667 2018-06-25 Richard Biener <rguenther@suse.de>
4669 * tree-vectorizer.h (struct vec_info_shared): New structure
4670 with parts split out from struct vec_info and loop_nest from
4671 struct _loop_vec_info.
4672 (struct vec_info): Adjust accordingly.
4673 (struct _loop_vec_info): Likewise.
4674 (LOOP_VINFO_LOOP_NEST): Adjust.
4675 (LOOP_VINFO_DATAREFS): Likewise.
4676 (LOOP_VINFO_DDRS): Likewise.
4677 (struct _bb_vec_info): Likewise.
4678 (BB_VINFO_DATAREFS): Likewise.
4679 (BB_VINFO_DDRS): Likewise.
4680 (struct _stmt_vec_info): Add dr_aux member.
4681 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4682 (DR_MISALIGNMENT_UNINITIALIZED): New.
4683 (set_dr_misalignment): Adjust.
4684 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4685 (vect_analyze_loop): Adjust prototype.
4686 (vect_analyze_loop_form): Likewise.
4687 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4688 Compute dependences lazily.
4689 (vect_record_base_alignments): Use shared datarefs/ddrs.
4690 (vect_verify_datarefs_alignment): Likewise.
4691 (vect_analyze_data_refs_alignment): Likewise.
4692 (vect_analyze_data_ref_accesses): Likewise.
4693 (vect_analyze_data_refs): Likewise.
4694 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4695 constructor parameter for shared part.
4696 (vect_analyze_loop_form): Pass in shared part and adjust.
4697 (vect_analyze_loop_2): Pass in storage for the number of
4698 stmts. Move loop nest finding to the caller. Compute
4700 (vect_analyze_loop): Pass in shared part.
4701 (vect_transform_loop): Verify shared datarefs are unchanged.
4702 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4703 constructor parameter for shared part.
4704 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4705 (vect_slp_bb): Verify shared datarefs are unchanged before
4707 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4709 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4710 DR_MISALIGNMENT_UNINITIALIZED.
4711 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4712 parameter for shared part.
4713 (vec_info::~vec_info): Adjust.
4714 (vec_info_shared::vec_info_shared): New.
4715 (vec_info_shared::~vec_info_shared): Likewise.
4716 (vec_info_shared::save_datarefs): Likewise.
4717 (vec_info_shared::check_datarefs): Likewise.
4718 (try_vectorize_loop_1): Construct shared part live for analyses
4719 of a single loop for multiple vector sizes.
4720 * tree-parloops.c (gather_scalar_reductions): Adjust.
4722 2018-06-25 Richard Biener <rguenther@suse.de>
4724 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4725 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4726 (vect_analyze_data_refs): Remove similar code from here and
4727 simplify accordingly.
4729 2018-06-25 Richard Biener <rguenther@suse.de>
4731 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4732 for reverse storage order accesses rather than asserting
4733 they cannot happen here.
4735 2018-06-25 Tom de Vries <tdevries@suse.de>
4738 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4739 Use data16 instead of .byte for insn prefix.
4741 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4744 * parser.c (make_char_string_pack): Pass this literal chars
4745 through cpp_interpret_string.
4746 (cp_parser_userdef_numeric_literal): Check the result of
4747 make_char_string_pack.
4749 2018-06-24 Maya Rashish <coypu@sdf.org>
4751 * ginclude/stddef.h: Simplify conditions around avoiding
4752 re-definition of __size_t.
4754 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4756 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4757 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4759 2018-06-22 Maya Rashish <coypu@sdf.org>
4761 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4762 made to OpenBSD and NetBSD through the years.
4764 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4766 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4767 behavior of vec_pack (vector double, vector double) to match
4768 behavior of vec_float2 (vector double, vector double).
4770 2018-06-22 Olivier Hainque <hainque@adacore.com>
4772 * gimplify.c (gimplify_function_tree): Prevent creation
4773 of a trampoline for the address of the current function
4774 passed to entry/exit instrumentation hooks.
4776 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4779 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4782 2018-06-22 Martin Liska <mliska@suse.cz>
4784 PR tree-optimization/86263
4785 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4786 Bail out if is_enabled is false.
4787 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4789 (jump_table_cluster::is_enabled): New function.
4791 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4793 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4794 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4795 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4796 (lto_input_ts_binfo_tree_pointers): Likewise.
4797 * tree-streamer-out.c (streamer_write_tree_bitfields,
4798 write_ts_binfo_tree_pointers): Likewise.
4799 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4801 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4803 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4805 2018-06-22 Martin Liska <mliska@suse.cz>
4807 * symbol-summary.h (get): Make it pure and inline move
4808 functionality from ::get function.
4809 (get): Remove and inline into ::get and ::get_create.
4810 (get_create): Move code from ::get function.
4812 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4815 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4816 -x assembler-with-cpp.
4818 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4820 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4821 _FILE_OFFSET_BITS=64 for C++.
4823 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4825 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4826 conversion insn that shows up when pr85657-3.c is compiled using
4827 IEEE 128-bit long double.
4828 (neg<mode>2_internal): Use the correct mode to check whether the
4829 mode is IBM extended.
4830 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4831 multiply and divide external functions from being created more
4834 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4836 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4838 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4839 the edge can be forwarded.
4840 (cfg_layout_merge_blocks): Likewise.
4842 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4844 * except.c (finish_eh_generation): Commit edge insertions only after
4845 the EH edges have been redirected from post-landing to landing pads.
4847 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4849 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4850 create_tmp_var_for to create the FRAME decl.
4851 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4853 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4855 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4856 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4857 debug statement when resetting its value.
4858 (expand_call_inline): Copy the locus of the call onto the assignment
4859 of the return value, if any. Use local variable in more cases.
4861 2018-06-21 Martin Liska <mliska@suse.cz>
4863 * ipa-pure-const.c (propagate_nothrow): Use
4864 funct_state_summaries->get.
4865 (dump_malloc_lattice): Likewise.
4866 (propagate_malloc): Likewise.
4868 2018-06-21 Richard Biener <rguenther@suse.de>
4870 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4871 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4872 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4874 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4875 BLOCK_ABSTRACT_ORIGIN unconditionally.
4877 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4879 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4881 * ipa-reference.c (ipa_reference_c_finalize): Delete
4882 ipa_ref_opt_sum_summaries and set it to NULL.
4884 2018-06-21 Tom de Vries <tdevries@suse.de>
4886 PR tree-optimization/85859
4887 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4888 test with comment from bb_no_side_effects_p.
4890 2018-06-21 Richard Biener <rguenther@suse.de>
4892 PR tree-optimization/86232
4893 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4894 max for constant niter.
4896 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4898 * config/aarch64/aarch64-simd.md
4899 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4901 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4903 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4904 Make opernads of the unspec commutative.
4906 2018-06-21 Richard Biener <rguenther@suse.de>
4908 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4909 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4910 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4911 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4913 (vect_record_base_alignments): Do not record base alignment
4914 for gathers or scatters.
4915 (vect_compute_data_ref_alignment): Drop return value that is always
4916 true. Bail out early for gathers or scatters.
4917 (vect_enhance_data_refs_alignment): Bail out early for gathers
4919 (vect_find_same_alignment_drs): Likewise.
4920 (vect_analyze_data_refs_alignment): Remove dead code.
4921 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4922 (vect_analyze_data_refs): For possible gathers or scatters do
4923 not create an alternate DR, just check their possible validity
4924 and mark them. Adjust DECL_NONALIASED handling to not rely
4926 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4927 update inits of gathers or scatters.
4928 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4929 Also copy gather/scatter flag to pattern vinfo.
4931 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4933 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4934 behavior of vec_packsu (vector unsigned long long, vector unsigned
4935 long long) to match behavior of vec_packs with same signature.
4937 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4938 Thomas Schwinge <thomas@codesourcery.com>
4939 Cesar Philippidis <cesar@codesourcery.com>
4941 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4942 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4943 (gimplify_adjust_omp_clauses): Likewise.
4944 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4945 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4946 (gimplify_omp_target_update): Update handling of acc update and
4948 * omp-low.c (install_var_field): Remove unused parameter
4949 base_pointers_restrict.
4950 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4951 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4953 (omp_target_base_pointers_restrict_p): Delete.
4954 (scan_omp_target): Update call to scan_sharing_clauses.
4955 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4957 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4958 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4959 (convert_local_omp_clauses): Likewise.
4960 * tree-pretty-print.c (dump_omp_clause): Likewise.
4961 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4963 (omp_clause_code_name): Likewise.
4965 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4968 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4971 PR tree-optimization/86231
4972 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4973 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4975 2018-06-20 Tom de Vries <tdevries@suse.de>
4977 PR tree-optimization/86097
4978 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4979 iv type if signedness of iv type is not the same as that of *nit.
4981 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4983 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4984 EDGE_EH edges, verify they are all EDGE_EH.
4986 2018-06-20 Maya Rashish <coypu@sdf.org>
4988 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4990 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4992 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4993 * config/aarch64/aarch64.c (xgene1_tunings): Add
4994 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4995 (aarch64_mode_valid_for_sched_fusion_p):
4996 Allow 16-byte modes.
4997 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4998 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5000 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5002 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5003 * config/aarch64/iterators.md (VQ2): New mode iterator.
5005 2018-06-20 Martin Liska <mliska@suse.cz>
5007 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5008 Change default ratio from 10 to 8.
5010 2018-06-20 Martin Liska <mliska@suse.cz>
5012 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5014 (bit_test_cluster::find_bit_tests): Likewise.
5015 (switch_decision_tree::analyze_switch_statement): Find clusters.
5016 * tree-switch-conversion.h (struct jump_table_cluster): Document
5019 2018-06-20 Martin Liska <mliska@suse.cz>
5021 * tree-switch-conversion.c (switch_conversion::collect):
5022 Record m_uniq property.
5023 (switch_conversion::expand): Bail out for special conditions.
5024 (group_cluster::~group_cluster): New.
5025 (group_cluster::group_cluster): Likewise.
5026 (group_cluster::dump): Likewise.
5027 (jump_table_cluster::emit): New.
5028 (switch_decision_tree::fix_phi_operands_for_edges): New.
5029 (struct case_node): Remove struct.
5030 (jump_table_cluster::can_be_handled): New.
5031 (case_values_threshold): Moved to header.
5032 (reset_out_edges_aux): Likewise.
5033 (jump_table_cluster::is_beneficial): New.
5034 (bit_test_cluster::can_be_handled): Likewise.
5035 (add_case_node): Remove.
5036 (bit_test_cluster::is_beneficial): New.
5037 (case_bit_test::cmp): New.
5038 (bit_test_cluster::emit): New.
5039 (expand_switch_as_decision_tree_p): Remove.
5040 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5041 (fix_phi_operands_for_edge): Likewise.
5042 (switch_decision_tree::analyze_switch_statement): New.
5043 (compute_cases_per_edge): Move ...
5044 (switch_decision_tree::compute_cases_per_edge): ... here.
5045 (try_switch_expansion): Likewise.
5046 (switch_decision_tree::try_switch_expansion): Likewise.
5047 (record_phi_operand_mapping): Likewise.
5048 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5049 (emit_case_decision_tree): Likewise.
5050 (switch_decision_tree::emit): Likewise.
5051 (balance_case_nodes): Likewise.
5052 (switch_decision_tree::balance_case_nodes): Likewise.
5053 (dump_case_nodes): Likewise.
5054 (switch_decision_tree::dump_case_nodes): Likewise.
5055 (emit_jump): Likewise.
5056 (switch_decision_tree::emit_jump): Likewise.
5057 (emit_cmp_and_jump_insns): Likewise.
5058 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5059 (emit_case_nodes): Likewise.
5060 (switch_decision_tree::emit_case_nodes): Likewise.
5061 (conditional_probability): Remove.
5062 * tree-switch-conversion.h (enum cluster_type): New.
5064 (struct cluster): Likewise.
5065 (cluster::cluster): Likewise.
5066 (struct simple_cluster): Likewise.
5067 (simple_cluster::simple_cluster): Likewise.
5068 (struct group_cluster): Likewise.
5069 (struct jump_table_cluster): Likewise.
5070 (struct bit_test_cluster): Likewise.
5071 (struct min_cluster_item): Likewise.
5072 (struct case_tree_node): Likewise.
5073 (case_tree_node::case_tree_node): Likewise.
5074 (jump_table_cluster::case_values_threshold): Likewise.
5075 (struct case_bit_test): Likewise.
5076 (struct switch_decision_tree): Likewise.
5077 (struct switch_conversion): Likewise.
5078 (switch_decision_tree::reset_out_edges_aux): Likewise.
5080 2018-06-20 Martin Liska <mliska@suse.cz>
5082 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5083 (hoist_edge_and_branch_if_true): Likewise.
5084 (expand_switch_using_bit_tests_p): Likewise.
5085 (struct case_bit_test): Likewise.
5086 (case_bit_test_cmp): Likewise.
5087 (emit_case_bit_tests): Likewise.
5088 (switch_conversion::switch_conversion): New class.
5089 (struct switch_conv_info): Remove old struct.
5090 (collect_switch_conv_info): More to ...
5091 (switch_conversion::collect): ... this.
5092 (check_range): Likewise.
5093 (switch_conversion::check_range): Likewise.
5094 (check_all_empty_except_final): Likewise.
5095 (switch_conversion::check_all_empty_except_final): Likewise.
5096 (check_final_bb): Likewise.
5097 (switch_conversion::check_final_bb): Likewise.
5098 (create_temp_arrays): Likewise.
5099 (switch_conversion::create_temp_arrays): Likewise.
5100 (free_temp_arrays): Likewise.
5101 (gather_default_values): Likewise.
5102 (switch_conversion::gather_default_values): Likewise.
5103 (build_constructors): Likewise.
5104 (switch_conversion::build_constructors): Likewise.
5105 (constructor_contains_same_values_p): Likewise.
5106 (switch_conversion::contains_same_values_p): Likewise.
5107 (array_value_type): Likewise.
5108 (switch_conversion::array_value_type): Likewise.
5109 (build_one_array): Likewise.
5110 (switch_conversion::build_one_array): Likewise.
5111 (build_arrays): Likewise.
5112 (switch_conversion::build_arrays): Likewise.
5113 (gen_def_assigns): Likewise.
5114 (switch_conversion::gen_def_assigns): Likewise.
5115 (prune_bbs): Likewise.
5116 (switch_conversion::prune_bbs): Likewise.
5117 (fix_phi_nodes): Likewise.
5118 (switch_conversion::fix_phi_nodes): Likewise.
5119 (gen_inbound_check): Likewise.
5120 (switch_conversion::gen_inbound_check): Likewise.
5121 (process_switch): Use the newly created class.
5122 (switch_conversion::expand): New.
5123 (switch_conversion::~switch_conversion): New.
5124 * tree-switch-conversion.h: New file.
5126 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5128 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5129 tree-vect-patterns.c.
5130 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5131 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5132 (vect_recog_sad_pattern): Likewise.
5133 (vect_recog_widen_sum_pattern): Likewise.
5134 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5135 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5136 (vect_recog_rotate_pattern): Likewise.
5137 (vect_recog_mult_pattern): Likewise.
5138 (vect_recog_vector_vector_shift_pattern): Likewise.
5139 (vect_recog_divmod_pattern): Likewise.
5140 (vect_recog_mixed_size_cond_pattern): Likewise.
5141 (vect_recog_bool_pattern): Likewise.
5142 (vect_recog_mask_conversion_pattern): Likewise.
5143 (vect_try_gather_scatter_pattern): Likewise.
5144 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5145 (vect_recog_over_widening_pattern): Likewise.
5146 (vect_recog_gather_scatter_pattern): Likewise.
5147 (vect_recog_func_ptr): Move from tree-vectorizer.h
5148 (vect_vect_recog_func_ptrs): Move further down the file.
5149 (vect_recog_func): Likewise. Remove the third argument.
5150 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5151 (vect_pattern_recog_1): Expect the pattern function to do any
5152 necessary target tests. Also expect it to provide a vector type.
5153 Remove the type_in handling.
5155 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5157 * tree-vect-patterns.c (vect_pattern_detected): New function.
5158 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5159 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5160 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5161 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5162 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5163 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5164 (vect_recog_mask_conversion_pattern)
5165 (vect_try_gather_scatter_pattern): Likewise.
5167 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5169 * tree-vect-patterns.c (vect_get_internal_def): New function.
5170 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5171 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5172 (search_type_for_mask_1): Use it.
5174 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5176 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5177 redundant WIDEN_SUM_EXPR handling.
5178 (vect_recog_sad_pattern): Likewise.
5180 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5182 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5183 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5184 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5185 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5186 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5188 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5190 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5191 use the stmt_vec_info of the original bb statement for the
5192 new zero assignment, even if the call is part of a pattern.
5194 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5196 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5197 that the sequence is attached to the original statement rather
5198 than the pattern statement.
5199 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5200 PATTERN_DEF_SEQ from the original statement rather than
5201 the main pattern statement.
5202 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5203 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5204 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5206 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5208 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5209 definition statements before the early exit for statements that aren't
5211 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5213 (vect_transform_loop): ...here. Process pattern definition
5214 statements without first checking whether the main pattern
5215 statement is live or relevant.
5217 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5219 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5220 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5222 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5224 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5225 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5226 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5227 (expand_block_compare): Change select_block_compare_mode call.
5228 (expand_strncmp_align_check): Use new functions, fix comment.
5229 (emit_final_str_compare_gpr): New function.
5230 (expand_strn_compare): Refactor and clean up code.
5231 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5233 2018-06-19 Tony Reix <tony.reix@atos.com>
5234 Damien Bergamini <damien.bergamini@atos.com>
5235 David Edelsohn <dje.gcc@gmail.com>
5237 * collect2.c (static_obj): New variable.
5238 (static_libs): New variable.
5239 (is_in_list): Uncomment declaration.
5240 (main): Track AIX libraries linked statically.
5241 (is_in_list): Uncomment definition.
5242 (scan_prog_file): Don't add AIX shared libraries initializer
5243 to constructor list if linking statically.
5245 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5247 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5249 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5251 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5253 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5256 2018-06-19 Martin Liska <mliska@suse.cz>
5258 * config/i386/i386.c (ix86_can_inline_p): Do not use
5259 ipa_fn_summaries::get_create.
5260 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5262 (devirtualization_time_bonus): Likewise.
5263 (ipcp_propagate_stage): Likewise.
5264 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5265 (edge_set_predicate): Likewise.
5266 (evaluate_conditions_for_known_args): Likewise.
5267 (evaluate_properties_for_edge): Likewise.
5268 (ipa_call_summary::reset): Tranform to ...
5269 (ipa_call_summary::~ipa_call_summary): ... this.
5270 (ipa_fn_summary::reset): Transform to ...
5271 (ipa_fn_summary::~ipa_fn_summary): ... this.
5272 (ipa_fn_summary_t::remove): Rename to ...
5273 (ipa_fn_summary_t::remove_callees): ... this.
5274 (ipa_fn_summary_t::duplicate): Use placement new
5275 instead of memory copy.
5276 (ipa_call_summary_t::duplicate): Likewise.
5277 (ipa_call_summary_t::remove): Remove.
5278 (dump_ipa_call_summary): Change get_create to get.
5279 (ipa_dump_fn_summary): Dump only when summary exists.
5280 (analyze_function_body): Use symbol_summary::get instead
5282 (compute_fn_summary): Likewise.
5283 (estimate_edge_devirt_benefit): Likewise.
5284 (estimate_edge_size_and_time): Likewise.
5285 (inline_update_callee_summaries): Likewise.
5286 (remap_edge_change_prob): Likewise.
5287 (remap_edge_summaries): Likewise.
5288 (ipa_merge_fn_summary_after_inlining): Likewise.
5289 (write_ipa_call_summary): Likewise.
5290 (ipa_fn_summary_write): Likewise.
5291 (ipa_free_fn_summary): Likewise.
5292 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5293 (struct ipa_call_summary): Likewise.
5294 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5296 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5297 (estimate_size_after_inlining): Likewise.
5298 (estimate_growth): Likewise.
5299 (growth_likely_positive): Likewise.
5300 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5301 (inline_call): Likewise.
5302 * ipa-inline.c (caller_growth_limits): Likewise.
5303 (can_inline_edge_p): Likewise.
5304 (can_inline_edge_by_limits_p): Likewise.
5305 (compute_uninlined_call_time): Likewise.
5306 (compute_inlined_call_time): Likewise.
5307 (want_inline_small_function_p): Likewise.
5308 (edge_badness): Likewise.
5309 (update_caller_keys): Likewise.
5310 (update_callee_keys): Likewise.
5311 (inline_small_functions): Likewise.
5312 (inline_to_all_callers_1): Likewise.
5313 (dump_overall_stats): Likewise.
5314 (early_inline_small_functions): Likewise.
5315 (early_inliner): Likewise.
5316 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5317 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5318 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5319 * ipa-split.c (execute_split_functions): Likewise.
5320 * symbol-summary.h: Likewise.
5321 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5323 2018-06-19 Richard Biener <rguenther@suse.de>
5325 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5326 (vectorize_loops): ... here. Fix dbgcnt handling.
5327 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5329 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5332 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5333 ieee128 argument takes up only one (vector) register, not two (floating
5336 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5338 * gimplify.c (gimplify_init_constructor): Really never clear for an
5339 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5341 2018-06-19 Richard Biener <rguenther@suse.de>
5343 PR tree-optimization/86179
5344 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5345 after failed recognition.
5347 2018-06-18 Martin Sebor <msebor@redhat.com>
5350 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5351 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5352 Handle integer subtraction.
5353 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5354 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5356 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5358 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5359 param from rtx to rtx_insn *.
5360 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5362 (frv_ifcvt_modify_insn): Likwise.
5363 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5364 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5365 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5366 as_a <rtx_insn *> cast to local "unprotected_region" once
5367 it's been established that it's not NULL or pc_rtx.
5368 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5369 param "sethi" from rtx to rtx_insn *.
5370 (nds32_group_float_insns): Likewise for param "insn".
5371 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5373 (vax_output_int_subtract): Likewise.
5374 * config/vax/vax.c (vax_output_int_add): Likewise for param
5376 (vax_output_int_subtract): Likewise.
5377 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5378 (emit_pattern_after): Likewise for param "after".
5379 (emit_insn_after): Likewise.
5380 (emit_jump_insn_after): Likewise.
5381 (emit_call_insn_after): Likewise.
5382 (emit_debug_insn_after): Likewise.
5383 (emit_pattern_before): Likewise for param "before".
5384 (emit_insn_before): Likewise.
5385 (emit_jump_insn_before): Likewise.
5386 * final.c (get_insn_template): Likewise for param "insn", removing
5388 * output.h (get_insn_template): Likewise for 2nd param.
5389 * rtl.h (emit_insn_before): Likewise.
5390 (emit_jump_insn_before): Likewise.
5391 (emit_debug_insn_before_noloc): Likewise.
5392 (emit_insn_after): Likewise.
5393 (emit_jump_insn_after): Likewise.
5394 (emit_call_insn_after): Likewise.
5395 (emit_debug_insn_after): Likewise.
5396 (set_insn_deleted): Likewise for param.
5398 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5401 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5402 floating point modes, so that IFmode is numerically greater than
5403 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5404 to declare the ordering. This prevents IFmode from being
5405 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5406 machine. Include rs6000-modes.h to share the fractional values
5407 between genmodes* and the rest of the compiler.
5411 * config/rs6000/rs6000-modes.h: New file.
5412 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5413 meaning of rs6000_long_double_size so that 126..128 selects an
5414 appropriate 128-bit floating point type.
5415 (rs6000_option_override_internal): Likewise.
5416 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5417 (TARGET_LONG_DOUBLE_128): Change the meaning of
5418 rs6000_long_double_size so that 126..128 selects an appropriate
5419 128-bit floating point type.
5420 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5421 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5422 source and destination to match the standard usage.
5423 (truncifkf2): Likewise.
5424 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5425 ISA 2.07 to use an explicit clobber, instead of passing in a
5427 (copysign<mode>3_soft): Likewise.
5429 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5431 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5432 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5433 (vect_slp_analyze_instance_dependence): Likewise.
5434 (vect_enhance_data_refs_alignment): Likewise.
5435 (vect_analyze_data_refs_alignment): Likewise.
5436 (vect_slp_analyze_and_verify_instance_alignment
5437 (vect_analyze_data_ref_accesses): Likewise.
5438 (vect_prune_runtime_alias_test_list): Likewise.
5439 (vect_analyze_data_refs): Likewise.
5440 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5441 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5442 (vect_analyze_scalar_cycles_1): Likewise.
5443 (vect_get_loop_niters): Likewise.
5444 (vect_analyze_loop_form_1): Likewise.
5445 (vect_update_vf_for_slp): Likewise.
5446 (vect_analyze_loop_operations): Likewise.
5447 (vect_analyze_loop): Likewise.
5448 (vectorizable_induction): Likewise.
5449 (vect_transform_loop): Likewise.
5450 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5451 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5452 (vect_make_slp_decision): Likewise.
5453 (vect_detect_hybrid_slp): Likewise.
5454 (vect_slp_analyze_operations): Likewise.
5455 (vect_slp_bb): Likewise.
5456 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5457 (vectorizable_bswap): Likewise.
5458 (vectorizable_call): Likewise.
5459 (vectorizable_simd_clone_call): Likewise.
5460 (vectorizable_conversion): Likewise.
5461 (vectorizable_assignment): Likewise.
5462 (vectorizable_shift): Likewise.
5463 (vectorizable_operation): Likewise.
5464 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5466 2018-06-18 Martin Sebor <msebor@redhat.com>
5468 PR tree-optimization/81384
5469 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5470 * builtins.c (expand_builtin_strnlen): New function.
5471 (expand_builtin): Call it.
5472 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5473 * builtins.def (BUILT_IN_STRNLEN): New.
5474 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5475 Warn for bounds in excess of maximum object size.
5476 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5477 single-value ranges. Handle strnlen.
5478 (handle_builtin_strlen): Handle strnlen.
5479 (strlen_check_and_optimize_stmt): Same.
5480 * doc/extend.texi (Other Builtins): Document strnlen.
5482 2018-06-18 Maya Rashish <coypu@sdf.org>
5484 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5485 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5486 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5488 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5490 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5492 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5494 * tree.c (escaped_string::escape): Replace cast to char * by
5495 const_cast<char *> (unescaped).
5497 2018-06-18 Nick Clifton <nickc@redhat.com>
5500 * tree.c (escaped_string): New class. Converts an unescaped
5501 string into its escaped equivalent.
5502 (warn_deprecated_use): Use the new class to convert the
5503 deprecation message, if present.
5504 (test_escaped_strings): New self test.
5505 (test_c_tests): Add test_escaped_strings.
5506 * doc/extend.texi (deprecated): Add a note that the
5507 deprecation message is affected by the -fmessage-length
5508 option, and that control characters will be escaped.
5509 (#pragma GCC error): Document this pragma.
5510 (#pragma GCC warning): Likewise.
5511 * doc/invoke.texi (-fmessage-length): Document this option's
5512 effect on the #warning and #error preprocessor directives and
5513 the deprecated attribute.
5515 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5517 * tree.c (decl_value_expr_lookup): Revert latest change.
5518 (decl_value_expr_insert): Likewise.
5520 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5522 * gimplify.c (nonlocal_vlas): Delete.
5523 (nonlocal_vla_vars): Likewise.
5524 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5526 (gimplify_body): Do not create and destroy nonlocal_vlas.
5527 * tree-nested.c: Include diagnostic.h.
5528 (use_pointer_in_frame): Tweak.
5529 (lookup_field_for_decl): Add assertion and declare the transformation.
5530 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5531 internal error when the reference is in a wrong context. Do not
5532 create a debug decl by default.
5533 (note_nonlocal_block_vlas): Delete.
5534 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5535 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5536 create a debug decl by default.
5537 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5538 call is in a wrong context.
5539 (fixup_vla_decls): New function.
5540 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5541 debug variables were created.
5542 * tree.c (decl_value_expr_lookup): Add checking assertion.
5543 (decl_value_expr_insert): Likewise.
5545 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5548 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5549 * tree-scalar-evolution.c (interpret_expr): Likewise.
5550 (expression_expensive_p): Likewise.
5551 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5552 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5553 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5554 (ssa_defined_by_minus_one_stmt_p): New.
5556 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5559 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5560 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5561 * dojump.c (do_jump): Likewise.
5562 * expr.c (expand_expr_real_2): Check operand type's sign.
5563 * fold-const.c (const_unop): Handle ABSU_EXPR.
5564 (fold_abs_const): Likewise.
5565 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5566 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5567 (strip_sign_op_1): Likesise.
5568 * match.pd: Add new pattern to generate ABSU_EXPR.
5569 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5570 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5571 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5572 * tree-inline.c (estimate_operator_cost): Likewise.
5573 * tree-pretty-print.c (dump_generic_node): Likewise.
5574 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5575 * tree.def (ABSU_EXPR): New.
5577 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5580 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5581 documented as preserved for backward compatibility only.
5582 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5584 PR rtl-optimization/86108
5585 * bb-reorder.c (create_forwarder_block): Renamed to ...
5586 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5587 jump from new landing pad to the second part.
5588 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5591 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5594 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5595 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5596 Only call store_expr for halves if the mode is the same.
5599 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5600 Fix up comment formatting.
5602 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5604 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5605 (typed_splay_tree::closure,
5606 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5607 (typed_splay_tree::typed_splay_tree,
5608 typed_splay_tree::operator =): Declared private.
5609 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5610 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5611 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5612 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5613 typed_splay_tree::splay_tree_splay,
5614 typed_splay_tree::splay_tree_foreach_helper,
5615 typed_splay_tree::splay_tree_insert,
5616 typed_splay_tree::splay_tree_remove,
5617 typed_splay_tree::splay_tree_lookup,
5618 typed_splay_tree::splay_tree_predecessor,
5619 typed_splay_tree::splay_tree_successor,
5620 typed_splay_tree::splay_tree_min,
5621 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5622 (typed_splay_tree::root, typed_splay_tree::comp,
5623 typed_splay_tree::delete_key,
5624 typed_splay_tree::delete_value): New data members.
5625 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5626 typed_splay_tree::remove.
5628 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5630 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5631 -mginv and -mno-ginv to the assembler.
5632 * config/mips/mips.opt (-mcrc): New option.
5634 * doc/invoke.text (-mcrc): Document.
5637 2018-06-15 Nick Clifton <nickc@redhat.com>
5640 * tree.c (escaped_string): New class. Converts an unescaped
5641 string into its escaped equivalent.
5642 (warn_deprecated_use): Use the new class to convert the
5643 deprecation message, if present.
5644 (test_escaped_strings): New self test.
5645 (test_c_tests): Add test_escaped_strings.
5646 * doc/extend.texi (deprecated): Add a note that the
5647 deprecation message is affected by the -fmessage-length
5648 option, and that control characters will be escaped.
5649 (#pragma GCC error): Document this pragma.
5650 (#pragma GCC warning): Likewise.
5651 * doc/invoke.texi (-fmessage-length): Document this option's
5652 effect on the #warning and #error preprocessor directives and
5653 the deprecated attribute.
5655 2018-06-15 Richard Biener <rguenther@suse.de>
5657 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5658 here, also noting vector size used.
5659 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5660 size used in MSG_OPTIMIZED_LOCATIONS dump.
5661 (pass_slp_vectorize::execute): Adjust.
5663 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5666 * config/arc/arc.c (arc_return_address_register): Fix
5669 2018-06-15 Richard Biener <rguenther@suse.de>
5672 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5673 leave useless conversion stripping to force_gimple_operand_gsi.
5674 (gimplify_build2): Likewise.
5675 (gimplify_build1): Likewise.
5677 2018-06-15 Richard Biener <rguenther@suse.de>
5680 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5681 before adjusting their block.
5683 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5685 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5686 multilibs for *-*-rtems*.
5687 * config/riscv/t-rtems: New file.
5689 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5692 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5693 unsigned_type_for returns NULL.
5696 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5697 subregs of multi-word pseudos unless the float mode has word size.
5699 2018-06-14 Richard Biener <rguenther@suse.de>
5702 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5703 duplicate and harmful type_hash_canon.
5704 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5706 2018-06-14 Richard Biener <rguenther@suse.de>
5709 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5712 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5714 * config/rtems.h (STDINT_LONG32): Define.
5716 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5717 Prachi Godbole <prachi.godbole@imgtec.com>
5719 * config/mips/mips-cpus.def: Define P6600.
5720 * config/mips/mips-tables.opt: Regenerate.
5721 * config/mips/mips.c (mips_ucbranch_type): New enum.
5722 (mips_rtx_cost_data): Add support for P6600.
5723 (mips_issue_rate): Likewise.
5724 (mips_multipass_dfa_lookahead): Likewise.
5725 (mips_avoid_hazard): Likewise.
5726 (mips_reorg_process_insns): Likewise.
5727 (mips_classify_branch_p6600): New function.
5728 * config/mips/mips.h (TUNE_P6600): New define.
5729 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5730 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5731 * config/mips/mips.md: Include p6600.md.
5732 (processor): Add p6600.
5733 * config/mips/p6600.md: New file.
5734 * doc/invoke.texi: Add p6600 to supported architectures.
5736 2018-06-13 Martin Sebor <msebor@redhat.com>
5738 PR tree-optimization/86114
5739 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5741 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5743 2018-06-13 Richard Biener <rguenther@suse.de>
5745 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5746 Properly set vector type of the intermediate stmt.
5747 * tree-vect-stmts.c (vectorizable_operation): The destination
5748 var always has vectype_out type.
5750 2018-06-13 Jeff Law <law@redhat.com>
5752 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5753 integer 0 for argument to print_rtl_with_bb.
5754 (rl78_reorg): Likewise.
5756 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5758 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5759 from rtx to rtx_insn *.
5760 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5762 (add_sched_insns_for_speculation): Likewise for local "target",
5763 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5764 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5765 from rtx_insn ** to rtx_code_label **.
5766 (reorg_emit_nops): Likewise.
5767 (c6x_reorg): Likewise for local "call_labels".
5768 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5770 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5771 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5772 the loops over LABEL_REFS.
5773 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5775 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5776 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5777 (split_branches): Strengthen local "olabel" from rtx to
5778 rtx_insn *, adding a safe_as_a cast.
5779 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5781 (add_insn_after): Likewise for first two params.
5782 (add_insn_before): Likewise.
5783 (remove_insn): Likewise for param.
5784 (emit_pattern_before_noloc): Likewise for second and third params.
5785 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5786 (emit_call_insn_before_noloc): Likewise.
5787 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5789 (emit_barrier_before): Likewise.
5790 (emit_label_before): Strengthen "label" param from "rtx" to
5791 "rtx_code_label *". Strengthen "before" param from "rtx" to
5793 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5795 (emit_pattern_after_noloc): Likewise.
5796 (emit_insn_after_noloc): Likewise.
5797 (emit_jump_insn_after_noloc): Likewise.
5798 (emit_call_insn_after_noloc): Likewise.
5799 (emit_debug_insn_after_noloc): Likewise.
5800 (emit_barrier_after): Likewise.
5801 (emit_label_after): Likewise for both params.
5802 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5803 "loc" param from "int" to "location_t".
5804 (emit_insn_after_setloc): Likewise.
5805 (emit_jump_insn_after_setloc): Likewise.
5806 (emit_call_insn_after_setloc): Likewise.
5807 (emit_debug_insn_after_setloc): Likewise.
5808 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5809 "loc" param from "int" to "location_t".
5810 (emit_pattern_before): Convert NULL_RTX to NULL.
5811 (emit_insn_before_setloc): Convert "loc" param from "int" to
5813 (emit_jump_insn_before_setloc): Likewise.
5814 (emit_call_insn_before_setloc): Likewise.
5815 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5816 rtx_insn *. Convert "loc" param from "int" to "location_t".
5817 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5818 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5819 Convert 3rd param from "int" to "location_t".
5820 (emit_barrier_before, emit_barrier_after, next_real_insn):
5821 Strengthen param from rtx to rtx_insn *.
5822 (emit_label_before): Strengthen 1st param from "rtx" to
5823 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5825 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5826 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5827 Strengthen 2nd param from "rtx" to "rtx_insn *".
5828 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5829 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5830 Likewise. Convert 3rd param from "int" to "location_t".
5831 (emit_label_after): Strengthen 1st param from "rtx" to
5833 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5835 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5836 from "rtx" to "rtx_insn *".
5838 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5840 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5841 bodies streamed in with -Q.
5842 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5843 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5844 * gimple-streamer-out.c: Include gimple-pretty-print.h
5845 (output_bb): Dump stmts streamed.
5846 * lto-section-out.c: Include print-tree.h
5847 (lto_begin_section): Dump sections created.
5848 (lto_output_decl_index): Dump decl encoded.
5849 * lto-streamer-out.c: Include print-tree.h
5850 (create_output_block): Dump output block created.
5851 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5852 (output_function): Dump function output.
5853 (output_constructor): Dump constructor streamed.
5854 (write_global_stream): Output indexes encoded.
5855 (produce_asm_for_decls): Dump streams encoded.
5856 * lto-streamer.c (streamer_dump_file): New global var.
5857 * lto-streamer.h (streamer_dump_file): Declare.
5858 * passes.c (ipa_write_summaries): Initialize streamer dump.
5859 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5862 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5865 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5866 offsets for register save directives. Emit a second batch of save
5867 directives, if need be, when the function accesses prior frames.
5869 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5871 * config/arc/fpu.md (fmasf4): Force operand to register.
5872 (fnmasf4): Likewise.
5874 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5876 * config/arc/arc-protos.h (arc_pad_return): Remove.
5877 * config/arc/arc.c (machine_function): Remove force_short_suffix
5879 (arc_print_operand): Adjust printing of '&'.
5880 (arc_verify_short): Remove conditional printing of short suffix.
5881 (arc_final_prescan_insn): Remove reference to size_reason.
5882 (pad_return): New function.
5883 (arc_reorg): Call pad_return.
5884 (arc_pad_return): Remove.
5885 (arc_init_machine_status): Remove reference to force_short_suffix.
5886 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5887 (attr length): When attribute iscompact is true force to 2
5888 regardless; in the case of maybe check if we want to force the
5889 instruction to have 4 bytes length.
5890 (nopv): Change it to generate 4 byte long nop as well.
5891 (blockage): New pattern.
5892 (simple_return): Remove call to arc_pad_return.
5893 (p_return_i): Likewise.
5895 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5897 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5899 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5901 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5904 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5906 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5907 for ARC700 and ARCv2.
5909 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5912 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5913 operands[2] instead of operands[1].
5916 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5918 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5919 case, check whether the outer register overlaps an unallocatable
5920 register, not just whether it fits the required class.
5922 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5924 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5926 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5927 (memrefs_conflict_p): Likewise.
5928 (init_alias_analysis): Likewise.
5929 * cfgexpand.c (expand_debug_expr): Likewise.
5930 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5931 * cse.c (fold_rtx): Likewise.
5932 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5933 * expr.c (emit_block_move_hints): Likewise.
5934 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5935 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5936 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5937 (emit_group_store): Likewise.
5938 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5939 to read the PRE/POST_MODIFY increment.
5940 * calls.c (store_one_arg): Use strip_offset.
5941 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5943 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5945 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5946 (simplify_binary_operation_1): Extend CONST_INT handling to
5948 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5949 than a HOST_WIDE_INT.
5950 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5952 (adjust_mems, add_stores): Update accodingly.
5953 (vt_canonicalize_addr): Track polynomial offsets.
5954 (emit_note_insn_var_location): Likewise.
5955 (vt_add_function_parameter): Likewise.
5956 (vt_initialize): Likewise.
5958 2018-06-12 Jeff Law <law@redhat.com>
5960 * config.gcc (alpha*-*-freebsd*): Remove.
5961 * config/alpha/freebsd.h: Remove.
5963 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5966 * spellcheck-tree.c (levenshtein_distance): Rename to...
5967 (get_edit_distance): ...this, and update for underlying renaming.
5968 * spellcheck-tree.h (levenshtein_distance): Rename to...
5969 (get_edit_distance): ...this.
5970 * spellcheck.c (levenshtein_distance): Rename to...
5971 (get_edit_distance): ...this. Convert from Levenshtein distance
5972 to Damerau-Levenshtein distance by supporting transpositions of
5973 adjacent characters. Rename "v1" to "v_next" and "v0" to
5975 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5976 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5977 update for underlying renaming.
5978 (selftest::levenshtein_distance_unit_test): Rename to...
5979 (selftest::test_get_edit_distance_unit): ...this, and update for
5980 underlying renaming.
5981 (selftest::test_find_closest_string): Add example from PR 69968
5982 where transposition helps
5983 (selftest::test_metric_conditions): Update for renaming.
5984 (selftest::test_metric_conditions): Likewise.
5985 (selftest::spellcheck_c_tests): Likewise.
5986 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5987 (get_edit_distance): ...this.
5988 (best_match::consider): Update for renaming.
5990 2018-06-12 Martin Sebor <msebor@redhat.com>
5992 PR tree-optimization/85259
5993 * builtins.c (compute_objsize): Handle constant offsets.
5994 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5995 true iff a warning has been issued.
5996 * gimple.h (gimple_nonartificial_location): New function.
5997 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5998 gimple_nonartificial_location and handle -Wno-system-headers.
5999 (handle_builtin_stxncpy): Same.
6001 2018-06-12 Martin Sebor <msebor@redhat.com>
6004 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6006 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6008 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6009 BUILTIN_VEC_XST entries for pointer to double and long long.
6011 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6014 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6016 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6019 2018-06-12 Martin Liska <mliska@suse.cz>
6021 * doc/options.texi: Document IntegerRange.
6023 2018-06-12 Martin Liska <mliska@suse.cz>
6025 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6026 * opt-functions.awk: Handle Deprecated flag.
6027 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6029 (read_cmdline_option): Report warning for a deprecated option.
6030 * opts.h (struct cl_option): Add new field cl_deprecated.
6031 (CL_ERR_DEPRECATED): New.
6033 2018-06-12 Martin Liska <mliska@suse.cz>
6035 * doc/options.texi: Document Deprecated option flag.
6037 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6039 * config/arc/arc-arch.h (arc_extras): New enum.
6040 (arc_cpu_t):Add field extra.
6041 (arc_cpu_types): Consider the extras.
6042 * config/arc/arc-cpus.def: Add extras info.
6043 * config/arc/arc-opts.h (processor_type): Consider extra field.
6044 * config/arc/arc.c (arc_override_options): Handle extra field.
6046 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6048 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6049 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6051 * config/arc/arc.c (arc_init): Update pic warning.
6052 (irq_range): Update irq range parsing warnings.
6053 (arc_override_options): Update various warning messages.
6054 (arc_handle_aux_attribute): Likewise.
6056 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6058 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6060 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6062 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6063 compiler messages directives.
6065 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6067 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6068 * config/mips/mips-tables.opt: Regenerate.
6069 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6071 * doc/invoke.texi: Document -march=i6500.
6073 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6075 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6076 (i6400_gpmul): Add cpu_unit.
6077 (i6400_gpdiv): Likewise.
6078 (i6400_msa_add_d): Update reservations.
6079 (i6400_msa_int_add) Likewise.
6080 (i6400_msa_short_logic3) Likewise.
6081 (i6400_msa_short_logic2) Likewise.
6082 (i6400_msa_short_logic) Likewise.
6083 (i6400_msa_move) Likewise.
6084 (i6400_msa_cmp) Likewise.
6085 (i6400_msa_short_float2) Likewise.
6086 (i6400_msa_div_d) Likewise.
6087 (i6400_msa_long_logic1) Likewise.
6088 (i6400_msa_long_logic2) Likewise.
6089 (i6400_msa_mult) Likewise.
6090 (i6400_msa_long_float2) Likewise.
6091 (i6400_msa_long_float4) Likewise.
6092 (i6400_msa_long_float5) Likewise.
6093 (i6400_msa_long_float8) Likewise.
6094 (i6400_fpu_fadd): Include frint type.
6095 (i6400_fpu_store): New define_insn_reservation.
6096 (i6400_fpu_load): Likewise.
6097 (i6400_fpu_move): Likewise.
6098 (i6400_fpu_fcmp): Likewise.
6099 (i6400_fpu_fmadd): Likewise.
6100 (i6400_int_mult): Include imul3nc type and update reservation.
6101 (i6400_int_div): Include idiv3 type and update reservation.
6102 (i6400_int_load): Update to check type not move_type.
6103 (i6400_int_store): Likewise.
6104 (i6400_int_prefetch): Set zero latency.
6106 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6108 * gcc.c: Document new %@{...} sequence.
6109 (LINK_COMMAND_SPEC): Use it for the -L switches.
6110 (cpp_unique_options): Use it for the -I switches.
6111 (at_file_argbuf): New global variable.
6112 (in_at_file): Likewise.
6113 (alloc_args): Create at_file_argbuf.
6114 (clear_args): Truncate at_file_argbuf.
6115 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6116 (open_at_file): New function.
6117 (close_at_file): Likewise.
6118 (create_at_file): Delete.
6119 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6122 (validate_switches_from_spec): Deal with %@{...} sequence.
6123 (validate_switches): Likewise.
6124 (driver::finalize): Call clear_args.
6126 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6128 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6130 2018-06-11 Martin Sebor <msebor@redhat.com>
6132 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6133 (Wno-class-memaccess): Add @opindex.
6134 (Wno-templates, Wno-multiple-inheritance): Same.
6135 (Wno-virtual-inheritance, Wno-namespaces): Same.
6136 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6137 (Wno-format-overflow, Wno-format-truncation): Same.
6138 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6139 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6140 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6141 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6142 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6143 (Wno-misspelled-isr): Same.
6145 2018-06-11 Martin Sebor <msebor@redhat.com>
6147 * PR tree-optimization/86083
6148 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6150 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6152 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6154 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6157 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6158 on the correct operand.
6159 (*movdi_internal64): Ditto.
6161 2018-06-11 Martin Liska <mliska@suse.cz>
6163 PR tree-optimization/86089
6164 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6166 2018-06-11 Julia Koval <julia.koval@intel.com>
6168 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6169 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6170 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6172 2018-06-11 Olivier Hainque <hainque@adacore.com>
6174 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6175 for Ada with strict dwarf2.
6177 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6180 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6183 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6185 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6187 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6189 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6192 2018-06-08 Martin Liska <mliska@suse.cz>
6194 * tree-cfg.h (debug_function): Fix argument type to match
6197 2018-06-08 Martin Liska <mliska@suse.cz>
6199 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6200 Remove usage of MPX-related (and removed) fields.
6201 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6203 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6205 * cfg.c (debug): Use TDF_NONE rather than 0.
6206 * cfghooks.c (debug): Likewise.
6207 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6208 (struct dump_option_value_info): Convert to...
6209 (struct kv_pair): ...this template type.
6210 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6212 (optinfo_verbosity_options): Likewise.
6213 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6215 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6216 than int for "optgroup_flags" param.
6217 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6219 (dump_dec): Likewise.
6220 (dump_finish): Use TDF_NONE rather than 0.
6221 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6222 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6223 than 0. Update for change to option_ptr.
6224 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6225 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6226 0. Update for changes to optinfo_verbosity_options and
6228 (opt_info_switch_p): Convert optgroup_flags from int to
6230 (dump_basic_block): Use dump_flags_t rather than int
6231 for "dump_kind" param.
6232 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6233 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6234 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6235 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6236 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6237 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6238 TDF_NONE): Convert from macros to...
6239 (enum dump_flag): ...this new enum.
6240 (dump_flags_t): Update to use enum.
6241 (operator|, operator&, operator~, operator|=, operator&=):
6242 Implement for dump_flags_t.
6243 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6244 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6245 Convert from macros to...
6246 (enum optgroup_flag): ...this new enum.
6247 (optgroup_flags_t): New typedef.
6248 (operator|, operator|=): Implement for optgroup_flags_t.
6249 (struct dump_file_info): Convert field "alt_flags" to
6250 dump_flags_t. Convert field "optgroup_flags" to
6252 (dump_basic_block): Use dump_flags_t rather than int for param.
6253 (dump_generic_expr_loc): Likewise.
6254 (dump_dec): Likewise.
6255 (dump_register): Convert param "optgroup_flags" to
6257 (opt_info_enable_passes): Likewise.
6258 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6260 * gimple-pretty-print.c (debug): Likewise.
6261 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6262 (merged_store_group::apply_stores): Likewise.
6263 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6264 * gimple.c (verify_gimple_pp): Likewise.
6265 * graphite-poly.c (print_pbb_body): Likewise.
6266 * passes.c (pass_manager::register_one_dump_file): Convert
6267 local "optgroup_flags" to optgroup_flags_t.
6268 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6270 (debug_body): Likewise.
6271 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6272 to optgroup_flags_t.
6273 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6275 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6276 (convert_mult_to_fma): Likewise.
6277 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6278 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6279 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6280 "dump_kind" to dump_flags_t.
6282 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6284 * config/rs6000/rs6000.c (min, max): Delete.
6286 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6288 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6289 -mabi=spe and -mabi=no-spe.
6291 2018-06-08 Martin Liska <mliska@suse.cz>
6293 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6294 where we expect an existing summary.
6296 2018-06-08 Martin Liska <mliska@suse.cz>
6298 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6299 * ipa-inline.h (estimate_edge_growth): Likewise.
6301 2018-06-08 Martin Liska <mliska@suse.cz>
6303 * cgraph.c (function_version_hasher::hash): Use
6304 cgraph_node::get_uid ().
6305 (function_version_hasher::equal):
6306 * cgraph.h (cgraph_node::get_uid): New method.
6307 * ipa-inline.c (update_caller_keys): Use
6308 cgraph_node::get_uid ().
6309 (update_callee_keys): Likewise.
6310 * ipa-utils.c (searchc): Likewise.
6311 (ipa_reduced_postorder): Likewise.
6312 * lto-cgraph.c (input_node): Likewise.
6313 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6314 * symbol-summary.h (symtab_insertion): Likewise.
6315 (symtab_removal): Likewise.
6316 (symtab_duplication): Likewise.
6317 * tree-pretty-print.c (dump_function_header): Likewise.
6318 * tree-sra.c (convert_callers_for_node): Likewise.
6320 2018-06-08 Martin Liska <mliska@suse.cz>
6322 * cgraph.c (symbol_table::create_edge): Always assign a new
6324 (symbol_table::free_edge): Do not recycle numbers.
6325 * cgraph.h (cgraph_edge::get): New method.
6326 * symbol-summary.h (symtab_removal): Use it.
6327 (symtab_duplication): Likewise.
6328 (call_summary::hashable_uid): Remove.
6330 2018-06-08 Martin Liska <mliska@suse.cz>
6332 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6333 (initialize_growth_caches): Remove.
6334 (free_growth_caches): Likewise.
6335 (do_estimate_edge_time): Use edge_growth_cache.
6336 (do_estimate_edge_size): Likewise.
6337 (do_estimate_edge_hints): Likewise.
6338 * ipa-inline.c (reset_edge_caches): Likewise.
6339 (recursive_inlining): Likewise.
6340 (inline_small_functions): Likewise.
6341 * ipa-inline.h (initialize_growth_caches): Remove.
6342 (estimate_edge_size): Likewise.
6343 (estimate_edge_time): Likewise.
6344 (estimate_edge_hints): Likewise.
6345 (reset_edge_growth_cache): Likewise.
6346 * symbol-summary.h (call_summary::remove): New method.
6348 2018-06-08 Martin Liska <mliska@suse.cz>
6350 * ipa-cp.c (class edge_clone_summary): New summary.
6351 (grow_edge_clone_vectors): Remove.
6352 (ipcp_edge_duplication_hook): Remove.
6353 (class edge_clone_summary_t): New call_summary class.
6354 (ipcp_edge_removal_hook): Remove.
6355 (edge_clone_summary_t::duplicate): New function.
6356 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6357 (create_specialized_node): Likewise.
6358 (ipcp_driver): Initialize edge_clone_summaries and do not
6361 2018-06-08 Martin Liska <mliska@suse.cz>
6363 * symbol-summary.h (get): New function.
6364 (call_summary::m_initialize_when_cloning): New class member.
6366 2018-06-08 Martin Liska <mliska@suse.cz>
6368 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6369 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6370 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6371 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6372 (remove_cgraph_node_from_order): Use the removed_nodes set.
6373 (do_per_function_toporder): Likwise.
6374 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6375 instead of summary_uid.
6376 (symtab_removal): Likewise.
6377 (symtab_duplication): Likewise.
6379 2018-06-08 Martin Liska <mliska@suse.cz>
6381 * ipa-cp.c (ipcp_store_bits_results): Use
6382 ipcp_transformation_sum.
6383 (ipcp_store_vr_results): Likewise.
6384 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6386 (ipcp_transformation_initialize): ... this.
6387 (ipa_set_node_agg_value_chain):
6388 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6389 (write_ipcp_transformation_info): Likewise.
6390 (read_ipcp_transformation_info): Likewise.
6391 (ipcp_update_bits): Likewise.
6392 (ipcp_update_vr): Likewise.
6393 (ipcp_transform_function): Likewise.
6394 * ipa-prop.h: Rename ipcp_transformation_summary to
6395 ipcp_transformation.
6396 (class ipcp_transformation_t): New function summary.
6397 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6398 (ipa_get_agg_replacements_for_node): Likewise.
6400 2018-06-08 Martin Liska <mliska@suse.cz>
6402 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6404 (class funct_state_summary_t): New function_summary class.
6405 (has_function_state): Remove.
6406 (get_function_state): Likewise.
6407 (set_function_state): Likewise.
6408 (add_new_function): Likewise.
6409 (funct_state_summary_t::insert): New function.
6410 (duplicate_node_data): Remove.
6411 (remove_node_data): Remove.
6412 (funct_state_summary_t::duplicate): New function.
6413 (register_hooks): Create new funct_state_summaries.
6414 (pure_const_generate_summary): Use it.
6415 (pure_const_write_summary): Likewise.
6416 (pure_const_read_summary): Likewise.
6417 (propagate_pure_const): Likewise.
6418 (propagate_nothrow): Likewise.
6419 (dump_malloc_lattice): Likewise.
6420 (propagate_malloc): Likewise.
6421 (execute): Do not register hooks, just remove summary
6423 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6426 2018-06-08 Martin Liska <mliska@suse.cz>
6428 * ipa-reference.c (remove_node_data): Remove.
6429 (duplicate_node_data): Likewise.
6430 (class ipa_ref_var_info_summary_t): New class.
6431 (class ipa_ref_opt_summary_t): Likewise.
6432 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6433 (get_reference_optimization_summary): Use
6434 ipa_ref_opt_sum_summaries.
6435 (set_reference_vars_info): Remove.
6436 (set_reference_optimization_summary): Likewise.
6437 (ipa_init): Create summaries.
6438 (init_function_info): Use function summary.
6439 (ipa_ref_opt_summary_t::duplicate): New function.
6440 (ipa_ref_opt_summary_t::remove): New function.
6441 (get_read_write_all_from_node): Fix GNU coding style.
6442 (propagate): Use function summary.
6443 (write_node_summary_p): Fix GNU coding style.
6444 (stream_out_bitmap): Likewise.
6445 (ipa_reference_read_optimization_summary): Use function summary.
6446 (ipa_reference_c_finalize): Do not release hooks.
6448 2018-06-08 Martin Liska <mliska@suse.cz>
6450 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6451 (analyze_function_body): Extract multiple calls of get_create.
6452 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6453 * ipa-inline.c (recursive_inlining): Use ::get method.
6454 * ipa-inline.h (estimate_edge_growth): Likewise.
6456 2018-06-08 Martin Liska <mliska@suse.cz>
6458 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6460 (hsa_function_summary::hsa_function_summary): Use the new enum
6462 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6463 * hsa-gen.c (hsa_get_host_function): Likewise.
6464 (get_brig_function_name): Likewise.
6465 * ipa-hsa.c (process_hsa_functions): Likewise.
6466 (ipa_hsa_write_summary): Likewise.
6467 * symbol-summary.h (symtab_duplication): Use ::get function/
6468 (get): New function.
6470 2018-06-08 Martin Liska <mliska@suse.cz>
6472 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6474 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6475 (hsa_register_kernel): Likewise.
6476 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6477 * hsa-gen.c (hsa_get_host_function): Likewise.
6478 (get_brig_function_name): Likewise.
6479 (generate_hsa): Likewise.
6480 (pass_gen_hsail::execute): Likewise.
6481 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6482 (devirtualization_time_bonus): Likewise.
6483 (ipcp_propagate_stage): Likewise.
6484 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6485 (edge_set_predicate): Likewise.
6486 (evaluate_conditions_for_known_args): Likewise.
6487 (evaluate_properties_for_edge): Likewise.
6488 (ipa_fn_summary::reset): Likewise.
6489 (ipa_fn_summary_t::duplicate): Likewise.
6490 (dump_ipa_call_summary): Likewise.
6491 (ipa_dump_fn_summary): Likewise.
6492 (analyze_function_body): Likewise.
6493 (compute_fn_summary): Likewise.
6494 (estimate_edge_devirt_benefit): Likewise.
6495 (estimate_edge_size_and_time): Likewise.
6496 (estimate_calls_size_and_time): Likewise.
6497 (estimate_node_size_and_time): Likewise.
6498 (inline_update_callee_summaries): Likewise.
6499 (remap_edge_change_prob): Likewise.
6500 (remap_edge_summaries): Likewise.
6501 (ipa_merge_fn_summary_after_inlining): Likewise.
6502 (ipa_update_overall_fn_summary): Likewise.
6503 (read_ipa_call_summary): Likewise.
6504 (inline_read_section): Likewise.
6505 (write_ipa_call_summary): Likewise.
6506 (ipa_fn_summary_write): Likewise.
6507 (ipa_free_fn_summary): Likewise.
6508 * ipa-hsa.c (process_hsa_functions): Likewise.
6509 (ipa_hsa_write_summary): Likewise.
6510 (ipa_hsa_read_section): Likewise.
6511 * ipa-icf.c (sem_function::merge): Likewise.
6512 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6513 (do_estimate_edge_time): Likewise.
6514 (estimate_size_after_inlining): Likewise.
6515 (estimate_growth): Likewise.
6516 (growth_likely_positive): Likewise.
6517 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6518 (inline_call): Likewise.
6519 * ipa-inline.c (caller_growth_limits): Likewise.
6520 (can_inline_edge_p): Likewise.
6521 (can_inline_edge_by_limits_p): Likewise.
6522 (compute_uninlined_call_time): Likewise.
6523 (compute_inlined_call_time): Likewise.
6524 (want_inline_small_function_p): Likewise.
6525 (edge_badness): Likewise.
6526 (update_caller_keys): Likewise.
6527 (update_callee_keys): Likewise.
6528 (recursive_inlining): Likewise.
6529 (inline_small_functions): Likewise.
6530 (inline_to_all_callers_1): Likewise.
6531 (dump_overall_stats): Likewise.
6532 (early_inline_small_functions): Likewise.
6533 (early_inliner): Likewise.
6534 * ipa-inline.h (estimate_edge_growth): Likewise.
6535 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6536 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6537 * ipa-prop.h (IPA_NODE_REF): Likewise.
6538 (IPA_EDGE_REF): Likewise.
6539 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6540 (propagate_malloc): Likewise.
6541 * ipa-split.c (execute_split_functions): Likewise.
6542 * symbol-summary.h: Rename get to get_create.
6544 (get_create): Likewise.
6545 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6547 2018-06-08 Martin Liska <mliska@suse.cz>
6549 * symbol-summary.h (release): Move definition out of class
6551 (symtab_removal): Likewise.
6552 (symtab_duplication): Likewise.
6554 2018-06-08 Martin Liska <mliska@suse.cz>
6556 * symbol-summary.h (function_summary): Move constructor
6557 implementation out of class declaration.
6558 (release): Likewise.
6559 (symtab_insertion): Likewise.
6560 (symtab_removal): Likewise.
6561 (symtab_duplication): Likewise.
6564 2018-06-08 Martin Liska <mliska@suse.cz>
6566 * Makefile.in: Remove support for MPX (macros, related functions,
6567 fields in cgraph_node, ...).
6568 * builtin-types.def (BT_BND): Likewise.
6569 (BT_FN_BND_CONST_PTR): Likewise.
6570 (BT_FN_CONST_PTR_BND): Likewise.
6571 (BT_FN_VOID_PTR_BND): Likewise.
6572 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6573 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6574 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6575 (expand_builtin_mempcpy_with_bounds): Likewise.
6576 (expand_builtin_memset_with_bounds): Likewise.
6577 (expand_builtin_memset_args): Likewise.
6578 (std_expand_builtin_va_start): Likewise.
6579 (expand_builtin): Likewise.
6580 (expand_builtin_with_bounds): Likewise.
6581 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6582 (DEF_LIB_BUILTIN_CHKP): Likewise.
6583 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6584 (DEF_CHKP_BUILTIN): Likewise.
6585 (BUILT_IN_MEMCPY): Likewise.
6586 (BUILT_IN_MEMMOVE): Likewise.
6587 (BUILT_IN_MEMPCPY): Likewise.
6588 (BUILT_IN_MEMSET): Likewise.
6589 (BUILT_IN_STPCPY): Likewise.
6590 (BUILT_IN_STRCAT): Likewise.
6591 (BUILT_IN_STRCHR): Likewise.
6592 (BUILT_IN_STRCPY): Likewise.
6593 (BUILT_IN_STRLEN): Likewise.
6594 (BUILT_IN_MEMCPY_CHK): Likewise.
6595 (BUILT_IN_MEMMOVE_CHK): Likewise.
6596 (BUILT_IN_MEMPCPY_CHK): Likewise.
6597 (BUILT_IN_MEMSET_CHK): Likewise.
6598 (BUILT_IN_STPCPY_CHK): Likewise.
6599 (BUILT_IN_STRCAT_CHK): Likewise.
6600 (BUILT_IN_STRCPY_CHK): Likewise.
6601 * calls.c (store_bounds): Likewise.
6602 (emit_call_1): Likewise.
6603 (special_function_p): Likewise.
6604 (maybe_warn_nonstring_arg): Likewise.
6605 (initialize_argument_information): Likewise.
6606 (finalize_must_preallocate): Likewise.
6607 (compute_argument_addresses): Likewise.
6608 (expand_call): Likewise.
6609 * cfgexpand.c (expand_call_stmt): Likewise.
6610 (expand_return): Likewise.
6611 (expand_gimple_stmt_1): Likewise.
6612 (pass_expand::execute): Likewise.
6613 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6614 (cgraph_node::remove): Likewise.
6615 (cgraph_node::dump): Likewise.
6616 (cgraph_node::verify_node): Likewise.
6617 * cgraph.h (chkp_function_instrumented_p): Likewise.
6618 (symtab_node::get_alias_target): Likewise.
6619 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6620 (cgraph_local_p): Likewise.
6621 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6622 (cgraph_edge::rebuild_references): Likewise.
6623 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6624 (walk_polymorphic_call_targets): Likewise.
6625 (cgraph_node::expand_thunk): Likewise.
6626 (symbol_table::output_weakrefs): Likewise.
6627 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6628 (ix86_handle_option): Likewise.
6629 * config/i386/constraints.md: Likewise.
6630 * config/i386/i386-builtin-types.def (BND): Likewise.
6634 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6635 (BDESC_FIRST): Likewise.
6637 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6638 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6639 * config/i386/i386.c (enum reg_class): Likewise.
6640 (ix86_target_string): Likewise.
6641 (ix86_option_override_internal): Likewise.
6642 (ix86_conditional_register_usage): Likewise.
6643 (ix86_valid_target_attribute_inner_p): Likewise.
6644 (ix86_set_indirect_branch_type): Likewise.
6645 (ix86_set_current_function): Likewise.
6646 (ix86_function_arg_regno_p): Likewise.
6647 (init_cumulative_args): Likewise.
6648 (ix86_function_arg_advance): Likewise.
6649 (ix86_function_arg): Likewise.
6650 (ix86_pass_by_reference): Likewise.
6651 (ix86_function_value_regno_p): Likewise.
6652 (ix86_function_value_1): Likewise.
6653 (ix86_function_value_bounds): Likewise.
6654 (ix86_return_in_memory): Likewise.
6655 (ix86_setup_incoming_vararg_bounds): Likewise.
6656 (ix86_va_start): Likewise.
6657 (indirect_thunk_need_prefix): Likewise.
6658 (print_reg): Likewise.
6659 (ix86_print_operand): Likewise.
6660 (ix86_expand_call): Likewise.
6661 (ix86_output_function_return): Likewise.
6662 (reg_encoded_number): Likewise.
6663 (BDESC_VERIFYS): Likewise.
6664 (ix86_init_mpx_builtins): Likewise.
6665 (ix86_init_builtins): Likewise.
6666 (ix86_emit_cmove): Likewise.
6667 (ix86_emit_move_max): Likewise.
6668 (ix86_expand_builtin): Likewise.
6669 (ix86_builtin_mpx_function): Likewise.
6670 (ix86_get_arg_address_for_bt): Likewise.
6671 (ix86_load_bounds): Likewise.
6672 (ix86_store_bounds): Likewise.
6673 (ix86_load_returned_bounds): Likewise.
6674 (ix86_store_returned_bounds): Likewise.
6675 (ix86_class_likely_spilled_p): Likewise.
6676 (ix86_hard_regno_mode_ok): Likewise.
6677 (x86_order_regs_for_local_alloc): Likewise.
6678 (ix86_mitigate_rop): Likewise.
6679 (ix86_bnd_prefixed_insn_p): Likewise.
6680 (ix86_mpx_bound_mode): Likewise.
6681 (ix86_make_bounds_constant): Likewise.
6682 (ix86_initialize_bounds): Likewise.
6683 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6684 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6685 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6686 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6687 (TARGET_CHKP_BOUND_MODE): Likewise.
6688 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6689 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6690 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6691 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6692 * config/i386/i386.h (TARGET_MPX): Likewise.
6693 (TARGET_MPX_P): Likewise.
6694 (VALID_BND_REG_MODE): Likewise.
6695 (FIRST_BND_REG): Likewise.
6696 (LAST_BND_REG): Likewise.
6697 (enum reg_class): Likewise.
6698 (BND_REG_P): Likewise.
6699 (BND_REGNO_P): Likewise.
6700 (BNDmode): Likewise.
6701 (ADJUST_INSN_LENGTH): Likewise.
6702 * config/i386/i386.md: Likewise.
6703 * config/i386/i386.opt: Likewise.
6704 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6705 (defined): Likewise.
6706 (LINK_MPX): Likewise.
6707 (MPX_SPEC): Likewise.
6708 (LIBMPX_SPEC): Likewise.
6709 (LIBMPXWRAPPERS_SPEC): Likewise.
6710 (CHKP_SPEC): Likewise.
6711 * config/i386/predicates.md: Likewise.
6712 * dbxout.c (dbxout_type): Likewise.
6713 * doc/extend.texi: Likewise.
6714 * doc/invoke.texi: Likewise.
6715 * doc/md.texi: Likewise.
6716 * doc/tm.texi: Likewise.
6717 * doc/tm.texi.in: Likewise.
6718 * dwarf2out.c (is_base_type): Likewise.
6719 (gen_formal_types_die): Likewise.
6720 (gen_subprogram_die): Likewise.
6721 (gen_type_die_with_usage): Likewise.
6722 (gen_decl_die): Likewise.
6723 (dwarf2out_late_global_decl): Likewise.
6724 * expr.c (expand_assignment): Likewise.
6725 (emit_storent_insn): Likewise.
6726 (store_expr_with_bounds): Likewise.
6727 (store_expr): Likewise.
6728 (expand_expr_real_1): Likewise.
6729 * expr.h (store_expr_with_bounds): Likewise.
6730 * function.c (use_register_for_decl): Likewise.
6731 (struct bounds_parm_data): Likewise.
6732 (assign_parms_augmented_arg_list): Likewise.
6733 (assign_parm_find_entry_rtl): Likewise.
6734 (assign_parm_is_stack_parm): Likewise.
6735 (assign_parm_load_bounds): Likewise.
6736 (assign_bounds): Likewise.
6737 (assign_parms): Likewise.
6738 (expand_function_start): Likewise.
6739 * gcc.c (CHKP_SPEC): Likewise.
6740 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6741 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6742 (wrestrict_dom_walker::check_call): Likewise.
6743 * gimple.c (gimple_build_call_from_tree): Likewise.
6744 * gimple.h (enum gf_mask): Likewise.
6745 (gimple_call_with_bounds_p): Likewise.
6746 (gimple_call_set_with_bounds): Likewise.
6747 * gimplify.c (gimplify_init_constructor): Likewise.
6748 * ipa-cp.c (initialize_node_lattices): Likewise.
6749 (propagate_constants_across_call): Likewise.
6750 (find_more_scalar_values_for_callers_subset): Likewise.
6751 * ipa-hsa.c (process_hsa_functions): Likewise.
6752 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6753 * ipa-icf.c (sem_function::merge): Likewise.
6754 * ipa-inline.c (early_inliner): Likewise.
6755 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6756 (warn_function_cold): Likewise.
6757 (propagate_pure_const): Likewise.
6758 * ipa-ref.h (enum GTY): Likewise.
6759 * ipa-split.c (find_retbnd): Likewise.
6760 (consider_split): Likewise.
6761 (split_function): Likewise.
6762 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6763 * ipa.c (walk_polymorphic_call_targets): Likewise.
6764 (symbol_table::remove_unreachable_nodes): Likewise.
6765 (process_references): Likewise.
6766 (cgraph_build_static_cdtor_1): Likewise.
6767 * lto-cgraph.c (lto_output_node): Likewise.
6768 (output_refs): Likewise.
6769 (compute_ltrans_boundary): Likewise.
6770 (input_overwrite_node): Likewise.
6771 (input_node): Likewise.
6772 (input_cgraph_1): Likewise.
6773 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6774 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6775 (class pass_chkp_instrumentation_passes): Likewise.
6776 (make_pass_chkp_instrumentation_passes): Likewise.
6777 * passes.def: Likewise.
6778 * rtl.h (struct GTY): Likewise.
6779 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6780 * stor-layout.c (layout_type): Likewise.
6781 * symtab.c: Likewise.
6782 * target.def: Likewise.
6783 * targhooks.c (default_chkp_bound_type): Likewise.
6784 (default_chkp_bound_mode): Likewise.
6785 (default_builtin_chkp_function): Likewise.
6786 (default_chkp_function_value_bounds): Likewise.
6787 (default_chkp_make_bounds_constant): Likewise.
6788 (default_chkp_initialize_bounds): Likewise.
6789 * targhooks.h (default_chkp_bound_type): Likewise.
6790 (default_chkp_bound_mode): Likewise.
6791 (default_builtin_chkp_function): Likewise.
6792 (default_chkp_function_value_bounds): Likewise.
6793 (default_chkp_make_bounds_constant): Likewise.
6794 (default_chkp_initialize_bounds): Likewise.
6795 * toplev.c (compile_file): Likewise.
6796 (process_options): Likewise.
6797 * tree-core.h (DEF_BUILTIN): Likewise.
6798 (DEF_BUILTIN_CHKP): Likewise.
6799 * tree-inline.c (declare_return_variable): Likewise.
6800 (remap_gimple_stmt): Likewise.
6801 (copy_bb): Likewise.
6802 (initialize_inlined_parameters): Likewise.
6803 (expand_call_inline): Likewise.
6804 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6805 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6806 (make_pass_ipa_chkp_produce_thunks): Likewise.
6807 (make_pass_chkp): Likewise.
6808 (make_pass_chkp_opt): Likewise.
6809 (make_pass_chkp_instrumentation_passes): Likewise.
6810 * tree-pretty-print.c (dump_generic_node): Likewise.
6811 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6812 * tree-ssa-dce.c (propagate_necessity): Likewise.
6813 (eliminate_unnecessary_stmts): Likewise.
6814 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6815 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6816 * tree-ssa-sccvn.h: Likewise.
6817 * tree-ssa-strlen.c (get_string_length): Likewise.
6818 (valid_builtin_call): Likewise.
6819 (adjust_last_stmt): Likewise.
6820 (handle_builtin_strchr): Likewise.
6821 (handle_builtin_strcpy): Likewise.
6822 (handle_builtin_stxncpy): Likewise.
6823 (handle_builtin_memcpy): Likewise.
6824 (handle_builtin_strcat): Likewise.
6825 (strlen_check_and_optimize_stmt): Likewise.
6826 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6827 * tree-streamer-in.c: Likewise.
6828 * tree-streamer.c (record_common_node): Likewise.
6829 * tree.c (tree_code_size): Likewise.
6830 (wide_int_to_tree_1): Likewise.
6831 (type_contains_placeholder_1): Likewise.
6832 (build_common_tree_nodes): Likewise.
6833 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6834 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6835 (POINTER_BOUNDS_P): Likewise.
6836 (BOUNDED_TYPE_P): Likewise.
6837 (BOUNDED_P): Likewise.
6838 (CALL_WITH_BOUNDS_P): Likewise.
6839 (pointer_bounds_type_node): Likewise.
6840 * value-prof.c (gimple_ic): Likewise.
6841 * var-tracking.c (vt_add_function_parameters): Likewise.
6842 * varasm.c (make_decl_rtl): Likewise.
6843 (assemble_start_function): Likewise.
6844 (output_constant): Likewise.
6845 (maybe_assemble_visibility): Likewise.
6846 * varpool.c (ctor_for_folding): Likewise.
6847 * chkp-builtins.def: Remove.
6848 * ipa-chkp.c: Remove.
6849 * ipa-chkp.h: Remove.
6850 * rtl-chkp.c: Remove.
6851 * rtl-chkp.h: Remove.
6852 * tree-chkp-opt.c: Remove.
6853 * tree-chkp.c: Remove.
6854 * tree-chkp.h: Remove.
6856 2018-06-07 Carl Love <cel@us.ibm.com>
6858 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6859 vextract_fp_from_shortl): Add BE support.
6861 2018-06-07 Paul Koning <ni1d@arrl.net>
6863 * compare-elim.c (try_merge_compare): Don't merge compare if
6864 address contains a side effect.
6865 (try_eliminate_compare): Likewise.
6867 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6869 * config.gcc: Support "tremont".
6870 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6871 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6873 * config/i386/i386.c (m_TREMONT): Define.
6874 (processor_target_table): Add "tremont".
6875 (PTA_TREMONT): Define.
6876 (ix86_lea_outperforms): Add TARGET_TREMONT.
6877 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6878 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6879 and M_INTEL_GOLDMONT_PLUS.
6880 (fold_builtin_cpu): Add "tremont".
6881 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6882 (ix86_option_override_internal): Add "tremont".
6883 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6884 (processor_type): Add PROCESSOR_TREMONT.
6885 * config/i386/x86-tune.def: Add m_TREMONT.
6886 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6888 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6890 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6891 symbol defined for msp430i* devices to be lower case.
6893 2018-06-07 Richard Biener <rguenther@suse.de>
6895 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6896 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6897 Properly wrap signed arithmetic if overflow wraps.
6899 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6901 PR tree-optimization/69615
6902 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6903 of a cast from a same precision integral SSA_NAME in a bb dominated
6904 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6905 cast to utype if rhs2 has already a compatible type.
6907 2018-06-07 Richard Biener <rguenther@suse.de>
6909 PR tree-optimization/85935
6910 * graphite-scop-detection.c (find_params_in_bb): Analyze
6911 condition operands with respect to the correct loop. Assert
6912 the analysis doesn't fail.
6914 2018-06-04 Carl Love <cel@us.ibm.com>
6916 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6917 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6918 as it is slightly cheaper.
6919 (first_match_or_eos_index_<mode>):
6920 Calculate index using natural element order.
6921 (first_match_index_<mode>):
6922 Calculate index using natural element order.
6923 (first_match_or_eos_index_<mode>):
6924 Calculate index using natural order.
6925 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6926 for BE and LE modes.
6927 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6928 P9V_BUILTIN_VCLZLSBB_V16QI.
6929 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6932 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6934 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6935 indentation and line wrap for many prototypes. Add missing
6936 @smallexample directives around block of prototypes for vec_xl and
6939 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6941 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6942 track if we pass or return IEEE 128-bit floating point.
6943 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6944 C++ mangling that is compatible with GCC 8.1.
6945 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6946 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6947 floating point types.
6948 (rs6000_function_arg_advance_1): Likewise.
6949 (rs6000_mangle_type): Optionally generate mangled names that match
6950 what GCC 8.1 generated for IEEE 128-bit floating point types.
6951 (rs6000_globalize_decl_name): If we have an external function that
6952 passes or returns IEEE 128-bit types, generate a weak reference
6953 from the mangled name used in GCC 8.1 to the current mangled
6955 (rs6000_init_builtins): Make __ibm128 use the long double type if
6956 long double is IBM extended double. Make __float128 use the long
6957 double type if long double is IEEE 128-bit.
6960 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6961 macro for __ibm128 built-in functions.
6962 (PACK_IF): Add __ibm128 pack/unpack functions.
6963 (UNPACK_IF): Likewise.
6964 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6965 enable long double built-in functions if long double is IEEE
6966 128-bit floating point.
6967 (rs6000_invalid_builtin): Update long double built-in function
6969 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6970 functions, adjust the built-in function to use the long double
6971 built-in function if __ibm128 and long double are the same type.
6972 * doc/extend.texi (PowerPC builtins): Update documention for
6973 __builtin_{,un}pack_longdouble. Add documentation for
6974 __builtin_{,un}pack_ibm128.
6976 2018-06-06 Jim Wilson <jimw@sifive.com>
6978 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6979 (struct machine_function): New field interrupt_mode.
6980 (riscv_handle_type_attribute): New function. Add forward declaration.
6981 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6982 (riscv_expand_epilogue): Check interrupt_mode field.
6983 (riscv_set_current_function): Check interrupt attribute args and
6984 set interrupt_mode field.
6985 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6986 (riscv_sret, riscv_uret): New.
6987 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6988 new arguments to interrupt attribute.
6990 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6993 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6994 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6996 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6998 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6999 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7000 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7001 several redundant entries.
7003 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7005 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7006 type from "rtx" to "rtx_insn *".
7007 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7008 for local "call_insn", removing cast.
7009 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7011 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7013 PR tree-optimization/86066
7014 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7015 for BIT_INSERT_EXPR stores.
7017 2018-06-06 Richard Biener <rguenther@suse.de>
7019 PR tree-optimization/86062
7020 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7021 component refs ontop
7022 of to be offsetted base.
7024 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7026 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7027 to be static and remove check on interrupt attribute name.
7029 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7031 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7032 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7034 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7037 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7039 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7040 Remove second argument, change how error is called.
7041 (aarch64_layout_arg): Remove second argument from
7042 aarch64_err_no_fpadvsimd call.
7043 (aarch64_init_cumulative_args): Ditto.
7044 (aarch64_gimplify_va_arg_expr): Ditto.
7045 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7047 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7049 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7050 (*simple_return_indirect_internal<mode>): Rename from
7051 simple_return_indirect_internal. Use W mode iterator.
7052 (rstorssp): New expander.
7053 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7054 (clrssbsy): New expander.
7055 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7057 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7059 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7061 (cmse_check_pointed_object): Likewise.
7063 2018-06-05 Martin Liska <mliska@suse.cz>
7065 PR gcov-profile/47618
7066 * doc/invoke.texi: Document how -fprofile-dir format
7069 2018-06-05 Richard Biener <rguenther@suse.de>
7071 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7072 removal pretend DOM info isn't available so we do not update
7073 it and only remove edges, not dominated blocks. Actually free
7074 DOM info in case we removed something. Remove unreachable blocks.
7075 (mfb_keep_latches): Work with either DOM info or marked backedges.
7076 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7077 first. Mark backedges if DOM info isn't available.
7078 (Re-)compute DOM info after cleanup_control_flow_pre.
7080 2018-06-05 Richard Biener <rguenther@suse.de>
7082 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7083 (locus_discrim_hasher::hash): Adjust.
7084 (locus_discrim_hasher::equal): Likewise.
7085 (next_discriminator_for_locus): Work on line directly.
7086 (same_line_p): Pass in expanded locus1 as well.
7087 (assign_discriminators): Avoid redundant location expansions.
7089 2018-06-05 Richard Biener <rguenther@suse.de>
7091 PR tree-optimization/86046
7092 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7093 if required after clearing TREE_ADDRESSABLE.
7095 2018-06-05 Richard Biener <rguenther@suse.de>
7097 PR tree-optimization/86047
7098 * tree-ssa-loop.c (for_each_index): Glob handling of all
7099 decls and constants and really handle all of them.
7101 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7104 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7105 qualifier_void_pointer and qualifier_const_void_pointer.
7106 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7107 (arm_init_builtins): Handle the above.
7108 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7109 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7110 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7113 2018-06-05 Martin Liska <mliska@suse.cz>
7115 * auto-profile.c (read_autofdo_file): Do not use
7116 gcov_ctr_summary struct.
7117 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7118 * coverage.c (struct counts_entry): Likewise.
7119 (read_counts_file): Read just single summary entry.
7120 (get_coverage_counts): Use gcov_summary struct.
7121 * coverage.h (get_coverage_counts): Likewise.
7122 * gcov-dump.c (dump_working_sets): Likewise.
7123 (tag_summary): Dump just single summary.
7124 * gcov-io.c (gcov_write_summary): Write just histogram
7126 (gcov_read_summary): Read just single summary.
7127 (compute_working_sets): Use gcov_summary struct.
7128 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7129 of GCOV_COUNTERS_SUMMABLE.
7130 (GCOV_COUNTERS_SUMMABLE): Remove.
7131 (GCOV_FIRST_VALUE_COUNTER): Replace with
7132 GCOV_COUNTER_V_INTERVAL.
7133 (struct gcov_ctr_summary): Remove.
7134 (struct gcov_summary): Directly use fields of former
7136 (compute_working_sets): Use gcov_summary struct.
7137 * gcov.c (read_count_file): Do not use ctrs fields.
7138 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7140 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7142 * profile.c: Likewise.
7143 * profile.h: Likewise.
7145 2018-06-05 Martin Liska <mliska@suse.cz>
7147 PR gcov-profile/84846
7148 * gcov.c (output_lines): Print working directory only
7149 in intermediate format.
7151 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7153 * config/s390/s390-builtin-types.def: Add void function type.
7154 * config/s390/s390-builtins.def: Use the function type for the
7157 2018-06-04 Jim Wilson <jimw@sifive.com>
7159 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7161 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7162 and maybe_eh_return. Change regno to unsigned int. Use new args to
7163 handle EH_RETURN_DATA_REGNO registers properly.
7164 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7165 (riscv_expand_epilogue): Update comment. Change argument name and
7166 type. Update code to use new name and type. Pass new args to
7167 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7169 * config/riscv/riscv.md (NORMAL_RETURN): New.
7170 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7171 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7172 (eh_return): Call gen_eh_return_internal and emit barrier.
7173 (eh_return_internal): Call riscv_expand_epilogue.
7175 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7177 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7178 bit_insertion field and declare can_be_merged_into method.
7179 (merged_store_group::can_be_merged_into): New method.
7180 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7181 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7182 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7184 2018-06-04 Richard Biener <rguenther@suse.de>
7186 PR tree-optimization/85955
7187 * builtins.c (fold_builtin_sincos): Convert pointers to
7188 destination to appropriate type before dereferencing.
7190 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7192 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7194 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7196 * expr.c (expand_expr_real_1): Force the operand into memory if
7197 its TYPE_MODE is BLKmode and if there is no integer mode for
7198 the number of bits being extracted.
7200 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7204 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7205 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7207 2018-06-04 Richard Biener <rguenther@suse.de>
7209 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7210 (cleanup_tree_cfg_noloop): ... single caller. Do
7211 start_recording_case_labels later.
7213 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7215 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7216 to _IMMINTRIN_H_INCLUDED.
7217 * config/i386/pconfigintrin.h: Ditto.
7218 * config/i386/waitpkgintrin.h: Ditto.
7219 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7220 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7221 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7222 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7223 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7224 waitpkgintrin.h and cldemoteintrin.h.
7226 2018-06-04 Richard Biener <rguenther@suse.de>
7228 PR tree-optimization/86038
7229 * tracer.c (find_best_successor): Check probability for
7230 being initialized, bail out if not.
7232 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7235 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7236 of bits to ignore when comparing architectures.
7238 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7240 PR tree-optimization/69615
7241 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7242 maximum or minimum of the type, try to merge it also as if
7243 range1 is + [-, x - 1] or + [x + 1, -].
7246 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7248 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7250 PR tree-optimization/86034
7251 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7252 the unsigned bitfield type in a bit insertion sequence if it does not
7253 have a larger precision than the bitfield size.
7254 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7256 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7258 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7260 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7262 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7263 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7264 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7265 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7267 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7269 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7270 Disable -fdelete-null-pointer-checks for ELF toolchain.
7272 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7273 Kito Cheng <kito.cheng@gmail.com>
7275 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7276 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7277 (nds32*-*-*): Add glibc and uclibc conditions.
7278 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7279 (TARGET_EXCEPT_UNWIND_INFO): Define.
7280 * config/nds32/elf.h: New file.
7281 * config/nds32/linux.h: New file.
7282 * config/nds32/nds32-elf.opt: New file.
7283 * config/nds32/nds32-linux.opt: New file.
7284 * config/nds32/nds32-fp-as-gp.c
7285 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7286 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7288 (nds32_asm_file_end): Ditto.
7289 (nds32_print_operand): Ditto.
7290 (nds32_insert_attributes): Ditto.
7291 (nds32_init_libfuncs): New function.
7292 (TARGET_HAVE_TLS): Define.
7293 (TARGET_INIT_LIBFUNCS): Define.
7294 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7296 (TARGET_ELF): Apply different mcmodel setting.
7297 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7298 been migrated into elf.h and linux.h files.
7299 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7300 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7301 (mcmodel): The content has been migrated into nds32-elf.opt and
7302 nds32-linux.opt files.
7303 * config/nds32/t-elf: New file.
7304 * config/nds32/t-linux: New file.
7306 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7307 Shiva Chen <shiva0217@gmail.com>
7309 * config/nds32/constants.md (unspec_volatile_element): Add
7310 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7311 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7313 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7314 (make_pass_nds32_fp_as_gp): Declare.
7315 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7317 (nds32_asm_function_end_prologue): Remove unused asm output.
7318 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7319 (nds32_asm_file_start): Output necessary fp_as_gp information.
7320 (nds32_option_override): Adjust register usage.
7321 (nds32_expand_prologue): Consider fp_as_gp situation.
7322 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7323 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7326 (simple_return): Ditto.
7327 (omit_fp_begin): Output special directive for fp_as_gp.
7328 (omit_fp_end): Output special directive for fp_as_gp.
7329 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7330 mforbid-fp-as-gp): New options.
7332 2018-06-01 Mark Wielaard <mark@klomp.org>
7334 * dwarf2out.c (dwarf2out_finish): Remove generation of
7335 DW_AT_loclists_base.
7337 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7339 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7340 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7341 (struct merged_store_group): Add bit_insertion field.
7342 (dump_char_array): Use standard hexadecimal format.
7343 (merged_store_group::merged_store_group): Set bit_insertion to false.
7344 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7345 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7346 also print the mask in the dump file.
7347 (pass_store_merging::gate): Minor tweak.
7348 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7349 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7350 stores with INTEGER_CST stores.
7351 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7352 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7353 and use it throughout. Generate bit insertion sequences if need be.
7354 (pass_store_merging::process_store): Remove redundant condition.
7355 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7357 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7359 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7360 the 128-bit floating point types. Fix function comment.
7362 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7364 * config/aarch64/aarch64-simd.md
7365 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7367 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7370 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7372 PR tree-optimization/85989
7373 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7375 (backprop::intersect_uses): Check it when deciding whether this
7376 is a backedge reference.
7377 (backprop::process_block): Add each phi to m_visited_phis
7378 after visiting it, then clear it at the end.
7380 2018-06-01 Richard Biener <rguenther@suse.de>
7382 * tree-vectorizer.h (vect_dr_stmt): New function.
7383 (vect_get_load_cost): Adjust.
7384 (vect_get_store_cost): Likewise.
7385 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7386 Use vect_dr_stmt instead of DR_SMTT.
7387 (vect_record_base_alignments): Likewise.
7388 (vect_calculate_target_alignment): Likewise.
7389 (vect_compute_data_ref_alignment): Likewise and make static.
7390 (vect_update_misalignment_for_peel): Likewise.
7391 (vect_verify_datarefs_alignment): Likewise.
7392 (vector_alignment_reachable_p): Likewise.
7393 (vect_get_data_access_cost): Likewise. Pass down
7394 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7395 (vect_get_peeling_costs_all_drs): Likewise.
7396 (vect_peeling_hash_get_lowest_cost): Likewise.
7397 (vect_enhance_data_refs_alignment): Likewise.
7398 (vect_find_same_alignment_drs): Likewise.
7399 (vect_analyze_data_refs_alignment): Likewise.
7400 (vect_analyze_group_access_1): Likewise.
7401 (vect_analyze_group_access): Likewise.
7402 (vect_analyze_data_ref_access): Likewise.
7403 (vect_analyze_data_ref_accesses): Likewise.
7404 (vect_vfa_segment_size): Likewise.
7405 (vect_small_gap_p): Likewise.
7406 (vectorizable_with_step_bound_p): Likewise.
7407 (vect_prune_runtime_alias_test_list): Likewise.
7408 (vect_analyze_data_refs): Likewise.
7409 (vect_supportable_dr_alignment): Likewise.
7410 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7411 (vect_gen_prolog_loop_niters): Likewise.
7412 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7413 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7415 (vect_recog_mask_conversion_pattern): Likewise.
7416 (vect_try_gather_scatter_pattern): Likewise.
7417 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7418 to vect_get_store_cost.
7419 (vect_get_store_cost): Get stmt_info instead of DR.
7420 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7421 (vect_get_load_cost): Get stmt_info instead of DR.
7423 2018-06-01 Richard Biener <rguenther@suse.de>
7426 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7427 vars wrapped in MEM_REFs.
7429 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7431 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7432 Fix subreg tests so that we only return a choice between
7433 GENERAL_REGS and FP_REGS if the original classes included both.
7435 2018-06-01 Richard Biener <rguenther@suse.de>
7438 * tree-ssa-structalias.c (get_function_part_constraint):
7439 Handle NULL fi->decl.
7440 (find_func_aliases_for_call): Properly handle indirect
7441 fi from direct call.
7442 (find_func_clobbers): Likewise.
7443 (ipa_pta_execute): Likewise.
7444 (create_variable_info_for): For functions that are ifunc_resolver
7445 resolve to a varinfo that contains the result of the resolver call.
7446 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7449 2018-05-31 Michael Collison <michael.collison@arm.com>
7451 * config/aarch64/aarch64.md:
7452 (*fix_to_zero_extenddfdi2): New pattern.
7453 * gcc.target/aarch64/fix_extend1.c: New testcase.
7455 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7459 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7460 and BUILT_IN_STRNCMP_EQ.
7461 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7462 BUILT_IN_STRNCMP_EQ.
7463 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7464 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7465 (gimple_fold_builtin): Likewise.
7466 * tree-ssa-strlen.c (compute_string_length): New function.
7467 (determine_min_obsize): New function.
7468 (handle_builtin_string_cmp): New function to handle calls to
7469 string compare functions.
7470 (strlen_optimize_stmt): Add handling to builtin string compare
7472 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7473 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7474 * tree.c (build_common_builtin_nodes): Add new defines of
7475 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7477 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7480 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7481 functions with naked attribute.
7483 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7485 * config/i386/sse.md (avx_vec_concat<mode>):
7486 Substitute concat_tg_mode mode attribute with xtg_mode.
7487 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7488 (concat_tg_mode): Remove mode attribute.
7490 2018-05-31 Martin Sebor <msebor@redhat.com>
7493 * calls.c (alloc_max_size): Correct a logic error/typo.
7494 Treat excessive arguments as infinite. Warn for invalid arguments.
7495 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7497 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7500 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7501 and movx for Haswell.
7503 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7504 Cesar Philippidis <cesar@codesourcery.com>
7507 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7508 when emitting error on private/firstprivate reductions.
7509 * omp-low.c (lower_omp_target): Avoid reference-type processing
7510 on pointers for firstprivate clause.
7512 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7514 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7517 * config/aarch64/aarch64-simd.md
7518 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7519 (aarch64_ld1_x3_<mode>): Likewise
7520 (aarch64_st1x2<VALLDIF:mode>): Likewise
7521 (aarch64_st1_x2_<mode>): Likewise
7522 (aarch64_st1x3<VALLDIF:mode>): Likewise
7523 (aarch64_st1_x3_<mode>): Likewise
7524 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7525 (vld1_s8_x3): Likewise.
7526 (vld1_u16_x3): Likewise.
7527 (vld1_s16_x3): Likewise.
7528 (vld1_u32_x3): Likewise.
7529 (vld1_s32_x3): Likewise.
7530 (vld1_u64_x3): Likewise.
7531 (vld1_s64_x3): Likewise.
7532 (vld1_f16_x3): Likewise.
7533 (vld1_f32_x3): Likewise.
7534 (vld1_f64_x3): Likewise.
7535 (vld1_p8_x3): Likewise.
7536 (vld1_p16_x3): Likewise.
7537 (vld1_p64_x3): Likewise.
7538 (vld1q_u8_x3): Likewise.
7539 (vld1q_s8_x3): Likewise.
7540 (vld1q_u16_x3): Likewise.
7541 (vld1q_s16_x3): Likewise.
7542 (vld1q_u32_x3): Likewise.
7543 (vld1q_s32_x3): Likewise.
7544 (vld1q_u64_x3): Likewise.
7545 (vld1q_s64_x3): Likewise.
7546 (vld1q_f16_x3): Likewise.
7547 (vld1q_f32_x3): Likewise.
7548 (vld1q_f64_x3): Likewise.
7549 (vld1q_p8_x3): Likewise.
7550 (vld1q_p16_x3): Likewise.
7551 (vld1q_p64_x3): Likewise.
7552 (vst1_s64_x2): Likewise.
7553 (vst1_u64_x2): Likewise.
7554 (vst1_f64_x2): Likewise.
7555 (vst1_s8_x2): Likewise.
7556 (vst1_p8_x2): Likewise.
7557 (vst1_s16_x2): Likewise.
7558 (vst1_p16_x2): Likewise.
7559 (vst1_s32_x2): Likewise.
7560 (vst1_u8_x2): Likewise.
7561 (vst1_u16_x2): Likewise.
7562 (vst1_u32_x2): Likewise.
7563 (vst1_f16_x2): Likewise.
7564 (vst1_f32_x2): Likewise.
7565 (vst1_p64_x2): Likewise.
7566 (vst1q_s8_x2): Likewise.
7567 (vst1q_p8_x2): Likewise.
7568 (vst1q_s16_x2): Likewise.
7569 (vst1q_p16_x2): Likewise.
7570 (vst1q_s32_x2): Likewise.
7571 (vst1q_s64_x2): Likewise.
7572 (vst1q_u8_x2): Likewise.
7573 (vst1q_u16_x2): Likewise.
7574 (vst1q_u32_x2): Likewise.
7575 (vst1q_u64_x2): Likewise.
7576 (vst1q_f16_x2): Likewise.
7577 (vst1q_f32_x2): Likewise.
7578 (vst1q_f64_x2): Likewise.
7579 (vst1q_p64_x2): Likewise.
7580 (vst1_s64_x3): Likewise.
7581 (vst1_u64_x3): Likewise.
7582 (vst1_f64_x3): Likewise.
7583 (vst1_s8_x3): Likewise.
7584 (vst1_p8_x3): Likewise.
7585 (vst1_s16_x3): Likewise.
7586 (vst1_p16_x3): Likewise.
7587 (vst1_s32_x3): Likewise.
7588 (vst1_u8_x3): Likewise.
7589 (vst1_u16_x3): Likewise.
7590 (vst1_u32_x3): Likewise.
7591 (vst1_f16_x3): Likewise.
7592 (vst1_f32_x3): Likewise.
7593 (vst1_p64_x3): Likewise.
7594 (vst1q_s8_x3): Likewise.
7595 (vst1q_p8_x3): Likewise.
7596 (vst1q_s16_x3): Likewise.
7597 (vst1q_p16_x3): Likewise.
7598 (vst1q_s32_x3): Likewise.
7599 (vst1q_s64_x3): Likewise.
7600 (vst1q_u8_x3): Likewise.
7601 (vst1q_u16_x3): Likewise.
7602 (vst1q_u32_x3): Likewise.
7603 (vst1q_u64_x3): Likewise.
7604 (vst1q_f16_x3): Likewise.
7605 (vst1q_f32_x3): Likewise.
7606 (vst1q_f64_x3): Likewise.
7607 (vst1q_p64_x3): Likewise.
7609 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7611 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7612 user_label_prefix to name.
7614 * tree-core.h: Update comment about the format of NAME string
7615 passed to handler in attribute_spec.
7617 * config/msp430/msp430.md: Remove erroneous subreg expression from
7618 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7619 zero_extend{q,h}isi2.
7621 2018-05-30 Borislav Petkov <bp@suse.de>
7623 * doc/extend.texi: Document some architecture specific
7624 constraints and sort entries.
7626 2018-05-30 Martin Sebor <msebor@redhat.com>
7629 * builtins.c (expand_builtin_stpcpy_1): New function.
7630 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7631 only if the former succeeds.
7633 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7635 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7638 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7640 * doc/invoke.texi (-flinker-output): Document
7642 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7644 * passes.c (ipa_write_summaries): Only modify statements if body
7646 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7647 incrementally linking.
7648 (ipa_passes): Likewise.
7649 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7650 pass down resolution info.
7651 * common.opt (flag_incremental_link): Update info.
7652 * gcc.c (plugin specs): Turn flinker-output=* to
7653 -plugin-opt=-linker-output-known
7654 * toplev.c (compile_file): Also cut compilation when doing incremental
7656 * flag-types. (enum lto_partition_model): Add
7657 LTO_LINKER_OUTPUT_NOLTOREL.
7658 (invoke.texi): Add -flinker-output docs.
7659 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7660 link same way as WPA; do not stream in dead initializers.
7662 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7663 darf2out_register_external_decl): Support incremental link.
7665 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7667 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7669 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7671 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7672 it down to simple_object_copy_lto_debug_sections.
7673 (run_gcc): Determine incremental LTO link time and configure
7674 lto1 into non-wpa mode, disable renaming of debug sections.
7676 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7678 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7679 descriptions of various incorrectly documented functions.
7681 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7684 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7685 address check not strict.
7687 2018-05-30 Richard Biener <rguenther@suse.de>
7689 PR tree-optimization/85964
7690 * tracer.c (better_p): Drop initialized count check, we only
7691 call the function with initialized counts now.
7692 (find_best_successor): Do find a best edge if one
7693 has uninitialized count.
7694 (find_best_predecessor): Likewise. Do BB frequency check only
7695 if count is initialized.
7697 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7699 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7700 (aarch64_ldrstr_offset_compare): New.
7701 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7702 load/store orderings.
7703 (aarch64_gen_adjusted_ldpstp): Likewise.
7705 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7707 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7708 Check for subset of GENERAL_REGS and FP_REGS.
7709 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7712 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7714 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7715 and wi::to_poly_offset. Add the current offset and then check
7716 whether the sum fits, rather than using an unchecked addition of
7717 a checked term. Check for a shwi rather than a uhwi.
7718 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7719 (store_constructor): Use poly_int_tree_p.
7720 (expand_expr_real_1): Likewise.
7721 * function.c (assign_temp): Likewise.
7722 * fold-const.c (const_binop): Use poly_int_tree_p and
7724 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7726 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7727 to_poly_offset for MEM offsets.
7728 * ipa-icf.c (sem_variable::equals): Likewise.
7729 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7730 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7731 wi::to_poly_offset for BIT_FIELD_REF offsets.
7732 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7734 * var-tracking.c (emit_note_insn_var_location): Use
7735 tree_to_poly_uint64.
7737 2018-05-29 Jim Wilson <jimw@sifive.com>
7739 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7741 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7744 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7745 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7747 (sse4_1_round<mode>2): Use nonimmediate_operand
7748 for operand 1 predicate.
7750 2018-05-29 Martin Sebor <msebor@redhat.com>
7751 Richard Biener <rguenther@suse.de>
7754 * calls.c (get_size_range): Call determine_value_range instead
7755 of get_value_range..
7756 * tree-vrp.h (determine_value_range): Declared new function.
7757 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7759 2018-05-29 Richard Biener <rguenther@suse.de>
7761 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7762 sure to use non-pattern stmts for get_earlier_stmt arguments.
7763 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7764 called on pattern stmts.
7765 (get_later_stmt): Likewise.
7767 2018-05-29 Martin Liska <mliska@suse.cz>
7769 PR gcov-profile/85759
7770 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7773 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7775 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7777 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7781 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7782 VEC_PACK_FLOAT_EXPR): New tree codes.
7783 * tree-pretty-print.c (op_code_prio): Handle
7784 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7785 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7786 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7787 * tree-inline.c (estimate_operator_cost): Likewise.
7788 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7789 * fold-const.c (const_binop): Likewise.
7790 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7791 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7792 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7793 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7794 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7795 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7796 * expr.c (expand_expr_real_2): Likewise.
7797 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7798 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7799 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7801 * optabs.c (expand_widen_pattern_expr): For
7802 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7803 sign from result type rather than operand's type.
7804 (expand_binop_directly): For vec_packu_float_optab and
7805 vec_packs_float_optab allow result type to be different from operand's
7807 * optabs-tree.c (optab_for_tree_code): Handle
7808 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7809 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7810 * tree-vect-generic.c (expand_vector_operations_1): Handle
7811 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7812 VEC_PACK_FLOAT_EXPR.
7813 * tree-vect-stmts.c (supportable_widening_operation): Handle
7815 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7816 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7817 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7818 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7819 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7821 (vec_pack<floatprefix>_float_<mode>): New expander.
7822 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7824 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7825 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7826 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7827 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7828 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7830 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7831 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7832 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7833 VEC_PACK_FLOAT_EXPR): Document.
7835 2018-05-29 Richard Biener <rguenther@suse.de>
7837 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7839 (stmt_vec_info_vec): Make pointer.
7840 (init_stmt_vec_info_vec): Remove.
7841 (free_stmt_vec_info_vec): Likewise.
7842 (set_stmt_vec_info_vec): New function.
7843 (free_stmt_vec_infos): Likewise.
7844 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7845 (set_vinfo_for_stmt): Likewise.
7846 (get_earlier_stmt): Likewise.
7847 (get_later_stmt): Likewise.
7848 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7849 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7850 (vec_info::~vec_info): Free stmt_vec_infos.
7851 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7852 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7853 (pass_slp_vectorize::execute): Likewise.
7854 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7855 (free_stmt_vec_info_vec): Likewise.
7856 (set_stmt_vec_info_vec): New function.
7857 (free_stmt_vec_infos): Likewise.
7858 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7859 the global stmt_vec_info_vec.
7860 * tree-parloops.c (gather_scalar_reductions): Use
7861 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7864 2018-05-29 Richard Biener <rguenther@suse.de>
7866 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7868 2018-05-29 Martin Liska <mliska@suse.cz>
7869 David Malcolm <dmalcolm@redhat.com>
7871 * vec.c (test_reverse): New.
7872 (vec_c_tests): Add new test.
7873 * vec.h (vl_ptr>::reverse): New function.
7875 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7877 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7879 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7882 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7884 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7886 2018-05-28 Richard Biener <rguenther@suse.de>
7888 PR tree-optimization/85933
7889 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7890 look at stmts marked as vectorizable.
7892 2018-05-28 Richard Biener <rguenther@suse.de>
7894 PR tree-optimization/85934
7895 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7896 vector boolean check before scalar optimization.
7898 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7900 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7903 2018-05-28 Mark Wielaard <mark@klomp.org>
7905 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7906 if it is an expression containing a minus sign.
7908 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7910 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7912 2018-05-27 Paul Koning <ni1d@arrl.net>
7914 * config/pdp11/pdp11.md (truncsihi2): Remove.
7916 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7917 Chung-Ju Wu <jasonwucj@gmail.com>
7919 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7921 (unaligned_store_dw): Ditto.
7922 * config/nds32/nds32-memory-manipulation.c
7923 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7924 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7925 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7926 (emit_setmem_word_loop): Rename to ...
7927 (emit_setmem_doubleword_loop): ... this.
7928 (nds32_gen_dup_4_byte_to_word_value): New function.
7929 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7930 (nds32_expand_setmem_loop): Refine implementation.
7931 (nds32_expand_setmem_loop_v3m): Ditto.
7932 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7935 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7937 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7939 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7941 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7942 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7943 machine->attr_no_prologue_p.
7944 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7945 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7946 (nds32_expand_epilogue): Consider attr_naked_p.
7947 (nds32_expand_epilogue_v3pop): Likewise.
7948 (nds32_can_use_return_insn): Likewise.
7949 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7950 attr_no_prologue_p fields.
7951 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7953 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7956 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7958 * config/i386/sse.md
7959 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7961 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7963 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7965 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7967 (*<floatsuffix>floatv2div2sf2): Rename to ...
7968 (*float<floatunssuffix>v2div2sf2): ... this.
7969 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7970 (float<floatunssuffix>v2div2sf2_mask): ... this.
7971 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7972 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7973 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7975 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7977 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7979 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7981 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7983 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7985 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7986 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7987 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7988 gen_ufix_truncv8dfv8si2.
7989 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7990 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7991 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7992 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7993 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7994 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7995 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7996 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7998 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8002 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8004 2018-05-25 Jim Wilson <jimw@sifive.com>
8006 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8007 * config/riscv/riscv.c (struct machine_function): Add
8008 interrupt_handler_p and attribute_checked_p fields.
8009 (riscv_attribute_table): Add interrupt.
8010 (riscv_interrupt_type_p): New.
8011 (riscv_save_reg_p): Save extra regs for interrupt handler.
8012 (riscv_use_save_libcall): Return false for interrupt handler.
8013 (riscv_first_stack_step): Add forward declaration.
8014 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8015 for interrupt handler with large frame. Use it for saved reg list.
8016 (riscv_expand_prologue): Move flag_stack_usage_info support to
8017 eliminate duplication.
8018 (riscv_expand_epilogue): Generate mret for interrupt handler.
8019 (riscv_epilogue_uses): New.
8020 (riscv_can_use_return_insn): Return false for interrupt handler.
8021 (riscv_function_ok_for_sibcall): Likewise.
8022 (riscv_set_current_function): Add interrupt handler support.
8023 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8024 * config/riscv/riscv.md (UNSPECV_MRET): New.
8026 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8028 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8030 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8032 PR tree-optimization/85712
8033 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8034 this candidate has already been replaced in-situ by a copy.
8036 2018-05-25 Jason Merrill <jason@redhat.com>
8038 PR c++/80485 - inline function non-zero address.
8039 * symtab.c (nonzero_address): Check DECL_COMDAT.
8041 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8044 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8045 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8046 extension of SImode operation. Use const123_operand predicate.
8047 (*saddsi_1): Remove.
8048 (*saddl_se_1): Ditto.
8050 (*ssubl_se_1): Ditto.
8051 * config/alpha/predicates.md (const123_operand): New predicate.
8052 * config/alpha/constraints.md (P): Use IN_RANGE.
8054 2018-05-25 Richard Biener <rguenther@suse.de>
8056 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8058 (ref_maybe_used_by_stmt_p): Likewise.
8059 (stmt_may_clobber_ref_p): Likewise.
8060 (stmt_may_clobber_ref_p_1): Likewise.
8061 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8063 (ref_maybe_used_by_stmt_p): Likewise.
8064 (stmt_may_clobber_ref_p): Likewise.
8065 (stmt_may_clobber_ref_p_1): Likewise.
8066 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8067 the alias oracle to disambiguate DRs with stmts DR analysis
8069 (vect_analyze_data_refs): Do not give up on not analyzable
8070 DRs for BB vectorization. Remove code truncating the dataref
8073 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8076 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8077 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8078 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8080 2018-05-25 Richard Biener <rguenther@suse.de>
8082 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8083 function, combining stmt data ref gathering and fatal analysis
8085 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8086 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8087 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8088 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8089 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8091 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8093 PR tree-optimization/85720
8094 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8095 SCC if all partitions are builtins.
8096 (version_loop_by_alias_check): New parameter. Generate cancelable
8097 runtime alias check if all partitions are builtins.
8098 (distribute_loop): Update call to above function.
8100 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8102 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8103 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8104 (parm_default_def_partition_arg): Ditto.
8105 (set_parm_default_def_partition): Ditto.
8106 (get_parm_default_def_partitions): Ditto and make it static.
8107 (get_undefined_value_partitions): Ditto and make it static.
8108 (remove_ssa_form): Refactor call to init_var_map here.
8109 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8110 computation for loop region.
8111 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8112 (register_default_def): Delete.
8113 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8114 (parm_default_def_partition_arg): Ditto.
8115 (set_parm_default_def_partition): Ditto.
8116 (get_parm_default_def_partitions): Ditto and make it static.
8117 (get_undefined_value_partitions): Ditto and make it static.
8118 (coalesce_with_default, coalesce_with_default): Update comment.
8119 (create_coalesce_list_for_region): New func factored out from
8120 create_outofssa_var_map.
8121 (populate_coalesce_list_for_outofssa): New func factored out from
8122 create_outofssa_var_map and coalesce_ssa_name.
8123 (create_outofssa_var_map): Delete.
8124 (coalesce_ssa_name): Refactor to support live range computation.
8125 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8126 (get_parm_default_def_partitions): Delete.
8127 (get_undefined_value_partitions): Ditto.
8128 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8129 computation for loop region.
8130 (new_tree_live_info, loe_visit_block): Ditto.
8131 (live_worklist, set_var_live_on_entry): Ditto.
8132 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8133 * tree-ssa-live.h (struct _var_map): New fields.
8134 (init_var_map): Change decl.
8135 (region_contains_p): New.
8137 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8139 * tree-ssa-live.h (live_merge_and_clear): Delete.
8141 2018-05-25 Richard Biener <rguenther@suse.de>
8144 * tree-dump.c (dequeue_and_dump): Remove access to removed
8145 operand 2 of a SWITCH_EXPR.
8147 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8149 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8150 multiplication and division.
8151 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8152 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8153 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8154 (cond_udiv_optab, cond_umod_optab): New optabs.
8155 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8156 (IFN_COND_RDIV): New internal functions.
8157 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8158 TRUNC_MOD_EXPR and RDIV_EXPR.
8159 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8160 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8162 (SVE_INT_BINARY): Include mult.
8163 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8164 (optab, sve_int_op): Handle mult.
8165 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8167 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8168 for SVE_INT_BINARY_SD.
8170 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8172 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8173 (optab, sve_int_op): Handle div and udiv.
8174 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8175 for SVE_INT_BINARY_SD.
8176 (*<optab><mode>3): New insn for the same.
8178 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8180 * tree-vect-patterns.c: Include predict.h.
8181 (vect_recog_divmod_pattern): Restrict check for division support
8182 to when optimizing for size.
8184 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8186 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8187 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8188 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8189 (gimple_match_op::set_op): Likewise.
8190 (gimple_resimplify4): Declare.
8191 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8192 (expr::gen_transform): Likewise.
8193 (decision_tree::gen): Generate a simplification routine for 4 operands.
8194 * gimple-match-head.c (gimple_simplify): Add an overload for
8195 4 operands. In the top-level function, handle up to 4 call
8196 arguments and call gimple_resimplify4.
8197 (gimple_resimplify4): New function.
8198 (build_call_internal): Pass a fourth operand.
8199 (maybe_push_to_seq): Likewise.
8200 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8201 Fold VEC_COND_EXPRs of an operation and a default value into
8202 an IFN_COND_* function if possible.
8203 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8205 (SVE_COND_FP_BINARY): Include them.
8206 (optab, sve_fp_op): Handle them.
8207 (SVE_INT_BINARY_REV): New code iterator.
8208 (SVE_COND_FP_BINARY_REV): New int iterator.
8209 (commutative): New int attribute.
8210 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8212 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8214 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8215 (*cond_<optab><mode>): New patterns for reversed operands.
8217 2018-05-25 Richard Biener <rguenther@suse.de>
8219 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8220 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8221 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8222 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8223 * tree-vect-data-refs.c (everywhere): Adjust users.
8224 * tree-vect-loop.c (everywhere): Likewise.
8225 * tree-vect-slp.c (everywhere): Likewise.
8226 * tree-vect-stmts.c (everywhere): Likewise.
8227 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8229 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8231 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8233 (gcc_cv_as_section_exclude): ... this.
8234 Try Solaris as #exclude syntax.
8235 * configure: Regenerate.
8236 * config.in: Regenerate.
8237 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8239 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8240 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8242 * varasm.c (default_elf_asm_named_section): Don't check if
8243 HAVE_GAS_SECTION_EXCLUDE is defined.
8245 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8247 * doc/md.texi: Update the documentation of the cond_* optabs
8248 to mention the new final operand. Fix GET_MODE_NUNITS call.
8249 Describe the scalar case too.
8250 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8251 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8253 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8254 (get_conditional_internal_fn): Update comment.
8255 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8256 accumulator value as a final argument to conditional functions.
8257 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8258 a define_expand and add an "else" operand. Assert for now that
8259 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8260 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8261 (*cond_<optab><mode>): New patterns.
8262 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8263 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8264 (UNSPEC_COND_EOR): Delete.
8265 (optab): Remove associated mappings.
8266 (SVE_INT_BINARY): New code iterator.
8267 (sve_int_op): Remove int attribute and add "minus" to the code
8269 (SVE_COND_INT_OP): Delete.
8270 (SVE_COND_FP_OP): Rename to...
8271 (SVE_COND_FP_BINARY): ...this.
8273 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8275 * optabs.c (can_reuse_operands_p): New function.
8276 (maybe_legitimize_operands): Try to reuse the results for
8279 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8281 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8282 Add {q} suffix to insn mnemonic.
8284 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8286 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8287 (msp430_warn_func_return): New.
8289 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8291 * fold-const.c (tree_nonzero_bits): New function.
8292 * fold-const.h (tree_nonzero_bits): Likewise.
8293 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8294 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8296 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8300 * varasm.c (assemble_alias): Check ifunc_resolver only on
8303 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8306 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8307 when memory input operand is handled.
8309 2018-05-24 Luis Machado <luis.machado@linaro.org>
8311 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8313 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8315 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8317 * match.pd: Delay FMA folds until after vectorization.
8319 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8322 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8323 address check not strict.
8325 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8327 * gimple-match.h (gimple_match_op): New class.
8328 (mprts_hook): Replace parameters with a gimple_match_op *.
8329 (maybe_build_generic_op): Likewise.
8330 (gimple_simplified_result_is_gimple_val): Replace parameters with
8331 a const gimple_match_op *.
8332 (gimple_simplify): Replace code_helper * and tree * parameters with
8333 a gimple_match_op * parameter.
8334 (gimple_resimplify1): Replace code_helper *, tree and tree *
8335 parameters with a gimple_match_op * parameter.
8336 (gimple_resimplify2): Likewise.
8337 (gimple_resimplify3): Likewise.
8338 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8339 parameters with a gimple_match_op * parameter.
8340 * gimple-match-head.c (gimple_simplify): Change prototypes of
8341 auto-generated functions to take a gimple_match_op * instead of
8342 separate code_helper * and tree * parameters. Make the same
8343 change in the top-level overload and update calls to the
8344 gimple_resimplify routines. Update calls to the auto-generated
8345 functions and to maybe_push_res_to_seq in the publicly-facing
8346 operation-specific gimple_simplify overloads.
8347 (gimple_match_op::MAX_NUM_OPS): Define.
8348 (gimple_resimplify1): Replace rcode and ops with a single res_op
8349 parameter. Update call to gimple_simplify.
8350 (gimple_resimplify2): Likewise.
8351 (gimple_resimplify3): Likewise.
8352 (mprts_hook): Replace parameters with a gimple_match_op *.
8353 (maybe_build_generic_op): Likewise.
8354 (build_call_internal): Replace type, nargs and ops with
8355 a gimple_match_op *.
8356 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8357 with a single gimple_match_op *. Update calls to mprts_hook,
8358 build_call_internal and gimple_simplified_result_is_gimple_val.
8359 Factor out code that is common to the tree_code and combined_fn cases.
8360 * genmatch.c (expr::gen_transform): Replace tem_code and
8361 tem_ops with a gimple_match_op called tem_op. Update calls
8362 to the gimple_resimplify functions and maybe_push_res_to_seq.
8363 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8364 res_ops. Update call to the gimple_resimplify functions.
8365 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8366 (decision_tree::gen): Make the functions take a gimple_match_op *
8367 called res_op instead of separate res_code and res_ops parameters.
8368 Update call accordingly.
8369 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8370 and ops with a single res_op parameter. Update calls to
8371 maybe_build_generic_op and maybe_push_res_to_seq.
8372 (fold_stmt_1): Update calls to gimple_simplify and
8373 replace_stmt_with_simplification.
8374 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8375 and gimple_simplified_result_is_gimple_val.
8376 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8378 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8379 with a gimple_match_op *.
8380 (vn_nary_build_or_lookup): Likewise. Update call to
8381 vn_nary_build_or_lookup_1.
8382 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8383 gimple_match_op *. Update calls to the gimple_resimplify routines
8384 and to gimple_simplified_result_is_gimple_val.
8385 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8386 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8387 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8388 (visit_nary_op): Likewise.
8389 (visit_reference_op_load): Likewise.
8391 2018-05-23 Luis Machado <luis.machado@linaro.org>
8393 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8394 modifier for printing the step amount.
8396 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8399 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8402 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8404 * doc/sourcebuild.texi (Endianness): New subsubsection.
8406 2018-05-23 Luis Machado <luis.machado@linaro.org>
8408 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8409 <prefetch_dynamic_strides>: New const bool field.
8410 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8411 prefetch_dynamic_strides.
8412 (exynosm1_prefetch_tune): Likewise.
8413 (thunderxt88_prefetch_tune): Likewise.
8414 (thunderx_prefetch_tune): Likewise.
8415 (thunderx2t99_prefetch_tune): Likewise.
8416 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8418 (aarch64_override_options_internal): Update to set
8419 PARAM_PREFETCH_DYNAMIC_STRIDES.
8420 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8421 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8422 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8423 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8424 prefetch-dynamic-strides setting.
8426 2018-05-23 Luis Machado <luis.machado@linaro.org>
8428 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8429 <minimum_stride>: New const int field.
8430 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8431 minimum_stride field defaulting to -1.
8432 (exynosm1_prefetch_tune): Likewise.
8433 (thunderxt88_prefetch_tune): Likewise.
8434 (thunderx_prefetch_tune): Likewise.
8435 (thunderx2t99_prefetch_tune): Likewise.
8436 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8437 <default_opt_level>: Set to 3.
8438 (aarch64_override_options_internal): Update to set
8439 PARAM_PREFETCH_MINIMUM_STRIDE.
8440 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8441 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8442 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8443 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8444 stride is constant and is below the minimum stride threshold.
8446 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8448 * config/arm/arm-cpus.in (mode26): Delete.
8449 (armv4): Delete mode26 reference.
8450 * config/arm/arm.c (arm_configure_build_target): Delete use of
8453 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8455 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8457 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8458 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8460 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8461 (floatunsdidf2): Ditto.
8463 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8465 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8466 (fixuns_trunc<mode>si2_avx512f): Ditto.
8467 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8468 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8469 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8471 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8473 PR rtl-optimization/79985
8474 * df-scan.c (df_insn_refs_collect): Remove special case for
8475 global registers and asm statements.
8477 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8479 * extend.texi (Global Register Variables): Rewrite the bullet list.
8480 Note that the register is available for allocation. Note that access
8481 via inline asm must use constraints. Add note about async-signal
8482 handlers. Remove paragraph about automagic register selection.
8484 2018-05-23 Richard Biener <rguenther@suse.de>
8486 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8487 of fixed offset from memset VN.
8489 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8491 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8493 (alloc_cand_and_find_basis): Initialize first_interp field.
8494 (slsr_process_mul): Modify first_interp field.
8495 (slsr_process_add): Likewise.
8496 (slsr_process_cast): Modify first_interp field for each new
8498 (slsr_process_copy): Likewise.
8499 (dump_candidate): Dump first_interp field.
8500 (replace_mult_candidate): Process all interpretations, not just
8502 (replace_rhs_if_not_dup): Likewise.
8503 (replace_one_candidate): Likewise.
8505 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8507 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8509 (aarch64_needs_frame_chain): New function.
8510 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8512 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8515 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8516 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8517 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8518 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8519 as true for strict-align.
8520 (aarch64_can_inline_p): Perform checks even when callee has no
8521 attributes to check for strict alignment.
8522 * doc/extend.texi (AArch64 Function Attributes): Document
8524 * doc/invoke.texi: (AArch64 Options): Likewise.
8526 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8528 PR tree-optimization/85853
8529 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8530 the handling of the root of the node to...
8531 (vect_slp_analyze_node_operations_1): ...this new function,
8532 and run the whole thing with the child nodes' def types
8533 set according to their SLP node's def type.
8535 2018-05-23 Richard Biener <rguenther@suse.de>
8538 * tree-data-ref.c (create_runtime_alias_checks): Defer
8539 and ignore overflow warnings.
8541 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8543 PR tree-optimization/85822
8544 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8547 2018-05-23 Richard Biener <rguenther@suse.de>
8549 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8550 memset constants via native_interpret_expr.
8552 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8555 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8557 (cgraph_node::create_alias): Likewise.
8558 (cgraph_node::get_availability): Check ifunc_resolver instead
8559 of looking up ifunc attribute.
8560 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8561 * varasm.c (do_assemble_alias): Likewise.
8562 (assemble_alias): Likewise.
8563 (default_binds_local_p_3): Likewise.
8564 * cgraph.h (cgraph_node): Add ifunc_resolver.
8565 (cgraph_node::only_called_directly_or_aliased_p): Return false
8567 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8569 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8570 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8571 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8572 instead of looking up ifunc attribute.
8574 2018-05-22 Luis Machado <luis.machado@linaro.org>
8576 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8578 2018-05-22 Martin Sebor <msebor@redhat.com>
8581 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8582 only when expasion succeeds.
8583 (expand_builtin_strcmp): Same.
8584 (expand_builtin_strncmp): Same.
8586 2018-05-22 Martin Sebor <msebor@redhat.com>
8588 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8590 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8591 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8593 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8594 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8596 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8597 Add check for legitimate_address.
8598 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8599 (aarch64_swap_ldrstr_operands): New.
8600 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8603 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8604 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8606 * config/aarch64/aarch64.md: New patterns to generate stp
8608 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8609 single words and double words.
8610 (load_pair_sw, load_pair_dw): Likewise.
8611 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8613 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8615 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8616 for different mode ldpstp and add peephole for merged zero stores.
8618 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8620 (aarch64_gen_store_pair): Rename calls to match new patterns.
8621 (aarch64_gen_load_pair): Rename calls to match new patterns.
8622 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8623 (load_pair<DREG:mode><DREG2:mode>): ... This.
8624 (store_pair<mode>): Rename to...
8625 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8626 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8628 (V_INT_EQUIV): Handle SImode.
8629 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8632 2018-05-22 Martin Sebor <msebor@redhat.com>
8635 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8636 or ajust the presumed bound on an operation to avoid unnecessary
8639 2018-05-22 Martin Sebor <msebor@redhat.com>
8641 PR tree-optimization/85826
8642 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8643 assuming that a DECL necesarily has a constant size.
8645 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8648 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8650 2018-05-22 Richard Biener <rguenther@suse.de>
8652 PR tree-optimization/85834
8653 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8654 non-constant and non-zero memset arguments.
8656 2018-05-22 Martin Liska <mliska@suse.cz>
8659 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8661 2018-05-22 Richard Biener <rguenther@suse.de>
8663 PR tree-optimization/85863
8664 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8665 comparisons when vectype is specified.
8666 (vectorizable_condition): Do not specify vectype for
8667 vect_is_simple_cond when SLP vectorizing.
8669 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8672 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8673 define __ibm128 as long double.
8674 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8675 as a distinct type when IEEE 128-bit support is enabled.
8676 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8677 128-bit types to use the correct functions.
8678 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8679 convert between 128-bit floating point types that have different
8680 modes but the same representation, instead of using gen_lowpart to
8682 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8684 (IFKF_reg): New attributes to give the register constraints for
8686 (extend<mode>tf2_internal): New insns to mark an explicit
8687 conversion between 128-bit floating point types that have a
8688 different mode but share the same representation.
8690 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8692 PR tree-optimization/85814
8693 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8694 a null return from get_strinfo when unsharing the next
8695 strinfo in the chain.
8697 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8700 * varasm.c (weak_finish): Clean up weak_decls.
8702 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8704 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8705 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8706 UNSPEC_UADALP values.
8707 * config/aarch64/iterators.md (ABAL): New int iterator.
8710 (sur): Add mappings for the above.
8711 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8713 (aarch64_<sur>abal<mode>_4): Likewise.
8714 (aarch64_<sur>adalp<mode>_3): Likewise.
8715 (<sur>sadv16qi): New define_expand.
8717 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8719 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8720 (*movdf_internal): Ditto.
8721 (*rcpsf2_sse): Ditto.
8722 (*rsqrtsf2_sse): Ditto.
8723 (*sqrt<mode>2_sse): Ditto.
8725 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8727 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8729 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8730 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8731 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8732 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8734 * config/aarch64/arm_neon.h: Likewise.
8735 * config/aarch64/iterators.md (VQ_I): New.
8737 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8739 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8741 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8744 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8746 * config/nds32/constraints.md (S): New constraint.
8747 * config/nds32/nds32.md (call_internal): Use constraint S.
8748 (call_value_internal): Likewise.
8749 (sibcall_internal): Likewise.
8750 (sibcall_value_internal): Likewise.
8752 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8753 Chung-Ju Wu <jasonwucj@gmail.com>
8755 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8758 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8759 Chung-Ju Wu <jasonwucj@gmail.com>
8761 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8762 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8763 (nds32_rtx_costs_impl): Simplify.
8764 (nds32_address_cost_impl): Simplify.
8765 (nds32_init_rtx_costs): New function.
8766 (nds32_rtx_costs_speed_prefer): Likewise.
8767 (nds32_rtx_costs_size_prefer): Likewise.
8768 (nds32_address_cost_speed_prefer): Likewise.
8769 (nds32_address_cost_speed_fwprop): Likewise.
8770 (nds32_address_cost_size_prefer): Likewise.
8771 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8772 * config/nds32/nds32.c (nds32_option_override): Use
8773 nds32_init_rtx_costs function.
8775 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8777 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8778 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8779 (TARGET_PIPELINE_N8): Likewise.
8780 (TARGET_PIPELINE_N10): Likewise.
8781 (TARGET_PIPELINE_N13): Likewise.
8782 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8784 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8786 * config/nds32/nds32-fpu.md: Update copyright year.
8788 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8790 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8792 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8794 * config/nds32/nds32.c
8795 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8796 * config/nds32/nds32.opt (minline-asm-r15): New option.
8798 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8800 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8802 * config/nds32/nds32.md (abssi2): New pattern.
8804 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8806 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8807 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8808 Merge insn pattern from sse_cvtsi2ss<round_name> and
8809 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8810 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8811 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8812 using SWI48 mode iterator.
8813 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8814 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8815 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8816 pattern from sse_cvttss2si<round_saeonly_name>
8817 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8818 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8819 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8820 using SWI48 mode iterator.
8821 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8822 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8823 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8824 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8825 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8826 using SWI48 mode iterator.
8827 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8828 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8829 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8830 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8831 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8832 SWI48 mode iterator.
8833 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8834 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8835 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8836 pattern from sse_cvttsd2si<round_saeonly_name>
8837 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8839 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8841 * config/nds32/nds32-md-auxiliary.c
8842 (nds32_valid_smw_lwm_base_p): Refine.
8843 (nds32_output_smw_single_word): Refine.
8844 (nds32_output_smw_double_word): New.
8845 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8847 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8849 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8850 (nds32_output_stack_pop): Refine.
8851 (nds32_expand_unaligned_load): Refine.
8852 (nds32_expand_unaligned_store): Refine.
8854 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8855 Chung-Ju Wu <jasonwucj@gmail.com>
8857 * config/nds32/constants.md: Add TP_REGNUM constant.
8858 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8859 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8861 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8862 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8863 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8864 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8865 and PIC code generation.
8866 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8868 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8870 * config/nds32/nds32.md: Support TLS and PIC.
8871 * config/nds32/nds32.c: Support TLS and PIC.
8872 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8873 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8876 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8878 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8879 mode with E_ prefix.
8881 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8882 Chung-Ju Wu <jasonwucj@gmail.com>
8884 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8885 * config/nds32/nds32-md-auxiliary.c
8886 (symbolic_reference_mentioned_p): New.
8887 (nds32_legitimize_ict_address): New.
8888 (nds32_expand_ict_move): New.
8889 (nds32_indirect_call_referenced_p): New.
8890 (nds32_symbol_binds_local_p): Delete.
8891 (nds32_long_call_p): Modify.
8892 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8893 * config/nds32/nds32-protos.h
8894 (symbolic_reference_mentioned_p): Declare.
8895 (nds32_legitimize_ict_address): Declare.
8896 (nds32_expand_ict_move): Declare.
8897 (nds32_indirect_call_referenced_p): Declare.
8898 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8899 (nds32_relax_group): Use nds32_ict_const_p as condition.
8900 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8901 (nds32_asm_file_start): Output ict_model directive in asm code.
8902 (nds32_legitimate_address_p): Consider indirect call.
8903 (nds32_print_operand): Consider indirect call.
8904 (nds32_print_operand_address): Consider indirect call.
8905 (nds32_insert_attributes): Handle "indirect_call" attribute.
8906 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8907 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8908 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8909 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8910 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8911 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8912 (TARGET_ICT_MODEL_SMALL): Define.
8913 (TARGET_ICT_MODEL_LARGE): Define.
8914 * config/nds32/nds32.md (movsi): Consider ict model.
8915 (call, call_value): Consider ict model.
8916 (sibcall, sibcall_value): Consider ict model.
8917 * config/nds32/nds32.opt (mict-model): New option.
8918 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8921 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8922 Monk Chiang <sh.chiang04@gmail.com>
8923 Jim Wilson <jimw@sifive.com>
8925 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8926 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8927 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8928 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8929 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8930 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8931 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8932 compute save_libcall_adjustment properly.
8933 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8934 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8935 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8936 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8937 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8938 (ABI_SPEC): Handle mabi=ilp32e.
8939 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8940 (RVE): Add RVE mask.
8941 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8942 <-march>: Add rv32e as an example.
8944 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8947 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8948 (intra_create_variable_infos): Handle C++ constructors.
8950 2018-05-18 Martin Liska <mliska@suse.cz>
8952 * passes.def: Remove a redundant pass.
8954 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8957 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8959 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8961 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8963 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8965 (armv2, armv2a, armv3, armv3m): Delete architectures.
8966 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8967 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8968 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8970 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8971 (*mulsidi3adddi): Likewise.
8972 (mulsidi3): Likewise.
8973 (*mulsidi3_nov6): Likewise.
8974 (umulsidi3): Likewise.
8975 (umulsidi3_nov6): Likewise.
8976 (umaddsidi4): Likewise.
8977 (*umulsidi3adddi): Likewise.
8978 (smulsi3_highpart): Likewise.
8979 (*smulsi3_highpart_nov6): Likewise.
8980 (umulsi3_highpart): Likewise.
8981 (*umulsi3_highpart_nov6): Likewise.
8982 * config/arm/arm.h (arm_arch3m): Delete.
8983 * config/arm/arm.c (arm_arch3m): Delete.
8984 (arm_option_override_internal): Update armv3-related comment.
8985 (arm_configure_build_target): Delete use of isa_bit_mode32.
8986 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8987 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8988 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8990 (mulusa3): Likewise.
8991 * config/arm/arm-protos.h (arm_arch3m): Delete.
8992 * config/arm/arm-tables.opt: Regenerate.
8993 * config/arm/arm-tune.md: Likewise.
8994 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8995 deleted architectures.
8997 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8999 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9000 (armv5t, armv5te): New features.
9001 (ARMv5, ARMv5e): Delete fgroups.
9002 (ARMv5t, ARMv5te): Adjust for above changes.
9004 (armv5, armv5e): Delete arches.
9005 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9007 (*call_reg_arm): Likewise.
9008 (*call_value_reg_armv5): Likewise.
9009 (*call_value_reg_arm): Likewise.
9010 (*call_symbol): Likewise.
9011 (*call_value_symbol): Likewise.
9012 (*sibcall_insn): Likewise.
9013 (*sibcall_value_insn): Likewise.
9015 (prefetch): Likewise.
9016 (define_split and define_peephole2 dependent on arm_arch5):
9018 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9020 (TARGET_ARM_QBIT): Likewise.
9021 (TARGET_DSP_MULTIPLY): Likewise.
9022 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9023 (arm_arch5, arm_arch5e): Delete.
9024 (arm_arch5t, arm_arch5te): Declare.
9025 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9026 (arm_arch5t): Declare.
9027 (arm_option_reconfigure_globals): Update for the above.
9028 (arm_options_perform_arch_sanity_checks): Update comment, replace
9029 use of arm_arch5 with arm_arch5t.
9030 (use_return_insn): Likewise.
9031 (arm_emit_call_insn): Likewise.
9032 (output_return_instruction): Likewise.
9033 (arm_final_prescan_insn): Likewise.
9034 (arm_coproc_builtin_available): Likewise.
9035 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9036 arm_arch5e with arm_arch5t and arm_arch5te.
9037 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9038 (arm_arch5t, arm_arch5te): Declare.
9039 * config/arm/arm-tables.opt: Regenerate.
9040 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9041 * config/arm/t-multilib: Likewise.
9042 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9043 instead of arm_arch5.
9044 (*call_reg_thumb1): Likewise.
9045 (*call_value_reg_thumb1_v5): Likewise.
9046 (*call_value_reg_thumb1): Likewise.
9047 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9049 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9051 2018-05-18 Martin Liska <mliska@suse.cz>
9053 PR gcov-profile/84846
9054 * doc/gcov.texi: Document -t option of gcov tool.
9056 2018-05-18 Martin Liska <mliska@suse.cz>
9058 PR gcov-profile/84846
9059 * gcov.c (print_usage): Add new -t option.
9060 (process_args): Handle the option.
9061 (generate_results): Use stdout as output when requested by
9064 2018-05-18 Martin Liska <mliska@suse.cz>
9066 PR gcov-profile/84846
9067 * coverage.c (coverage_init): Write PWD to .gcno file.
9068 * doc/gcov.texi: Document how working directory is printed.
9069 * gcov-dump.c (dump_gcov_file): Print PWD.
9070 * gcov.c (output_intermediate_file): Likewise.
9071 (read_graph_file): Read PWD string.
9072 (output_lines): Print PWD.
9074 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9077 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9078 for retval and return false if all args to phi are zero.
9080 2018-05-18 Richard Biener <rguenther@suse.de>
9082 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9084 (evrp_dom_walker::before_dom_children): Call it.
9086 2018-05-18 Richard Biener <rguenther@suse.de>
9088 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9089 results when processing array refs with variable index.
9091 2018-05-18 Toon Moene <toon@moene.org>
9093 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9094 directly after that of -floop-interchange. Indicate that both
9095 options are enabled by default when specifying -O3.
9097 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9099 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9100 iterator. Delete separate integer-mode vec_set<mode> expander.
9101 (aarch64_simd_vec_setv2di): Delete.
9102 (vec_setv2di): Delete.
9103 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9104 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9105 the "w, r" alternative.
9107 2018-05-18 Martin Liska <mliska@suse.cz>
9109 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9110 * tree-pass.h (make_pass_lower_switch_O0): New function.
9111 * tree-switch-conversion.c (node_has_low_bound): Remove.
9112 (node_has_high_bound): Likewise.
9113 (node_is_bounded): Likewise.
9114 (class pass_lower_switch): Make it a template type and create
9116 (pass_lower_switch::execute): Add template argument.
9117 (make_pass_lower_switch): New function.
9118 (make_pass_lower_switch_O0): New function.
9119 (do_jump_if_equal): Remove.
9120 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9121 all the hard work to tree optimization passes.
9123 2018-05-18 Martin Liska <mliska@suse.cz>
9125 * dbgcnt.c (limit_low): Renamed from limit.
9126 (limit_high): New variable.
9127 (dbg_cnt_is_enabled): Check for upper limit.
9128 (dbg_cnt): Adjust dumping.
9129 (dbg_cnt_set_limit_by_index): Add new argument for high
9131 (dbg_cnt_set_limit_by_name): Likewise.
9132 (dbg_cnt_process_single_pair): Parse new format.
9133 (dbg_cnt_process_opt): Use strtok.
9134 (dbg_cnt_list_all_counters): Remove 'value' and add
9136 * doc/invoke.texi: Document changes.
9138 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9140 * doc/sourcebuild.texi (scalar_all_fma): Document.
9141 * tree.def (FMA_EXPR): Delete.
9142 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9143 * internal-fn.c (ternary_direct): New macro.
9144 (expand_ternary_optab_fn): Likewise.
9145 (direct_ternary_optab_supported_p): Likewise.
9146 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9147 * builtins.c (fold_builtin_fma): Delete.
9148 (fold_builtin_3): Don't call it.
9149 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9150 * expr.c (expand_expr_real_2): Likewise.
9151 * fold-const.c (operand_equal_p): Likewise.
9152 (fold_ternary_loc): Likewise.
9153 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9154 * gimple.c (DEFTREECODE): Likewise.
9155 * gimplify.c (gimplify_expr): Likewise.
9156 * optabs-tree.c (optab_for_tree_code): Likewise.
9157 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9158 * tree-eh.c (operation_could_trap_p): Likewise.
9159 (stmt_could_throw_1_p): Likewise.
9160 * tree-inline.c (estimate_operator_cost): Likewise.
9161 * tree-pretty-print.c (dump_generic_node): Likewise.
9162 (op_code_prio): Likewise.
9163 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9164 * tree-ssa-operands.c (get_expr_operands): Likewise.
9165 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9166 * fold-const-call.h (fold_fma): Delete.
9167 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9168 CFN_FNMA and CFN_FNMS.
9170 * genmatch.c (combined_fn): New enum.
9171 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9172 (commutative_op): New function.
9173 (commutate): Use it. Handle more than 2 operands.
9174 (dt_operand::gen_gimple_expr): Use commutative_op.
9175 (parser::parse_expr): Allow :c to be used with non-binary
9176 operators if the commutative operand is known.
9177 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9178 CFN_FMS, CFN_FNMA and CFN_FNMS.
9179 (backprop::process_assign_use): Remove FMA_EXPR handling.
9180 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9181 (gen_hsa_fma): New function.
9182 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9183 IFN_FNMA and IFN_FNMS.
9184 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9185 * gimple-fold.h (follow_all_ssa_edges): Declare.
9186 * gimple-fold.c (follow_all_ssa_edges): New function.
9187 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9188 gimple_build interface and use follow_all_ssa_edges to fold the result.
9189 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9190 instead of checking for optabs directly.
9191 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9192 rather than FMA_EXPRs.
9193 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9194 call to IFN_FMA instead of an FMA_EXPR.
9196 2018-05-17 Jim Wilson <jimw@sifive.com>
9198 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9199 sign extended promoted subreg, and the range does not have the sign bit
9200 set, then do a sign extend.
9202 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9203 test, check for sign extended subreg and/or constant operands, and
9204 do a sign extend in that case.
9206 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9208 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9209 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9211 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9212 Change logics_shift_reg to logics_shift_imm.
9213 (thunderx2t99_fp_loadpair_basic): Delete.
9214 (thunderx2t99_fp_storepair_basic): Delete.
9215 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9216 (thunderx2t99_asimd_polynomial): Delete.
9217 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9218 and neon_fp_mul_d_scalar_q.
9219 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9220 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9221 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9222 (thunderx2t99_asimd_lut): Add missing tbl types.
9223 (thunderx2t99_asimd_ext): Delete.
9224 (thunderx2t99_asimd_load1_1_mult): Delete.
9225 (thunderx2t99_asimd_load1_2_mult): Delete.
9226 (thunderx2t99_asimd_load1_ldp): New.
9227 (thunderx2t99_asimd_load1): New.
9228 (thunderx2t99_asimd_load2): Add missing *load2* types.
9229 (thunderx2t99_asimd_load3): New.
9230 (thunderx2t99_asimd_load4): New.
9231 (thunderx2t99_asimd_store1_1_mult): Delete.
9232 (thunderx2t99_asimd_store1_2_mult): Delete.
9233 (thunderx2t99_asimd_store2_mult): Delete.
9234 (thunderx2t99_asimd_store2_onelane): Delete.
9235 (thunderx2t99_asimd_store_stp): New.
9236 (thunderx2t99_asimd_store1): New.
9237 (thunderx2t99_asimd_store2): New.
9238 (thunderx2t99_asimd_store3): New.
9239 (thunderx2t99_asimd_store4): New.
9241 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9243 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9244 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9246 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9247 Segher Boessenkool <segher@kernel.crashing.org>
9250 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9253 2018-05-17 Richard Biener <rguenther@suse.de>
9255 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9256 for pruning loop and prune defs feeding only already visited PHIs.
9258 2018-05-17 Richard Biener <rguenther@suse.de>
9260 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9262 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9263 Richard Biener <rguenther@suse.de>
9265 PR tree-optimization/85793
9266 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9267 for VMAT_ELEMENTWISE.
9269 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9271 * internal-fn.h (lookup_internal_fn): Declare
9272 * internal-fn.c (lookup_internal_fn): New function.
9273 * gimple.c (gimple_build_call_from_tree): Handle calls to
9275 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9276 internal function names.
9277 * tree-pretty-print.c (dump_generic_node): Likewise.
9278 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9280 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9282 * gimple-fold.h (gimple_build): Make the function forms take
9283 combined_fn rather than built_in_function.
9284 (gimple_simplify): Likewise.
9285 * gimple-match-head.c (gimple_simplify): Likewise.
9286 * gimple-fold.c (gimple_build): Likewise.
9287 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9288 rather than gimple_build_call_internal.
9289 (get_initial_defs_for_reduction): Likewise.
9290 (vect_create_epilog_for_reduction): Likewise.
9291 (vectorizable_live_operation): Likewise.
9293 2018-05-17 Martin Liska <mliska@suse.cz>
9295 * gimple-ssa-sprintf.c (format_directive): Do not use
9296 space in between 'G_' and '('.
9298 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9301 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9302 even if the mask is not all ones.
9305 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9307 (ix86_gimple_fold_builtin): Likewise.
9310 * config/i386/i386.c: Include tree-vector-builder.h.
9311 (ix86_vector_shift_count): New function.
9312 (ix86_fold_builtin): Fold shift builtins by scalar count.
9313 (ix86_gimple_fold_builtin): Likewise.
9315 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9316 _mm512_setzero): New intrinsics.
9318 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9319 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9321 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9322 code generation for cases where splatting a value is not useful.
9323 * simplify-rtx.c (simplify_ternary_operation): Simplify
9324 vec_merge across a vec_duplicate and a paradoxical subreg forming
9325 a vector mode to a vec_concat.
9327 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9329 * config.gcc: Support "goldmont-plus".
9330 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9332 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9333 PROCESSOR_GOLDMONT_PLUS.
9334 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9335 (processor_target_table): Add "goldmont-plus".
9336 (PTA_GOLDMONT_PLUS): Define.
9337 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9338 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9339 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9340 (fold_builtin_cpu): Add "goldmont-plus".
9341 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9342 (ix86_option_override_internal): Add "goldmont-plus".
9343 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9344 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9345 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9346 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9348 2018-05-17 Richard Biener <rguenther@suse.de>
9350 PR tree-optimization/85757
9351 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9352 remove defs that only feed that PHI from further processing.
9354 2018-05-16 Jim Wilson <jimw@sifive.com>
9356 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9358 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9360 2018-05-16 Mark Wielaard <mark@klomp.org>
9362 * dwarf2out.c (count_index_strings): New function.
9363 (output_indirect_strings): Call count_index_strings and generate
9364 header for dwarf_version >= 5.
9366 2018-05-16 Mark Wielaard <mark@klomp.org>
9368 * dwarf2out.c (dwarf_FORM): New function.
9369 (set_indirect_string): Use dwarf_FORM.
9370 (reset_indirect_string): Likewise.
9371 (size_of_die): Likewise.
9372 (value_format): Likewise.
9373 (output_die): Likewise.
9374 (add_skeleton_AT_string): Likewise.
9375 (output_macinfo_op): Likewise.
9376 (index_string): Likewise.
9377 (output_index_string_offset): Likewise.
9378 (output_index_string): Likewise.
9379 (count_index_strings): Likewise.
9381 2018-05-16 Carl Love <cel@us.ibm.com>
9383 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9384 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9386 2018-05-16 Martin Jambor <mjambor@suse.cz>
9388 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9389 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9391 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9393 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9394 (fnma<mode>4): Likewise.
9395 (fms<mode>4): Likewise.
9396 (fnms<mode>4): Likewise.
9397 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9398 (aarch64_fnma<mode>4): Likewise.
9399 (aarch64_fms<mode>4): Likewise.
9400 (aarch64_fnms<mode>4): Likewise.
9401 (aarch64_fnmadd<mode>4): Likewise.
9403 2018-05-16 Jason Merrill <jason@redhat.com>
9405 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9407 2018-05-16 Richard Biener <rguenther@suse.de>
9409 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9410 (dump_stmt_cost): Declare.
9411 (add_stmt_cost): Dump cost we add.
9412 (add_stmt_costs): New function.
9413 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9415 (vect_analyze_stmt): Adjust prototype.
9416 (vectorizable_condition): Likewise.
9417 (vectorizable_live_operation): Likewise.
9418 (vectorizable_reduction): Likewise.
9419 (vectorizable_induction): Likewise.
9420 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9421 cost vector to pass to vectorizable_ and record afterwards.
9422 (vect_model_reduction_cost): Take cost vector argument and adjust.
9423 (vect_model_induction_cost): Likewise.
9424 (vectorizable_reduction): Likewise.
9425 (vectorizable_induction): Likewise.
9426 (vectorizable_live_operation): Likewise.
9427 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9428 SLP_TREE_NUMBER_OF_VEC_STMTS.
9429 (vect_analyze_slp_cost_1): Remove.
9430 (vect_analyze_slp_cost): Likewise.
9431 (vect_slp_analyze_node_operations): Take visited args and
9432 a target cost vector. Avoid processing already visited stmt sets.
9433 (vect_slp_analyze_operations): Use a local cost vector to gather
9434 costs and register those of non-discarded instances.
9435 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9436 (vect_schedule_slp_instance): Remove copying of
9437 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9439 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9440 adding cost. Record cost entry location.
9441 (vect_prologue_cost_for_slp_op): Function to compute cost of
9442 a constant or invariant generated for SLP vect in the prologue,
9443 split out from vect_analyze_slp_cost_1.
9444 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9445 (vect_model_promotion_demotion_cost): Likewise.
9446 (vect_model_store_cost): Likewise, make static.
9447 (vect_model_load_cost): Likewise.
9448 (vectorizable_bswap): Add cost vector arg and adjust.
9449 (vectorizable_call): Likewise.
9450 (vectorizable_simd_clone_call): Likewise.
9451 (vectorizable_conversion): Likewise.
9452 (vectorizable_assignment): Likewise.
9453 (vectorizable_shift): Likewise.
9454 (vectorizable_operation): Likewise.
9455 (vectorizable_store): Likewise.
9456 (vectorizable_load): Likewise.
9457 (vectorizable_condition): Likewise.
9458 (vectorizable_comparison): Likewise.
9459 (can_vectorize_live_stmts): Likewise.
9460 (vect_analyze_stmt): Likewise.
9461 (vect_transform_stmt): Adjust calls to vectorizable_*.
9462 * tree-vectorizer.c: Include gimple-pretty-print.h.
9463 (dump_stmt_cost): New function.
9465 2018-05-16 Richard Biener <rguenther@suse.de>
9467 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9468 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9469 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9470 (check_name): New callback.
9471 (dse_classify_store): Track cycles via a visited bitmap of PHI
9472 defs and simplify handling of in-loop and across loop dead stores
9473 and properly fail for loop-variant refs. Handle byte-tracking with
9474 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9477 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9479 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9480 (vect_get_mask_type_for_stmt): Likewise.
9481 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9483 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9484 to determine the statement's vector type and the vector type that
9485 should be used for calculating nunits. Deal with cases in which
9486 the type has to be deferred.
9487 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9488 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9489 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9490 (vect_determine_vf_for_stmt): New functions, split out from...
9491 (vect_determine_vectorization_factor): ...here.
9492 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9493 (vect_get_mask_type_for_stmt): New functions, split out from
9494 vect_determine_vectorization_factor.
9496 2018-05-16 Richard Biener <rguenther@suse.de>
9498 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9499 verify the [VEC_]COND_EXPR embedded comparison.
9501 2018-05-15 Martin Sebor <msebor@redhat.com>
9503 PR tree-optimization/85753
9504 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9505 RECORD_TYPE in addition to ARRAY_TYPE.
9507 2018-05-15 Martin Sebor <msebor@redhat.com>
9510 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9512 2018-05-15 Richard Biener <rguenther@suse.de>
9514 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9515 add by_clobber_p one. Change algorithm to collect all defs
9516 representing uses we need to walk and try reducing them to
9517 a single one before failing.
9518 (dse_dom_walker::dse_optimize_stmt): Adjust.
9520 2018-05-13 Mark Wielaard <mark@klomp.org>
9522 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9523 (size_of_loc_descr): Likewise.
9524 (output_loc_operands): Likewise.
9525 (output_loc_operands_raw): Likewise.
9526 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9527 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9528 (hash_loc_operands): Likewise.
9529 (compare_loc_operands): Likewise.
9531 2018-05-14 Mark Wielaard <mark@klomp.org>
9533 * dwarf2out.c (count_index_addrs): New function.
9534 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9536 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9538 PR tree-optimization/83648
9539 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9540 return value as malloc candidate.
9542 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9545 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9546 param as true in call to suggest_attribute.
9548 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9550 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9551 -mreadonly-in-sdata.
9553 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9555 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9557 (aarch64_crypto_aesd_fused): Likewise.
9559 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9561 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9562 (movsi_aarch64): Likewise.
9563 (load_pairsi): Likewise.
9564 (load_pairdi): Likewise.
9565 (store_pairsi): Likewise.
9566 (store_pairdi): Likewise.
9567 (load_pairsf): Likewise.
9568 (load_pairdf): Likewise.
9569 (store_pairsf): Likewise.
9570 (store_pairdf): Likewise.
9571 (zero_extend): Likewise.
9572 (trunc): Swap alternatives.
9573 (fcvt_target): Add '?' to prefer w over r.
9575 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9578 * config/i386/i386.md: Disallow non-commutative arithmetics in
9579 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9580 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9581 in the peephole2 before it.
9583 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9585 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9586 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9587 (ix86_handle_option): Handle -mcldemote.
9588 * config.gcc: New header.
9589 * config/i386/cldemoteintrin.h: New file.
9590 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9591 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9593 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9594 OPTION_MASK_ISA_CLDEMOTE.
9595 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9596 (ix86_valid_target_attribute_inner_p): Ditto.
9597 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9598 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9599 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9600 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9601 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9603 * config/i386/i386.opt: Add -mcldemote.
9604 * config/i386/x86intrin.h: New header.
9605 * doc/invoke.texi: Add -mcldemote.
9607 2018-05-14 Richard Biener <rguenther@suse.de>
9609 * doc/match-and-simplify.texi: Adjust :s documentation.
9611 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9613 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9614 intended memcpy size.
9615 (REORDER_45): Likewise.
9617 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9619 * sort.cc: New file.
9620 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9621 * vec.c (qsort_chk): Use gcc_qsort.
9622 * Makefile.in (OBJS-libcommon): Add sort.o.
9623 (build/sort.o): New target. Use it...
9624 (BUILD_RTL): ... here, and...
9625 (build/gencfn-macros): ... here, and...
9626 (build/genmatch): ... here.
9628 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9629 Chung-Ju Wu <jasonwucj@gmail.com>
9631 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9632 * config/nds32/nds32-graywolf.md: New file.
9633 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9634 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9636 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9637 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9638 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9639 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9640 * config/nds32/pipelines.md: Include n15 settings.
9642 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9643 Chung-Ju Wu <jasonwucj@gmail.com>
9645 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9646 * config/nds32/nds32-n13.md: New file.
9647 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9648 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9650 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9651 * config/nds32/nds32.md (pipeline_model): Add n13.
9652 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9653 * config/nds32/pipelines.md: Include n13 settings.
9655 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9656 Chung-Ju Wu <jasonwucj@gmail.com>
9658 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9659 * config/nds32/nds32-n10.md: New file.
9660 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9661 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9663 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9664 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9665 * config/nds32/nds32.md (pipeline_model): Add n10.
9666 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9667 * config/nds32/pipelines.md: Include n10 settings.
9669 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9670 Kito Cheng <kito.cheng@gmail.com>
9671 Chung-Ju Wu <jasonwucj@gmail.com>
9673 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9674 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9675 Add enum values for DSP extension instructions.
9676 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9678 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9679 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9681 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9682 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9683 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9684 * config/nds32/nds32-intrinsic.md: Likewise.
9685 * config/nds32/nds32_intrinsic.h: Likewise.
9686 * config/nds32/nds32-md-auxiliary.c: Likewise.
9687 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9688 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9689 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9690 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9691 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9692 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9693 TYPE_DMAC in switch statement.
9694 * config/nds32/nds32.c: New checking and implementation for DSP
9695 extension instructions.
9696 * config/nds32/nds32.h: Likewise.
9697 * config/nds32/nds32.md: Likewise.
9698 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9699 * config/nds32/predicates.md: Implement new predicates for DSP
9702 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9704 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9705 Reformat alternatives and attributes so it is easier to identify
9706 which constraints/attributes go with which instruction.
9707 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9708 (mov<mode>_softfloat32, FMOVE64): Likewise.
9709 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9710 (mov<mode>_softfloat64, FMOVE64): Likewise.
9712 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9714 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9716 (Basic PowerPC Built-in Functions): The new name of the
9717 subsection previously known as "PowerPC Built-in Functions".
9718 (Basic PowerPC Built-in Functions Available on all Configurations):
9720 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9721 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9722 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9723 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9725 2018-05-11 Martin Jambor <mjambor@suse.cz>
9728 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9731 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9734 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9736 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9738 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9739 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9740 (ix86_handle_option): Handle -mwaitpkg.
9741 * config.gcc: New header.
9742 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9743 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9744 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9746 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9747 OPTION_MASK_ISA_WAITPKG.
9748 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9749 (ix86_option_override_internal): Add PTA_WAITPKG.
9750 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9751 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9752 IX86_BUILTIN_TPAUSE.
9753 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9754 __builtin_ia32_umwait and __builtin_ia32_tpause.
9755 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9756 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9757 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9758 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9759 UNSPECV_TPAUSE): New.
9760 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9761 * config/i386/i386.opt: Add -mwaitpkg.
9762 * config/i386/waitpkgintrin.h: New file.
9763 * config/i386/x86intrin.h: New header.
9764 * doc/invoke.texi: Add -mwaitpkg.
9766 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9769 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9771 (cortex-m0): Use armv6s-m isa.
9772 (cortex-m0plus): Likewise.
9773 (cortex-m1): Likewise.
9774 (cortex-m0.small-multiply): Likewise.
9775 (cortex-m0plus.small-multiply): Likewise.
9776 (cortex-m1.small-multiply): Likewise.
9778 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9779 Jakub Jelinek <jakub@redhat.com>
9781 PR tree-optimization/85692
9782 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9783 source permute as well.
9785 2018-05-11 Martin Liska <mliska@suse.cz>
9788 * doc/extend.texi: Document LLVM style format for no_sanitize
9791 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9793 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9794 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9795 (mode_supports_vsx_dform_quad): Likewise.
9796 (mode_supports_vmx_dform): Move these functions to be next to the
9797 other mode_supports functions.
9798 (mode_supports_dq_form): Likewise.
9799 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9800 mode_supports_dq_form.
9801 (reg_offset_addressing_ok_p): Likewise.
9802 (offsettable_ok_by_alignment): Likewise.
9803 (rs6000_legitimate_offset_address_p): Likewise.
9804 (legitimate_lo_sum_address_p): Likewise.
9805 (rs6000_legitimize_address): Likewise.
9806 (rs6000_legitimize_reload_address): Likewise.
9807 (rs6000_secondary_reload_inner): Likewise.
9808 (rs6000_preferred_reload_class): Likewise.
9809 (rs6000_output_move_128bit): Likewise.
9811 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9813 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9814 Generate SImode target register for null target.
9815 <case IX86_BUILTIN_XGETBV>: Ditto.
9816 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9817 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9819 2018-05-10 Carl Love <cel@us.ibm.com>
9821 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9822 dcbtt and dcbtstt if operands[2] is 0.
9824 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9827 * config/i386/sse.md (usadv64qi): New expander.
9829 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9831 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9832 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9833 -maltivec=be support.
9834 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9835 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9836 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9837 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9838 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9839 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9840 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9841 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9842 altivec_vsumsws): Adjust.
9843 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9844 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9845 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9847 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9848 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9849 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9850 (altivec_lve<VI_char>x): Delete expand.
9851 (*altivec_lve<VI_char>x_internal): Rename to...
9852 (altivec_lve<VI_char>x): ... this.
9853 (altivec_lvxl_<mode>): Delete expand.
9854 (*altivec_lvxl_<mode>_internal): Rename to ...
9855 (altivec_lvxl_<mode>): ... this.
9856 (altivec_stvxl_<mode>): Delete expand.
9857 (*altivec_stvxl_<mode>_internal): Rename to ...
9858 (altivec_stvxl_<mode>): ... this.
9859 (altivec_stve<VI_char>x): Delete expand.
9860 (*altivec_stve<VI_char>x_internal): Rename to ...
9861 (altivec_stve<VI_char>x): ... this.
9862 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9863 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9864 reduc_plus_scal_<mode>): Adjust.
9865 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9867 (rs6000_cpu_cpp_builtins): Adjust.
9868 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9869 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9870 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9872 -maltivec=be support.
9873 (rs6000_split_vec_extract_var): Adjust.
9874 (rs6000_split_v4si_init): Adjust.
9875 (swap_selector_for_mode): Delete.
9876 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9877 altivec_expand_stvex_be): Delete.
9878 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9879 -maltivec=be support.
9880 (rs6000_gimple_fold_builtin): Ditto.
9881 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9883 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9884 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9885 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9886 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9887 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9888 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9889 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9890 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9891 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9892 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9893 anonymous split): Adjust.
9894 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9895 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9897 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9899 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9900 when --with-gxx-include-dir is also specified.
9901 * configure: Regenerate.
9903 2018-05-09 Jim Wilson <jimw@sifive.com>
9906 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9907 * config/riscv/t-withmultilib: New.
9908 * config/riscv/withmultilib.h: New.
9909 * doc/install.texi: Document RISC-V --with-multilib-list support.
9911 2018-05-09 Richard Biener <rguenther@suse.de>
9913 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9915 (vect_bb_vectorization_profitable_p): Adjust. Compute
9916 actual scalar cost using the cost vector and the add_stmt_cost
9919 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9921 PR rtl-optimization/85645
9922 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9923 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9925 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9927 PR rtl-optimization/85645
9928 * shrink-wrap.c (spread_components): Return a boolean saying if
9929 anything was changed.
9930 (try_shrink_wrapping_separate): Iterate spread_components until
9931 nothing changes anymore.
9933 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9935 PR rtl-optimization/85645
9936 * regrename.c (build_def_use): Also kill the chains that include the
9937 destination of a REG_CFA_REGISTER note.
9939 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9941 PR rtl-optimization/85645
9942 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9943 insn that has a REG_CFA_REGISTER note.
9945 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9947 * cfgexpand.c (expand_clobber): New function.
9948 (expand_gimple_stmt_1): Use it.
9949 * tree-vect-stmts.c (vect_clobber_variable): New function,
9951 (vectorizable_simd_clone_call): ...here.
9952 (vectorizable_store): Emit a clobber either side of an
9953 IFN_STORE_LANES sequence.
9954 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9956 2018-05-09 Tom de Vries <tom@codesourcery.com>
9959 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9960 (define_insn "trap_if_false"): Add exit after trap.
9962 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9964 PR rtl-optimization/85638
9965 * bb-reorder.c: Include common/common-target.h.
9966 (create_forwarder_block): New function extracted from...
9967 (fix_up_crossing_landing_pad): ...here. Rename into...
9968 (dw2_fix_up_crossing_landing_pad): ...this.
9969 (sjlj_fix_up_crossing_landing_pad): New function.
9970 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9971 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9972 from both partitions and exit the loop after one iteration.
9974 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9977 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9979 (Basic PowerPC Built-in Functions): The new name of the
9980 subsection previously known as "PowerPC Built-in Functions".
9981 (Basic PowerPC Built-in Functions Available on all Configurations):
9983 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9985 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9987 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9989 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9992 2018-05-08 Jim Wilson <jimw@sifive.com>
9994 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9995 (LD_EMUL_SUFFIX): New.
9996 (LINK_SPEC): Use it.
9998 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10000 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10002 (Basic PowerPC Built-in Functions): The new name of the
10003 subsection previously known as "PowerPC Built-in Functions".
10004 (Basic PowerPC Built-in Functions Available on all Configurations):
10006 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10008 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10010 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10012 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10015 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10018 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10019 after cmpelim optimization.
10021 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10023 * config.gcc: Support "goldmont".
10024 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10025 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10026 PROCESSOR_GOLDMONT.
10027 * config/i386/i386.c (m_GOLDMONT): Define.
10028 (processor_target_table): Add "goldmont".
10029 (PTA_GOLDMONT): Define.
10030 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10031 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10032 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10033 (fold_builtin_cpu): Add "goldmont".
10034 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10035 (ix86_option_override_internal): Add "goldmont".
10036 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10037 (processor_type): Add PROCESSOR_GOLDMONT.
10038 * config/i386/i386.md: Add CPU "glm".
10039 * config/i386/glm.md: New file.
10040 * config/i386/x86-tune.def: Add m_GOLDMONT.
10041 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10043 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10046 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10048 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10049 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10050 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10053 * config/i386/i386.c (ix86_fold_builtin): Handle
10054 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10057 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10058 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10060 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10063 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10064 (check_arch): Likewise.
10065 (check_fpu): Return the result rather than printing it.
10066 (end arch): Fix operator precedence.
10067 (end cpu): Likewise.
10068 (END): Print the result from check_fpu.
10070 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10071 Alan Hayward <alan.hayward@arm.com>
10072 David Sherwood <david.sherwood@arm.com>
10074 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10075 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10076 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10077 (*fcmuo<mode>_and): New patterns.
10079 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10081 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10082 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10083 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10084 (cmp_op, sve_imm_con): New code attributes.
10085 (SVE_COND_INT_CMP, imm_con): Delete.
10086 (cmp_op): Remove above unspecs from int attribute.
10087 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10089 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10090 comparison-specific unspecs.
10091 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10092 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10093 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10094 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10095 (*vec_fcm<cmp_op><mode>): Rename to...
10096 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10097 (*vec_fcmuo<mode>): Rename to...
10098 (*fcmuo<mode>): ...this and adjust likewise.
10099 (*pred_fcm<cmp_op><mode>): New pattern.
10100 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10101 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10103 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10105 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10106 (aarch64_emit_sve_predicated_cond): New function.
10107 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10108 (aarch64_emit_unspec_cond_or): Replace with...
10109 (aarch64_emit_sve_or_conds): ...this new function. Use
10110 aarch64_emit_sve_ptrue_op for the individual comparisons and
10111 aarch64_emit_binop to OR them together.
10112 (aarch64_emit_inverted_unspec_cond): Replace with...
10113 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10114 aarch64_emit_sve_ptrue_op for the comparison and
10115 aarch64_emit_unop to invert the result.
10116 (aarch64_expand_sve_vec_cmp_float): Update after the above
10117 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10119 2018-05-07 Nathan Sidwell <nathan@acm.org>
10121 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10122 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10123 (Backwards Compatibility): Likewise.
10125 2018-05-07 Luis Machado <luis.machado@linaro.org>
10129 2018-05-07 Luis Machado <luis.machado@linaro.org>
10131 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10132 <prefetch_dynamic_strides>: New const bool field.
10133 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10134 prefetch_dynamic_strides.
10135 (exynosm1_prefetch_tune): Likewise.
10136 (thunderxt88_prefetch_tune): Likewise.
10137 (thunderx_prefetch_tune): Likewise.
10138 (thunderx2t99_prefetch_tune): Likewise.
10139 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10141 (aarch64_override_options_internal): Update to set
10142 PARAM_PREFETCH_DYNAMIC_STRIDES.
10143 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10144 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10145 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10146 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10147 prefetch-dynamic-strides setting.
10149 2018-05-07 Luis Machado <luis.machado@linaro.org>
10151 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10152 <minimum_stride>: New const int field.
10153 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10154 minimum_stride field.
10155 (exynosm1_prefetch_tune): Likewise.
10156 (thunderxt88_prefetch_tune): Likewise.
10157 (thunderx_prefetch_tune): Likewise.
10158 (thunderx2t99_prefetch_tune): Likewise.
10159 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10160 (aarch64_override_options_internal): Update to set
10161 PARAM_PREFETCH_MINIMUM_STRIDE.
10162 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10163 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10164 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10165 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10166 stride is constant and is below the minimum stride threshold.
10168 2018-05-07 Luis Machado <luis.machado@linaro.org>
10170 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10173 2018-05-07 Luis Machado <luis.machado@linaro.org>
10175 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10176 <prefetch_dynamic_strides>: New const bool field.
10177 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10178 prefetch_dynamic_strides.
10179 (exynosm1_prefetch_tune): Likewise.
10180 (thunderxt88_prefetch_tune): Likewise.
10181 (thunderx_prefetch_tune): Likewise.
10182 (thunderx2t99_prefetch_tune): Likewise.
10183 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10185 (aarch64_override_options_internal): Update to set
10186 PARAM_PREFETCH_DYNAMIC_STRIDES.
10187 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10188 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10189 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10190 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10191 prefetch-dynamic-strides setting.
10193 2018-05-07 Luis Machado <luis.machado@linaro.org>
10195 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10196 <minimum_stride>: New const int field.
10197 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10198 minimum_stride field.
10199 (exynosm1_prefetch_tune): Likewise.
10200 (thunderxt88_prefetch_tune): Likewise.
10201 (thunderx_prefetch_tune): Likewise.
10202 (thunderx2t99_prefetch_tune): Likewise.
10203 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10204 (aarch64_override_options_internal): Update to set
10205 PARAM_PREFETCH_MINIMUM_STRIDE.
10206 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10207 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10208 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10209 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10210 stride is constant and is below the minimum stride threshold.
10212 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10215 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10216 the type is addressable. Don't force op into register if it has
10219 2018-05-05 Roland McGrath <mcgrathr@google.com>
10222 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10223 any section for which we don't know a specific type it should have,
10224 regardless of name. Previously this was done only for the exact
10225 names ".init_array", ".fini_array", and ".preinit_array".
10226 (default_elf_asm_named_section): Add comment about
10227 relationship with default_section_type_flags and SECTION_NOTYPE.
10228 (get_section): Don't consider it a type conflict if one side has
10229 SECTION_NOTYPE and the other doesn't, as long as neither has the
10230 SECTION_BSS et al used in the default_section_type_flags logic.
10232 2018-05-05 Tom de Vries <tom@codesourcery.com>
10235 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10236 (workaround_barsyncs): New function.
10237 (nvptx_reorg): Use workaround_barsyncs.
10238 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10239 (define_expand "nvptx_membar_cta"): New define_expand.
10240 (define_insn "*nvptx_membar_cta"): New insn.
10242 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10244 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10245 To improve optimization opportunities.
10246 * builtin-types.def: The new needed builtin types for the above.
10248 2018-05-04 Richard Biener <rguenther@suse.de>
10250 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10251 * gimple-ssa-store-merging.c
10252 (imm_store_chain_info::output_merged_store): Remove redundant create,
10253 release split_store vector contents on failure.
10254 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10255 scalar stmt vector on cache hit.
10257 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10259 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10261 * config.gcc (powerpc-xilinx-eabi*): Remove.
10262 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10264 (fusion_addis_mem_combo_load): Ditto.
10265 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10267 (rs6000_cpu_cpp_builtins): Ditto.
10268 * config/rs6000/rs6000-linux.c
10269 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10270 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10271 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10273 (rs6000_setup_reg_addr_masks): Ditto.
10274 (rs6000_init_hard_regno_mode_ok): Ditto.
10275 (rs6000_option_override_internal): Ditto.
10276 (legitimate_lo_sum_address_p): Ditto.
10277 (rs6000_legitimize_address): Ditto.
10278 (rs6000_legitimize_reload_address): Ditto.
10279 (rs6000_legitimate_address_p): Ditto.
10280 (abi_v4_pass_in_fpr): Ditto.
10281 (setup_incoming_varargs): Ditto.
10282 (rs6000_gimplify_va_arg): Ditto.
10283 (rs6000_split_multireg_move): Ditto.
10284 (rs6000_savres_strategy): Ditto.
10285 (rs6000_emit_prologue_components): Ditto.
10286 (rs6000_emit_epilogue_components): Ditto.
10287 (rs6000_emit_prologue): Ditto.
10288 (rs6000_emit_epilogue): Ditto.
10289 (rs6000_elf_file_end): Ditto.
10290 (rs6000_function_value): Ditto.
10291 (rs6000_libcall_value): Ditto.
10292 * config/rs6000/rs6000.h: Ditto.
10293 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10294 (TARGET_MINMAX): ... this. New.
10295 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10296 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10297 (*movsi_internal1_single): Delete.
10298 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10299 mfpu=, mxilinx-fpu): Delete.
10300 * config/rs6000/singlefp.h: Delete.
10301 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10302 * config/rs6000/t-rs6000: Ditto.
10303 * config/rs6000/t-xilinx: Delete.
10304 * config/rs6000/titan.md: Adjust for fp_type removal.
10305 * config/rs6000/vsx.md: Remove Xilinx FP support.
10306 (VStype_simple): Delete.
10307 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10308 * config/rs6000/xfpu.h: Delete.
10309 * config/rs6000/xfpu.md: Delete.
10310 * config/rs6000/xilinx.h: Delete.
10311 * config/rs6000/xilinx.opt: Delete.
10312 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10313 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10315 2018-05-04 Tom de Vries <tom@codesourcery.com>
10318 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10321 2018-05-04 Richard Biener <rguenther@suse.de>
10323 PR middle-end/85627
10324 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10325 (expand_complex_div_wide): Likewise.
10326 (expand_complex_operations_1): Likewise.
10327 (expand_complex_libcall): Preserve EH info of the original stmt.
10328 (tree_lower_complex): Handle removed blocks.
10329 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10330 on complex multiplication and division libcall builtins.
10332 2018-05-04 Richard Biener <rguenther@suse.de>
10334 PR middle-end/85574
10335 * fold-const.c (negate_expr_p): Restrict negation of operand
10336 zero of a division to when we know that can happen without
10338 (fold_negate_expr_1): Likewise.
10340 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10343 * real.h (real_nextafter): Declare.
10344 * real.c (real_nextafter): New function.
10345 * fold-const-call.c (fold_const_nextafter): New function.
10346 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10347 CASE_CFN_NEXTTOWARD.
10348 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10349 even when arg1_mode is different from arg0_mode.
10351 2018-05-03 Nathan Sidwell <nathan@acm.org>
10353 * doc/extend.texi (Deprecated Features): Remove
10354 -ffriend-injection.
10355 (Backwards Compatibility): Likewise.
10356 * doc/invoke.texi (C++ Language Options): Likewise.
10357 (C++ Dialect Options): Likewise.
10359 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10362 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10363 _mm512_mask_mullox_epi64): New intrinsics.
10365 2018-05-03 Tom de Vries <tom@codesourcery.com>
10368 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10369 dump files): Add offload-tree.
10371 2018-05-03 Richard Biener <rguenther@suse.de>
10373 PR tree-optimization/85615
10374 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10375 to loops not nested in BBs loop father to avoid creating multi-entry
10378 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10380 PR tree-optimization/70291
10381 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10382 arguments. Change return type to tree. Emit libcall as a new
10383 statement rather than replacing existing one when inplace_p is true.
10384 (expand_complex_multiplication_components): New function.
10385 (expand_complex_multiplication): Expand floating-point complex
10386 multiplication using the above.
10387 (expand_complex_division): Rename inner_type parameter to type.
10388 Update expand_complex_libcall call-site.
10389 (expand_complex_operations_1): Update expand_complex_multiplication
10390 and expand_complex_division call-sites.
10392 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10395 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10396 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10397 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10398 the highest significant bit of the shift count mask is clear. In
10399 check whether and[sq]i3 is needed verify that all significant bits
10400 of the shift count other than the highest are set.
10402 2018-05-02 Tom de Vries <tom@codesourcery.com>
10405 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10406 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10407 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10408 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10409 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10410 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10411 __builtin_goacc_parlevel_size.
10413 2018-05-02 Richard Biener <rguenther@suse.de>
10415 PR tree-optimization/85597
10416 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10417 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10420 2018-05-02 Tom de Vries <tom@codesourcery.com>
10423 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10424 dump files): Add ltrans-tree.
10426 2018-05-02 Tom de Vries <tom@codesourcery.com>
10429 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10430 dump files): Add wpa-ipa.
10432 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10434 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10435 powerpc*-*-linux*paired* target.
10436 * config/rs6000/750cl.h: Delete.
10437 * config/rs6000/paired.h: Delete.
10438 * config/rs6000/paired.md: Delete.
10439 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10441 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10442 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10443 comment. Remove paired float support.
10444 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10445 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10447 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10448 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10450 * config/rs6000/rs6000.c: Remove paired float support.
10451 (paired_expand_vector_init, paired_expand_vector_move,
10452 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10453 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10454 paired_expand_builtin, paired_expand_predicate_builtin,
10455 paired_init_builtins): Delete.
10456 * config/rs6000/rs6000.h: Remove paired float support.
10457 * config/rs6000/rs6000.md: Remove paired float support.
10458 (move_from_CR_ov_bit): Delete.
10459 * config/rs6000/rs6000.opt (mpaired): Delete.
10460 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10461 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10463 2018-05-02 Richard Biener <rguenther@suse.de>
10465 PR middle-end/85567
10466 * gimplify.c (gimplify_save_expr): When in SSA form allow
10467 SAVE_EXPRs to compute to SSA vars.
10469 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10472 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10473 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10474 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10475 clobber operands[2], instead use a new pseudo. Formatting fixes.
10477 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10479 PR tree-optimization/85586
10480 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10481 exit early for statements in the same group if the accesses are
10484 2018-05-02 Tom de Vries <tom@codesourcery.com>
10487 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10490 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10492 PR tree-optimization/85143
10493 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10495 2018-05-01 Tom de Vries <tom@codesourcery.com>
10498 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10499 not found" error message.
10501 2018-05-01 Tom de Vries <tom@codesourcery.com>
10504 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10505 * vec.c (test_ordered_remove_if): New function.
10506 (vec_c_tests): Call test_ordered_remove_if.
10507 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10508 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10509 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10510 VEC_ORDERED_REMOVE_IF.
10512 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10514 PR tree-optimization/82665
10515 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10516 pointer subtraction where arguments come from a memchr call.
10518 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10520 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10521 --push-state --as-needed and --pop-state instead of --as-needed and
10522 --no-as-needed if ld supports it.
10523 * configure: Regenerated.
10526 * doc/install.texi2html: Replace _002d with - and _002a with * in
10527 generated html files using sed.
10529 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10532 * gcc-rich-location.c (blank_line_before_p): New function.
10533 (use_new_line): New function.
10534 (gcc_rich_location::add_fixit_insert_formatted): New function.
10535 * gcc-rich-location.h
10536 (gcc_rich_location::add_fixit_insert_formatted): New function.
10538 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10540 * selftest.c (assert_streq): Rename "expected" and "actual" to
10541 "val1" and "val2". Extend NULL-handling to cover both inputs
10542 symmetrically, while still requiring both to be non-NULL for a pass.
10543 * selftest.h (assert_streq): Rename "expected" and "actual" to
10545 (ASSERT_EQ): Likewise.
10546 (ASSERT_EQ_AT): Likewise.
10547 (ASSERT_KNOWN_EQ): Likewise.
10548 (ASSERT_KNOWN_EQ_AT): Likewise.
10549 (ASSERT_NE): Likewise.
10550 (ASSERT_MAYBE_NE): Likewise.
10551 (ASSERT_MAYBE_NE_AT): Likewise.
10552 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10553 the assertion to pass.
10554 (ASSERT_STREQ_AT): Likewise.
10556 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10558 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10559 interaction with -pie.
10561 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10563 * selftest.h: Fix alphabetization of per-source-file selftest
10566 2018-04-30 Jason Merrill <jason@redhat.com>
10568 PR c++/61982 - dead stores to destroyed objects.
10569 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10572 2018-04-30 Jason Merrill <jason@redhat.com>
10574 * tree.c (build_clobber): New.
10575 * tree.h: Declare it.
10576 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10578 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10580 * diagnostic-show-locus.c (layout::layout): Update for
10581 location_get_source_line returning a char_span.
10582 (struct char_span): Move to input.h.
10583 (struct correction): Update for fields in char_span becoming
10585 (struct source_line): Update for location_get_source_line
10586 returning a char_span.
10587 (layout::print_line): Likewise.
10588 * edit-context.c (edited_file::print_content): Likewise.
10589 (edited_file::print_diff_hunk): Likewise.
10590 (edited_file::print_run_of_changed_lines): Likewise.
10591 (edited_file::get_num_lines): Likewise.
10592 (edited_line::edited_line): Likewise.
10593 * final.c (asm_show_source): Likewise.
10594 * input.c (location_get_source_line): Convert return type
10595 from const char * to char_span, losing the final "line_len"
10597 (dump_location_info): Update for the above.
10598 (get_substring_ranges_for_loc): Likewise. Use a char_span
10599 when handling the literal within the line.
10600 (test_reading_source_line): Update for location_get_source_line
10601 returning a char_span.
10602 * input.h (class char_span): Move here from
10603 diagnostic-show-locus.c, converting from a struct to a class.
10604 Make data members private.
10605 (char_span::operator bool): New.
10606 (char_span::length): New.
10607 (char_span::get_buffer): New.
10608 (char_span::operator[]): New.
10609 (char_span::subspan): Make const.
10610 (char_span::xstrdup): New.
10611 (location_get_source_line): Convert return type from const char *
10612 to char_span, losing the final "line_size" param.
10614 2018-04-30 Jan Hubicka <jh@suse.cz>
10616 * lto-wrapper.c (ltrans_priorities): New static var.
10617 (cmp_priority): New.
10618 (run_gcc): Read priorities and if doing parallel build order
10619 the Makefile by them.
10621 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10623 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10625 2018-04-30 Richard Biener <rguenther@suse.de>
10627 * tree-cfg.c (verify_address): Remove base argument, add
10628 flag whether to check TREE_ADDRESSABLE and do that.
10629 (verify_expr): Remove.
10630 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10631 (verify_gimple_assign_single): Likewise.
10632 (verify_gimple_switch): Likewise.
10633 (verify_expr_location_1): Dereference tp once. Add (disabled)
10634 piece from verify_expr.
10635 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10637 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10639 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10641 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10643 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10644 (small_data_pattern): Likewise.
10645 (arc_rewrite_small_data): Likewise.
10646 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10647 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10648 (get_symbol_alignment): New function.
10649 (legitimate_small_data_address_p): Likewise.
10650 (legitimate_scaled_address): Update, call
10651 legitimate_small_data_address_p.
10652 (output_sdata): New static variable.
10653 (arc_print_operand): Update how we handle small data operands.
10654 (arc_print_operand_address): Likewise.
10655 (arc_legitimate_address_p): Update, use
10656 legitimate_small_data_address_p.
10657 (arc_rewrite_small_data_p): Remove.
10658 (arc_rewrite_small_data_1): Likewise.
10659 (arc_rewrite_small_data): Likewise.
10660 (small_data_pattern): Likewise.
10661 (compact_sda_memory_operand): Update to use
10662 legitimate_small_data_address_p and get_symbol_alignment.
10663 (prepare_move_operands): Don't rewite sdata pattern.
10664 (prepare_extend_operands): Remove.
10665 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10667 (zero_extendqisi2): Likewise.
10668 (zero_extendhisi2): Likewise.
10669 (extendqihi2): Likewise.
10670 (extendqisi2): Likewise.
10671 (extendhisi2): Likewise.
10672 (addsi3): Likewise.
10673 (subsi3): Likewise.
10674 (andsi3): Likewise.
10675 * config/arc/constraints.md (Usd): Change it to memory constraint.
10677 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10679 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10680 as source of std instructions.
10681 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10682 allow 6-bit constants as source for store instructions.
10683 (movdi_insn): Update instruction pattern to allow 6-bit constants
10684 as source for store instructions.
10686 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10688 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10690 2018-04-30 Nathan Sidwell <nathan@acm.org>
10691 Sandra Loosemore <sandra@codesourcery.com>
10693 * dumpfile.c (dump_open): Allow '-' for stdout.
10694 * doc/invoke.texi (Developer Options): Document dump filename
10695 determination early. Document stdin/stdout selection.
10697 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10699 Microblaze Target: PIC data text relative
10701 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10702 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10704 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10705 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10706 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10707 New addressing mode for data-text relative position indepenedent code.
10708 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10709 'ADDRESS_SYMBOLIC_TXT_REL'.
10710 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10711 (microblaze_legitimate_pic_operand): Exclude function calls from
10712 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10713 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10715 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10716 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10717 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10718 for 'address + offset'.
10719 (microblaze_expand_prologue): Add new function prologue call for
10721 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10722 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10723 table in case of TARGET_PIC_DATA_TEXT_REL.
10724 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10725 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10726 Add new macros 'UNSPEC_TEXT',
10727 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10728 + exclude function calls from 'UNSPEC_PLT' in case of data text
10730 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10731 new target hook for generating address diff vector tables in case of
10733 * doc/tm.texi : Regenerate.
10734 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10735 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10736 of addr diff vector generation.
10737 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10738 target hook definition.
10739 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10740 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10741 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10742 option for data text relative.
10744 2018-04-30 Richard Biener <rguenther@suse.de>
10746 * tree-chrec.h (evolution_function_is_constant_p): Remove
10748 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10750 2018-04-30 Richard Biener <rguenther@suse.de>
10753 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10755 2018-04-30 Richard Biener <rguenther@suse.de>
10757 PR tree-optimization/28364
10758 PR tree-optimization/85275
10759 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10760 copying first exit test.
10762 2018-04-28 Mark Wielaard <mark@klomp.org>
10764 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10765 dwarf_version >= 5.
10766 (dwarf_AT): Handle DW_AT_addr_base.
10767 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10769 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10772 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10773 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10774 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10775 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10777 2018-04-28 Richard Biener <rguenther@suse.de>
10779 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10780 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10781 to reflect use. Only add interesting stmts.
10783 2018-04-27 Martin Jambor <mjambor@suse.cz>
10786 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10787 the jump function allows for passing through aggregate values.
10789 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10791 * input.h (in_system_header_at): Convert from macro to inline
10793 (from_macro_expansion_at): Likewise.
10794 (from_macro_definition_at): Likewise.
10796 2018-04-27 Jeff Law <law@redhat.com>
10798 * config.gcc: Mark tile* targets as deprecated/obsolete.
10800 2018-04-27 Richard Biener <rguenther@suse.de>
10802 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10805 2018-04-27 Richard Biener <rguenther@suse.de>
10807 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10809 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10811 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10812 with Yd constraint. Set "preferred_for_speed" attribute from
10813 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10814 with Yd constraint.
10815 (*movdi_internal): Ditto.
10816 (movti_interunit splitters): Remove
10817 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10818 (movdi_interunit splitters): Ditto.
10819 * config/i386/constraints.md (Ye): Remove.
10820 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10822 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10825 * config/aarch64/constraints.md (Usg): Limit to 31.
10826 (Usj): Limit to 63.
10828 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10830 PR tree-optimization/85529
10831 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10832 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10833 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10834 zero extension or masking of the MSB bit.
10835 (optimize_range_tests): Add FIRST_BB argument, pass it through
10836 to optimize_range_tests_var_bound.
10837 (maybe_optimize_range_tests, reassociate_bb): Adjust
10838 optimize_range_tests callers.
10840 2018-04-26 Richard Biener <rguenther@suse.de>
10841 Jakub Jelinek <jakub@redhat.com>
10843 * cgraph.h (symbol_table): Just declare debug method here.
10844 * symtab.c (symbol_table::debug): Define.
10846 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10848 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10850 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10852 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10853 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10854 (*movdi_internal): Substitute Yi and Yj constraint with x
10855 and Ym and Yn constraint with y constraint. Update "isa"
10856 attribute and set "preferred_for_speed" attribute from
10857 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10858 (*movsi_internal): Ditto.
10859 (*movdf_internal): Ditto.
10860 (*movsf_internal): Ditto.
10861 (*zero_extendsidi2): Ditto.
10862 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10863 (sse2_loadld): Ditto.
10864 (*vec_extract<ssevecmodelower>_0): Ditto.
10865 (*vec_extractv4si_0_zext_sse4): Ditto.
10866 (vec_concatv2di): Ditto.
10867 (*vec_dup<mode>): Ditto.
10868 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10869 * config/i386/constraints.md (Yi): Remove.
10874 2018-04-26 Nathan Sidwell <nathan@acm.org>
10876 * dumpfile.c (dump_open): New.
10877 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10878 (dump_finish): Detect stdio/stderr by value not name.
10880 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10882 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10884 2018-04-26 Tom de Vries <tom@codesourcery.com>
10887 * config/nvptx/nvptx.c (verify_neutering_jumps)
10888 (verify_neutering_labels): New function
10889 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10891 2018-04-26 Tom de Vries <tom@codesourcery.com>
10894 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10895 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10898 2018-04-26 Richard Biener <rguenther@suse.de>
10899 Tom de Vries <tom@codesourcery.com>
10902 * lto-streamer-out.c (output_function): Fixup loops if required to match
10903 discovery done in the reader.
10905 2018-04-26 Richard Biener <rguenther@suse.de>
10907 PR tree-optimization/85116
10908 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10909 have a loop exit from the single latch predecessor. Remove
10910 case of header with just condition.
10911 (ch_base::copy_headers): Exclude infinite loops from any
10913 (pass_ch::execute): Record exits.
10915 2018-04-26 Richard Biener <rguenther@suse.de>
10917 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10918 prologue cost vector and pass it to vect_get_load_cost.
10919 (vect_get_peeling_costs_all_drs): Likewise.
10920 (vect_peeling_hash_get_lowest_cost): Likewise.
10921 (vect_enhance_data_refs_alignment): Likewise.
10923 2018-04-26 Richard Biener <rguenther@suse.de>
10925 PR middle-end/85450
10926 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10927 checking of integer<->pointer conversions.
10928 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10929 sign-/zero-extending pointer types.
10930 (expand_omp_for_static_chunk): Likewise.
10932 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10933 Jean Lee <xiaoyur347@gmail.com>
10935 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10936 (TARGET_ASAN_SHADOW_OFFSET): Define.
10937 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10938 true for -fsanitize=address.
10940 2018-04-25 Mark Wielaard <mark@klomp.org>
10942 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10945 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10947 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10948 than "alu", remove explicit "memory" and "imm_disp" attributes.
10949 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10951 PR middle-end/85414
10952 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10953 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10954 gen_lowpart_no_emit.
10956 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10959 * config/i386/i386.c (ix86_expand_builtin): Change memory
10960 operand to XI, extend p0 to Pmode.
10961 * config/i386/i386.md: Change unspec volatile and operand
10962 1 mode to XI, change operand 0 mode to P.
10964 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10966 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10967 GET_MODE_MASK before any checking.
10968 (nds32_can_use_bset_p): Likewise.
10969 (nds32_can_use_btgl_p): Likewise.
10971 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10973 * config/nds32/nds32-doubleword.md: New define_split pattern for
10974 illegal register number.
10976 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10978 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10980 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10982 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10984 2018-04-25 Richard Biener <rguenther@suse.de>
10986 * lto-streamer.h (LTO_major_version): Bump to 8.
10988 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10990 * BASE-VER: Set to 9.0.0.
10992 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10994 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10995 in __abskf2 and __powikf2.
10997 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11000 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11001 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11002 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11003 Use the above on operand 2. Reindent.
11004 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11006 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11009 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11011 * config/i386/i386.opt (mcet): Removed.
11012 * doc/install.texi: Remove -mcet documentation.
11013 * doc/invoke.texi: Likewise.
11015 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11018 * doc/install.texi: Remove -mcet from bootstrap-cet.
11020 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11023 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11024 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11028 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11029 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11030 containing a CONST_VECTOR.
11032 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11034 * doc/install.texi: Update newlib dependency for nvptx.
11036 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11039 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11040 instead of INTVAL when shifting x left.
11042 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11044 PR tree-optimization/85478
11045 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11046 vect_grouped_store_supported for single element vectors.
11048 2018-04-24 Richard Biener <rguenther@suse.de>
11051 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11052 load cost increase to the case of non-constant step.
11054 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11057 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11058 destination if any_malformed_asm.
11060 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11062 PR middle-end/85496
11063 * expr.c (store_field): In the bitfield case, if the value comes from
11064 a function call and is returned in registers by means of a PARALLEL,
11065 do not change the mode of the temporary unless BLKmode and VOIDmode.
11067 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11069 PR rtl-optimization/85423
11070 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11071 dependencies to debug insns when the previous insn is non-debug.
11073 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11075 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11076 enums into a single definition.
11077 (fls): Fix predicates and printing.
11080 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11082 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11083 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11084 and short u6 immediate.
11085 (check_if_valid_sleep_operand): Remove.
11086 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11088 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11090 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11091 flag_always_save_lp condition.
11092 * config/nds32/nds32.opt (malways-save-lp): New option.
11094 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11096 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11097 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11098 * config/nds32/nds32.h
11099 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11100 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11102 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11104 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11105 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11107 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11108 Chung-Ju Wu <jasonwucj@gmail.com>
11110 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11112 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11113 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11115 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11117 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11119 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11121 * config/nds32/nds32-protos.h (nds32_data_alignment,
11122 nds32_local_alignment): Declare.
11123 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11124 nds32_local_alignment): New functions.
11125 (TARGET_CONSTANT_ALIGNMENT): Define.
11126 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11128 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11130 * config/nds32/nds32.c
11131 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11132 (TARGET_MODES_TIEABLE_P): Likewise.
11134 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11136 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11137 level Ofast and Og.
11139 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11140 Chung-Ju Wu <jasonwucj@gmail.com>
11142 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11143 for unaligned access.
11144 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11146 * config/nds32/nds32-intrinsic.md: Likewise.
11147 * config/nds32/nds32_intrinsic.h: Likewise.
11148 * config/nds32/nds32.h (nds32_builtins): Likewise.
11149 * config/nds32/nds32.opt (munaligned-access): New option.
11150 * config/nds32/nds32.c (nds32_asm_file_start): Display
11151 flag_unaligned_access status.
11153 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11155 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11156 -mno-relax is present.
11157 * config/riscv/linux.h (LINK_SPEC): Ditto.
11159 2018-04-20 Martin Sebor <msebor@redhat.com>
11162 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11164 (gimple_fold_builtin_stxcpy_chk): Same.
11165 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11167 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11170 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11171 __powikf2 when long double is IEEE 128-bit.
11173 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11175 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11176 step to make sure stack always aligned.
11178 2018-04-20 Carl Love <cel@us.ibm.com>
11181 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11182 size check for arg0.
11184 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11185 Tom de Vries <tom@codesourcery.com>
11188 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11189 Emit insns for calls too.
11190 (nvptx_find_par): Always look for worker-level predecessor insn.
11191 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11193 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11194 (nvptx_process_pars): Propagate frames for calls.
11196 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11199 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11201 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11202 (ix86_handle_option): Don't handle OPT_mibt.
11203 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11205 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11207 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11208 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11209 (ix86_target_macros): Define __CET__ with flag_cf_protection
11210 for -fcf-protection.
11211 * config/i386/i386.c (isa2_opts): Remove -mibt.
11212 * config/i386/i386.h (TARGET_IBT): Removed.
11213 (TARGET_IBT_P): Likewise.
11214 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11215 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11216 * config/i386/i386.opt (mcet): Update help message.
11217 (mshstk): Likewise.
11219 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11220 -mcet as an alias for -mshstk.
11222 2018-04-20 Richard Biener <rguenther@suse.de>
11224 PR middle-end/85475
11225 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11226 complexity by forcing a single use of the multiply operand.
11228 2018-04-20 Martin Jambor <mjambor@suse.cz>
11231 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11232 recursion dependency to only apply to non-clones.
11234 2018-04-20 Martin Jambor <mjambor@suse.cz>
11237 * ipa-cp.c (create_specialized_node): Check that clones of
11238 self-recursive edges exist during IPA-CP.
11240 2018-04-19 Toon Moene <toon@moene.org>
11242 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11245 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11247 PR tree-optimization/85467
11248 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11249 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11250 VECTOR_CST element to type.
11252 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11255 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11256 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11257 (builtin_longjmp): Likewise.
11258 (save_stack_nonlocal): New pattern.
11259 (restore_stack_nonlocal): Likewise.
11261 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11264 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11265 Replace ASM_OUTPUT_LABEL with fprintf.
11267 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11270 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11271 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11272 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11273 define __IBT__ and __SHSTK__ for -fcf-protection.
11274 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11276 (ix86_trampoline_init): Likewise.
11277 (x86_output_mi_thunk): Likewise.
11278 (ix86_notrack_prefixed_insn_p): Likewise.
11279 (ix86_option_override_internal): Don't disallow -fcf-protection.
11280 * config/i386/i386.md (rdssp<mode>): Also enable for
11282 (incssp<mode>): Likewise.
11283 (nop_endbr): Likewise.
11284 * config/i386/i386.opt (mcet): Change help message to built-in
11287 (mshstk): Likewise.
11288 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11289 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11290 enable CET built-in functions.
11292 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11294 * common/config/i386/i386-common.c
11295 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11296 OPTION_MASK_ISA_MOVDIRI_UNSET,
11297 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11298 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11299 * config.gcc (movdirintrin.h): New header.
11300 * config/i386/cpuid.h (bit_MOVDIRI,
11301 bit_MOVDIR64B): New bits.
11302 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11304 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11305 (VOID, PVOID, PCVOID)): New function types.
11306 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11307 __builtin_ia32_directstoreu_u64,
11308 __builtin_ia32_movdir64b): New builtins.
11309 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11310 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11312 (ix86_valid_target_attribute_inner_p): Ditto.
11313 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11314 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11315 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11316 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11317 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11318 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11319 (movdiri<mode>, movdir64b_<mode>): New.
11320 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11321 * config/i386/immintrin.h: Include movdirintrin.h.
11322 * config/i386/movdirintrin.h: New file.
11323 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11325 2018-04-19 Richard Biener <rguenther@suse.de>
11327 PR middle-end/85455
11328 * cfg.c (clear_bb_flags): When loop state says we have
11329 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11331 2018-04-19 Richard Biener <rguenther@suse.de>
11333 PR tree-optimization/84737
11334 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11335 copying restrict info.
11336 (vect_setup_realignment): Use it.
11337 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11338 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11339 the first DR to all generated stores.
11340 (vectorizable_load): Likewise for loads.
11342 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11344 PR tree-optimization/85446
11345 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11346 the integral and pointer types to have the same precision.
11348 * doc/install.texi: Document --disable-cet being the default and
11351 2018-04-18 Martin Liska <mliska@suse.cz>
11353 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11356 2018-04-18 Martin Liska <mliska@suse.cz>
11359 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11362 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11363 arguments if they are comparable.
11365 2018-04-18 Martin Liska <mliska@suse.cz>
11368 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11371 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11374 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11377 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11378 ENDBR after calling __morestack.
11380 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11383 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11384 by using gcc_base_ver to generate a gcc_driver_version, and use
11385 it when generating GCC_DRIVER_NAME.
11386 * configure: Regenerate.
11388 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11391 * config.gcc: Obsolete powerpc*-*-*spe*.
11393 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11396 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11397 (stabstr_D): Change type of unum from unsigned int to
11398 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11401 2018-04-17 Jim Wilson <jimw@sifive.com>
11404 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11405 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11406 Set arg_pointer_offset after using pretend_args_size.
11408 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11410 PR rtl-optimization/85431
11411 * dse.c (record_store): Ignore zero width stores.
11414 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11415 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11416 __builtin_stack_restore rather than after it.
11417 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11418 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11419 argument instead of virtual_dynamic_stack_rtx.
11421 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11423 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11425 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11426 Add note to error message to explain internal mapping of overloaded
11427 built-in function name to non-overloaded built-in function name.
11428 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11431 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11434 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11435 where the inputs overlap with the output.
11437 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11439 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11440 (=v, v) alternative and explicit "memory" attribute.
11441 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11442 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11444 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11445 "sselog1" type instead of "sselog".
11446 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11447 "sselog". Remove explicit "memory" attribute.
11448 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11449 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11451 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11452 "sselog1" type instead of "sselog". Remove explicit "memory"
11454 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11455 use "sselog1" type instead of "sselog". Remove explicit "memory"
11457 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11458 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11460 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11461 "sselog1" type instead of "sselog". Remove explicit "memory"
11463 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11464 use "sselog1" type instead of "sselog". Remove explicit "memory"
11468 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11470 PR middle-end/85414
11471 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11474 2018-04-17 Martin Jambor <mjambor@suse.cz>
11477 * ipa-cp.c (create_specialized_node): Call
11478 expand_all_artificial_thunks if necessary.
11480 2018-04-17 Martin Liska <mliska@suse.cz>
11483 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11484 in message, remote space in between '_G' and '('.
11486 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11489 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11490 avx512f_vmcmp<mode>3<round_saeonly_name>,
11491 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11492 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11493 avx512f_rndscale<mode><round_saeonly_name>,
11494 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11495 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11496 Use %<iptr>2 instead of %2 for -masm=intel.
11497 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11498 avx512f_vcvttss2usi<round_saeonly_name>,
11499 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11501 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11502 avx512f_vcvttsd2usi<round_saeonly_name>,
11503 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11504 Use %q1 instead of %1 for -masm=intel.
11505 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11506 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11507 of %3 for -masm=intel.
11508 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11510 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11512 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11514 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11515 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11517 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11519 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11520 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11521 %g1 and one with %0 and %1.
11522 (avx512er_vmrcp28<mode><round_saeonly_name>,
11523 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11524 %1 for -masm=intel.
11525 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11526 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11527 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11528 of %0 and %{%4%} for -masm=intel.
11529 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11530 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11531 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11532 order of %0 and %{%5%}%{z%} for -masm=intel.
11534 2018-04-17 Jan Hubicka <jh@suse.cz>
11537 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11539 2018-04-17 Martin Liska <mliska@suse.cz>
11542 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11543 for target_clone error message. Make default implementation
11544 clone to be a local declaration.
11545 (separate_attrs): Add new argument and check for an empty
11547 (expand_target_clones): Handle it.
11548 (ipa_target_clone): Make redirection just for target_clones
11551 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11552 Tom de Vries <tom@codesourcery.com>
11554 PR middle-end/84955
11555 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11556 tiled basic blocks without omp continue statements.
11558 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11561 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11562 vec_extract expression as having side effects to make sure it gets
11565 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11568 * config/i386/i386.c (get_builtin_code_for_version): Check
11571 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11574 * config.gcc: Support "skylake".
11575 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11577 * config/i386/i386.c (m_SKYLAKE): Define.
11578 (processor_target_table): Add "skylake".
11579 (ix86_option_override_internal): Add "skylake".
11580 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11581 PROCESSOR_CANNONLAKE.
11582 (get_builtin_code_for_version): Fix priority for
11583 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11584 PROCESSOR_SKYLAKE-AVX512.
11585 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11586 (processor_type): Add PROCESSOR_SKYLAKE.
11588 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11589 Jason Merrill <jason@redhat.com>
11592 * convert.c (convert_to_integer_1): Use direct recursion for
11593 enumeral types and types with a precision less than the number
11594 of bits in their mode.
11596 2018-04-16 Julia Koval <julia.koval@intel.com>
11599 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11600 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11602 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11605 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11606 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11607 and -mno-direct-move.
11609 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11612 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11613 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11614 Ensure negative shifts result in {0}.
11616 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11618 PR rtl-optimization/79916
11619 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11620 regs (if any) to define how to gnerate SD moves when LRA is in
11623 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11625 PR rtl-optimization/85393
11626 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11627 * except.c (expand_dw2_landing_pad_for_region): Make static.
11628 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11629 a label and unconditional jump to old_bb, rather than
11630 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11633 PR rtl-optimization/85376
11634 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11635 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11636 instead of a specific value.
11638 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11639 Bin Cheng <bin.cheng@arm.com>
11641 PR tree-optimization/82965
11642 PR tree-optimization/83991
11643 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11644 by_profile_only parameter.
11645 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11646 information if the loop was predicted to iterate too many times.
11647 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11649 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11652 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11655 2018-04-13 Martin Liska <mliska@suse.cz>
11656 Jakub Jelinek <jakub@redhat.com>
11658 PR middle-end/81657
11659 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11660 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11661 * builtins.c (expand_builtin_memory_copy_args): Use
11662 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11663 handle dest_addr == pc_rtx.
11665 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11668 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11669 asked to not generate direct moves.
11670 (fix_trunc<mode>si2_stfiwx): Similar.
11671 (fix_trunc<mode>si2_internal): Similar.
11673 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11676 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11677 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11678 lookup if dest in some wider mode is known to be const0_rtx and
11679 if so, record permanent equivalence for it to be ZERO_EXTEND of
11680 the narrower mode destination.
11682 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11684 * lto-streamer-out.c (output_function): Revert 259346.
11685 * omp-expand.c (expand_oacc_for): Likewise.
11687 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11689 PR rtl-optimization/85354
11690 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11691 * sel-sched.c (sel_global_init): ... here.
11693 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11696 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11697 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11698 mode for PE-COFF targets.
11699 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11700 (i386_pe_asm_lto_end): Likewise.
11701 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11702 (TARGET_ASM_LTO_END): Likewise.
11703 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11704 (i386_pe_asm_lto_start): New function.
11705 (i386_pe_asm_lto_end): Likewise.
11707 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11708 Richard Biener <rguenther@suse.de>
11710 PR middle-end/84955
11711 * lto-streamer-out.c (output_function): Fix CFG loop state before
11713 * omp-expand.c (expand_oacc_for): Handle calls to internal
11714 functions like regular functions.
11716 2018-04-12 Richard Biener <rguenther@suse.de>
11719 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11720 for the early LTO debug to properly generate references to it
11721 during DIE emission. Do not re-use that for the skeleton for
11723 (dwarf2out_early_finish): Likewise.
11725 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11728 * config/i386/sse.md
11729 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11730 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11731 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11732 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11733 and output is a reg, avoid creating invalid lowpart subreg, but
11734 instead split into a 512-bit move. Don't split if not AVX512VL,
11735 input is xmm16+ reg and output is a mem.
11736 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11737 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11738 xmm16+ reg and output is a mem.
11740 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11742 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11743 also for flag_dwarf2_cfi_asm.
11745 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11747 PR rtl-optimization/85342
11748 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11749 a bool scalar var inside of the loop instead. Don't try to update
11750 recog_data.operand after failed apply_change_group.
11752 2018-04-12 Tom de Vries <tom@codesourcery.com>
11755 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11756 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11757 array with flexible array member as array without given dimension.
11758 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11759 argument for undefined param to true.
11761 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11764 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11765 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11766 from PowerPC section.
11767 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11768 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11769 help text that is too long.
11770 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11771 help text that is too long.
11772 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11773 help text that is too long.
11775 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11777 * config/alpha/alpha.md (stack_probe_internal): Rename
11778 from "probe_stack". Update all callers.
11780 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11782 PR rtl-optimization/84566
11783 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11784 sched_macro_fuse_insns.
11786 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11789 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11790 (compute_block_dependences): ... from here.
11792 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11794 PR tree-optimization/85331
11795 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11796 from int to HOST_WIDE_INT.
11798 2018-04-11 Martin Jambor <mjambor@suse.cz>
11801 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11802 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11803 not the same as the source val.
11804 (cgraph_edge_brings_value_p): New parameter.
11805 (gather_edges_for_value): Pass destination value to
11806 cgraph_edge_brings_value_p.
11807 (perhaps_add_new_callers): Likewise.
11808 (get_info_about_necessary_edges): Likewise and exclude values brought
11809 only by self-recursive edges.
11810 (create_specialized_node): Redirect only clones of self-calling edges.
11811 (+self_recursive_pass_through_p): New function.
11812 (find_more_scalar_values_for_callers_subset): Use it.
11813 (find_aggregate_values_for_callers_subset): Likewise.
11814 (known_aggs_to_agg_replacement_list): Removed.
11815 (decide_whether_version_node): Re-calculate known constants for all
11816 remaining context clones.
11818 2018-04-11 Richard Biener <rguenther@suse.de>
11821 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11822 from early DWARF output.
11823 (dwarf2out_early_finish): Output line info unconditionally into
11824 early DWARF and add reference to it.
11826 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11829 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11830 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11831 other than V2DFmode using iptr mode attribute.
11832 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11834 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11836 PR rtl-optimization/84659
11837 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11839 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11842 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11844 (output_loc_list): Pass address of a dummy size variable even in the
11845 locview handling loop.
11846 (index_location_lists): Add comment on why skip_loc_list_entry can't
11849 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11852 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11855 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11858 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11859 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11860 and -mstring-compare-inline-limit.
11862 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11865 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11866 for stack clash protection in a register whenever we need it to be in
11869 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11871 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11872 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11874 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11877 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11879 (mlong-double-): Ditto.
11880 * config/rs6000/sysv4.opt (msdata=): Ditto.
11881 (mtls-size=): Ditto.
11883 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11885 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11886 erroneous entries for
11887 "vector int vec_ldl (int, long int *)", and
11888 "vector unsigned int vec_ldl (int, unsigned long int *)".
11889 Add comments and entries for
11890 "vector bool char vec_ldl (int, bool char *)",
11891 "vector bool short vec_ldl (int, bool short *)",
11892 "vector bool int vec_ldl (int, bool int *)",
11893 "vector bool long long vec_ldl (int, bool long long *)",
11894 "vector pixel vec_ldl (int, pixel *)",
11895 "vector long long vec_ldl (int, long long *)",
11896 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11897 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11898 type tree bool_long_long_type_node and correct definition of
11899 bool_V2DI_type_node to make reference to this new type tree.
11900 (rs6000_mangle_type): Replace erroneous reference to
11901 bool_long_type_node with bool_long_long_type_node.
11902 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11903 comments to emphasize sign distinctions for char and int types and
11904 replace RS6000_BTI_bool_long constant with
11905 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11906 use of RS6000_BTI_pixel.
11907 (bool_long_type_node): Remove this macro definition.
11908 (bool_long_long_type_node): New macro definition
11910 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11912 PR rtl-optimization/85300
11913 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11914 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11915 simplify_unary_operation fails.
11917 2018-04-10 Martin Liska <mliska@suse.cz>
11919 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11920 cgraph_edge and ipa_ref.
11922 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11926 * config/i386/sse.md
11927 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11928 computation of the VEC_MERGE selector from mask.
11929 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11930 Fix decoding of the VEC_MERGE selector into mask.
11932 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11934 PR tree-optimization/85286
11935 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11937 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11939 * final.c (final_1): Set insn_last_address as well as
11940 insn_current_address.
11942 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11945 * explow.c (emit_stack_probe): Call validize_mem on memory location
11946 before passing it to gen_probe_stack. Create address operand and
11947 legitimize it for the probe_stack_address case.
11949 2018-04-09 Jan Hubicka <jh@suse.cz>
11952 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11953 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11954 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11956 (free_lang_data): Rebuild type inheritance graph.
11958 2018-04-09 Martin Sebor <msebor@redhat.com>
11960 * invoke.texi (-finline-small-functions): Mention other optimization
11962 (-findirect-inlining, -fpartial-inlining): Same.
11963 (-finline-functions-called-once): Same.
11964 (-freorder-blocks-and-partition): Same.
11966 2018-04-09 Jan Hubicka <jh@suse.cz>
11969 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11970 jumps; choose last target that matches the criteria (i.e.
11971 no partition changes for non-crossing jumps).
11972 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11973 support for redirecting crossing jumps to non-crossing.
11975 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11977 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11978 also for naked functions.
11980 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11982 * config/arc/arc.md (add_shift): New pattern.
11983 (add_shift2): Likewise.
11984 (sub_shift): Likewise.
11985 (sub_shift_cmp0_noout): Likewise.
11986 (compare_si_ashiftsi): Likewise.
11987 (xbfu_cmp0_noout): New combine pattern.
11988 (xbfu_cmp0"): Likewise.
11989 (movsi_set_cc_insn): Place the predicable variant first.
11990 (commutative_binary_cmp0_noout): Remove clobber.
11991 (commutative_binary_cmp0): New pattern.
11992 (noncommutative_binary_cmp0): Likewise.
11993 (noncommutative_binary_cmp0_noout): Likewise.
11994 (noncommutative_binary_comparison_result_used): Removed.
11995 (rsub_cmp0): New pattern.
11996 (rsub_cmp0_noout): Likewise.
11997 (extzvsi): Changed, keep only meaningful variants.
11998 (SQH, SEZ): New iterators.
11999 (SQH_postfix): New mode attribute.
12000 (SEZ_prefix): New code attribute.
12001 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12002 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12003 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12004 of numerical value.
12005 (noncommutative_operator): Check the availability of barrel
12008 2018-04-09 Richard Biener <rguenther@suse.de>
12010 PR tree-optimization/85284
12011 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12012 Only use the niter constraining form of simple_iv when the exit
12013 is always executed.
12015 2018-04-09 Tom de Vries <tom@codesourcery.com>
12018 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12019 (define_expand "*memory_barrier"): New define_expand.
12020 (define_insn "memory_barrier"): New insn.
12022 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12024 PR rtl-optimization/80463
12025 PR rtl-optimization/83972
12026 PR rtl-optimization/83480
12028 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12029 correct producer for the insn.
12030 (tidy_control_flow): Fixup seqnos in case of debug insns.
12032 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12034 PR rtl-optimization/83913
12036 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12037 different sched-times when merging exprs.
12039 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12041 PR rtl-optimization/83962
12043 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12044 tidy_fallthru_edge and tidy_control_flow.
12046 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12048 PR rtl-optimization/83530
12050 * sel-sched.c (force_next_insn): New global variable.
12051 (remove_insn_for_debug): When force_next_insn is true, also leave only
12052 next insn in the ready list.
12053 (sel_sched_region): When the region wasn't scheduled, make another pass
12054 over it with force_next_insn set to 1.
12056 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12058 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12060 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12061 for interrupt control.
12062 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12063 functions for interrupt control.
12064 * config/nds32/nds32-intrinsic.md: Likewise.
12065 * config/nds32/nds32_intrinsic.h: Likewise.
12066 * config/nds32/nds32.h (nds32_builtins): Likewise.
12068 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12070 * config/nds32/nds32.c (nds32_init_machine_status,
12071 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12072 strict_aligned_p field.
12073 (nds32_expand_to_rtl_hook): New function.
12074 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12075 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12077 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12078 Chung-Ju Wu <jasonwucj@gmail.com>
12080 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12081 * config/nds32/nds32-n7.md: New file.
12082 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12083 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12085 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12086 * config/nds32/nds32.md (pipeline_model): Add n7.
12087 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12088 * config/nds32/pipelines.md: Include n7 settings.
12090 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12091 Chung-Ju Wu <jasonwucj@gmail.com>
12093 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12094 * config/nds32/nds32-e8.md: New file.
12095 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12096 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12098 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12099 * config/nds32/nds32.md (pipeline_model): Add e8.
12100 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12101 * config/nds32/pipelines.md: Include e8 settings.
12103 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12104 Chung-Ju Wu <jasonwucj@gmail.com>
12106 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12107 * config/nds32/nds32-n8.md: New file.
12108 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12109 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12111 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12112 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12113 * config/nds32/nds32.md (pipeline_model): Add n8.
12114 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12115 * config/nds32/pipelines.md: Include n8 settings.
12117 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12118 Chung-Ju Wu <jasonwucj@gmail.com>
12120 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12121 * config/nds32/nds32-n9-2r1w.md: New file.
12122 * config/nds32/nds32-n9-3r2w.md: New file.
12123 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12124 nds32_register_ports): New or modify for cpu n9.
12125 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12127 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12128 * config/nds32/nds32-utils.c: New file.
12129 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12130 TARGET_MUL_SLOW): Define.
12131 * config/nds32/nds32.md (pipeline_model): New attribute.
12132 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12133 New options that support cpu n9.
12134 * config/nds32/pipelines.md: Include n9 settings.
12135 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12137 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12139 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12140 information if necessary.
12141 (output_cond_branch_compare_zero): Likewise.
12142 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12143 (nds32_target_alignment): Refine for alignment.
12144 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12145 (FUNCTION_BOUNDARY): Modify.
12146 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12148 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12150 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12152 * config/nds32/constants.md (unspec_volatile_element): Add values for
12153 TLB operation and data prefetch.
12154 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12155 functions for TLB operation and data prefetch.
12156 * config/nds32/nds32-intrinsic.md: Likewise.
12157 * config/nds32/nds32_intrinsic.h: Likewise.
12158 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12159 (nds32_print_operand): Likewise.
12160 * config/nds32/nds32.h (nds32_builtins): Likewise.
12162 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12163 Andrew Pinski <pinsika@gcc.gnu.org>
12165 PR middle-end/82976
12166 * match.pd: Use constant_boolean_node of correct type instead of
12167 boolean_true_node or boolean_false_node for simplifying
12168 pointer comparisons to zero.
12170 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12172 PR tree-optimization/80021
12173 * tree.c (verify_type_variant): Make error call in verify_variant_match
12174 translatable and remove final full stop.
12176 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12178 * config/nds32/constants.md (unspec_volatile_element): Add
12179 UNSPEC_VOLATILE_EH_RETURN.
12180 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12181 nds32_output_stack_pop): Support dwarf exception handling process.
12182 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12183 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12184 exception handling process.
12185 (nds32_compute_stack_frame): Likewise.
12186 (nds32_return_addr_rtx): Likewise.
12187 (nds32_initial_elimination_offset): Likewise.
12188 (nds32_expand_prologue): Likewise.
12189 (nds32_expand_epilogue): Likewise.
12190 (nds32_dynamic_chain_address): New function.
12191 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12192 exception handling.
12193 (DYNAMIC_CHAIN_ADDRESS): Define.
12194 (EH_RETURN_DATA_REGNO): Define.
12195 (EH_RETURN_STACKADJ_RTX): Define.
12196 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12197 patterns for dwarf exception handling.
12199 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12201 * config/nds32/nds32.h: Clean up obsolete macros.
12203 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12205 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12206 Add enum values for particular instructions.
12207 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12208 particular intrinsic functions.
12209 * config/nds32/nds32-intrinsic.md: Likewise.
12210 * config/nds32/nds32_intrinsic.h: Likewise.
12211 * config/nds32/nds32.h (nds32_builtins): Likewise.
12212 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12213 (btst, ave): New patterns for particular instructions.
12215 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12217 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12218 Add enum values for atomic load/store and memory sync.
12219 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12221 * config/nds32/nds32-intrinsic.md: Likewise.
12222 * config/nds32/nds32_intrinsic.h: Likewise.
12223 * config/nds32/nds32.h (nds32_builtins): Likewise.
12225 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12227 PR tree-optimization/85257
12228 * fold-const.c (native_encode_vector): If not all elts could fit
12229 and off is -1, return 0 rather than offset.
12230 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12231 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12232 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12233 adjust buffer in native_interpret_expr call.
12235 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12237 * config/nds32/constants.md (unspec_volatile_element): Add cache
12238 control enum values.
12239 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12240 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12241 * config/nds32/nds32.c (nds32_cctl_names): New.
12242 (nds32_print_operand): Handle cache control register names.
12243 * config/nds32/nds32.h (nds32_builtins): New enum values.
12244 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12246 * config/nds32/nds32.md (type): Add mmu.
12247 * config/nds32/pipelines.md (simple_insn): Add mmu.
12249 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12251 * config/nds32/nds32.md (type): Remove call.
12252 * config/nds32/pipelines.md (simple_insn): Likewise.
12254 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12256 * config/nds32/constants.md (unspec_volatile_element): Add
12257 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12258 UNSPEC_VOLATILE_FMFCFG.
12259 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12260 description for fmfcfg and fmfcsr.
12261 (bdesc_1arg): Add fmtcsr.
12262 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12263 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12264 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12265 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12266 unspec_fmfcfg): New patterns.
12267 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12268 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12269 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12270 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12271 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12272 __nds32__fmfcfg): Define.
12274 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12276 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12277 intrinsic register names.
12278 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12279 intrinsic register enum values and macros.
12281 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12283 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12284 for load/store addressing form.
12285 (nds32_print_operand_address): Likewise.
12287 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12290 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12291 based on LABEL_REF. Remove useless assertion.
12292 (pic_address_needs_scratch): Fix formatting.
12293 (sparc_legitimize_pic_address): Minor tweaks.
12294 (sparc_delegitimize_address): Adjust assertion accordingly.
12295 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12296 into symbolic_operand.
12297 (movsi_high_pic_label_ref): Likewise.
12298 (movsi_lo_sum_pic_label_ref): Likewise.
12299 (movdi_pic_label_ref): Likewise.
12300 (movdi_high_pic_label_ref): Likewise.
12301 (movdi_lo_sum_pic_label_ref): Likewise.
12303 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12305 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12306 custom LIB_SPEC setup.
12308 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12309 Kito Cheng <kito.cheng@gmail.com>
12311 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12312 * config/riscv/freebsd.h: New.
12314 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12316 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12317 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12320 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12321 Kito Cheng <kito.cheng@gmail.com>
12323 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12324 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12325 * config/nds32/nds32-protos.h (nds32_output_call,
12326 nds32_output_return): Declare.
12327 * config/nds32/nds32.md: Refine all the call and return patterns.
12329 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12332 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12333 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12335 PR rtl-optimization/84872
12336 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12337 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12338 EDGE_CROSSING edge.
12340 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12342 * expr.c (copy_blkmode_to_reg): Revert 254862.
12343 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12345 2018-04-06 Richard Biener <rguenther@suse.de>
12347 PR middle-end/85244
12348 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12349 after seeing a component reference with an adjacent field. Treat
12350 refs to arrays at struct end of external decls similar to
12351 refs to unconstrained commons.
12353 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12356 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12357 look through SAVE_EXPRs with non-side-effects argument. Adjust
12359 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12362 2018-04-06 Richard Biener <rguenther@suse.de>
12364 PR middle-end/85180
12365 * alias.c (find_base_term): New wrapper around find_base_term
12366 unwinding CSELIB_VAL_PTR changes.
12367 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12370 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12372 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12374 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12375 constant definitions.
12376 ("nop"): lr 0,0 -> nopr r0
12377 ("nop_lr0", "nop_lr1"): New insn definitions.
12379 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12381 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12382 NDS32_V3PUSH_AVAILABLE_P macro.
12384 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12385 Chung-Ju Wu <jasonwucj@gmail.com>
12387 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12388 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12389 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12390 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12391 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12392 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12393 * config/nds32/constraints.md: New constraints and checking for hard
12394 float configuration.
12395 * config/nds32/iterators.md: New mode iterator and attribute for hard
12396 float configuration.
12397 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12399 * config/nds32/nds32-fpu.md: New file.
12400 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12401 deal with hard float code generation.
12402 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12404 (abi_type, float_reg_number): New enum type.
12405 * config/nds32/nds32-predicates.c: New predicates for hard float.
12406 * config/nds32/nds32-protos.h: Declare functions for hard float.
12407 * config/nds32/nds32.c: Implementation for hard float configuration.
12408 * config/nds32/nds32.h: Definitions for hard float configuration.
12409 * config/nds32/nds32.md: Include hard float machine description and
12410 modify patterns for hard float configuration.
12411 * config/nds32/nds32.opt: New options for hard float configuration.
12412 * config/nds32/predicates.md: New predicates for hard float
12415 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12417 * common/config/nds32/nds32-common.c
12418 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12420 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12422 PR middle-end/85195
12423 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12424 CONSTRUCTOR_ELT (ctor, ...)->value.
12426 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12429 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12431 2018-04-05 Tom de Vries <tom@codesourcery.com>
12434 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12437 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12438 Kito Cheng <kito.cheng@gmail.com>
12440 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12441 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12442 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12443 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12445 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12446 Kito Cheng <kito.cheng@gmail.com>
12448 * config/nds32/constraints.md (Ufe): New memory constraint.
12449 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12450 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12451 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12453 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12454 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12456 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12458 * config/nds32/nds32.md: Use optimize_size in the condition for
12459 alu-shift instructions.
12461 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12463 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12465 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12467 * config/nds32/nds32.md (negsi2): Refine pattern.
12469 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12470 Chung-Ju Wu <jasonwucj@gmail.com>
12472 * config/nds32/iterators.md (shift_rotate): New code iterator.
12473 (shift): New code attribute.
12474 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12475 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12476 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12477 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12478 bit-wise operations.
12479 (andsi3, *andsi3): Ditto.
12480 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12481 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12482 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12483 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12484 nds32_ior_operand, nds32_xor_operand): New predicates.
12486 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12488 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12489 (addsi3, subsi3): ... this.
12491 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12493 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12495 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12497 * config/nds32/nds32.md: Adjust indention.
12499 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12501 * config/nds32/nds32.md (feature): New attribute.
12503 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12505 * config/nds32/nds32.md (subtype): New attribute.
12507 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12510 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12511 expansion to perform a bitwise AND of the argument followed by a
12512 boolean negation of the result.
12514 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12516 PR rtl-optimization/84878
12517 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12518 the basic block. Assert the use reference is not artificial and that
12519 it has an associated insn.
12521 2018-04-04 Michael Matz <matz@suse.de>
12523 * builtins.c (compute_objsize): Pass correct operand
12524 to array_at_struct_end_p.
12526 2018-04-04 Richard Biener <rguenther@suse.de>
12529 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12530 from contexts for DINFO_LEVEL_TERSE and below.
12532 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12534 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12535 resiter_operand condition.
12536 * config/nds32/nds32.md (*move<mode>): Ditto.
12538 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12539 Monk Chiang <sh.chiang04@gmail.com>
12541 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12543 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12545 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12547 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12548 Kito Cheng <kito.cheng@gmail.com>
12550 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12551 nds32_cond_code_str, output_cond_branch,
12552 output_cond_branch_compare_zero, nds32_expand_cbranch,
12553 nds32_expand_cstore, nds32_expand_movcc,
12554 nds32_output_cbranchsi4_equality_zero,
12555 nds32_output_cbranchsi4_equality_reg,
12556 nds32_output_cbranchsi4_equality_reg_or_const_int,
12557 nds32_output_cbranchsi4_greater_less_zero: New functions.
12558 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12559 nds32_expand_cstore, nds32_expand_movcc,
12560 nds32_output_cbranchsi4_equality_zero,
12561 nds32_output_cbranchsi4_equality_reg,
12562 nds32_output_cbranchsi4_equality_reg_or_const_int,
12563 nds32_output_cbranchsi4_greater_less_zero): Declare.
12564 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12565 nds32_rimm11s_operand): New predicates.
12566 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12567 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12570 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12572 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12573 * config/nds32/nds32.md: Ditto.
12574 * config/nds32/pipelines.md: Ditto.
12576 2018-04-04 Richard Biener <rguenther@suse.de>
12578 PR tree-optimization/85168
12579 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12580 propagating abnormals.
12582 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12584 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12586 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12587 Kito Cheng <kito.cheng@gmail.com>
12589 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12590 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12591 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12592 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12593 * config/nds32/nds32.md (sibcall_internal): New.
12594 (sibcall_register): Remove.
12595 (sibcall_immediate): Remove.
12596 (sibcall_value_internal): New.
12597 (sibcall_value_register): Remove.
12598 (sibcall_value_immediate): Remove.
12599 * config/nds32/predicates.md (nds32_general_register_operand): New.
12600 (nds32_call_address_operand): New.
12602 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12604 PR rtl-optimization/85167
12605 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12606 bb_defs if *split_p, instead preinitialize it to NULL.
12608 PR tree-optimization/85156
12609 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12610 evaluating the argument multiple times.
12612 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12614 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12616 (_mm_cvtpd_ps): Likewise.
12617 (_mm_cvttpd_epi32): Likewise.
12618 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12619 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12620 vector, pixel, and bool following altivec.h include.
12622 2018-04-03 Martin Sebor <msebor@redhat.com>
12624 * doc/extend.texi (Common Function Attributes): Clarify.
12625 (const attribute): Likewise.
12626 (pure attribute): Likewise.
12628 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12631 * config/i386/i386.c (ix86_expand_vector_set): Use
12632 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12634 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12636 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12637 instructions when changing rounding bits to preserve precision bits
12638 in the x87 control word.
12640 2018-04-03 Martin Liska <mliska@suse.cz>
12642 PR tree-optimization/82491
12643 * rtl.h (strip_offset_and_add): Replace += suboffset with
12644 poly_uint64 () + suboffset.
12646 2018-03-29 Martin Liska <mliska@suse.cz>
12647 Martin Jambor <mjambor@suse.cz>
12650 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12651 param_type is not an integral or pointer type.
12653 2018-04-03 Richard Biener <rguenther@suse.de>
12655 * sese.h (recompute_all_dominators): Remove.
12657 2018-04-02 Martin Sebor <msebor@redhat.com>
12659 * doc/invoke.texi (-Wrestrict): Fix typos.
12661 2018-04-02 Jim Wilson <jimw@sifive.com>
12663 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12664 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12665 (<optab>di3, <optab>si3_extend): Likewise.
12666 (<optab>si3_mask, <optab>si3_mask_1): New.
12667 (<optab>di3_mask, <optab>di3_mask_1): New.
12668 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12669 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12670 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12672 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12674 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12677 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12679 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12680 (nds32_canonicalize_comparison): New function.
12682 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12683 Kito Cheng <kito.cheng@gmail.com>
12684 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12686 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12687 * config/nds32/constants.md (unspec_volatile_element): Add
12688 UNSPEC_VOLATILE_RELAX_GROUP.
12689 * config/nds32/nds32-relax-opt.c: New file.
12690 * config/nds32/nds32-predicates.c
12691 (nds32_symbol_load_store_p): New function.
12692 * config/nds32/nds32-protos.h
12693 (nds32_symbol_load_store_p): Declare function.
12694 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12695 * config/nds32/nds32.c
12696 (nds32_register_pass): New function to register pass.
12697 (nds32_register_passes): New function to register passes.
12698 * config/nds32/nds32.md (relax_group): New pattern.
12699 * config/nds32/nds32.opt (mrelax-hint): New option.
12700 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12702 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12704 * config/nds32/t-nds32: Modify files dependency.
12706 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12708 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12709 (PROFILE_HOOK): Define its implementation.
12711 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12713 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12714 type and 32-bit size.
12716 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12718 PR middle-end/85090
12719 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12720 (V_128_256): New mode iterator.
12721 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12722 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12723 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12725 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12726 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12728 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12731 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12732 NaN inputs correctly.
12734 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12737 * config/rs6000/vsx.md (??r): New mode attribute.
12738 (*vsx_mov<mode>_64bit): Use it.
12739 (*vsx_mov<mode>_32bit): Likewise.
12741 2018-03-30 Martin Sebor <msebor@redhat.com>
12743 PR tree-optimization/84818
12744 * builtins.c (check_access): Use warning_n.
12746 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12749 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12751 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12754 2018-03-30 Julia Koval <julia.koval@intel.com>
12757 * x86-tune.def (movx, partial_reg_dependency): Enable for
12760 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12762 PR inline-asm/84985
12763 * lra-constraints.c (process_alt_operands): Move setting
12764 this_alternative_matches below.
12766 2018-03-29 Martin Liska <mliska@suse.cz>
12769 * doc/invoke.texi: Document how LTO works with debug info.
12770 Describe auto-load support of binutils. Mention 'x86-64'
12771 as valid option value of -march option.
12773 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12775 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12778 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12779 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12780 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12783 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12786 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12787 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12788 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12789 for RS6000_BTM_POWERPC64.
12790 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12791 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12792 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12795 (DIVDEU): Likewise.
12797 2018-03-28 Carl Love <cel@us.ibm.com>
12800 2017-09-27 Carl Love <cel@us.ibm.com>
12802 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12803 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12804 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12807 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12809 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12810 instead of __vector bool.
12811 (_mm_max_pu8): Likewise.
12812 (_mm_min_pi16): Likewise.
12814 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12817 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12818 (DIVWEUO): Likewise.
12819 (DIVDEO): Likewise.
12820 (DIVDEUO): Likewise.
12821 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12822 DIVWEUO and DIVDEUO.
12823 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12824 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12825 (div_extend): Likewise.
12826 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12828 (__builtin_divweuo): Likewise.
12829 (__builtin_divdeo): Likewise.
12830 (__builtin_divdeuo): Likewise.
12832 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12835 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12836 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12838 PR tree-optimization/82004
12839 * gimple-match-head.c (optimize_pow_to_exp): New function.
12840 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12841 Don't fold to exp if optimize_pow_to_exp is false.
12843 2018-03-28 Martin Liska <mliska@suse.cz>
12846 * calls.c (initialize_argument_information): Fix trailing space.
12847 * common.opt: Fix typo and provide better explanation for
12848 -fsanitize-coverage option.
12849 * config/i386/i386.opt: Fix typo.
12851 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12852 Martin Liska <mliska@suse.cz>
12855 * gimplify.c (asan_poison_variable): Don't do the check for
12856 gimplify_omp_ctxp here.
12857 (gimplify_decl_expr): Do it here.
12858 (gimplify_target_expr): Likewise.
12860 2018-03-28 Martin Liska <mliska@suse.cz>
12863 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12864 chkp_type_bounds_count if MPX is not enabled.
12866 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12868 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12870 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12873 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12874 function to create the function decl for complex long double
12875 multiply and divide for -mabi=ieeelongdouble.
12876 (init_float128_ieee): Call it.
12878 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12881 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12882 -fcf-protection=branch -mibt.
12883 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12885 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12888 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12889 arm_word_relocations.
12891 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12894 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12895 extern array declarations.
12897 2018-03-27 Richard Biener <rguenther@suse.de>
12899 PR middle-end/84067
12900 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12901 explicit single_use checks.
12903 2018-03-27 Richard Biener <rguenther@suse.de>
12905 PR tree-optimization/85082
12906 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12909 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12911 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12912 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12913 Turn on fasynchronous-unwind-tables and funwind-tables.
12915 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12918 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12919 (*bmi_blsr_<mode>_ccz): Ditto.
12921 2018-03-26 Tom de Vries <tom@codesourcery.com>
12923 PR tree-optimization/85063
12924 * omp-general.c (offloading_function_p): New function. Factor out
12926 * omp-offload.c (pass_omp_target_link::gate): ... here.
12927 * omp-general.h (offloading_function_p): Declare.
12928 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12929 with attribute omp declare target for offloading functions.
12931 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12933 PR tree-optimization/84005
12934 * tree-data-ref.h (get_base_for_alignment): Declare.
12935 * tree-data-ref.c (get_base_for_alignment_1): New function.
12936 (get_base_for_alignment): Likewise.
12937 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12938 get_base_for_alignment to find a suitable base object, instead
12939 of always using drb->base_address.
12941 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12943 PR inline-asm/85022
12944 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12945 known size by default.
12947 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12949 PR inline-asm/85030
12950 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12951 and non BLKmode operands.
12953 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12956 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12957 Clean up attributes.
12959 2018-03-23 Richard Biener <rguenther@suse.de>
12962 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12963 we are going to emit early debug for LTO.
12965 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12967 PR inline-asm/85034
12968 * function.c (match_asm_constraints_1): Don't optimize if input
12969 doesn't satisfy general_operand predicate for output's mode.
12971 PR inline-asm/85022
12972 * alias.c (write_dependence_p): Don't require for x_canonicalized
12973 non-VOIDmode if x has VOIDmode.
12976 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12977 just don't try to optimize it rather than assert it never happens.
12979 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12981 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12982 macro expansions for definition of ST_INTERNAL_<mode> and
12983 LD_INTERNAL_<mode> builtins.
12984 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12986 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12988 (altivec_expand_st_builtin): Likewise.
12989 (altivec_expand_builtin): Remove calls to deleted functions.
12990 (rs6000_address_for_altivec): Delete this function.
12991 * config/rs6000/vector.md: Remove expands for
12992 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12994 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12997 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12998 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12999 re-computing once computed.
13000 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13001 (arm_init_machine_status): Initialize
13002 machine->static_chain_stack_bytes.
13004 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13007 * doc/extend.texi: Add four new prototypes for vec_ld.
13008 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13009 definitions for more logical presentation.
13010 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13011 entries for V1TI variants of __builtin_altivec_ld builtin.
13012 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13013 handling of V1TI variant of LVX icode pattern.
13014 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13015 (rs6000_gimple_fold_builtin): Likewise.
13016 (altivec_init_builtins): Add code to define
13017 __builtin_altivec_lvx_v1ti function.
13019 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13021 PR inline-asm/84941
13022 * function.c (match_asm_constraints_1): Don't do the optimization
13023 if input isn't a REG, SUBREG, MEM or constant.
13025 2018-03-22 Tom de Vries <tom@codesourcery.com>
13027 PR tree-optimization/84956
13028 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13029 bb_has_abnormal_pred.
13031 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13034 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13035 DECL_INITIAL (decl) to decl at the end.
13036 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13037 adjust the comment.
13039 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13041 * doc/extend.texi (__builtin_tgmath): Document when complex
13042 integer types are treated as _Complex _Float64.
13044 2018-03-21 Tom de Vries <tom@codesourcery.com>
13046 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13048 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13050 PR tree-optimization/84960
13051 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13052 if it is ENTRY block, move them into single succ of ENTRY in that case.
13054 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13056 PR tree-optimization/84811
13057 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13058 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13059 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13060 (known_subrange_p): Update accordingly. Cast each value involved
13061 in the size comparison, rather than casting the result of the
13064 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13066 PR tree-optimization/84982
13067 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13068 by flipping the least significant bit rather than all bits from
13069 bitpos to bitpos + bitsize - 1.
13071 2018-03-21 Nathan Sidwell <nathan@acm.org>
13073 * doc/extend.texi (Deprecated Features): Remove mention of
13074 long-deleted deprecations.
13076 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13079 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13080 * configure: Regenerate.
13082 2018-03-21 Tom de Vries <tom@codesourcery.com>
13084 PR tree-optimization/83126
13085 * tree-parloops.c (num_phis): New function.
13086 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13088 2018-03-21 Nathan Sidwell <nathan@acm.org>
13090 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13091 mention anon-struct/union members and trailing attributes.
13093 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13095 PR tree-optimization/84969
13096 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13097 builtin memset partitions if they set different rhs values.
13099 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13101 PR rtl-optimization/84989
13102 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13103 VEC_DUPLICATE with scalar result mode.
13105 2018-03-21 Martin Liska <mliska@suse.cz>
13108 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13109 not intended return statement.
13111 2018-03-21 Martin Liska <mliska@suse.cz>
13114 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13115 (chkp_find_bound_slots_1): Limit number of iterations.
13117 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13120 * Minor grammar fixes for x86 options.
13122 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13125 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13126 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13128 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13131 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13132 (altivec_lvx_<mode>_1op): Likewise.
13133 (altivec_stvx_<mode>_2op): Likewise.
13134 (altivec_stvx_<mode>_1op): Likewise.
13135 (altivec_lvx_<VM2:mode>): New define_expand.
13136 (altivec_stvx_<VM2:mode>): Likewise.
13137 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13138 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13139 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13140 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13141 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13142 (rs6000_gen_lvx): Likewise.
13143 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13144 (altivec_expand_stv_builtin): Likewise.
13145 (altivec_expand_builtin): Likewise.
13146 * config/rs6000/vector.md: Likewise.
13148 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13151 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13154 2018-03-20 Richard Biener <rguenther@suse.de>
13157 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13158 sign-conversions as zero, fall back to standard scalar_stmt
13161 2018-03-20 Martin Liska <mliska@suse.cz>
13164 * predict.c (rebuild_frequencies): Handle case when we have
13165 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13167 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13170 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13171 flag_section_anchors.
13172 * varasm.c (use_blocks_for_decl_p): Remove hack for
13173 dw2_force_const_mem.
13176 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13178 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13179 be created, use lowpart_subreg of operands[0] rather than operands[0]
13181 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13182 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13183 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13184 and n constraint instead of aarch64_shift_imm_di and Usd.
13185 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13186 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13188 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13191 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13192 to favor GPR over NEON registers.
13193 (<shift>di3_neon): Likewise.
13195 2018-03-20 Tom de Vries <tom@codesourcery.com>
13198 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13199 (nvptx_process_pars): Emit bar.sync asap and alap.
13201 2018-03-20 Tom de Vries <tom@codesourcery.com>
13204 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13205 seen_label if seen_label is already set.
13207 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13210 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13211 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13212 Use 1U instead of 1. Formatting fixes.
13215 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13216 instead of TREE_TYPE (s1) for the return value.
13218 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13220 PR tree-optimization/84946
13221 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13222 bitsize + bitsize in poly_uint64 rather than poly_int64.
13225 * dwarf2asm.c: Include fold-const.c.
13226 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13227 of decl rather than decl itself.
13229 PR rtl-optimization/84643
13230 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13232 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13235 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13236 calling assemble_variable.
13238 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13241 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13242 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13244 2018-03-19 Jim Wilson <jimw@sifive.com>
13247 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13248 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13249 (riscv_first_stack_step): Likewise.
13250 (riscv_option_override): Use STACK_BOUNDARY instead of
13251 MIN_STACK_BOUNDARY.
13252 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13253 MIN_STACK_BOUNDARY.
13254 (BIGGEST_ALIGNMENT): Set to 128.
13255 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13256 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13259 2018-03-19 Richard Biener <rguenther@suse.de>
13261 PR tree-optimization/84933
13262 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13263 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13265 2018-03-19 Richard Biener <rguenther@suse.de>
13267 PR tree-optimization/84859
13268 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13269 (cond_if_else_store_replacement): Perform sinking operation on
13270 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13271 Generalize what a BB with a single eligible store is.
13273 2018-03-19 Richard Biener <rguenther@suse.de>
13275 PR tree-optimization/84929
13276 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13277 chrec_is_positive against non-chrec arg.
13279 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13282 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13284 2018-03-18 Martin Liska <mliska@suse.cz>
13286 PR rtl-optimization/84635
13287 * regrename.c (build_def_use): Use matches_mode only when
13290 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13292 PR tree-optimization/84913
13293 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13294 vectorize chains of COND_EXPRs.
13296 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13298 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13300 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13302 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13304 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13306 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13308 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13309 Kito Cheng <kito.cheng@gmail.com>
13311 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13312 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13313 (nds32_adjust_reg_alloc_order): New function.
13314 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13316 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13318 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13319 nds32_print_operand, nds32_print_operand_address): Use
13320 HOST_WIDE_INT_PRINT_DEC instead.
13322 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13324 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13326 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13329 * config/i386/i386.c (initial_ix86_tune_features,
13330 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13331 unsigned long long.
13332 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13333 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13334 rather than 1u << ix86_tune. Formatting fix.
13335 (ix86_option_override_internal): Change ix86_arch_mask from
13336 unsigned int to unsigned HOST_WIDE_INT, initialize to
13337 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13338 (ix86_function_specific_restore): Likewise.
13340 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13343 * postreload.c (reload_combine_recognize_pattern): Perform
13344 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13345 truncate_int_for_mode the result for the destination's mode.
13348 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13349 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13351 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13354 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13357 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13358 regno_allocno_class_array and sorted_pseudos.
13359 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13360 insns where regno is used.
13362 2018-03-16 Martin Liska <mliska@suse.cz>
13365 * multiple_target.c (create_dispatcher_calls): Redirect
13366 reference in the symbol table.
13368 2018-03-16 Martin Liska <mliska@suse.cz>
13371 * multiple_target.c (create_dispatcher_calls): Redirect also
13374 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13378 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13379 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13380 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13382 2018-03-16 Julia Koval <julia.koval@intel.com>
13384 * doc/invoke.texi (Skylake Server): Add CLWB.
13385 Cannonlake): Remove CLWB.
13387 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13389 PR tree-optimization/84841
13390 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13392 (FLOAT_ONE_CONST_TYPE): Define.
13393 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13394 (sort_by_operand_rank): Put entries with higher constant_type last
13395 rather than first to match comments.
13397 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13399 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13402 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13405 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13406 check and use address of target always.
13408 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13411 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13412 (indirect_thunk_bnd_needed): Likewise.
13413 (indirect_thunks_used): Likewise.
13414 (indirect_thunks_bnd_used): Likewise.
13415 (indirect_return_needed): New.
13416 (indirect_return_bnd_needed): Likewise.
13417 (output_indirect_thunk_function): Add a bool argument for
13419 (output_indirect_thunk_function): Don't generate alias for
13420 function return thunk.
13421 (ix86_code_end): Call output_indirect_thunk_function to generate
13422 function return thunks.
13423 (ix86_output_function_return): Set indirect_return_bnd_needed
13424 and indirect_return_needed instead of indirect_thunk_bnd_needed
13425 and indirect_thunk_needed.
13427 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13429 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13430 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13431 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13433 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13434 Paul Hua <paul.hua.gm@gmail.com>
13437 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13439 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13441 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13442 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13443 resp. SFmode cases.
13445 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13448 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13449 instead of GET_MODE_SIZE when comparing Units.
13451 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13454 * varasm.c (hash_section): Return an unchangeble hash value
13455 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13456 Return !aarch64_can_use_per_function_literal_pools_p ().
13458 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13461 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13462 rather than address of cmode as last argument to prepare_cmp_insn.
13464 2018-03-15 Julia Koval <julia.koval@intel.com>
13466 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13467 F_AVX512VNNI, F_AVX512BITALG): New.
13469 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13472 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13473 insn for floating-point loads and stores.
13475 2018-03-14 Carl Love <cel@us.ibm.com>
13477 * config/rs6000/rs6000-c.c: Add macro definitions for
13478 ALTIVEC_BUILTIN_VEC_PERMXOR.
13479 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13480 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13481 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13482 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13484 * config/doc/extend.texi: Add prototypes for vec_permxor.
13486 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13489 * diagnostic-show-locus.c (class layout_point): Convert m_line
13490 from int to linenum_type.
13491 (line_span::comparator): Use linenum "compare" function when
13492 comparing line numbers.
13493 (test_line_span): New function.
13494 (layout_range::contains_point): Convert param "row" from int to
13496 (layout_range::intersects_line_p): Likewise.
13497 (layout::will_show_line_p): Likewise.
13498 (layout::print_source_line): Likewise.
13499 (layout::should_print_annotation_line_p): Likewise.
13500 (layout::print_annotation_line): Likewise.
13501 (layout::print_leading_fixits): Likewise.
13502 (layout::annotation_line_showed_range_p): Likewise.
13503 (struct line_corrections): Likewise for field m_row.
13504 (line_corrections::line_corrections): Likewise for param "row".
13505 (layout::print_trailing_fixits): Likewise.
13506 (layout::get_state_at_point): Likewise.
13507 (layout::get_x_bound_for_row): Likewise.
13508 (layout::print_line): Likewise.
13509 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13510 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13511 * input.c (selftest::test_linenum_comparisons): New function.
13512 (selftest::input_c_tests): Call it.
13513 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13514 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13515 * selftest.h (ASSERT_GT): New macro.
13516 (ASSERT_GT_AT): New macro.
13517 (ASSERT_LT): New macro.
13518 (ASSERT_LT_AT): New macro.
13520 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13522 PR rtl-optimization/84780
13523 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13525 2018-03-14 Martin Liska <mliska@suse.cz>
13527 * tree.c (record_node_allocation_statistics): Use
13528 get_stats_node_kind.
13529 (get_stats_node_kind): New function extracted from
13530 record_node_allocation_statistics.
13531 (free_node): Use get_stats_node_kind.
13533 2018-03-14 Richard Biener <rguenther@suse.de>
13535 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13536 that the value-set of ANTIC_IN doesn't grow.
13539 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13541 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13542 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13544 2018-03-14 Julia Koval <julia.koval@intel.com>
13546 * config.gcc (icelake-client, icelake-server): New.
13548 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13549 (initial_ix86_arch_features): Ditto.
13550 (PTA_SKYLAKE): Add SGX.
13551 (PTA_ICELAKE): Remove.
13552 (PTA_ICELAKE_CLIENT): New.
13553 (PTA_ICELAKE_SERVER): New.
13554 (ix86_option_override_internal): Split up icelake on icelake client and
13556 (get_builtin_code_for_version): Ditto.
13557 (fold_builtin_cpu): Ditto.
13558 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13559 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13560 * config/i386/i386.h (processor_type): Ditto.
13561 * doc/invoke.texi: Ditto.
13563 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13566 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13567 INTEGER_CST offset, add it together with bitpos / 8 and
13568 sign extend based on POINTER_SIZE.
13572 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13575 * config/i386/constraints.md (Yc): New register constraint.
13576 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13577 Use Yc constraint for alternative 2 of operand 0. Remove
13578 preferred_for_speed attribute.
13580 2018-03-14 Richard Biener <rguenther@suse.de>
13582 PR tree-optimization/84830
13583 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13584 with the old one to avoid oscillations.
13586 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13589 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13591 (assign_by_spills): Return a flag of reload assignment failure.
13592 Do not process the reload assignment failures. Do not spill other
13593 reload pseudos if they has the same reg class. Update n if
13595 (lra_assign): Add a return arg. Set up from the result of
13596 assign_by_spills call.
13597 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13598 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13599 usage_insns if it is not NULL.
13600 (spill_hard_reg_in_range): New function.
13601 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13602 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13603 function prototypes.
13604 (lra_assign): Change prototype.
13605 * lra.c (lra): Add code to deal with fails by splitting hard reg
13608 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13610 * config/riscv/riscv.opt (mrelax): New option.
13611 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13612 "norelax" when riscv_mrelax is disabled.
13613 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13615 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13618 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13619 reassociation for int modes.
13621 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13623 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13624 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13626 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13627 * config/aarch64/aarch64-sve.md
13628 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13629 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13630 (*extend<mode><Vwide>2): Rename to...
13631 (aarch64_sve_extend<mode><Vwide>2): ...this.
13632 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13633 renaming the old pattern to...
13634 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13636 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13637 define_expand, renaming the old pattern to...
13638 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13639 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13640 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13641 account when deciding which SVE instruction the optab should use.
13642 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13644 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13646 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13647 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13648 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13649 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13650 (tlsdesc_small_<mode>): Turn a define_expand and use
13651 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13652 (tlsdesc_small_advsimd_<mode>): ...this.
13653 (tlsdesc_small_sve_<mode>): New pattern.
13655 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13657 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13658 (UNSPEC_UMUL_HIGHPART): New constants.
13659 (MUL_HIGHPART): New int iteraor.
13660 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13661 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13663 (*<su>mul<mode>3_highpart): New define_insn.
13665 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13668 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13671 2018-03-13 Martin Liska <mliska@suse.cz>
13674 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13676 (sem_item_optimizer::~sem_item_optimizer): Release it.
13677 (sem_item_optimizer::merge_classes): Register variable aliases.
13678 (sem_item_optimizer::fixup_pt_set): New function.
13679 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13680 * ipa-icf.h: Declare new variables and functions.
13682 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13684 PR middle-end/84834
13685 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13686 integer_pow2p@2 and test integer_pow2p in condition.
13687 (A < 0 ? C : 0): Similarly for @1.
13689 PR middle-end/84831
13690 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13691 characters starting at p contain '\0' character, don't look beyond
13695 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13696 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13699 * reg-stack.c (change_stack): Change update_end var from int to
13700 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13701 also call set_block_for_insn on the newly added insns and rescan.
13704 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13705 on the last operand.
13708 * tree.c (stabilize_reference_1): Return save_expr (e) for
13709 STATEMENT_LIST even if it doesn't have side-effects.
13711 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13713 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13715 2018-03-12 Renlin Li <renlin.li@arm.com>
13717 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13718 aarch64_output_scalar_simd_mov_immediate.
13720 2018-03-12 Martin Sebor <msebor@redhat.com>
13722 PR tree-optimization/83456
13723 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13724 for perfectly overlapping calls to memcpy.
13725 (gimple_fold_builtin_memory_chk): Same.
13726 (gimple_fold_builtin_strcpy): Handle no-warning.
13727 (gimple_fold_builtin_stxcpy_chk): Same.
13728 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13730 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13732 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13733 parameter. Use it for SFmode.
13734 (rs6000_function_arg_advance_1): Adjust.
13735 (rs6000_function_arg): Adjust.
13736 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13738 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13740 PR rtl-optimization/84169
13741 PR rtl-optimization/84780
13742 * combine.c (can_combine_p): Check for a 2-insn combination whether
13743 the destination register is used between the two insns, too.
13745 2018-03-12 Richard Biener <rguenther@suse.de>
13747 PR tree-optimization/84803
13748 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13749 for refs DR analysis didn't process.
13751 2018-03-12 Richard Biener <rguenther@suse.de>
13753 PR tree-optimization/84777
13754 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13755 force-vectorize loops ignore whether we are optimizing for size.
13757 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13759 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13760 (TARGET_MD_ASM_ADJUST): Define.
13762 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13763 Kito Cheng <kito.cheng@gmail.com>
13764 Chung-Ju Wu <jasonwucj@gmail.com>
13766 * config/nds32/nds32.c (nds32_compute_stack_frame,
13767 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13768 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13769 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13770 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13771 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13772 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13773 * config/nds32/nds32.md (prologue, epilogue): Use macro
13774 NDS32_V3PUSH_AVAILABLE_P to do checking.
13776 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13779 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13780 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13781 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13782 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13783 addition of most attributes on !orig_type_die or the attribute not
13784 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13786 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13787 Chung-Ju Wu <jasonwucj@gmail.com>
13789 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13790 __NDS32_VH__ macro.
13791 * config/nds32/nds32.opt (mvh): New option.
13793 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13794 Chung-Ju Wu <jasonwucj@gmail.com>
13796 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13798 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13799 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13802 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13803 Chung-Ju Wu <jasonwucj@gmail.com>
13805 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13807 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13808 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13810 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13811 Kito Cheng <kito.cheng@gmail.com>
13812 Chung-Ju Wu <jasonwucj@gmail.com>
13814 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13815 UNSPEC_FFMISM and UNSPEC_FLMISM.
13816 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13817 for ffb, ffmism and flmism.
13818 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13819 (unspec_ffmism): Ditto.
13820 (unspec_flmism): Ditto.
13821 (nds32_expand_builtin_impl): Check if string extension is available.
13822 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13823 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13825 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13828 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13831 * lra-assigns.c (assign_by_spills): Return a flag of reload
13832 assignment failure. Do not process the reload assignment
13833 failures. Do not spill other reload pseudos if they has the same
13835 (lra_assign): Add a return arg. Set up from the result of
13836 assign_by_spills call.
13837 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13838 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13839 usage_insns if it is not NULL.
13840 (spill_hard_reg_in_range): New function.
13841 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13842 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13843 function prototypes.
13844 (lra_assign): Change prototype.
13845 * lra.c (lra): Add code to deal with fails by splitting hard reg
13848 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13851 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13853 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13856 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13857 (dw_val_node): Add val_symbolic_view.
13858 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13859 (symview_upper_bound): New.
13860 (new_line_info_table): Initialize symviews_since_reset.
13861 (dwarf2out_source_line): Count symviews_since_reset and set
13862 symview_upper_bound.
13863 (dw_val_equal_p): Handle symview.
13864 (add_AT_symview): New.
13865 (print_dw_val): Handle symview.
13866 (attr_checksum, attr_checksum_ordered): Likewise.
13867 (same_dw_val_p, size_of_die): Likewise.
13868 (value_format, output_die): Likewise.
13869 (add_high_low_attributes): Use add_AT_symview for entry_view.
13870 (dwarf2out_finish): Reset symview_upper_bound, clear
13873 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13876 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13877 Add strict argument and use it.
13878 (rs6000_split_multireg_move): Update for new strict argument.
13879 (mem_operand_gpr): Disallow all non-offsettable addresses.
13880 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13882 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13885 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13886 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13887 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13890 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13891 decl, use remap_type if we want to use the type.
13893 2018-03-09 Martin Sebor <msebor@redhat.com>
13895 PR tree-optimization/84526
13896 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13898 (builtin_access::generic_overlap): Be prepared to handle non-array
13901 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13903 PR rtl-optimization/84682
13904 * lra-constraints.c (process_address_1): Check is_address flag
13905 for address constraints.
13906 (process_alt_operands): Likewise.
13907 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13908 preprocess_constraints.
13909 * recog.h (preprocess_constraints): Add oploc parameter.
13911 * recog.c (preprocess_constraints): Test address_operand for
13912 CT_ADDRESS constraints.
13914 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13917 * lra-assigns.c (assign_by_spills): Return a flag of reload
13918 assignment failure. Do not process the reload assignment
13919 failures. Do not spill other reload pseudos if they has the same
13921 (lra_assign): Add a return arg. Set up from the result of
13922 assign_by_spills call.
13923 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13924 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13925 usage_insns if it is not NULL.
13926 (spill_hard_reg_in_range): New function.
13927 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13928 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13929 function prototypes.
13930 (lra_assign): Change prototype.
13931 * lra.c (lra): Add code to deal with fails by splitting hard reg
13934 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13937 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13938 Accept complain bool parameter. Only emit errors if it is true.
13939 (arm_parse_cpu_option_name): Likewise.
13940 (arm_target_thumb_only): Adjust callers of the above.
13941 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13942 prototype to take a default true bool parameter.
13943 (arm_parse_arch_option_name): Likewise.
13945 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13946 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13950 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13951 * configure: Regenerate.
13952 * configure.ac ("linker --version-script option"): New.
13953 ("linker soname option"): New.
13955 2018-03-09 Richard Biener <rguenther@suse.de>
13957 PR tree-optimization/84775
13958 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13959 immediate uses of predicate stmts and mark them modified.
13962 PR tree-optimization/84178
13963 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13965 (version_loop_for_if_conversion): Delay update_ssa call.
13966 (tree_if_conversion): Delay update_ssa until after predicate
13969 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13972 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13973 when the function accesses prior frames.
13975 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13978 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13979 gen_llsym, otherwise call maybe_gen_llsym.
13981 PR inline-asm/84742
13982 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13983 has ',' character inside of it.
13985 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13988 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13989 as clobbering CC_REGNUM.
13991 2018-03-08 Richard Biener <rguenther@suse.de>
13993 PR middle-end/84552
13994 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13995 (follow_copies_to_constant): Do not follow SSA names registered
13998 2018-03-08 Richard Biener <rguenther@suse.de>
14000 PR tree-optimization/84178
14001 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14003 (version_loop_for_if_conversion): Delay update_ssa call.
14004 (tree_if_conversion): Delay update_ssa until after predicate
14007 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14009 PR tree-optimization/84178
14010 * tree-if-conv.c (release_bb_predicate): Remove the
14011 the assertion that the stmts have NULL use_ops.
14012 Discard the statements, asserting that they haven't
14013 yet been added to a BB.
14015 2018-03-08 Richard Biener <rguenther@suse.de>
14017 PR tree-optimization/84746
14018 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14019 (phi_translate): Pass in destination ANTIC_OUT set.
14020 (phi_translate_1): Likewise. For a simplified result lookup
14021 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14022 (phi_translate_set): Adjust.
14023 (do_pre_regular_insertion): Likewise.
14024 (do_pre_partial_partial_insertion): Likewise.
14026 2018-03-08 Martin Liska <mliska@suse.cz>
14028 PR gcov-profile/84735
14029 * doc/gcov.texi: Document usage of profile files.
14030 * gcov-io.h: Document changes in the format.
14032 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14036 * dwarf2out.c (struct dw_line_info_table): Update comments for
14038 (FORCE_RESET_NEXT_VIEW): New.
14039 (FORCE_RESETTING_VIEW_P): New.
14040 (RESETTING_VIEW_P): Check for -1 too.
14041 (ZERO_VIEW_P): Likewise.
14042 (new_line_info_table): Force-reset next view.
14043 (dwarf2out_begin_function): Likewise.
14044 (dwarf2out_source_line): Simplify zero_view_p initialization.
14045 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14046 view directly. Omit view when omitting .loc at line 0.
14048 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14050 PR tree-optimization/84740
14051 * tree-switch-conversion.c (process_switch): Call build_constructors
14052 only if info.phi_count is non-zero.
14054 PR tree-optimization/84739
14055 * tree-tailcall.c (find_tail_calls): Check call arguments against
14056 DECL_ARGUMENTS (current_function_decl) rather than
14057 DECL_ARGUMENTS (func) when checking for tail recursion.
14059 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14061 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14062 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14063 Volker Reichelt's entry and add entries for people that perform
14064 GCC fuzzy testing and report numerous bugs.
14066 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14069 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14070 readonly data in sdata, if that is disabled.
14071 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14072 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14073 -mreadonly-in-sdata option.
14075 2018-03-07 Martin Sebor <msebor@redhat.com>
14077 PR tree-optimization/84468
14078 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14079 basic block when looking for nul assignment.
14081 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14084 * except.h (output_function_exception_table): Adjust prototype.
14085 * except.c (output_function_exception_table): Remove FNNAME parameter
14086 and add SECTION parameter. Ouput one part of the table at a time.
14087 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14088 the first part of the exception table and emit unwind directives.
14089 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14090 (i386_pe_seh_cold_init): Likewise.
14091 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14092 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14093 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14094 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14095 * config/i386/winnt.c: Include except.h.
14096 (struct seh_frame_state): Add reg_offset, after_prologue and
14097 in_cold_section fields.
14098 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14099 (i386_pe_seh_cold_init): New function.
14100 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14101 to seh->in_cold_section.
14102 (seh_emit_push): Record the offset of the push.
14103 (seh_emit_save): Record the offet of the save.
14104 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14105 Test seh->after_prologue to disregard the epilogue.
14106 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14107 (i386_pe_end_cold_function): New function.
14109 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14112 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14113 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14116 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14118 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14119 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14121 PR middle-end/84723
14122 * multiple_target.c: Include tree-inline.h and intl.h.
14123 (expand_target_clones): Diagnose and fail if node->definition and
14124 !tree_versionable_function_p (node->decl).
14126 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14128 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14130 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14131 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14132 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14134 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14137 * combine.c (try_combine): Use reg_or_subregno instead of handling
14138 just paradoxical SUBREGs and REGs.
14140 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14142 * config/arc/arc.c (arc_finalize_pic): Remove function.
14143 (arc_must_save_register): We use single base PIC register, remove
14144 checks to save/restore the PIC register.
14145 (arc_expand_prologue): Likewise.
14146 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14148 (arc_verify_short): Likewise.
14149 (arc_attr_type): Likewise.
14150 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14151 (walk_stores): Likewise.
14152 (arc_address_cost): Make it static.
14153 (arc_verify_short): Likewise.
14154 (branch_dest): Likewise.
14155 (arc_attr_type): Likewise.
14156 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14157 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14158 (arc_final_prescan_insn): Remove inserting the nops due to
14159 hardware hazards. It is done in reorg step.
14160 (insn_length_variant_t): Remove.
14161 (insn_length_parameters_t): Likewise.
14162 (arc_insn_length_parameters): Likewise.
14163 (arc_get_insn_variants): Likewise.
14164 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14166 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14168 PR inline-asm/84683
14169 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14172 PR tree-optimization/84687
14173 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14175 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14177 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14179 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14180 Rename to ppc_speculation_barrier.
14181 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14182 __builtin_ppc_speculation_barrier.
14184 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14187 * combine.c (combine_simplify_rtx): Don't try to simplify if
14188 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14191 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14193 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14194 to 32 bytes when compiling for POWER9.
14196 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14199 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14200 regparm >= 3 with no arg reg available also for calls with
14201 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14204 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14206 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14208 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14211 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14213 2018-03-05 Richard Biener <rguenther@suse.de>
14215 PR tree-optimization/84486
14216 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14217 When inserting a __builtin_assume_aligned call set the LHS
14218 SSA name alignment info accordingly.
14220 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14222 PR tree-optimization/84114
14223 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14224 Avoid reassociation of FLOAT_MODE addition.
14226 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14228 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14229 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14230 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14231 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14232 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14233 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14234 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14236 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14237 __builtin_ia32_wbinvd): New builtins.
14238 (SPECIAL_ARGS2): New.
14239 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14240 (SPECIAL_ARGS2): New.
14241 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14242 (ix86_valid_target_attribute_inner_p): Ditto.
14243 (ix86_init_mmx_sse_builtins): Add special_args2.
14244 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14245 TARGET_WBNOINVD_P): New.
14246 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14247 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14248 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14249 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14250 * config/i386/pconfigintrin.h: New file.
14251 * config/i386/wbnoinvdintrin.h: Ditto.
14252 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14254 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14256 2018-03-05 Richard Biener <rguenther@suse.de>
14258 PR tree-optimization/84670
14259 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14261 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14262 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14263 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14264 doesn't grow if all successors (recursively) were visited at least
14267 2018-03-05 Richard Biener <rguenther@suse.de>
14269 PR tree-optimization/84650
14270 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14271 if executed in the loop pipeline.
14273 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14275 * doc/configfiles.texi (Configuration Files): Move info about
14276 conditionalizing $target-protos.h to...
14277 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14278 differs from $target-protos.h.
14280 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14281 Chung-Ju Wu <jasonwucj@gmail.com>
14283 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14284 * config/nds32/nds32-multiple.md (setmemsi): Define.
14285 * config/nds32/nds32-memory-manipulation.c
14286 (nds32_gen_dup_4_byte_to_word_value): New.
14287 (emit_setmem_word_loop): New.
14288 (emit_setmem_byte_loop): New.
14289 (nds32_expand_setmem_loop): New.
14290 (nds32_expand_setmem_loop_v3m): New.
14291 (nds32_expand_setmem_unroll): New.
14292 (nds32_expand_setmem): New.
14294 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14295 Chung-Ju Wu <jasonwucj@gmail.com>
14297 * config/nds32/nds32-memory-manipulation.c
14298 (nds32_emit_load_store): New.
14299 (nds32_emit_post_inc_load_store): New.
14300 (nds32_emit_mem_move): New.
14301 (nds32_emit_mem_move_block): New.
14302 (nds32_expand_movmemsi_loop_unknown_size): New.
14303 (nds32_expand_movmemsi_loop_known_size): New.
14304 (nds32_expand_movmemsi_loop): New.
14305 (nds32_expand_movmemsi_unroll): New.
14306 (nds32_expand_movmemqi): Rename ...
14307 (nds32_expand_movmemsi): ... to this.
14308 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14309 (movmemsi): ... to this.
14310 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14311 (nds32_expand_movmemsi): ... to this.
14313 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14314 Monk Chiang <sh.chiang04@gmail.com>
14315 Chung-Ju Wu <jasonwucj@gmail.com>
14317 * config/nds32/nds32-protos.h
14318 (nds32_expand_load_multiple): New arguments.
14319 (nds32_expand_store_multiple): Ditto.
14320 (nds32_valid_multiple_load_store): Rename ...
14321 (nds32_valid_multiple_load_store_p): ... to this.
14322 * config/nds32/nds32-memory-manipulation.c
14323 (nds32_expand_load_multiple): Refine implementation.
14324 (nds32_expand_store_multiple): Ditto.
14325 * config/nds32/nds32-multiple.md
14326 (load_multiple): Update nds32_expand_load_multiple interface.
14327 (store_multiple): Update nds32_expand_store_multiple interface.
14328 * config/nds32/nds32-predicates.c
14329 (nds32_valid_multiple_load_store): Rename ...
14330 (nds32_valid_multiple_load_store_p): ... to this and refine
14332 * config/nds32/predicates.md
14333 (nds32_load_multiple_and_update_address_operation): New predicate.
14334 (nds32_store_multiple_and_update_address_operation): New predicate.
14336 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14337 Chung-Ju Wu <jasonwucj@gmail.com>
14339 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14340 (combo): New attribute.
14341 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14343 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14345 * config/nds32/nds32.opt: Change -mcmodel= default value.
14347 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14348 Monk Chiang <sh.chiang04@gmail.com>
14349 Chung-Ju Wu <jasonwucj@gmail.com>
14351 * config/nds32/constants.md (unspec_element): New enum.
14352 * config/nds32/constraints.md (Umw): New constraint.
14353 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14354 * config/nds32/nds32-intrinsic.md: Likewise.
14355 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14356 (nds32_valid_smw_lwm_base_p): New.
14357 (nds32_output_smw_single_word): New.
14358 (nds32_output_lmw_single_word): New.
14359 (nds32_expand_unaligned_load): New.
14360 (nds32_expand_unaligned_store): New.
14361 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14362 (nds32_output_smw_single_word): Declare.
14363 (nds32_output_lmw_single_word): Declare.
14364 (nds32_expand_unaligned_load): Declare.
14365 (nds32_expand_unaligned_store): Declare.
14366 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14367 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14368 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14369 NDS32_BUILTIN_UASTORE_DW.
14370 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14373 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14374 Kito Cheng <kito.cheng@gmail.com>
14375 Chung-Ju Wu <jasonwucj@gmail.com>
14377 * config/nds32/nds32-intrinsic.c
14378 (nds32_expand_builtin_null_ftype_reg): Delete.
14379 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14380 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14381 (nds32_read_argument): New.
14382 (nds32_legitimize_target): Ditto.
14383 (nds32_legitimize_argument): Ditto.
14384 (nds32_check_constant_argument): Ditto.
14385 (nds32_expand_unop_builtin): Ditto.
14386 (nds32_expand_unopimm_builtin): Ditto.
14387 (nds32_expand_binop_builtin): Ditto.
14388 (nds32_builtin_decl_impl): Ditto.
14389 (builtin_description): Ditto.
14390 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14391 (nds32_init_builtins_impl): Ditto.
14392 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14393 (nds32_builtin_decl): New.
14394 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14395 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14397 2018-03-02 Jeff Law <law@redhat.com>
14399 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14400 (redundant_insn, fill_simple_delay_slots): Likewise.
14401 (fill_slots_from_thread): Likewise.
14402 * resource.c (mark_referenced_resources): Likewise.
14403 (mark_set_resources, find_dead_or_set_registers): Likewise.
14405 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14407 * substring-locations.h (format_warning_va): Formatting fix for
14408 ATTRIBUTE_GCC_DIAG.
14409 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14411 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14412 * substring-locations.c: Include intl.h.
14413 (format_warning_va): Turned into small wrapper around
14414 format_warning_n_va, renamed to ...
14415 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14416 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14418 (format_warning_at_substring_n): New function.
14419 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14420 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14421 format_warning_at_substring with just a shorter name instead of
14422 const function pointer.
14423 (fmtwarn_n): New function.
14424 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14425 appropriate, get rid of all the fmtstr temporaries, move conditionals
14426 with G_() wrapped string literals directly into fmtwarn arguments,
14427 cast dir.len to (int), formatting fixes.
14429 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14431 * doc/invoke.texi: Remove "Cilk Plus" references.
14433 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14434 Richard Biener <rguenther@suse.de>
14437 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14438 for error or warning attributes if CALL_FROM_THUNK_P is set.
14441 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14444 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14445 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14448 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14449 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14451 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14452 instead of -1U in last predictors element's probability member.
14454 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14457 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14458 arguments if they are comparable.
14460 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14462 PR tree-optimization/84634
14463 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14464 masks and masked_loop_p with a single loop_masks, making sure it's
14465 null for bb vectorization.
14467 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14469 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14470 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14471 loop->force_vectorize to check whether there is no alias.
14473 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14476 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14478 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14480 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14481 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14482 instead of a loop around prev_real_insn.
14483 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14486 PR inline-asm/84625
14487 * config/i386/i386.c (ix86_print_operand): Use conditional
14488 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14491 2018-03-02 Richard Biener <rguenther@suse.de>
14493 PR tree-optimization/84427
14494 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14495 (bitmap_set_subtract_values): Rewrite to handle multiple
14498 (prune_clobbered_mems): Likewise.
14499 (phi_translate): Take edge instead of pred/phiblock.
14500 (phi_translate_1): Likewise.
14501 (phi_translate_set): Likewise. Insert all translated
14502 exprs for a value into the set, keeping possibly multiple
14503 expressions per value.
14504 (compute_antic_aux): Adjust for phi_translate changes.
14505 When intersecting union the expressions and prune those
14506 not in the final value set, keeping possibly multiple
14507 expressions per value. Do not use value-insertion
14508 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14509 all expressions. Add verification that the value-sets
14510 only shrink during iteration.
14511 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14512 (do_pre_regular_insertion): Likewise.
14513 (do_pre_partial_partial_insertion): Likewise.
14515 2018-03-02 Richard Biener <rguenther@suse.de>
14518 * config/darwin.c (saved_debug_info_level): New static global.
14519 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14520 (darwin_asm_lto_end): Restore debug info generation settings.
14522 2018-03-01 Martin Liska <mliska@suse.cz>
14525 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14526 volatile arguments.
14528 2018-03-01 Richard Biener <rguenther@suse.de>
14531 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14532 type annotation with LTO when debug was disabled at compile-time.
14534 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14536 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14538 (mips_final_postscan_insn): Likewise.
14540 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14542 PR rtl-optimization/84528
14543 * alias.c (init_alias_target): Add commentary.
14544 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14545 a unique base value if the frame pointer is not eliminated
14546 to the stack pointer.
14548 2018-03-01 Tom de Vries <tom@codesourcery.com>
14550 PR rtl-optimization/83327
14551 * lra-int.h (hard_regs_spilled_into): Declare.
14552 * lra.c (hard_regs_spilled_into): Define.
14553 (init_reg_info): Init hard_regs_spilled_into.
14554 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14555 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14556 (process_bb_lives): Handle hard_regs_spilled_into.
14557 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14558 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14560 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14562 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14563 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14564 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14565 * config/rs6000/aix72.h: New file.
14567 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14569 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14570 instead of warning_at with conditional singular and plural messages
14574 * stor-layout.c (update_alignment_for_field): For
14575 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14576 && !DECL_PACKED (field), do the alignment update, just use
14577 only desired_align instead of MAX (type_align, desired_align)
14579 (place_field): Don't do known_align < desired_align handling
14580 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14581 is non-NULL, instead do it after rli->prev_field handling and
14582 only if not within a bitfield word. For DECL_PACKED (field)
14583 use type_align of BITS_PER_UNIT.
14585 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14587 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14588 superfluous parentheses and trailing spaces.
14590 2018-02-28 Richard Biener <rguenther@suse.de>
14592 PR tree-optimization/84584
14593 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14594 SCoPs with fake exit edge.
14596 2018-02-28 Martin Liska <mliska@suse.cz>
14599 * timevar.c (timer::print): Fix format to properly print 100%
14602 2018-02-28 Richard Biener <rguenther@suse.de>
14604 PR middle-end/84607
14605 * genmatch.c (capture_info::walk_match): Do not mark
14606 captured expressions without operands as expr_p given
14607 they act more like predicates and should be subject to
14608 "lost tail" side-effect preserving.
14610 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14612 PR rtl-optimization/81611
14613 * auto-inc-dec.c (attempt_change): Move dead note from
14614 mem_insn if it's the next use of regno
14615 (find_address): Take address use of reg holding
14616 non-incremented value. Add parm to limit search to the named
14618 (merge_in_block): Attempt to use a mem insn that is the next
14619 use of the original regno.
14621 2018-02-27 Martin Sebor <msebor@redhat.com>
14624 * doc/invoke.texi (-Wmissing-attributes): New option.
14625 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14627 2018-02-27 Martin Sebor <msebor@redhat.com>
14629 PR translation/84207
14630 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14631 n argument to unsigned HOST_WIDE_INT.
14632 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14633 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14634 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14635 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14637 2018-02-27 Richard Biener <rguenther@suse.de>
14639 PR tree-optimization/84512
14640 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14641 Do not use the estimate returned from record_stmt_cost for
14642 the scalar iteration cost but sum properly using add_stmt_cost.
14644 2018-02-27 Richard Biener <rguenther@suse.de>
14646 PR tree-optimization/84466
14647 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14648 Adjust last change to less strictly validate use operands.
14650 2018-02-27 Martin Liska <mliska@suse.cz>
14652 PR gcov-profile/84548
14653 * gcov.c (process_file): Allow partial overlap and consider it
14654 also as group functions.
14655 (output_lines): Properly calculate range of lines for a group.
14657 2018-02-27 Martin Liska <mliska@suse.cz>
14659 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14660 'ggc' suffixes. Change first column width.
14661 (timer::print): Fix formatting of the column.
14663 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14665 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14666 preserve inline entry blocks for the sake of debug inline
14667 entry point markers alone.
14668 (remove_unused_locals): Suggest in comments a better place to
14669 force the preservation of inline entry blocks that are
14670 otherwise unused, but do not preserve them.
14672 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14674 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14676 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14679 * config/i386/constraints.md (Bs): Replace
14680 ix86_indirect_branch_register with
14681 TARGET_INDIRECT_BRANCH_REGISTER.
14683 * config/i386/i386.md (indirect_jump): Likewise.
14684 (tablejump): Likewise.
14685 (*sibcall_memory): Likewise.
14686 (*sibcall_value_memory): Likewise.
14687 Peepholes of indirect call and jump via memory: Likewise.
14688 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14689 (*sibcall_value_GOT_32): Likewise.
14690 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14691 (GOT_memory_operand): Likewise.
14692 (call_insn_operand): Likewise.
14693 (sibcall_insn_operand): Likewise.
14694 (GOT32_symbol_operand): Likewise.
14695 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14697 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14699 PR rtl-optimization/83496
14700 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14701 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14702 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14703 redundant insn, if any.
14704 (relax_delay_slots): Likewise.
14705 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14707 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14709 PR tree-optimization/83965
14710 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14711 that grouped statements are part of a reduction chain. Return
14712 true if the statement is not marked as a reduction itself but
14713 is part of a group.
14714 (vect_recog_dot_prod_pattern): Don't check whether the statement
14715 is part of a group here.
14716 (vect_recog_sad_pattern): Likewise.
14717 (vect_recog_widen_sum_pattern): Likewise.
14719 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14722 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14724 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14727 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14729 (ix86_output_indirect_function_return): New prototype.
14730 (ix86_split_simple_return_pop_internal): Likewise.
14731 * config/i386/i386.c (indirect_return_via_cx): New.
14732 (indirect_return_via_cx_bnd): Likewise.
14733 (indirect_thunk_name): Handle return va CX_REG.
14734 (output_indirect_thunk_function): Create alias for
14735 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14736 (ix86_output_indirect_jmp): Remove the bool argument.
14737 (ix86_output_indirect_function_return): New function.
14738 (ix86_split_simple_return_pop_internal): Likewise.
14739 * config/i386/i386.md (*indirect_jump): Don't pass false
14740 to ix86_output_indirect_jmp.
14741 (*tablejump_1): Likewise.
14742 (simple_return_pop_internal): Change it to define_insn_and_split.
14743 Call ix86_split_simple_return_pop_internal to split it for
14744 -mfunction-return=.
14745 (simple_return_indirect_internal): Call
14746 ix86_output_indirect_function_return instead of
14747 ix86_output_indirect_jmp.
14749 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14752 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14753 memset and value initialization afterwards.
14755 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14757 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14759 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14762 * common/config/aarch64/aarch64-common.c
14763 (aarch_option_optimization_table[]): Switch
14764 off fomit-frame-pointer
14766 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14767 Chung-Ju Wu <jasonwucj@gmail.com>
14769 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14771 (store_multiple): Ditto.
14773 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14775 * config.gcc: Add --with-cpu support for nds32 target.
14776 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14777 * config/nds32/nds32.opt: Add -mcpu= option.
14779 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14781 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14782 isel=yes): Warn for these deprecated options.
14784 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14786 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14787 ISA_2_5_MASKS_EMBEDDED.
14789 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14791 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14792 p->max as pointers rather than using iterative_hash_expr.
14794 2018-02-23 Carl Love <cel@us.ibm.com>
14796 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14797 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14799 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14800 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14801 P8V_BUILTIN_VEC_VUNSIGNED2.
14803 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14806 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14807 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14809 * lra-constraints.c (curr_insn_transform): Set up
14810 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14812 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14813 * lra-eliminations.c (spill_pseudos): Ditto.
14814 (process_insn_for_elimination): Ditto.
14815 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14816 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14817 LRA_NON_CLOBBERED_ALT.
14819 2018-02-22 Martin Sebor <msebor@redhat.com>
14821 PR tree-optimization/84480
14822 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14823 to maybe_diag_stxncpy_trunc. Call it.
14824 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14825 from gimple_fold_builtin_strcpy. Print inlining stack.
14826 (handle_builtin_stxncpy): Print inlining stack.
14827 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14829 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14832 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14833 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14834 and -fcheck-pointer-bounds are used together.
14835 (indirect_thunk_prefix): New enum.
14836 (indirect_thunk_need_prefix): New function.
14837 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14838 "_nt" instead of "_bnd" for NOTRACK prefix.
14839 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14840 (output_indirect_thunk_function): Likewise.
14842 (ix86_code_end): Update output_indirect_thunk_function calls.
14843 (ix86_output_indirect_branch_via_reg): Replace
14844 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14845 (ix86_output_indirect_branch_via_push): Likewise.
14846 (ix86_output_function_return): Likewise.
14847 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14848 incompatible with -fcf-protection=branch and
14849 -fcheck-pointer-bounds.
14851 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14854 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14855 Change gcc_assert call to output_operand_lossage.
14857 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14859 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14861 2018-02-22 DJ Delorie <dj@redhat.com>
14862 Sebastian Perta <sebastian.perta@renesas.com>
14863 Oleg Endo <olegendo@gcc.gnu.org>
14865 * config/rx/rx.c (rx_rtx_costs): New function.
14866 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14868 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14870 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14872 2018-02-22 Martin Liska <mliska@suse.cz>
14875 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14876 Add "native" as a possible value.
14878 2018-02-22 Martin Liska <mliska@suse.cz>
14881 * config/i386/i386.c (ix86_option_override_internal):
14882 Add "native" as a possible value for -march and -mtune.
14884 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14887 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14888 to all type variants.
14890 PR tree-optimization/84503
14891 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14892 width as info->bitpos + info->bitsize - start.
14893 (merged_store_group::merge_overlapping): Simplify width computation.
14894 (check_no_overlap): New function.
14895 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14896 start + width and last_order of the group, fail if check_no_overlap
14898 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14899 to group if check_no_overlap fails.
14901 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14903 * config/rs6000/altivec.md: Delete contraint arguments to
14904 define_expand, define_split, and define_peephole2, and in
14905 define_insn_and_split if always unused.
14906 * config/rs6000/darwin.md: Ditto.
14907 * config/rs6000/dfp.md: Ditto.
14908 * config/rs6000/rs6000.md: Ditto.
14909 * config/rs6000/sync.md: Ditto.
14910 * config/rs6000/vector.md: Ditto.
14911 * config/rs6000/vsx.md: Ditto.
14913 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14915 * config/rs6000/altivec.md: Write output control strings as braced
14916 blocks instead of double-quoted strings.
14917 * config/rs6000/darwin.md: Ditto.
14918 * config/rs6000/rs6000.md: Ditto.
14919 * config/rs6000/vector.md: Ditto.
14920 * config/rs6000/vsx.md: Ditto.
14922 2018-02-21 Jason Merrill <jason@redhat.com>
14924 PR c++/84314 - ICE with templates and fastcall attribute.
14925 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14927 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14929 * ipa-cp.c (determine_versionability): Fix comment typos.
14931 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14934 * ipa-cp.c (determine_versionability): Do not version functions caling
14937 2018-02-21 Martin Liska <mliska@suse.cz>
14940 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14941 Add "native" as a possible value.
14942 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14943 the macro when native cpu detection is available.
14945 2018-02-21 Martin Liska <mliska@suse.cz>
14948 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14949 Add "native" as a possible value.
14950 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14951 when native cpu detection is available.
14953 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14954 Martin Sebor <msebor@redhat.com>
14956 PR tree-optimization/84478
14957 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14959 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14960 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14961 support which is conservatively correct, for 2 only stay conservative
14962 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14963 argument to the 2 argument get_range_strlen, adjust 6 arg
14964 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14966 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14967 (gimple_fold_builtin_strlen): Pass true as last argument to
14970 2018-02-20 Martin Sebor <msebor@redhat.com>
14972 PR middle-end/84095
14973 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14974 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14975 (builtin_memref::builtin_memref): Factor out parts into
14976 set_base_and_offset and call it.
14978 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14980 PR middle-end/84406
14981 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14982 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14983 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14984 search at the associated MODE_INT.
14986 2018-02-20 Jeff Law <law@redhat.com>
14988 PR middle-end/82123
14989 PR tree-optimization/81592
14990 PR middle-end/79257
14991 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14992 for range data rather than using global data.
14993 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14994 range data rather than using global data.
14995 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14996 pass it to children as needed.
14997 (struct directive::fmtresult): Similarly.
14998 (struct directive::set_width): Similarly.
14999 (struct directive::set_precision): Similarly.
15000 (format_integer, format_directive, parse_directive): Similarly.
15001 (format_none): Accept unnamed vr_values parameter.
15002 (format_percent, format_floating, format_character): Similarly.
15003 (format_string, format_plain): Similarly.
15004 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15005 the EVRP range analyzer for range data rather than using global data.
15006 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15007 gimple-ssa-evrp-analyze.h
15008 (class sprintf_dom_walker): Add after_dom_children member function.
15009 Add evrp_range_analyzer member.
15010 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15011 range analyzer as needed.
15012 (sprintf_dom_walker::after_dom_children): New member function.
15013 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15015 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15016 (evrp_range_analyzer::pop_to_marker): Likewise.
15018 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15020 PR tree-optimization/84419
15021 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15022 with the required type if its current type is compatible but
15025 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15027 PR middle-end/82004
15028 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15029 after vectorization.
15031 2018-02-20 Martin Liska <mliska@suse.cz>
15034 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15035 possible values if we don't have a hint.
15037 2018-02-20 Martin Liska <mliska@suse.cz>
15041 * final.c (shorten_branches): Build align_tab array with one
15043 * opts.c (finish_options): Add alignment option limit check.
15044 (MAX_CODE_ALIGN): Likewise.
15045 (MAX_CODE_ALIGN_VALUE): Likewise.
15046 * doc/invoke.texi: Document maximum allowed option value for
15047 all -falign-* options.
15049 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15052 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15053 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15054 * var-tracking.c (emit_note_insn_var_location): Remove all references
15055 to NOTE_INSN_CALL_ARG_LOCATION.
15056 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15057 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15058 Use copy_rtx_if_shared.
15059 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15060 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15061 (dwarf2out_var_location): Remove handling of
15062 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15064 * final.c (final_scan_insn): Remove all references to
15065 NOTE_INSN_CALL_ARG_LOCATION.
15066 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15067 before dumping final insns.
15068 * except.c (emit_note_eh_region_end): Remove all references to
15069 NOTE_INSN_CALL_ARG_LOCATION.
15070 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15071 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15072 * config/arc/arc.c (hwloop_optimize): Likewise.
15073 * config/arm/arm.c (create_fix_barrier): Likewise.
15074 * config/s390/s390.c (s390_chunkify_start): Likewise.
15075 * config/sh/sh.c (find_barrier): Likewise.
15076 * config/i386/i386.c (rest_of_insert_endbranch,
15077 ix86_seh_fixup_eh_fallthru): Likewise.
15078 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15079 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15080 * config/frv/frv.c (frv_function_prologue): Likewise.
15081 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15083 (note_outside_basic_block_p): Remove all references to
15084 NOTE_INSN_CALL_ARG_LOCATION.
15085 * gengtype.c (adjust_field_rtx_def): Likewise.
15086 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15088 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15089 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15092 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15095 PR tree-optimization/84452
15096 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15097 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15100 2018-02-19 Martin Liska <mliska@suse.cz>
15103 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15105 2018-02-19 Martin Liska <mliska@suse.cz>
15106 Richard Sandiford <richard.sandiford@linaro.org>
15108 PR tree-optimization/82491
15109 * gimple-fold.c (get_base_constructor): Make earlier bail out
15112 2018-02-19 Carl Love <cel@us.ibm.com>
15114 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15115 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15117 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15118 P8V_BUILTIN_VEC_NEG.
15120 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15122 * config/rl78/rl78.md (movdf): New define expand.
15124 2018-02-19 Martin Liska <mliska@suse.cz>
15127 * doc/invoke.texi: Fix typo.
15128 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15130 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15132 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15133 handle rs6000_single_float and rs6000_double_float specially for
15136 2018-02-16 Jeff Law <law@redhat.com>
15138 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15139 (pop_regs): Use it.
15141 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15144 * ipa-inline.c (inline_small_functions): Fix a typo.
15146 2018-02-16 Nathan Sidwell <nathan@acm.org>
15148 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15150 2018-02-16 Carl Love <cel@us.ibm.com>
15152 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15153 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15154 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15155 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15156 expansion to P8V_BUILTIN_VEC_FLOAT2.
15158 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15160 PR rtl-optimization/70023
15161 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15162 src_regno into account.
15164 2018-02-16 Carl Love <cel@us.ibm.com>
15166 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15167 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15168 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15169 * config/rs6000/rs6000.c: Remove case statements for
15170 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15171 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15172 and P9V_BUILTIN_VEC_VINSERT4B.
15173 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15174 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15175 * config/rs6000/vsx.md:
15176 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15179 2018-02-16 Carl Love <cel@us.ibm.com>
15181 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15183 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15185 * config/rs6000/rs6000-c.c: Add the definitions for
15186 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15187 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15188 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15189 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15190 definition for insert4b and define insn *insert3b_internal.
15191 * doc/extend.texi: Add documentation for vec_extract4b.
15193 2018-02-16 Nathan Sidwell <nathan@acm.org>
15195 * doc/extend.texi (Backwards Compatibility): Mention friend
15196 injection. Note for-scope is deprecated.
15197 * doc/invoke.texi (-ffriend-injection): Deprecate.
15199 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15201 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15202 that moved to I2, also allow destinations that are a paradoxical
15203 subreg (instead of a normal reg).
15205 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15208 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15211 2018-02-16 Richard Biener <rguenther@suse.de>
15213 PR tree-optimization/84037
15214 PR tree-optimization/84016
15216 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15217 Adjust vec_construct for the fact we need additional higher latency
15218 128bit inserts for AVX256 and AVX512 vector builds.
15219 (ix86_add_stmt_cost): Scale vector construction cost for
15222 2018-02-16 Richard Biener <rguenther@suse.de>
15224 PR tree-optimization/84417
15225 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15226 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15227 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15229 2018-02-16 Martin Liska <mliska@suse.cz>
15232 * internal-fn.def (ASAN_CHECK): Set proper flags.
15233 (ASAN_MARK): Likewise.
15235 2018-02-16 Julia Koval <julia.koval@intel.com>
15237 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15238 from PTA_CANNONLAKE.
15240 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15243 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15244 Use ++iter rather than iter++ for std::list iterators.
15245 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15246 defer deleting them until all nodes in the forest are processed. Do
15247 free even leaf nodes. Change to_process into auto_vec.
15250 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15251 * vec.h (vec_default_construct): Use memset instead of placement new
15252 if BROKEN_VALUE_INITIALIZATION is defined.
15253 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15254 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15257 PR rtl-optimization/83723
15258 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15259 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15260 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15262 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15264 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15266 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15268 PR rtl-optimization/81443
15269 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15270 from inner REGs to paradoxical SUBREGs.
15272 2018-02-16 Richard Biener <rguenther@suse.de>
15274 PR tree-optimization/84399
15275 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15276 For operands we can analyze at their definition make sure we can
15277 analyze them at each use as well.
15279 2018-02-16 Richard Biener <rguenther@suse.de>
15281 PR tree-optimization/84190
15282 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15283 volatile accesses if the decl isn't volatile.
15285 2018-02-15 Jason Merrill <jason@redhat.com>
15287 PR c++/84314 - ICE with templates and fastcall attribute.
15288 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15289 TYPE_CANONICAL on an existing type.
15291 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15293 PR tree-optimization/84383
15294 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15295 dstoff nor call operand_equal_p if dstbase is NULL.
15297 PR tree-optimization/84334
15298 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15299 also a CONSTANT_CLASS_P, punt.
15301 2018-02-14 Jim Wilson <jimw@sifive.com>
15303 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15304 first SMALL_OPERAND check. New local min_second_step. Move assert
15305 to where locals are set. Add TARGET_RVC support.
15306 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15308 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15310 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15312 2018-02-14 Martin Sebor <msebor@redhat.com>
15314 PR tree-optimization/83698
15315 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15316 arrays constrain the offset range to their bounds.
15317 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15318 (builtin_access::overlap): Avoid setting the size of overlap if it's
15320 (maybe_diag_overlap): Also consider arrays when deciding what values
15321 of offsets to include in diagnostics.
15323 2018-02-14 Martin Sebor <msebor@redhat.com>
15326 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15327 that correspond to the kind of a declaration.
15329 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15332 * config/pa/pa.md: Load address of PIC label using the linkage table
15333 if the label is nonlocal.
15335 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15337 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15338 warning message if user requests -maltivec=be.
15339 * doc/invoke.texi: Document deprecation of -maltivec=be.
15341 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15344 * config/rs6000/rs6000-c.c: Update definitions for
15345 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15346 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15348 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15351 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15352 add _get_ssp intrinsics. Remove argument from
15353 __builtin_ia32_rdssp[d|q].
15354 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15355 * config/i386/i386-builtin.def: Remove argument from
15356 __builtin_ia32_rdssp[d|q].
15357 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15358 ix86_expand_special_args_builtin for _rdssp[d|q].
15359 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15360 Clear register before usage.
15361 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15362 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15364 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15366 PR tree-optimization/84357
15367 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15368 operand 1 of an ARRAY_REF too.
15370 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15373 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15374 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15376 (set_of_reg): New struct.
15377 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15378 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15379 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15381 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15382 Split into bitclr, bitset, bitinvert patterns if appropriate.
15383 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15384 use rx_fuse_in_memory_bitop.
15385 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15386 to named insn, correct maximum insn length.
15388 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15391 * machmode.def: Define a complex mode for PARTIAL_INT.
15392 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15394 * doc/rtl.texi: Document CSPImode.
15395 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15397 (msp430_hard_regno_nregs_with_padding): Likewise.
15399 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15402 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15404 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15406 PR rtl-optimization/84169
15407 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15408 we generated a parallel as new i3 and we split that to new i2 and i3
15409 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15410 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15411 those to i2, not i1. Partially rewrite this scan code.
15413 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15416 * stor-layout.c (place_field): For variable length fields, adjust
15417 offset_align afterwards not just based on the field's alignment,
15418 but also on the size.
15420 PR middle-end/84309
15421 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15422 of exps and logs in the use_exp2 case.
15424 2018-02-13 Jeff Law <law@redhat.com>
15426 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15427 entry for "vector".
15429 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15432 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15436 * common.opt (gas-loc-support, gas-locview-support): New.
15437 (ginline-points, ginternal-reset-location-views): New.
15438 * doc/invoke.texi: Document them. Use @itemx where intended.
15439 (gvariable-location-views): Adjust.
15440 * target.def (reset_location_view): New.
15441 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15442 (TARGET_RESET_LOCATION_VIEW): New.
15443 * doc/tm.texi: Rebuilt.
15444 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15445 (dwarf2out_default_as_locview_support): New.
15446 (output_asm_line_debug_info): Use option variables.
15447 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15448 (output_loc_list): Likewise.
15449 (add_high_low_attributes): Check option variables.
15450 Don't output entry view attribute in strict mode.
15451 (gen_inlined_subroutine_die): Check option variables.
15452 (dwarf2out_inline_entry): Likewise.
15453 (init_sections_and_labels): Likewise.
15454 (dwarf2out_early_finish): Likewise.
15455 (maybe_reset_location_view): New, from...
15456 (dwarf2out_var_location): ... here. Call it.
15457 * debug.h (dwarf2out_default_as_loc_support): Declare.
15458 (dwarf2out_default_as_locview_support): Declare.
15459 * hooks.c (hook_int_rtx_insn_0): New.
15460 * hooks.h (hook_int_rtx_insn_0): Declare.
15461 * toplev.c (process_options): Take -gas-loc-support and
15462 -gas-locview-support from dwarf2out. Enable
15463 -gvariable-location-views by default only with locview
15464 assembler support. Enable -ginternal-reset-location-views by
15465 default only if the target defines the corresponding hook.
15466 Enable -ginline-points by default if location views are
15467 enabled; force it disabled if statement frontiers are
15469 * tree-inline.c (expand_call_inline): Check option variables.
15470 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15472 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15474 PR tree-optimization/84321
15475 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15476 handling. Also check whether the anti-range contains any values
15477 that satisfy the mask; switch to a VR_RANGE if not.
15479 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15482 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15484 2018-02-13 Martin Jambor <mjambor@suse.cz>
15487 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15488 of call statements, also set location of a load to a temporary.
15490 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15492 * config/rl78/rl78.c (add_vector_labels): New function.
15493 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15494 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15495 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15496 which checks that no arguments are passed.
15497 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15498 * doc/extend.texi: Documentation for the new attribute.
15500 2018-02-13 Andreas Schwab <schwab@suse.de>
15502 * config/riscv/linux.h (CPP_SPEC): Define.
15504 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15507 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15508 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15509 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15510 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15511 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15512 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15513 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15514 temporarily for AES and PCLMUL builtins.
15516 PR tree-optimization/84339
15517 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15518 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15521 PR middle-end/84309
15522 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15523 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15524 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15526 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15528 * omp-simd-clone.h: New file.
15529 * omp-simd-clone.c: Include omp-simd-clone.h.
15530 (expand_simd_clones): No longer static.
15531 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15532 cgraph.h and omp-simd-clone.h.
15533 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15534 (vect_recog_widen_shift_pattern): Formatting fix.
15535 (vect_pattern_recog_1): Don't check optab for calls.
15538 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15539 operands[2] into a REG before using gen_lowpart on it.
15541 2018-02-12 Jeff Law <law@redhat.com>
15544 * config/sh/sh.c (find_barrier): Consider a sibling call
15547 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15548 successfully back substituting a reg.
15550 2018-02-12 Richard Biener <rguenther@suse.de>
15552 PR tree-optimization/84037
15553 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15554 parameter, move visited init to caller.
15555 (vect_slp_analyze_operations): Separate cost from validity
15556 check, initialize visited once for all instances.
15557 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15559 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15561 (vect_model_promotion_demotion_cost): Likewise.
15562 (vectorizable_bswap): Guard cost modeling with !slp_node
15563 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15565 (vectorizable_call): Likewise.
15566 (vectorizable_conversion): Likewise.
15567 (vectorizable_assignment): Likewise.
15568 (vectorizable_shift): Likewise.
15569 (vectorizable_operation): Likewise.
15570 (vectorizable_store): Likewise.
15571 (vectorizable_load): Likewise.
15572 (vectorizable_condition): Likewise.
15573 (vectorizable_comparison): Likewise.
15575 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15578 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15579 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15580 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15582 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15584 PR middle-end/83665
15585 * params.def (inline-min-speedup): Increase from 8 to 15.
15586 (max-inline-insns-auto): Decrease from 40 to 30.
15587 * ipa-split.c (consider_split): Add some buffer for function to
15588 be considered inlining candidate.
15589 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15592 2018-02-12 Richard Biener <rguenther@suse.de>
15594 PR tree-optimization/84037
15595 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15596 matched stmts if we cannot swap the non-matched ones.
15598 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15600 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15601 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15602 _mm_maskz_scalef_round_ss): New intrinsics.
15603 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15604 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15605 __builtin_ia32_scalefss_round): Remove.
15606 (__builtin_ia32_scalefsd_mask_round,
15607 __builtin_ia32_scalefss_mask_round): New intrinsics.
15608 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15609 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15610 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15611 "<round_constraint>")): Changed to ...
15612 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15613 "<round_scalar_constraint>")): ... this.
15614 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15615 %0, %1, %2<round_op3>}"): Changed to ...
15616 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15617 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15618 %2<round_scalar_mask_op3>}"): ... this.
15619 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15621 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15623 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15624 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15625 (_mm_maskz_sqrt_round_ss): New intrinsics.
15626 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15627 (__builtin_ia32_sqrtsd_mask_round)
15628 (__builtin_ia32_sqrtss_mask_round): New builtins.
15629 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15630 (__builtin_ia32_sqrtss_round): Remove.
15631 (__builtin_ia32_sqrtsd_mask_round)
15632 (__builtin_ia32_sqrtss_mask_round): New builtins.
15633 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15634 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15635 ((match_operand:VF_128 1 "vector_operand"
15636 "xBm,<round_constraint>")): Changed to ...
15637 ((match_operand:VF_128 1 "vector_operand"
15638 "xBm,<round_scalar_constraint>")): ... this.
15639 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15640 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15641 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15642 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15643 %<iptr>1<round_scalar_mask_op3>}): ... this.
15644 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15645 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15647 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15650 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15651 Cast vec_cmpeq result to correct type.
15652 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15653 Cast vec_cmpgt result to correct type.
15655 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15657 * final.c (final_scan_insn_1): Renamed from...
15658 (final_scan_insn): ... this. New wrapper, to recover
15659 seen from the outermost call in recursive ones.
15660 * config/sparc/sparc.c (output_return): Drop seen from call.
15661 (output_sibcall): Likewise.
15662 * config/visium/visium.c (output_branch): Likewise.
15664 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15666 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15669 2018-02-10 Alan Modra <amodra@gmail.com>
15672 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15673 Specify LR as an input.
15675 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15678 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15679 remove_member_access_dummy_vars): New functions.
15680 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15681 lower_omp_1, execute_lower_omp): Use them.
15683 PR rtl-optimization/84308
15684 * shrink-wrap.c (spread_components): Release todo vector.
15686 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15688 PR rtl-optimization/57193
15689 * ira-color.c (struct allocno_color_data): Add member
15690 conflict_allocno_hard_prefs.
15691 (update_conflict_allocno_hard_prefs): New.
15692 (bucket_allocno_compare_func): Add a preference based on
15693 conflict_allocno_hard_prefs.
15694 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15695 (color_allocnos): Remove a dead code. Initiate
15696 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15698 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15701 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15702 constraint from =wa to wa. Avoid a subreg on the output operand,
15703 instead use a pseudo and subreg it in a move.
15704 (p9_xxbrd_<mode>): Changed to ...
15705 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15706 (p9_xxbrd_v2df): New expander.
15707 (p9_xxbrw_<mode>): Changed to ...
15708 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15709 (p9_xxbrw_v4sf): New expander.
15711 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15713 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15715 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15718 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15719 multiply in 32-bit mode.
15720 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15721 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15724 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15726 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15727 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15728 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15729 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15731 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15734 * dwarf2out.c (is_trivial_indirect_ref): New function.
15735 (dwarf2out_late_global_decl): Do not generate a location
15736 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15737 and that are not defined in the current unit.
15739 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15741 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15742 instead of a libcall for UNORDERED.
15744 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15747 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15748 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15750 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15753 * config/s390/s390.c (s390_set_current_function): Invoke
15754 s390_indirect_branch_settings also if fndecl didn't change.
15756 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15758 * config/rs6000/rs6000.md (blockage): Set length to zero.
15760 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15762 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15764 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15767 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15768 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15772 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15773 PARALLEL incoming that failed vt_get_decl_and_offset check.
15775 PR middle-end/84237
15776 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15777 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15779 (get_variable_section): For decls in named .bss* sections pass true as
15780 second argument to bss_initializer_p.
15782 2018-02-09 Marek Polacek <polacek@redhat.com>
15783 Jakub Jelinek <jakub@redhat.com>
15786 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15787 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15788 Sync some changes from cxx_fold_indirect_ref.
15790 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15792 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15794 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15795 (BLOCK_INLINE_ENTRY_LABEL): New.
15796 (dwarf2out_var_location): Disregard inline entry markers.
15797 (inline_entry_data): New struct.
15798 (inline_entry_data_hasher): New hashtable type.
15799 (inline_entry_data_hasher::hash): New.
15800 (inline_entry_data_hasher::equal): New.
15801 (inline_entry_data_table): New variable.
15802 (add_high_low_attributes): Add DW_AT_entry_pc and
15803 DW_AT_GNU_entry_view attributes if a pending entry is found
15804 in inline_entry_data_table. Add old entry_pc attribute only
15805 if debug nonbinding markers are disabled.
15806 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15807 markers are enabled.
15808 (block_within_block_p, dwarf2out_inline_entry): New.
15809 (dwarf2out_finish): Check that no entries remained in
15810 inline_entry_data_table.
15811 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15812 (final_scan_insn, notice_source_line): Likewise.
15813 (rest_of_clean_state): Skip inline entry markers.
15814 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15816 * gimple.c (gimple_build_debug_inline_entry): New.
15817 * gimple.h (enum gimple_debug_subcode): Add
15818 GIMPLE_DEBUG_INLINE_ENTRY.
15819 (gimple_build_debug_inline_entry): Declare.
15820 (gimple_debug_inline_entry_p): New.
15821 (gimple_debug_nonbind_marker_p): Adjust.
15822 * insn-notes.def (INLINE_ENTRY): New.
15823 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15824 inline entry marker notes.
15825 (print_insn): Likewise.
15826 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15827 (INSN_DEBUG_MARKER_KIND): Likewise.
15828 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15829 * tree-inline.c (expand_call_inline): Build and insert
15830 debug_inline_entry stmt.
15831 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15832 inline entry blocks early, if nonbind markers are enabled.
15833 (dump_scope_block): Dump fragment info.
15834 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15835 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15836 (gimple_build_debug_inline_entry): New.
15837 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15838 Enable/disable inline entry points too.
15839 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15840 (DEBUG_INSN): Describe inline entry markers.
15842 * common.opt (gvariable-location-views): New.
15843 (gvariable-location-views=incompat5): New.
15844 * config.in: Rebuilt.
15845 * configure: Rebuilt.
15846 * configure.ac: Test assembler for view support.
15847 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15848 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15849 * dwarf2out.c (var_loc_view): New typedef.
15850 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15851 (dwarf2out_locviews_in_attribute): New.
15852 (dwarf2out_locviews_in_loclist): New.
15853 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15854 (enum dw_line_info_opcode): Add LI_adv_address.
15855 (struct dw_line_info_table): Add view.
15856 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15857 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15858 (zero_view_p): New variable.
15859 (ZERO_VIEW_P): New macro.
15860 (output_asm_line_debug_info): New.
15861 (struct var_loc_node): Add view.
15862 (add_AT_view_list, AT_loc_list): New.
15863 (add_var_loc_to_decl): Add view param. Test it against last.
15864 (new_loc_list): Add view params. Record them.
15865 (AT_loc_list_ptr): Handle loc and view lists.
15866 (view_list_to_loc_list_val_node): New.
15867 (print_dw_val): Handle dw_val_class_view_list.
15868 (size_of_die): Likewise.
15869 (value_format): Likewise.
15870 (loc_list_has_views): New.
15871 (gen_llsym): Set vl_symbol too.
15872 (maybe_gen_llsym, skip_loc_list_entry): New.
15873 (dwarf2out_maybe_output_loclist_view_pair): New.
15874 (output_loc_list): Output view list or entries too.
15875 (output_view_list_offset): New.
15876 (output_die): Handle dw_val_class_view_list.
15877 (output_dwarf_version): New.
15878 (output_compilation_unit_header): Use it.
15879 (output_skeleton_debug_sections): Likewise.
15880 (output_rnglists, output_line_info): Likewise.
15881 (output_pubnames, output_aranges): Update version comments.
15882 (output_one_line_info_table): Output view numbers in asm comments.
15883 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15884 Call maybe_gen_llsym.
15885 (loc_list_from_tree_1): Adjust.
15886 (add_AT_location_description): Create view list attribute if
15887 needed, check it's absent otherwise.
15888 (convert_cfa_to_fb_loc_list): Adjust.
15889 (maybe_emit_file): Call output_asm_line_debug_info for test.
15890 (dwarf2out_var_location): Reset views as needed. Precompute
15891 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15892 attribute. Set view.
15893 (new_line_info_table): Reset next view.
15894 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15895 (dwarf2out_source_line): Likewise. Output view resets and labels to
15896 the assembler, or select appropriate line info opcodes.
15897 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15898 (optimize_string_length): Catch it. Adjust.
15899 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15900 dw_val_class_view_list, and remove it if no longer needed.
15901 (hash_loc_list): Hash view numbers.
15902 (loc_list_hasher::equal): Compare them.
15903 (optimize_location_lists): Check whether a view list symbol is
15904 needed, and whether the locview attribute is present, and
15905 whether they match. Remove the locview attribute if no longer
15907 (index_location_lists): Call skip_loc_list_entry for test.
15908 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15909 Use output_dwarf_version.
15910 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15911 (struct dw_val_node): Add val_view_list.
15912 * final.c (SEEN_NEXT_VIEW): New.
15913 (set_next_view_needed): New.
15914 (clear_next_view_needed): New.
15915 (maybe_output_next_view): New.
15916 (final_start_function): Rename to...
15917 (final_start_function_1): ... this. Take pointer to FIRST,
15918 add SEEN parameter. Emit param bindings in the initial view.
15919 (final_start_function): Reintroduce SEEN-less interface.
15920 (final): Rename to...
15921 (final_1): ... this. Take SEEN parameter. Output final pending
15922 next view at the end.
15923 (final): Reintroduce seen-less interface.
15924 (final_scan_insn): Output pending next view before switching
15925 sections or ending a block. Mark the next view as needed when
15926 outputting variable locations. Notify debug backend of section
15927 changes, and of location view changes.
15928 (rest_of_handle_final): Adjust.
15929 * toplev.c (process_options): Autodetect value for debug variable
15930 location views option. Warn on incompat5 without -gdwarf-5.
15931 * doc/invoke.texi (gvariable-location-views): New.
15932 (gvariable-location-views=incompat5): New.
15933 (gno-variable-location-views): New.
15935 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15937 PR tree-optimization/84136
15938 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15939 that the result of find_edge is non-NULL.
15941 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15944 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15945 storing integer register in SImode. Fix cost of 256 and 512
15946 byte aligned SSE register store.
15948 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15950 * config/i386/i386.c (ix86_multiplication_cost): Fix
15951 multiplication cost for TARGET_AVX512DQ.
15953 2018-02-08 Marek Polacek <polacek@redhat.com>
15955 PR tree-optimization/84238
15956 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15959 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15961 PR tree-optimization/84265
15962 * tree-vect-stmts.c (vectorizable_store): Don't treat
15963 VMAT_CONTIGUOUS accesses as grouped.
15964 (vectorizable_load): Likewise.
15966 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15968 PR tree-optimization/81635
15969 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15970 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15971 (test_round_for_mask): New functions.
15972 (wide_int_cc_tests): Call test_round_for_mask.
15973 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15974 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15975 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15976 range returned by get_range_info.
15978 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15981 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15982 * symtab.c: Include builtins.h
15983 (symtab_node::output_to_lto_symbol_table_p): Move here
15984 from lto-streamer-out.c:output_symbol_p.
15985 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15986 (output_symbol_p): Move all logic to symtab.c
15987 (produce_symtab): Update.
15989 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15991 * config/s390/s390-opts.h (enum indirect_branch): Define.
15992 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15993 (s390_indirect_branch_via_thunk)
15994 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15995 (enum s390_indirect_branch_type): Define.
15996 * config/s390/s390.c (struct s390_frame_layout, struct
15997 machine_function): Remove.
15998 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15999 (indirect_branch_table_label_no, indirect_branch_table_name):
16001 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16002 (enum s390_indirect_branch_option): Define.
16003 (s390_return_addr_from_memory): New function.
16004 (s390_handle_string_attribute): New function.
16005 (s390_attribute_table): Add new attribute handler.
16006 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16007 (s390_indirect_branch_via_thunk): New function.
16008 (s390_indirect_branch_via_inline_thunk): New function.
16009 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16010 sibling call optimization for non z10 compiles.
16011 (s390_emit_call): Force indirect branch target to be a single
16012 register. Add r1 clobber for non-z10 compiles.
16013 (s390_emit_epilogue): Emit return jump via return_use expander.
16014 (s390_reorg): Handle JUMP_INSNs as execute targets.
16015 (s390_option_override_internal): Perform validity checks for the
16016 new command line options.
16017 (s390_indirect_branch_attrvalue): New function.
16018 (s390_indirect_branch_settings): New function.
16019 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16020 (s390_output_indirect_thunk_function): New function.
16021 (s390_code_end): Implement target hook.
16022 (s390_case_values_threshold): Implement target hook.
16023 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16025 * config/s390/s390.h (struct s390_frame_layout)
16026 (struct machine_function): Move here from s390.c.
16027 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16028 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16029 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16030 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16031 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16032 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16033 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16034 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16035 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16036 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16037 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16038 (mnemonic attribute): Add values which aren't recognized
16040 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16041 pattern for branch conversion. Fix mnemonic attribute.
16042 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16043 indirect branch via thunk if requested.
16044 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16045 ("*indirect_jump"): Disable for branch conversion using out of
16047 ("indirect_jump_via_thunk<mode>_z10")
16048 ("indirect_jump_via_thunk<mode>")
16049 ("indirect_jump_via_inlinethunk<mode>_z10")
16050 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16051 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16052 ("casesi_jump_via_inlinethunk<mode>_z10")
16053 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16054 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16055 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16056 ("*indirect2_jump"): Disable for branch conversion.
16057 ("casesi_jump"): Turn into expander and expand patterns for branch
16059 ("return_use"): New expander.
16060 ("*return"): Emit return via thunk and rename it to ...
16061 ("*return<mode>"): ... this one.
16062 * config/s390/s390.opt: Add new options and and enum for the
16065 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16067 * lra-constraints.c (match_reload): Unconditionally use
16068 gen_lowpart_SUBREG, rather than selecting between that
16069 and equivalent gen_rtx_SUBREG code.
16071 2018-02-08 Richard Biener <rguenther@suse.de>
16073 PR tree-optimization/84233
16074 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16075 changed flag instead of boguously re-using phi_inserted.
16077 2018-02-08 Martin Jambor <mjambor@suse.cz>
16079 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16080 static local variables.
16082 2018-02-08 Richard Biener <rguenther@suse.de>
16084 PR tree-optimization/84278
16085 * tree-vect-stmts.c (vectorizable_store): When looking for
16086 smaller vector types to perform grouped strided loads/stores
16087 make sure the mode is supported by the target.
16088 (vectorizable_load): Likewise.
16090 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16092 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16093 Increase LDP/STP opportunities by adding adjacent callee-saves.
16095 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16097 PR rtl-optimization/84068
16098 PR rtl-optimization/83459
16099 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16101 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16103 PR tree-optimization/84224
16104 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16105 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16106 non-zero arguments.
16108 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16111 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16112 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16113 count, remove one USE.
16115 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16117 * doc/install.texi (Configuration): Document the
16118 --with-long-double-format={ibm,ieee} PowerPC configuration
16122 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16123 Convert from define_expand to be define_insn_and_split. Rework
16124 float/double/_Float128 conversions to QI/HI/SImode to work with
16125 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16126 conversions to QI/HImode types did a store and then a load to
16127 truncate the value. For conversions to VSX registers, don't split
16128 the insn, instead emit the code directly. Use the code iterator
16129 any_fix to combine signed and unsigned conversions.
16130 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16131 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16132 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16133 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16134 (fix_<mode>di2_hw): Likewise.
16135 (fixuns_<mode>di2_hw): Likewise.
16136 (fix_<mode>si2_hw): Likewise.
16137 (fixuns_<mode>si2_hw): Likewise.
16138 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16139 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16140 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16141 fix<uns>_trunc<SFDF:mode>si2_p8.
16142 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16143 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16144 (fix<uns>_<mode>_mem): Likewise.
16145 (fctiw<u>z_<mode>_mem): Likewise.
16146 (fix<uns>_<mode>_mem): Likewise.
16147 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16148 the register allocator from doing a direct move to the GPRs to do
16149 a store, and instead use the ISA 3.0 store byte/half-word from
16150 vector register instruction. For IEEE 128-bit floating point,
16151 also optimize stores of 32-bit ints.
16152 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16154 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16156 * genextract.c (push_pathstr_operand): New function to support
16158 (walk_rtx): Call push_pathstr_operand.
16159 (print_path): Support [a-zA-Z].
16161 2018-02-07 Richard Biener <rguenther@suse.de>
16163 PR tree-optimization/84037
16164 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16165 (cse_and_gimplify_to_preheader): Declare.
16166 (vect_get_place_in_interleaving_chain): Likewise.
16167 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16169 (_loop_vec_info::~_loop_vec_info): Delete it.
16170 (cse_and_gimplify_to_preheader): New function.
16171 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16172 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16173 (vectorizable_load): Likewise. For grouped stores always base
16174 the IV on the first element.
16175 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16176 condition before gimplifying.
16178 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16180 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16181 *DIV_EXPR and *MOD_EXPR.
16183 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16186 * config/i386/i386.c (ix86_option_override_internal): Mask out
16187 the CF_SET bit when checking -fcf-protection.
16189 2018-02-07 Tom de Vries <tom@codesourcery.com>
16192 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16195 2018-02-07 Richard Biener <rguenther@suse.de>
16197 PR tree-optimization/84204
16198 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16201 PR tree-optimization/84205
16202 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16203 special-case isl_ast_op_zdiv_r.
16205 PR tree-optimization/84223
16206 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16207 Only add conditions from within the region.
16208 (gather_bbs::after_dom_children): Adjust.
16210 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16213 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16214 * config/avr/avr.md: Only post-reload split REG-REG moves if
16215 either register is GENERAL_REG_P.
16217 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16219 PR tree-optimization/84235
16220 * tree-ssa-scopedtables.c
16221 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16222 if the subtraction is performed in floating point type where NaNs are
16223 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16224 build 1. Formatting fix.
16226 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16229 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16230 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16231 and skip it regardless of bb boundaries. Use CALL_P macro,
16232 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16233 unnecessarily, formatting fix.
16235 2018-02-06 Michael Collison <michael.collison@arm.com>
16237 * config/arm/thumb2.md:
16238 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16239 (*thumb_mov_notscc): Ditto.
16241 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16244 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16245 unsigned_fix, not "s".
16247 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16249 * configure.ac (gcc_fn_eh_frame_ro): New function.
16250 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16251 correct .eh_frame permissions.
16252 * configure: Regenerate.
16254 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16256 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16257 irrelevant options.
16259 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16261 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16262 Display warning message for -mno-speculate-indirect-jumps.
16264 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16266 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16268 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16270 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16272 PR tree-optimization/84225
16273 * tree-eh.c (find_trapping_overflow): Only call
16274 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16276 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16279 * config/i386/i386.c: Reimplement the check of possible options
16280 -mibt/-mshstk conbination. Change error messages.
16281 * doc/invoke.texi: Fix a typo: remove extra '='.
16283 2018-02-06 Marek Polacek <polacek@redhat.com>
16285 PR tree-optimization/84228
16286 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16288 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16291 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16292 emitted arch directives.
16293 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16294 __ARM_FEATURE_COPROC before changing architectures.
16296 2018-02-06 Richard Biener <rguenther@suse.de>
16298 * config/i386/i386.c (print_reg): Fix typo.
16299 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16301 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16303 * configure: Regenerate.
16305 2018-02-05 Martin Sebor <msebor@redhat.com>
16307 PR tree-optimization/83369
16308 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16311 2018-02-05 Martin Liska <mliska@suse.cz>
16313 * doc/invoke.texi: Cherry-pick upstream r323995.
16315 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16317 * ira.c (ira_init_register_move_cost): Adjust comment.
16319 2018-02-05 Martin Liska <mliska@suse.cz>
16321 PR gcov-profile/84137
16322 * doc/gcov.texi: Fix typo in documentation.
16324 2018-02-05 Martin Liska <mliska@suse.cz>
16326 PR gcov-profile/83879
16327 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16328 using dlopen functionality.
16330 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16332 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16333 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16334 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16335 _mm_maskz_range_round_ss): New intrinsics.
16336 (__builtin_ia32_rangesd128_round)
16337 (__builtin_ia32_rangess128_round): Remove.
16338 (__builtin_ia32_rangesd128_mask_round,
16339 __builtin_ia32_rangess128_mask_round): New builtins.
16340 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16341 __builtin_ia32_rangess128_round): Remove.
16342 (__builtin_ia32_rangesd128_mask_round,
16343 __builtin_ia32_rangess128_mask_round): New builtins.
16344 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16345 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16346 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16347 "<round_saeonly_constraint>")): Changed to ...
16348 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16349 "<round_saeonly_scalar_constraint>")): ... this.
16350 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16351 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16352 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16353 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16354 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16356 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16358 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16360 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16361 Remove all values except native, 8540 and 8548.
16363 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16365 * config/i386/i386.c (ix86_output_function_return): Pass
16366 INVALID_REGNUM, instead of -1, as invalid register number to
16367 indirect_thunk_name and output_indirect_thunk.
16369 2018-02-02 Julia Koval <julia.koval@intel.com>
16371 * config.gcc: Add -march=icelake.
16372 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16373 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16374 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16375 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16376 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16377 (processor_target_table): Add icelake.
16378 (ix86_option_override_internal): Handle new PTAs.
16379 (get_builtin_code_for_version): Handle icelake.
16380 (M_INTEL_COREI7_ICELAKE): New.
16381 (fold_builtin_cpu): Handle icelake.
16382 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16383 * doc/invoke.texi: Add -march=icelake.
16385 2018-02-02 Julia Koval <julia.koval@intel.com>
16387 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16388 to wide_int_bitmask.
16389 * wide-int-bitmask.h: New.
16391 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16394 * config/i386/i386.md: Replace Pmode with word_mode in
16395 builtin_setjmp_setup and builtin_longjmp to support x32.
16397 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16401 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16403 (rs6000_supported_cpu_names): New static variable.
16404 (linux_cpu_translation_table): Likewise.
16405 (elf_platform) <cpu>: Define new static variable and use it.
16406 Translate kernel AT_PLATFORM name to canonical name if needed.
16407 Error if platform name is unknown.
16409 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16412 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16414 2018-02-01 Jeff Law <law@redhat.com>
16417 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16418 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16419 the scratch if RELEASE_VIA_POP is false.
16420 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16421 If we have to save a temporary register, decrement SIZE appropriately.
16422 Pass new arguments to release_scratch_register_on_entry.
16423 (ix86_adjust_stack_and_probe): Likewise.
16424 (ix86_emit_probe_stack_range): Pass new arguments to
16425 release_scratch_register_on_entry.
16427 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16429 PR rtl-optimization/84157
16430 * combine.c (change_zero_ext): Use REG_P predicate in
16431 front of HARD_REGISTER_P predicate.
16433 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16435 * config/avr/avr.c (avr_option_override): Move disabling of
16436 -fdelete-null-pointer-checks to...
16437 * common/config/avr/avr-common.c (avr_option_optimization_table):
16440 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16442 PR tree-optimization/81635
16443 * tree-data-ref.c (split_constant_offset_1): For types that
16444 wrap on overflow, try to use range info to prove that wrapping
16447 2018-02-01 Renlin Li <renlin.li@arm.com>
16450 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16451 TAILCALL_ADDR_REGS.
16452 (aarch64_register_move_cost): Likewise.
16453 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16454 TAILCALL_ADDR_REGS.
16455 (REG_CLASS_NAMES): Likewise.
16456 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16457 TAILCALL_ADDR_REGS. Remove IP registers.
16458 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16460 2018-02-01 Richard Biener <rguenther@suse.de>
16462 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16463 for specifying RPO order and allow NULL for that.
16464 * domwalk.c (dom_walker::dom_walker): Likewise.
16465 (dom_walker::walk): Handle NULL RPO order.
16466 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16468 (rewrite_update_dom_walker): Likewise.
16469 (mark_def_dom_walker): Likewise.
16471 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16473 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16474 (aarch64_maybe_expand_sve_subreg_move): Declare.
16475 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16476 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16478 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16479 that are semantically a reverse operation.
16480 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16481 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16482 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16484 (aarch64_can_change_mode_class): For big-endian, forbid changes
16485 between two SVE modes if they have different element sizes.
16487 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16489 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16490 the TImode handling for big-endian targets.
16492 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16494 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16495 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16497 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16498 Remove BSWAP handing for big-endian targets and use the form of
16499 LD1RQ appropariate for the mode.
16501 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16503 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16504 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16505 duplicated element.
16507 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16510 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16511 check for operands that need to go through aarch64_sve_reload_be.
16513 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16515 PR tree-optimization/81661
16516 PR tree-optimization/84117
16517 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16518 * tree-eh.c: Include gimplify.h.
16519 (find_trapping_overflow, replace_trapping_overflow,
16520 rewrite_to_non_trapping_overflow): New functions.
16521 * tree-vect-loop.c: Include tree-eh.h.
16522 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16523 * tree-data-ref.c: Include tree-eh.h.
16524 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16526 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16528 PR rtl-optimization/84123
16529 * combine.c (change_zero_ext): Check if hard register satisfies
16530 can_change_dest_mode before calling gen_lowpart_SUBREG.
16532 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16535 * ira.c (ira_init_register_move_cost): Remove assert.
16537 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16539 PR rtl-optimization/84071
16540 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16541 * doc/tm.texi: Regenerate.
16543 2018-01-31 Richard Biener <rguenther@suse.de>
16545 PR tree-optimization/84132
16546 * tree-data-ref.c (analyze_miv_subscript): Properly
16547 check whether evolution_function_is_affine_multivariate_p
16548 before calling gcd_of_steps_may_divide_p.
16550 2018-01-31 Julia Koval <julia.koval@intel.com>
16553 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16554 * config/i386/i386.md (rdpid_rex64) New.
16555 (rdpid): Make 32bit only.
16557 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16560 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16561 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16563 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16566 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16568 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16570 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16572 PR rtl-optimization/84071
16573 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16574 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16576 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16578 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16579 (arc_attribute_table): Add 'aux' attribute.
16580 (arc_in_small_data_p): Consider aux like variables.
16581 (arc_is_aux_reg_p): New function.
16582 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16583 (arc_get_aux_arg): New function.
16584 (prepare_move_operands): Handle aux-register access.
16585 (arc_handle_aux_attribute): New function.
16586 * doc/extend.texi (ARC Variable attributes): Add subsection.
16588 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16590 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16591 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16592 (arc_attribute_table): Add 'uncached' attribute.
16593 (arc_print_operand): Print '.di' flag for uncached memory
16595 (arc_in_small_data_p): Do not consider for small data the uncached
16597 (arc_is_uncached_mem_p): New function.
16598 * config/arc/predicates.md (compact_store_memory_operand): Check
16599 for uncached memory accesses.
16600 (nonvol_nonimm_operand): Likewise.
16601 * doc/extend.texi (ARC Type Attribute): New subsection.
16603 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16606 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16607 falign-loops=): Add Optimization flag.
16609 2018-01-30 Jeff Law <law@redhat.com>
16612 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16613 INT_REGISTERS_SAVED. Check it prior to calling
16614 get_scratch_register_on_entry.
16615 (ix86_adjust_stack_and_probe): Similarly.
16616 (ix86_emit_probe_stack_range): Similarly.
16617 (ix86_expand_prologue): Corresponding changes.
16619 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16622 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16623 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16625 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16628 * lra-constraints.c (curr_insn_transform): Process AND in the
16631 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16633 PR rtl-optimization/83986
16634 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16635 dependence against last_pending_memory_flush in addition to
16636 pending_jump_insns.
16638 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16640 PR tree-optimization/81611
16641 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16644 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16647 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16650 2018-01-30 Richard Biener <rguenther@suse.de>
16651 Jakub Jelinek <jakub@redhat.com>
16653 PR tree-optimization/84111
16654 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16655 inner loops added during recursion, as they don't have up-to-date
16658 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16661 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16662 (can_inline_edge_by_limits_p): ... here.
16663 (can_early_inline_edge_p, check_callers,
16664 update_caller_keys, update_callee_keys, recursive_inlining,
16665 add_new_edges_to_heap, speculation_useful_p,
16666 inline_small_functions,
16667 inline_small_functions, flatten_function,
16668 inline_to_all_callers_1): Update.
16670 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16672 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16675 2018-01-30 Richard Biener <rguenther@suse.de>
16677 PR tree-optimization/83008
16678 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16679 invariant and constant vector uses in stmts when they need
16680 more than one stmt.
16682 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16685 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16686 * configure: Regenerate.
16688 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16690 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16692 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16693 Use gen_rtx_REG rather than gen_lowpart.
16695 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16697 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16698 rather than 0 when creating partial subregs.
16700 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16702 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16705 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16708 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16709 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16710 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16711 flags. This restores the settings used before the 2017-07-24.
16712 Turning off pre increment/decrement/modify allows IVOPTS to
16713 optimize DF/SF loops where the index is an int.
16715 2018-01-29 Richard Biener <rguenther@suse.de>
16716 Kelvin Nilsen <kelvin@gcc.gnu.org>
16719 * tree-vect-stmts.c (vectorizable_call): Don't call
16720 targetm.vectorize_builtin_md_vectorized_function if callee is
16723 2018-01-22 Carl Love <cel@us.ibm.com>
16725 * doc/extend.tex: Fix typo in second arg in
16726 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16728 2018-01-29 Richard Biener <rguenther@suse.de>
16730 PR tree-optimization/84086
16731 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16732 (flush_ssaname_freelist): When SSA names were released reset
16733 the SCEV hash table.
16735 2018-01-29 Richard Biener <rguenther@suse.de>
16737 PR tree-optimization/84057
16738 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16739 removed paths when removing edges.
16741 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16743 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16744 -mfunction-return=@var{choice}.
16746 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16748 PR diagnostic/84034
16749 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16750 Handle CR like TAB.
16751 (layout::print_source_line): Likewise.
16752 (test_get_line_width_without_trailing_whitespace): Add test cases.
16754 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16756 PR middle-end/84040
16757 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16760 2018-01-26 Jim Wilson <jimw@sifive.com>
16762 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16764 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16767 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16769 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16770 and CMP + SUB-immediate -> SUBS.
16772 2018-01-26 Martin Sebor <msebor@redhat.com>
16774 PR tree-optimization/83896
16775 * tree-ssa-strlen.c (get_string_len): Rename...
16776 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16777 Avoid assuming length is constant.
16778 (handle_char_store): Use HOST_WIDE_INT for string length.
16780 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16783 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16784 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16786 2018-01-26 Richard Biener <rguenther@suse.de>
16788 PR rtl-optimization/84003
16789 * dse.c (record_store): Only record redundant stores when
16790 the earlier store aliases at least all accesses the later one does.
16792 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16794 PR rtl-optimization/83985
16795 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16796 REG_CFA_RESTORE insns.
16797 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16798 REG_CFA_RESTORE insns here.
16801 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16802 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16804 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16806 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16807 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16808 (arc_init): Likewise.
16809 (arc_override_options): Likewise.
16810 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16812 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16814 * config/arc/arc.h (TARGET_DBNZ): Define.
16815 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16816 properly set the tune attribute.
16817 (dbnz): Use TARGET_DBNZ guard.
16818 * config/arc/arc.opt (mtune): Add core3 option.
16820 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16822 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16823 recognize new pic like addresses.
16824 (arc_delegitimize_address): Clean up.
16826 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16828 * config/arc/arc-arches.def: Option mrf16 valid for all
16830 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16831 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16832 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16833 * config/arc/arc-tables.opt: Regenerate.
16834 * config/arc/arc.c (arc_conditional_register_usage): Handle
16835 reduced register file case.
16836 (arc_file_start): Set must have build attributes.
16837 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16838 mrf16 option value.
16839 * config/arc/arc.opt (mrf16): Add new option.
16840 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16841 * config/arc/genmultilib.awk: Handle new mrf16 option.
16842 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16843 * config/arc/t-multilib: Regenerate.
16844 * doc/invoke.texi (ARC Options): Document mrf16 option.
16846 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16848 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16849 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16850 (arc_attribute_table): Add 'secure_call' attribute.
16851 (arc_print_operand): Print secure call operand.
16852 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16854 (arc_is_secure_call_p): New function. * config/arc/arc.md
16855 (call_i): Add support for sjli instruction.
16856 (call_value_i): Likewise.
16857 * config/arc/constraints.md (Csc): New constraint.
16859 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16860 John Eric Martin <John.Martin@emmicro-us.com>
16862 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16863 * config/arc/arc.c (_arc_jli_section): New struct.
16864 (arc_jli_section): New type.
16865 (rc_jli_sections): New static variable.
16866 (arc_handle_jli_attribute): New function.
16867 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16868 (arc_file_end): New function.
16869 (TARGET_ASM_FILE_END): Define.
16870 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16871 (arc_add_jli_section): New function.
16872 (jli_call_scan): Likewise.
16873 (arc_reorg): Call jli_call_scan.
16874 (arc_output_addsi): Remove 'S' from printing asm operand.
16875 (arc_is_jli_call_p): New function.
16876 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16878 (movhi_insn): Likewise.
16879 (movsi_insn): Likewise.
16880 (movsi_set_cc_insn): Likewise.
16881 (loadqi_update): Likewise.
16882 (load_zeroextendqisi_update): Likewise.
16883 (load_signextendqisi_update): Likewise.
16884 (loadhi_update): Likewise.
16885 (load_zeroextendhisi_update): Likewise.
16886 (load_signextendhisi_update): Likewise.
16887 (loadsi_update): Likewise.
16888 (loadsf_update): Likewise.
16889 (movsicc_insn): Likewise.
16890 (bset_insn): Likewise.
16891 (bxor_insn): Likewise.
16892 (bclr_insn): Likewise.
16893 (bmsk_insn): Likewise.
16894 (bicsi3_insn): Likewise.
16895 (cmpsi_cc_c_insn): Likewise.
16896 (movsi_ne): Likewise.
16897 (movsi_cond_exec): Likewise.
16898 (clrsbsi2): Likewise.
16899 (norm_f): Likewise.
16909 (call_i): Remove 'S' asm letter, add jli instruction.
16910 (call_value_i): Likewise.
16911 * config/arc/arc.op (mjli-always): New option.
16912 * config/arc/constraints.md (Cji): New constraint.
16913 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16915 (subsf3_fpx): Likewise.
16916 (mulsf3_fpx): Likewise.
16917 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16919 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16920 function attrbutes.
16921 * doc/invoke.texi (ARC): Document mjli-always option.
16923 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16925 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16926 avoid addition with 0 and use incw and decw where possible.
16928 2018-01-26 Richard Biener <rguenther@suse.de>
16930 PR tree-optimization/81082
16931 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16932 association if it requires casting to unsigned.
16933 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16934 from fold_plusminus_mult_expr to catch important cases late when
16935 range info is available.
16937 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16939 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16940 * configure.ac (hidden_linkonce): New test.
16941 * configure: Regenerate.
16942 * config.in: Regenerate.
16944 2018-01-26 Julia Koval <julia.koval@intel.com>
16946 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16947 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16948 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16949 _mm_mask_bitshuffle_epi64_mask): Fix type.
16950 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16951 USI_FTYPE_V4DI_V4DI_USI): Remove.
16952 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16953 __builtin_ia32_vpshufbitqmb256_mask,
16954 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16955 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16956 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16958 2018-01-26 Alan Modra <amodra@gmail.com>
16961 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16962 UNSPEC_VBPERMQ. Sort other unspecs.
16964 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16966 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16968 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16970 PR middle-end/83055
16971 * predict.c (drop_profile): Do not push/pop cfun; update also
16973 (handle_missing_profiles): Fix logic looking for zero profiles.
16975 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16977 PR middle-end/83977
16978 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16979 on functions with #pragma omp declare simd or functions with simd
16981 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16982 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16983 Remove trailing \n from warning_at calls.
16985 2018-01-25 Tom de Vries <tom@codesourcery.com>
16988 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16989 for neutered workers.
16991 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16994 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16995 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16997 2018-01-24 Jeff Law <law@redhat.com>
17000 * i386.c (get_probe_interval): Move to earlier point.
17001 (ix86_compute_frame_layout): If -fstack-clash-protection and
17002 the frame is larger than the probe interval, then use pushes
17003 to save registers rather than reg->mem moves.
17004 (ix86_expand_prologue): Remove conditional for int_registers_saved
17007 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17010 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17011 min/max for never referenced object.
17013 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17015 PR middle-end/83977
17016 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17018 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17019 attributes from DECL_ATTRIBUTES (decl) without affecting
17020 DECL_ATTRIBUTES (current_function_decl).
17021 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17022 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17024 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17026 PR tree-optimization/83979
17027 * fold-const.c (fold_comparison): Use constant_boolean_node
17028 instead of boolean_{true,false}_node.
17030 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17032 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17035 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17037 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17038 Simplify the clause that sets the length attribute.
17039 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17040 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17041 clause that sets the length attribute.
17042 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17044 2018-01-24 Tom de Vries <tom@codesourcery.com>
17047 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17048 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17049 Add strict parameter.
17050 (prevent_branch_around_nothing): Insert dummy insn between branch to
17051 label and label with no ptx insn inbetween.
17052 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17054 2018-01-24 Tom de Vries <tom@codesourcery.com>
17057 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17058 for neutered threads in warp.
17059 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17061 2018-01-24 Richard Biener <rguenther@suse.de>
17063 PR tree-optimization/83176
17064 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17067 2018-01-24 Richard Biener <rguenther@suse.de>
17069 PR tree-optimization/82819
17070 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17071 code generating pluses that are no-ops in the target precision.
17073 2018-01-24 Richard Biener <rguenther@suse.de>
17075 PR middle-end/84000
17076 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17078 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17080 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17081 to merge probabilities.
17082 * predict.c (probably_never_executed): Also mark as cold functions
17083 with global 0 profile and guessed local profile.
17084 * profile-count.c (profile_probability::combine_with_count): New
17086 * profile-count.h (profile_probability::operator*,
17087 profile_probability::operator*=, profile_probability::operator/,
17088 profile_probability::operator/=): Reduce precision to adjusted
17089 and set value to guessed on contradictory divisions.
17090 (profile_probability::combine_with_freq): Remove.
17091 (profile_probability::combine_wiht_count): Declare.
17092 (profile_count::force_nonzero):: Set to adjusted.
17093 (profile_count::probability_in):: Set quality to adjusted.
17094 * tree-ssa-tail-merge.c (replace_block_by): Use
17095 combine_with_count.
17097 2018-01-23 Andrew Waterman <andrew@sifive.com>
17098 Jim Wilson <jimw@sifive.com>
17100 * config/riscv/riscv.c (riscv_stack_boundary): New.
17101 (riscv_option_override): Set riscv_stack_boundary. Handle
17102 riscv_preferred_stack_boundary_arg.
17103 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17104 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17105 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17106 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17107 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17108 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17110 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17113 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17114 of struct ix86_frame.
17115 (ix86_expand_epilogue): Likewise. Add a local variable for
17116 the reg_save_offset field in struct ix86_frame.
17118 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17120 PR tree-optimization/82604
17121 * tree-loop-distribution.c (enum partition_kind): New enum item
17122 PKIND_PARTIAL_MEMSET.
17123 (partition_builtin_p): Support above new enum item.
17124 (generate_code_for_partition): Ditto.
17125 (compute_access_range): Differentiate cases that equality can be
17126 proven at all loops, the innermost loops or no loops.
17127 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17128 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17129 (finalize_partitions, distribute_loop): Don't fuse partition of
17130 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17131 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17132 parloop is enabled.
17134 2018-01-23 Martin Liska <mliska@suse.cz>
17136 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17137 order to ignore the predictor.
17138 (PRED_POLYMORPHIC_CALL): Likewise.
17139 (PRED_RECURSIVE_CALL): Likewise.
17141 2018-01-23 Martin Liska <mliska@suse.cz>
17143 * tree-profile.c (tree_profiling): Print function header to
17144 aware reader which function we are working on.
17145 * value-prof.c (gimple_find_values_to_profile): Do not print
17146 not interesting value histograms.
17148 2018-01-23 Martin Liska <mliska@suse.cz>
17150 * profile-count.h (enum profile_quality): Add
17151 profile_uninitialized as the first value. Do not number values
17152 as they are zero based.
17153 (profile_count::verify): Update sanity check.
17154 (profile_probability::verify): Likewise.
17156 2018-01-23 Nathan Sidwell <nathan@acm.org>
17158 * doc/invoke.texi (ffor-scope): Deprecate.
17160 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17162 PR tree-optimization/83510
17163 * domwalk.c (set_all_edges_as_executable): New function.
17164 (dom_walker::dom_walker): Convert bool param
17165 "skip_unreachable_blocks" to enum reachability. Move setup of
17166 edge flags to set_all_edges_as_executable and only do it when
17167 reachability is REACHABLE_BLOCKS.
17168 * domwalk.h (enum dom_walker::reachability): New enum.
17169 (dom_walker::dom_walker): Convert bool param
17170 "skip_unreachable_blocks" to enum reachability.
17171 (set_all_edges_as_executable): New decl.
17172 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17173 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17175 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17176 but converting true to REACHABLE_BLOCKS.
17177 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17179 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17180 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17181 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17183 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17184 if check_all_array_refs will be called.
17186 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17188 * tree.c (selftest::test_location_wrappers): Add more test
17191 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17193 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17194 (selftest::test_bit_in_range): Likewise.
17196 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17199 * doc/sourcebuild.texi (vect_float): Say that the selector
17200 only describes the situation when -funsafe-math-optimizations is on.
17201 (vect_float_strict): Document.
17203 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17205 PR tree-optimization/83965
17206 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17207 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17208 instead of checking only for a reduction.
17209 (vect_recog_widen_sum_pattern): Likewise.
17211 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17213 * predict.c (probably_never_executed): Only use precise profile info.
17214 (compute_function_frequency): Skip after inlining hack since we now
17215 have quality checking.
17217 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17219 * profile-count.h (profile_probability::very_unlikely,
17220 profile_probability::unlikely, profile_probability::even): Set
17221 precision to guessed.
17223 2018-01-23 Richard Biener <rguenther@suse.de>
17225 PR tree-optimization/83963
17226 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17227 Properly terminate dominator walk when crossing the exit edge not
17228 when visiting its source block.
17230 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17233 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17234 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17236 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17238 PR tree-optimization/83957
17239 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17240 semicolon after for body surrounded by braces.
17242 PR tree-optimization/83081
17243 * profile-count.h (profile_probability::split): New method.
17244 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17245 Use profile_probability::split.
17246 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17247 when splitting a single conditional jump into 2.
17249 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17251 PR tree-optimization/69452
17252 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17255 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17257 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17258 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17259 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17261 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17263 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17265 * config/rl78/rl78.md (movdi): New define_expand.
17266 * config/rl78/rl78.c (rl78_split_movdi): New function.
17268 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17271 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17273 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17274 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17275 128-bit to produce an UNSPEC move to get the double word with the
17276 signbit and then a shift directly to do signbit.
17277 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17278 implementation with a new version that just does either a direct
17279 move or a regular move. Move memory interface to separate insns.
17280 Move insns so they are next to the expander.
17281 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17282 with signbit move. Split big and little endian case.
17283 (signbit<mode>2_dm_mem_le): Likewise.
17284 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17285 (signbit<mode>2_dm2): Likewise.
17287 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17289 * config/rl78/rl78.md (anddi3): New define_expand.
17291 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17293 * config/rl78/rl78.md (umindi3): New define_expand.
17295 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17297 * config/rl78/rl78.md (smindi3): New define_expand.
17299 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17301 * config/rl78/rl78.md (smaxdi3): New define_expand.
17303 2018-01-22 Carl Love <cel@us.ibm.com>
17305 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17306 LVX_V1TI): Add macro expansion.
17307 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17308 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17309 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17310 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17311 Change check to determine if the instruction is a byte reversing
17312 entry. Fix typo in comment.
17313 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17314 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17315 Add def_builtin calls for new builtins.
17316 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17317 Add define_insn expansion.
17319 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17321 * config/rl78/rl78.md (umaxdi3): New define_expand.
17323 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17325 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17326 for non-QImode registers.
17328 2018-01-22 Richard Biener <rguenther@suse.de>
17330 PR tree-optimization/83963
17331 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17332 including the loop exit block.
17333 (scop_detection::merge_sese): Likewise.
17334 (scop_detection::add_scop): Do it here instead.
17336 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17338 * doc/sourcebuild.texi (arm_softfloat): Document.
17340 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17343 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17344 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17345 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17347 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17348 David Edelsohn <dje.gcc@gmail.com>
17351 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17352 Change "crset eq" to "crset 2".
17353 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17354 (*call_indirect_aix<mode>_nospec): Likewise.
17355 (*call_value_indirect_aix<mode>_nospec): Likewise.
17356 (*call_indirect_elfv2<mode>_nospec): Likewise.
17357 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17358 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17359 change assembly output from . to $.
17360 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17361 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17362 (*tablejump<mode>_internal1_nospec): Likewise.
17364 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17367 * config/sh/sh_optimize_sett_clrt.cc:
17368 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17370 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17372 PR tree-optimization/83940
17373 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17374 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17375 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17376 use it to pass back the definition type.
17377 (vect_check_store_rhs): Likewise rhs_dt_out.
17378 (vect_build_gather_load_calls): Add a mask_dt argument and use
17379 it instead of a call to vect_is_simple_use.
17380 (vectorizable_store): Update calls to vect_check_load_store_mask
17381 and vect_check_store_rhs. Use the dt returned by the latter instead
17382 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17383 instead of calls to vect_is_simple_use. Pass the scalar rather
17384 than the vector operand to vect_is_simple_use when handling
17385 second and subsequent copies of an rhs value.
17386 (vectorizable_load): Update calls to vect_check_load_store_mask
17387 and vect_build_gather_load_calls. Use the cached mask_dt and
17388 gs_info.offset_dt instead of calls to vect_is_simple_use.
17390 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17392 PR middle-end/83945
17393 * tree-emutls.c: Include gimplify.h.
17394 (lower_emutls_2): New function.
17395 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17396 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17397 it before further processing.
17400 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17401 UINTVAL (trueop1) instead of INTVAL (op1).
17403 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17407 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17408 INCOMING_FRAME_SP_OFFSET if not defined.
17409 (scan_trace): Add ENTRY argument. If true and
17410 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17411 emit a note to adjust the CFA offset.
17412 (create_cfi_notes): Adjust scan_trace callers.
17413 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17414 INCOMING_FRAME_SP_OFFSET in the CIE.
17415 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17416 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17418 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17419 * doc/tm.texi: Regenerated.
17421 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17423 PR rtl-optimization/83147
17424 * lra-constraints.c (remove_inheritance_pseudos): Use
17425 lra_substitute_pseudo_within_insn.
17427 2018-01-19 Tom de Vries <tom@codesourcery.com>
17428 Cesar Philippidis <cesar@codesourcery.com>
17431 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17433 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17436 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17437 spaces for function labels.
17439 2018-01-19 Martin Liska <mliska@suse.cz>
17441 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17442 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17443 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17444 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17445 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17446 (PRED_CONST_RETURN): Change from 69 to 65.
17447 (PRED_NULL_RETURN): Change from 91 to 71.
17448 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17449 (PRED_LOOP_GUARD): Change from 66 to 73.
17451 2018-01-19 Martin Liska <mliska@suse.cz>
17453 * predict.c (predict_insn_def): Add new assert.
17454 (struct branch_predictor): Change type to signed integer.
17455 (test_prediction_value_range): Amend test to cover
17456 PROB_UNINITIALIZED.
17457 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17458 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17459 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17460 (PRED_LOOP_IV_COMPARE): Likewise.
17461 * predict.h (PROB_UNINITIALIZED): Define new constant.
17463 2018-01-19 Martin Liska <mliska@suse.cz>
17465 * predict.c (dump_prediction): Add new format for
17466 analyze_brprob.py script which is enabled with -details
17468 * profile-count.h (precise_p): New function.
17470 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17472 PR tree-optimization/83922
17473 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17474 there are no statements that need masking.
17475 (vect_active_double_reduction_p): New function.
17476 (vect_analyze_loop_operations): Use it when handling phis that
17477 are not in the loop header.
17479 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17481 PR tree-optimization/83914
17482 * tree-vect-loop.c (vectorizable_induction): Don't convert
17483 init_expr or apply the peeling adjustment for inductions
17484 that are nested within the vectorized loop.
17486 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17488 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17491 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17495 * function.h (gimplify_parameters): Add gimple_seq * argument.
17496 * function.c: Include gimple.h and options.h.
17497 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17498 for the added local temporaries if needed.
17499 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17500 if there are any parameter cleanups, wrap whole body into a
17501 try/finally with the cleanups.
17503 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17506 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17507 Use GET_MODE_CLASS for scalar floating point.
17509 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17513 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17514 Fix call of call_cgraph_insertion_hooks.
17516 2018-01-18 Martin Sebor <msebor@redhat.com>
17518 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17520 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17523 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17526 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17529 * common.opt: (-ffile-prefix-map): New option.
17530 * opts.c (common_handle_option): Defer it.
17531 * opts-global.c (handle_common_deferred_options): Handle it.
17532 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17533 * file-prefix-map.h: New file.
17534 (remap_debug_filename, add_debug_prefix_map): ...here.
17535 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17536 * final.c (debug_prefix_map, add_debug_prefix_map
17537 remap_debug_filename): Move to...
17538 * file-prefix-map.c: New file.
17539 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17540 generalize, get rid of alloca(), use strrchr() instead of strchr().
17541 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17542 Implement in terms of add_prefix_map().
17543 (remap_macro_filename, remap_debug_filename): Implement in term of
17545 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17546 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17547 * dbxout.c: Include file-prefix-map.h.
17548 * varasm.c: Likewise.
17549 * vmsdbgout.c: Likewise.
17550 * xcoffout.c: Likewise.
17551 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17552 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17553 * doc/invoke.texi (-ffile-prefix-map): Document.
17554 (-fdebug-prefix-map): Update description.
17556 2018-01-18 Martin Liska <mliska@suse.cz>
17558 * config/i386/i386.c (indirect_thunk_name): Document that also
17560 (output_indirect_thunk): Document why both instructions
17561 (pause and lfence) are generated.
17563 2018-01-18 Richard Biener <rguenther@suse.de>
17565 PR tree-optimization/83887
17566 * graphite-scop-detection.c
17567 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17568 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17569 (scop_detection::merge_sese): Re-implement with a flood-fill
17570 algorithm that properly finds a SESE region if it exists.
17572 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17575 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17576 pointer_diff optimizations use view_convert instead of convert.
17578 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17580 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17581 Generate different code for -mno-speculate-indirect-jumps.
17582 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17583 (*call_indirect_aix<mode>): Disable for
17584 -mno-speculate-indirect-jumps.
17585 (*call_indirect_aix<mode>_nospec): New define_insn.
17586 (*call_value_indirect_aix<mode>): Disable for
17587 -mno-speculate-indirect-jumps.
17588 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17589 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17590 -mno-speculate-indirect-jumps.
17591 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17593 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17595 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17596 long double type, set the flags for noting the default long double
17597 type, even if we don't pass or return a long double type.
17599 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17602 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17605 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17607 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17608 support for merge[hl].
17609 (fold_mergehl_helper): New helper function.
17610 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17611 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17612 (altivec_vmrglw_direct): Add xxmrglw insn.
17614 2018-01-17 Andrew Waterman <andrew@sifive.com>
17616 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17617 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17619 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17622 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17623 call the lto_location_cache before reading the
17624 DECL_SOURCE_LOCATION of the types.
17626 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17627 Richard Sandiford <richard.sandiford@linaro.org>
17629 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17630 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17631 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17632 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17633 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17635 * config/aarch64/constraints.md (aarch64_movti_operand):
17637 * config/aarch64/predicates.md (Uti): Add new constraint.
17639 2018-01-17 Carl Love <cel@us.ibm.com>
17641 * config/rs6000/vsx.md (define_expand xl_len_r,
17642 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17643 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17645 (define_expand, define_insn): Move the shift left from the
17646 define_insn to the define_expand for lxvl and stxvl instructions.
17647 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17648 and XL_LEN_R definitions to PURE.
17650 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17652 * config/i386/i386.c (indirect_thunk_name): Declare regno
17653 as unsigned int. Compare regno with INVALID_REGNUM.
17654 (output_indirect_thunk): Ditto.
17655 (output_indirect_thunk_function): Ditto.
17656 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17657 in the call to output_indirect_thunk_function.
17659 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17661 PR middle-end/83884
17662 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17663 rather than the size of inner_type to determine the stack slot size
17664 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17666 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17669 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17672 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17674 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17675 endian Linux systems to optionally enable multilibs for selecting
17676 the long double type if the user configured an explicit type.
17677 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17678 have no long double multilibs if not defined.
17679 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17680 warn if the user used -mabi={ieee,ibm}longdouble and we built
17681 multilibs for long double.
17682 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17683 appropriate multilib option.
17684 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17686 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17687 for building long double multilibs.
17688 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17690 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17692 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17695 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17697 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17700 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17703 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17706 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17708 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17709 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17711 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17713 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17714 different rtl trees depending on TARGET_64BIT.
17715 (rs6000_gen_lvx): Likewise.
17717 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17719 * config/visium/visium.md (nop): Tweak comment.
17720 (hazard_nop): Likewise.
17722 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17724 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17725 -mspeculate-indirect-jumps.
17726 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17727 for -mno-speculate-indirect-jumps.
17728 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17729 (*call_value_indirect_elfv2<mode>): Disable for
17730 -mno-speculate-indirect-jumps.
17731 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17732 (indirect_jump): Emit different RTL for
17733 -mno-speculate-indirect-jumps.
17734 (*indirect_jump<mode>): Disable for
17735 -mno-speculate-indirect-jumps.
17736 (*indirect_jump<mode>_nospec): New define_insn.
17737 (tablejump): Emit different RTL for
17738 -mno-speculate-indirect-jumps.
17739 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17740 (tablejumpsi_nospec): New define_expand.
17741 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17742 (tablejumpdi_nospec): New define_expand.
17743 (*tablejump<mode>_internal1): Disable for
17744 -mno-speculate-indirect-jumps.
17745 (*tablejump<mode>_internal1_nospec): New define_insn.
17746 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17749 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17751 * caller-save.c (insert_save): Drop unnecessary parameter. All
17754 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17755 Richard Biener <rguenth@suse.de>
17758 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17759 return early, inline manually is_gimple_sizepos. Make sure if we
17760 call gimplify_expr we don't end up with a gimple constant.
17761 * tree.c (variably_modified_type_p): Don't return true for
17762 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17763 * gimplify.h (is_gimple_sizepos): Remove.
17765 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17767 PR tree-optimization/83857
17768 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17769 vectorizable_live_operation for pure SLP statements.
17770 (vectorizable_live_operation): Handle PHIs.
17772 2018-01-16 Richard Biener <rguenther@suse.de>
17774 PR tree-optimization/83867
17775 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17776 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17778 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17781 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17782 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17783 If off is not INTEGER_CST, issue a may not be aligned warning
17784 rather than isn't aligned. Use isn%'t rather than isn't.
17785 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17787 <case MULT_EXPR>: Improve the case when bottom and one of the
17788 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17789 operand, in that case check if the other operand is multiple of
17790 bottom divided by the INTEGER_CST operand.
17792 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17795 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17796 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17797 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17798 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17799 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17800 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17801 (pa_function_arg_size): New function.
17803 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17805 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17806 in a separate statement.
17808 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17810 PR tree-optimization/83847
17811 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17812 group gathers and scatters.
17814 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17816 PR rtl-optimization/86620
17817 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17819 PR rtl-optimization/83213
17820 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17821 to last if both are JUMP_INSNs.
17823 PR tree-optimization/83843
17824 * gimple-ssa-store-merging.c
17825 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17826 store_immediate_info for bswap/nop orig_stores.
17828 2018-01-15 Andrew Waterman <andrew@sifive.com>
17830 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17832 <UDIV>: Increase cost if !TARGET_DIV.
17834 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17836 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17837 (define_attr "cr_logical_3op"): New.
17838 (cceq_ior_compare): Adjust.
17839 (cceq_ior_compare_complement): Adjust.
17840 (*cceq_rev_compare): Adjust.
17841 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17842 (is_cracked_insn): Adjust.
17843 (insn_must_be_first_in_group): Adjust.
17844 * config/rs6000/40x.md: Adjust.
17845 * config/rs6000/440.md: Adjust.
17846 * config/rs6000/476.md: Adjust.
17847 * config/rs6000/601.md: Adjust.
17848 * config/rs6000/603.md: Adjust.
17849 * config/rs6000/6xx.md: Adjust.
17850 * config/rs6000/7450.md: Adjust.
17851 * config/rs6000/7xx.md: Adjust.
17852 * config/rs6000/8540.md: Adjust.
17853 * config/rs6000/cell.md: Adjust.
17854 * config/rs6000/e300c2c3.md: Adjust.
17855 * config/rs6000/e500mc.md: Adjust.
17856 * config/rs6000/e500mc64.md: Adjust.
17857 * config/rs6000/e5500.md: Adjust.
17858 * config/rs6000/e6500.md: Adjust.
17859 * config/rs6000/mpc.md: Adjust.
17860 * config/rs6000/power4.md: Adjust.
17861 * config/rs6000/power5.md: Adjust.
17862 * config/rs6000/power6.md: Adjust.
17863 * config/rs6000/power7.md: Adjust.
17864 * config/rs6000/power8.md: Adjust.
17865 * config/rs6000/power9.md: Adjust.
17866 * config/rs6000/rs64.md: Adjust.
17867 * config/rs6000/titan.md: Adjust.
17869 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17871 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17872 ix86_indirect_branch_register logic.
17874 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17876 * config/i386/constraints.md (Bs): Update
17877 ix86_indirect_branch_register check. Don't check
17878 ix86_indirect_branch_register with GOT_memory_operand.
17880 * config/i386/predicates.md (GOT_memory_operand): Don't check
17881 ix86_indirect_branch_register here.
17882 (GOT32_symbol_operand): Likewise.
17884 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17886 * config/i386/predicates.md (constant_call_address_operand):
17887 Rewrite ix86_indirect_branch_register logic.
17888 (sibcall_insn_operand): Likewise.
17890 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17892 * config/i386/constraints.md (Bs): Replace
17893 ix86_indirect_branch_thunk_register with
17894 ix86_indirect_branch_register.
17896 * config/i386/i386.md (indirect_jump): Likewise.
17897 (tablejump): Likewise.
17898 (*sibcall_memory): Likewise.
17899 (*sibcall_value_memory): Likewise.
17900 Peepholes of indirect call and jump via memory: Likewise.
17901 * config/i386/i386.opt: Likewise.
17902 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17903 (GOT_memory_operand): Likewise.
17904 (call_insn_operand): Likewise.
17905 (sibcall_insn_operand): Likewise.
17906 (GOT32_symbol_operand): Likewise.
17908 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17910 PR middle-end/83837
17911 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17912 type rather than type addr's type points to.
17913 (expand_omp_atomic_mutex): Likewise.
17914 (expand_omp_atomic): Likewise.
17916 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17919 * config/i386/i386.c (output_indirect_thunk_function): Use
17920 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17921 for __x86_return_thunk.
17923 2018-01-15 Richard Biener <rguenther@suse.de>
17925 PR middle-end/83850
17926 * expmed.c (extract_bit_field_1): Fix typo.
17928 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17931 * config/arm/iterators.md (VF): New mode iterator.
17932 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17933 Remove integer-related logic from pattern.
17934 (neon_vabd<mode>_3): Likewise.
17936 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17938 PR middle-end/82694
17939 * common.opt (fstrict-overflow): No longer an alias.
17940 (fwrapv-pointer): New option.
17941 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17942 also for pointer types based on flag_wrapv_pointer.
17943 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17944 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17945 opts->x_flag_wrapv got set.
17946 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17947 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17948 POINTER_TYPE_OVERFLOW_UNDEFINED.
17949 * match.pd: Likewise in address comparison pattern.
17950 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17952 2018-01-15 Richard Biener <rguenther@suse.de>
17955 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17956 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17957 Reset type names to their identifier if their TYPE_DECL doesn't
17958 have linkage (and thus is used for ODR and devirt).
17959 (save_debug_info_for_decl): Remove.
17960 (save_debug_info_for_type): Likewise.
17961 (add_tree_to_fld_list): Adjust.
17962 * tree-pretty-print.c (dump_generic_node): Make dumping of
17963 type names more robust.
17965 2018-01-15 Richard Biener <rguenther@suse.de>
17967 * BASE-VER: Bump to 8.0.1.
17969 2018-01-14 Martin Sebor <msebor@redhat.com>
17972 * builtins.c (check_access): Avoid warning when the no-warning bit
17975 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17977 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17978 * ira-color (allocno_hard_regs_compare): Likewise.
17980 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17983 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17984 Use .pushsection/.popsection.
17986 2018-01-14 Martin Sebor <msebor@redhat.com>
17989 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17991 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17993 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17994 entry from extra_headers.
17995 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17996 extra_headers, make the list bitwise identical to the i?86-*-* one.
17998 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18000 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18001 -mcmodel=large with -mindirect-branch=thunk,
18002 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18003 -mfunction-return=thunk-extern.
18004 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18005 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18006 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18008 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18010 * config/i386/i386.c (print_reg): Print the name of the full
18011 integer register without '%'.
18012 (ix86_print_operand): Handle 'V'.
18013 * doc/extend.texi: Document 'V' modifier.
18015 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18017 * config/i386/constraints.md (Bs): Disallow memory operand for
18018 -mindirect-branch-register.
18020 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18021 (GOT_memory_operand): Likewise.
18022 (call_insn_operand): Likewise.
18023 (sibcall_insn_operand): Likewise.
18024 (GOT32_symbol_operand): Likewise.
18025 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18026 for -mindirect-branch-register.
18027 (tablejump): Likewise.
18028 (*sibcall_memory): Likewise.
18029 (*sibcall_value_memory): Likewise.
18030 Disallow peepholes of indirect call and jump via memory for
18031 -mindirect-branch-register.
18032 (*call_pop): Replace m with Bw.
18033 (*call_value_pop): Likewise.
18034 (*sibcall_pop_memory): Replace m with Bs.
18035 * config/i386/i386.opt (mindirect-branch-register): New option.
18036 * doc/invoke.texi: Document -mindirect-branch-register option.
18038 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18040 * config/i386/i386-protos.h (ix86_output_function_return): New.
18041 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18042 set function_return_type.
18043 (indirect_thunk_name): Add ret_p to indicate thunk for function
18045 (output_indirect_thunk_function): Pass false to
18046 indirect_thunk_name.
18047 (ix86_output_indirect_branch_via_reg): Likewise.
18048 (ix86_output_indirect_branch_via_push): Likewise.
18049 (output_indirect_thunk_function): Create alias for function
18050 return thunk if regno < 0.
18051 (ix86_output_function_return): New function.
18052 (ix86_handle_fndecl_attribute): Handle function_return.
18053 (ix86_attribute_table): Add function_return.
18054 * config/i386/i386.h (machine_function): Add
18055 function_return_type.
18056 * config/i386/i386.md (simple_return_internal): Use
18057 ix86_output_function_return.
18058 (simple_return_internal_long): Likewise.
18059 * config/i386/i386.opt (mfunction-return=): New option.
18060 (indirect_branch): Mention -mfunction-return=.
18061 * doc/extend.texi: Document function_return function attribute.
18062 * doc/invoke.texi: Document -mfunction-return= option.
18064 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18066 * config/i386/i386-opts.h (indirect_branch): New.
18067 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18068 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18069 with local indirect jump when converting indirect call and jump.
18070 (ix86_set_indirect_branch_type): New.
18071 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18072 (indirectlabelno): New.
18073 (indirect_thunk_needed): Likewise.
18074 (indirect_thunk_bnd_needed): Likewise.
18075 (indirect_thunks_used): Likewise.
18076 (indirect_thunks_bnd_used): Likewise.
18077 (INDIRECT_LABEL): Likewise.
18078 (indirect_thunk_name): Likewise.
18079 (output_indirect_thunk): Likewise.
18080 (output_indirect_thunk_function): Likewise.
18081 (ix86_output_indirect_branch_via_reg): Likewise.
18082 (ix86_output_indirect_branch_via_push): Likewise.
18083 (ix86_output_indirect_branch): Likewise.
18084 (ix86_output_indirect_jmp): Likewise.
18085 (ix86_code_end): Call output_indirect_thunk_function if needed.
18086 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18088 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18089 (ix86_attribute_table): Add indirect_branch.
18090 * config/i386/i386.h (machine_function): Add indirect_branch_type
18091 and has_local_indirect_jump.
18092 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18094 (tablejump): Likewise.
18095 (*indirect_jump): Use ix86_output_indirect_jmp.
18096 (*tablejump_1): Likewise.
18097 (simple_return_indirect_internal): Likewise.
18098 * config/i386/i386.opt (mindirect-branch=): New option.
18099 (indirect_branch): New.
18102 (thunk-inline): Likewise.
18103 (thunk-extern): Likewise.
18104 * doc/extend.texi: Document indirect_branch function attribute.
18105 * doc/invoke.texi: Document -mindirect-branch= option.
18107 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18110 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18112 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18114 * ipa-inline.c (want_inline_small_function_p): Return false if
18115 inlining has already failed with CIF_FINAL_ERROR.
18116 (update_caller_keys): Call want_inline_small_function_p before
18118 (update_callee_keys): Likewise.
18120 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18122 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18124 (rs6000_quadword_masked_address_p): Likewise.
18125 (quad_aligned_load_p): Likewise.
18126 (quad_aligned_store_p): Likewise.
18127 (const_load_sequence_p): Add comment to describe the outer-most loop.
18128 (mimic_memory_attributes_and_flags): New function.
18129 (rs6000_gen_stvx): Likewise.
18130 (replace_swapped_aligned_store): Likewise.
18131 (rs6000_gen_lvx): Likewise.
18132 (replace_swapped_aligned_load): Likewise.
18133 (replace_swapped_load_constant): Capitalize argument name in
18134 comment describing this function.
18135 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18136 and stores that access quad-word aligned addresses and replace
18137 with stvx or lvx instructions when appropriate.
18138 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18139 New function prototype.
18140 (rs6000_quadword_masked_address_p): Likewise.
18141 (rs6000_gen_lvx): Likewise.
18142 (rs6000_gen_stvx): Likewise.
18143 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18144 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18145 when memory address is aligned.
18146 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18147 this split to select lvx instruction when memory address is aligned.
18148 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18149 instruction when memory address is aligned.
18150 (*vsx_le_perm_load_v16qi): Likewise.
18151 (four unnamed splitters): Modify to select the stvx instruction
18152 when memory is aligned.
18154 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18156 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18157 which appears in the queue multiple times.
18159 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18160 Alan Hayward <alan.hayward@arm.com>
18161 David Sherwood <david.sherwood@arm.com>
18163 * tree-vectorizer.h (vec_lower_bound): New structure.
18164 (_loop_vec_info): Add check_nonzero and lower_bounds.
18165 (LOOP_VINFO_CHECK_NONZERO): New macro.
18166 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18167 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18168 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18169 fields. Make seg_len the distance travelled, not including the
18171 (dr_direction_indicator): Declare.
18172 (dr_zero_step_indicator): Likewise.
18173 (dr_known_forward_stride_p): Likewise.
18174 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18176 (runtime_alias_check_p): Allow runtime alias checks with
18178 (operator ==): Compare access_size and align.
18179 (prune_runtime_alias_test_list): Rework for new distinction between
18180 the access_size and seg_len.
18181 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18183 (get_segment_min_max): New function.
18184 (create_intersect_range_checks): Use it.
18185 (dr_step_indicator): New function.
18186 (dr_direction_indicator): Likewise.
18187 (dr_zero_step_indicator): Likewise.
18188 (dr_known_forward_stride_p): Likewise.
18189 * tree-loop-distribution.c (data_ref_segment_size): Return
18190 DR_STEP * (niters - 1).
18191 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18193 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18194 (vect_preserves_scalar_order_p): New function, split out from...
18195 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18196 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18197 (vect_vfa_access_size): New function.
18198 (vect_vfa_align): Likewise.
18199 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18200 (dump_lower_bound): New function.
18201 (vect_check_lower_bound): Likewise.
18202 (vect_small_gap_p): Likewise.
18203 (vectorizable_with_step_bound_p): Likewise.
18204 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18205 depencies if the vectorization factor is 1. Convert the checks
18206 for nonzero steps into checks on the bounds of DR_STEP. Try using
18207 a bunds check for variable steps if the minimum required step is
18208 relatively small. Update calls to the dr_with_seg_len
18209 constructor and to vect_compile_time_alias.
18210 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18212 (vect_loop_versioning): Call it.
18213 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18215 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18217 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18218 Alan Hayward <alan.hayward@arm.com>
18219 David Sherwood <david.sherwood@arm.com>
18221 * doc/sourcebuild.texi (vect_scatter_store): Document.
18222 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18224 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18226 * genopinit.c (main): Add supports_vec_scatter_store and
18227 supports_vec_scatter_store_cached to target_optabs.
18228 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18229 IFN_MASK_SCATTER_STORE.
18230 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18232 * internal-fn.h (internal_store_fn_p): Declare.
18233 (internal_fn_stored_value_index): Likewise.
18234 * internal-fn.c (scatter_store_direct): New macro.
18235 (expand_scatter_store_optab_fn): New function.
18236 (direct_scatter_store_optab_supported_p): New macro.
18237 (internal_store_fn_p): New function.
18238 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18239 IFN_MASK_SCATTER_STORE.
18240 (internal_fn_mask_index): Likewise.
18241 (internal_fn_stored_value_index): New function.
18242 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18243 for scatter stores.
18244 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18245 * optabs-query.c (supports_vec_scatter_store_p): New function.
18246 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18247 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18248 true for scatter stores.
18249 (vect_gather_scatter_fn_p): Handle scatter stores too.
18250 (vect_check_gather_scatter): Consider using scatter stores if
18251 supports_vec_scatter_store_p.
18252 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18253 scatter stores too.
18254 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18255 internal_fn_stored_value_index.
18256 (check_load_store_masking): Handle scatter stores too.
18257 (vect_get_store_rhs): Make public.
18258 (vectorizable_call): Use internal_store_fn_p.
18259 (vectorizable_store): Handle scatter store internal functions.
18260 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18261 when deciding whether the end of the group has been reached.
18262 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18263 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18264 (mask_scatter_store<mode>): New insns.
18266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18267 Alan Hayward <alan.hayward@arm.com>
18268 David Sherwood <david.sherwood@arm.com>
18270 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18271 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18272 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18274 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18275 Use vect_truncate_gather_scatter_offset if we can't treat the
18276 operation as a normal gather load or scatter store.
18277 (get_group_load_store_type): Take the gather_scatter_info
18278 as argument. Try using a gather load or scatter store for
18279 single-element groups.
18280 (get_load_store_type): Update calls to get_group_load_store_type
18281 and vect_use_strided_gather_scatters_p.
18283 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18284 Alan Hayward <alan.hayward@arm.com>
18285 David Sherwood <david.sherwood@arm.com>
18287 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18288 optional tree argument.
18289 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18291 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18292 but continue to use the current value as a fallback.
18293 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18294 to compare the updates.
18295 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18296 (get_load_store_type): Use it when handling a strided access.
18297 (vect_get_strided_load_store_ops): New function.
18298 (vect_get_data_ptr_increment): Likewise.
18299 (vectorizable_load): Handle strided gather loads. Always pass
18300 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18302 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18303 Alan Hayward <alan.hayward@arm.com>
18304 David Sherwood <david.sherwood@arm.com>
18306 * doc/md.texi (gather_load@var{m}): Document.
18307 (mask_gather_load@var{m}): Likewise.
18308 * genopinit.c (main): Add supports_vec_gather_load and
18309 supports_vec_gather_load_cached to target_optabs.
18310 * optabs-tree.c (init_tree_optimization_optabs): Use
18311 ggc_cleared_alloc to allocate target_optabs.
18312 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18313 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18315 * internal-fn.h (internal_load_fn_p): Declare.
18316 (internal_gather_scatter_fn_p): Likewise.
18317 (internal_fn_mask_index): Likewise.
18318 (internal_gather_scatter_fn_supported_p): Likewise.
18319 * internal-fn.c (gather_load_direct): New macro.
18320 (expand_gather_load_optab_fn): New function.
18321 (direct_gather_load_optab_supported_p): New macro.
18322 (direct_internal_fn_optab): New function.
18323 (internal_load_fn_p): Likewise.
18324 (internal_gather_scatter_fn_p): Likewise.
18325 (internal_fn_mask_index): Likewise.
18326 (internal_gather_scatter_fn_supported_p): Likewise.
18327 * optabs-query.c (supports_at_least_one_mode_p): New function.
18328 (supports_vec_gather_load_p): Likewise.
18329 * optabs-query.h (supports_vec_gather_load_p): Declare.
18330 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18331 and memory_type field.
18332 (NUM_PATTERNS): Bump to 15.
18333 * tree-vect-data-refs.c: Include internal-fn.h.
18334 (vect_gather_scatter_fn_p): New function.
18335 (vect_describe_gather_scatter_call): Likewise.
18336 (vect_check_gather_scatter): Try using internal functions for
18337 gather loads. Recognize existing calls to a gather load function.
18338 (vect_analyze_data_refs): Consider using gather loads if
18339 supports_vec_gather_load_p.
18340 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18341 (vect_get_gather_scatter_offset_type): Likewise.
18342 (vect_convert_mask_for_vectype): Likewise.
18343 (vect_add_conversion_to_patterm): Likewise.
18344 (vect_try_gather_scatter_pattern): Likewise.
18345 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18346 (vect_vect_recog_func_ptrs): Add it.
18347 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18348 internal_fn_mask_index and internal_gather_scatter_fn_p.
18349 (check_load_store_masking): Take the gather_scatter_info as an
18350 argument and handle gather loads.
18351 (vect_get_gather_scatter_ops): New function.
18352 (vectorizable_call): Check internal_load_fn_p.
18353 (vectorizable_load): Likewise. Handle gather load internal
18355 (vectorizable_store): Update call to check_load_store_masking.
18356 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18357 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18358 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18359 (aarch64_gather_scale_operand_d): New predicates.
18360 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18361 (mask_gather_load<mode>): New insns.
18363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18364 Alan Hayward <alan.hayward@arm.com>
18365 David Sherwood <david.sherwood@arm.com>
18367 * optabs.def (fold_left_plus_optab): New optab.
18368 * doc/md.texi (fold_left_plus_@var{m}): Document.
18369 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18370 * internal-fn.c (fold_left_direct): Define.
18371 (expand_fold_left_optab_fn): Likewise.
18372 (direct_fold_left_optab_supported_p): Likewise.
18373 * fold-const-call.c (fold_const_fold_left): New function.
18374 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18375 * tree-parloops.c (valid_reduction_p): New function.
18376 (gather_scalar_reductions): Use it.
18377 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18378 (vect_finish_replace_stmt): Declare.
18379 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18380 (needs_fold_left_reduction_p): New function, split out from...
18381 (vect_is_simple_reduction): ...here. Accept reductions that
18382 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18383 (vect_force_simple_reduction): Also store the reduction type in
18384 the assignment's STMT_VINFO_REDUC_TYPE.
18385 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18386 (merge_with_identity): New function.
18387 (vect_expand_fold_left): Likewise.
18388 (vectorize_fold_left_reduction): Likewise.
18389 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18390 scalar phi in place for it. Check for target support and reject
18391 cases that would reassociate the operation. Defer the transform
18392 phase to vectorize_fold_left_reduction.
18393 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18394 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18395 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18399 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18400 call to ifc_temp_var.
18402 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18403 Alan Hayward <alan.hayward@arm.com>
18404 David Sherwood <david.sherwood@arm.com>
18406 * target.def (legitimize_address_displacement): Take the original
18407 offset as a poly_int.
18408 * targhooks.h (default_legitimize_address_displacement): Update
18410 * targhooks.c (default_legitimize_address_displacement): Likewise.
18411 * doc/tm.texi: Regenerate.
18412 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18413 as an argument, moving assert of ad->disp == ad->disp_term to...
18414 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18415 Try calling targetm.legitimize_address_displacement before expanding
18416 the address rather than afterwards, and adjust for the new interface.
18417 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18418 Match the new hook interface. Handle SVE addresses.
18419 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18420 new hook interface.
18422 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18424 * Makefile.in (OBJS): Add early-remat.o.
18425 * target.def (select_early_remat_modes): New hook.
18426 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18427 * doc/tm.texi: Regenerate.
18428 * targhooks.h (default_select_early_remat_modes): Declare.
18429 * targhooks.c (default_select_early_remat_modes): New function.
18430 * timevar.def (TV_EARLY_REMAT): New timevar.
18431 * passes.def (pass_early_remat): New pass.
18432 * tree-pass.h (make_pass_early_remat): Declare.
18433 * early-remat.c: New file.
18434 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18436 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18439 Alan Hayward <alan.hayward@arm.com>
18440 David Sherwood <david.sherwood@arm.com>
18442 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18443 vfm1 with a bound_epilog parameter.
18444 (vect_do_peeling): Update calls accordingly, and move the prologue
18445 call earlier in the function. Treat the base bound_epilog as 0 for
18446 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18447 this base when peeling for gaps.
18448 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18449 with fully-masked loops.
18450 (vect_estimate_min_profitable_iters): Handle the single peeled
18451 iteration in that case.
18453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18454 Alan Hayward <alan.hayward@arm.com>
18455 David Sherwood <david.sherwood@arm.com>
18457 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18458 single-element interleaving even if the size is not a power of 2.
18459 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18460 accesses for single-element interleaving if the group size is
18463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18464 Alan Hayward <alan.hayward@arm.com>
18465 David Sherwood <david.sherwood@arm.com>
18467 * doc/md.texi (fold_extract_last_@var{m}): Document.
18468 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18469 * optabs.def (fold_extract_last_optab): New optab.
18470 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18471 * internal-fn.c (fold_extract_direct): New macro.
18472 (expand_fold_extract_optab_fn): Likewise.
18473 (direct_fold_extract_optab_supported_p): Likewise.
18474 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18475 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18476 EXTRACT_LAST_REDUCTION.
18477 (get_initial_def_for_reduction): Do not create an initial vector
18478 for EXTRACT_LAST_REDUCTION reductions.
18479 (vectorizable_reduction): Leave the scalar phi in place for
18480 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18481 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18482 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18483 transform phase to vectorizable_condition.
18484 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18486 (vect_finish_stmt_generation): ...here.
18487 (vect_finish_replace_stmt): New function.
18488 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18489 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18491 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18493 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18494 Alan Hayward <alan.hayward@arm.com>
18495 David Sherwood <david.sherwood@arm.com>
18497 * doc/md.texi (extract_last_@var{m}): Document.
18498 * optabs.def (extract_last_optab): New optab.
18499 * internal-fn.def (EXTRACT_LAST): New internal function.
18500 * internal-fn.c (cond_unary_direct): New macro.
18501 (expand_cond_unary_optab_fn): Likewise.
18502 (direct_cond_unary_optab_supported_p): Likewise.
18503 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18504 loops using EXTRACT_LAST.
18505 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18506 (extract_last_<mode>): ...this optab.
18507 (vec_extract<mode><Vel>): Update accordingly.
18509 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18510 Alan Hayward <alan.hayward@arm.com>
18511 David Sherwood <david.sherwood@arm.com>
18513 * target.def (empty_mask_is_expensive): New hook.
18514 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18515 * doc/tm.texi: Regenerate.
18516 * targhooks.h (default_empty_mask_is_expensive): Declare.
18517 * targhooks.c (default_empty_mask_is_expensive): New function.
18518 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18519 if the target says that empty masks are expensive.
18520 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18522 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18524 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18525 Alan Hayward <alan.hayward@arm.com>
18526 David Sherwood <david.sherwood@arm.com>
18528 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18529 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18530 (vect_use_loop_mask_for_alignment_p): New function.
18531 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18532 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18533 niters_skip argument. Make sure that the first niters_skip elements
18534 of the first iteration are inactive.
18535 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18536 Update call to vect_set_loop_masks_directly.
18537 (get_misalign_in_elems): New function, split out from...
18538 (vect_gen_prolog_loop_niters): ...here.
18539 (vect_update_init_of_dr): Take a code argument that specifies whether
18540 the adjustment should be added or subtracted.
18541 (vect_update_init_of_drs): Likewise.
18542 (vect_prepare_for_masked_peels): New function.
18543 (vect_do_peeling): Skip prologue peeling if we're using a mask
18544 instead. Update call to vect_update_inits_of_drs.
18545 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18547 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18548 alignment. Do not include the number of peeled iterations in
18549 the minimum threshold in that case.
18550 (vectorizable_induction): Adjust the start value down by
18551 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18552 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18553 Take the number of skipped iterations into account when calculating
18555 * tree-vect-stmts.c (vect_gen_while_not): New function.
18557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18558 Alan Hayward <alan.hayward@arm.com>
18559 David Sherwood <david.sherwood@arm.com>
18561 * doc/sourcebuild.texi (vect_fully_masked): Document.
18562 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18563 default value to 0.
18564 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18566 (vect_analyze_loop_2): ...here. Don't check the vectorization
18567 factor against the number of loop iterations if the loop is
18570 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18571 Alan Hayward <alan.hayward@arm.com>
18572 David Sherwood <david.sherwood@arm.com>
18574 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18575 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18576 (dump_groups): Update accordingly.
18577 (iv_use::mem_type): New member variable.
18578 (address_p): New function.
18579 (record_use): Add a mem_type argument and initialize the new
18581 (record_group_use): Add a mem_type argument. Use address_p.
18582 Remove obsolete null checks of base_object. Update call to record_use.
18583 (find_interesting_uses_op): Update call to record_group_use.
18584 (find_interesting_uses_cond): Likewise.
18585 (find_interesting_uses_address): Likewise.
18586 (get_mem_type_for_internal_fn): New function.
18587 (find_address_like_use): Likewise.
18588 (find_interesting_uses_stmt): Try find_address_like_use before
18589 calling find_interesting_uses_op.
18590 (addr_offset_valid_p): Use the iv mem_type field as the type
18591 of the addressed memory.
18592 (add_autoinc_candidates): Likewise.
18593 (get_address_cost): Likewise.
18594 (split_small_address_groups_p): Use address_p.
18595 (split_address_groups): Likewise.
18596 (add_iv_candidate_for_use): Likewise.
18597 (autoinc_possible_for_pair): Likewise.
18598 (rewrite_groups): Likewise.
18599 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18600 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18601 (get_alias_ptr_type_for_ptr_address): New function.
18602 (rewrite_use_address): Rewrite address uses in calls that were
18603 identified by find_address_like_use.
18605 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18606 Alan Hayward <alan.hayward@arm.com>
18607 David Sherwood <david.sherwood@arm.com>
18609 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18611 * gimple-expr.h (is_gimple_addressable: Likewise.
18612 * gimple-expr.c (is_gimple_address): Likewise.
18613 * internal-fn.c (expand_call_mem_ref): New function.
18614 (expand_mask_load_optab_fn): Use it.
18615 (expand_mask_store_optab_fn): Likewise.
18617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18618 Alan Hayward <alan.hayward@arm.com>
18619 David Sherwood <david.sherwood@arm.com>
18621 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18622 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18623 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18624 (cond_umax@var{mode}): Document.
18625 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18626 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18627 (cond_umin_optab, cond_umax_optab): New optabs.
18628 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18629 (COND_IOR, COND_XOR): New internal functions.
18630 * internal-fn.h (get_conditional_internal_fn): Declare.
18631 * internal-fn.c (cond_binary_direct): New macro.
18632 (expand_cond_binary_optab_fn): Likewise.
18633 (direct_cond_binary_optab_supported_p): Likewise.
18634 (get_conditional_internal_fn): New function.
18635 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18636 Cope with reduction statements that are vectorized as calls rather
18638 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18639 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18640 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18641 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18642 (UNSPEC_COND_EOR): New unspecs.
18643 (optab): Add mappings for them.
18644 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18645 (sve_int_op, sve_fp_op): New int attributes.
18647 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18648 Alan Hayward <alan.hayward@arm.com>
18649 David Sherwood <david.sherwood@arm.com>
18651 * optabs.def (while_ult_optab): New optab.
18652 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18653 * internal-fn.def (WHILE_ULT): New internal function.
18654 * internal-fn.h (direct_internal_fn_supported_p): New override
18655 that takes two types as argument.
18656 * internal-fn.c (while_direct): New macro.
18657 (expand_while_optab_fn): New function.
18658 (convert_optab_supported_p): Likewise.
18659 (direct_while_optab_supported_p): New macro.
18660 * wide-int.h (wi::udiv_ceil): New function.
18661 * tree-vectorizer.h (rgroup_masks): New structure.
18662 (vec_loop_masks): New typedef.
18663 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18664 and fully_masked_p.
18665 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18666 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18667 (vect_max_vf): New function.
18668 (slpeel_make_loop_iterate_ntimes): Delete.
18669 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18670 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18671 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18672 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18673 internal-fn.h, stor-layout.h and optabs-query.h.
18674 (vect_set_loop_mask): New function.
18675 (add_preheader_seq): Likewise.
18676 (add_header_seq): Likewise.
18677 (interleave_supported_p): Likewise.
18678 (vect_maybe_permute_loop_masks): Likewise.
18679 (vect_set_loop_masks_directly): Likewise.
18680 (vect_set_loop_condition_masked): Likewise.
18681 (vect_set_loop_condition_unmasked): New function, split out from
18682 slpeel_make_loop_iterate_ntimes.
18683 (slpeel_make_loop_iterate_ntimes): Rename to..
18684 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18685 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18686 (vect_do_peeling): Update call accordingly.
18687 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18689 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18690 mask_compare_type, can_fully_mask_p and fully_masked_p.
18691 (release_vec_loop_masks): New function.
18692 (_loop_vec_info): Use it to free the loop masks.
18693 (can_produce_all_loop_masks_p): New function.
18694 (vect_get_max_nscalars_per_iter): Likewise.
18695 (vect_verify_full_masking): Likewise.
18696 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18697 retries, and free the mask rgroups before retrying. Check loop-wide
18698 reasons for disallowing fully-masked loops. Make the final decision
18699 about whether use a fully-masked loop or not.
18700 (vect_estimate_min_profitable_iters): Do not assume that peeling
18701 for the number of iterations will be needed for fully-masked loops.
18702 (vectorizable_reduction): Disable fully-masked loops.
18703 (vectorizable_live_operation): Likewise.
18704 (vect_halve_mask_nunits): New function.
18705 (vect_double_mask_nunits): Likewise.
18706 (vect_record_loop_mask): Likewise.
18707 (vect_get_loop_mask): Likewise.
18708 (vect_transform_loop): Handle the case in which the final loop
18709 iteration might handle a partial vector. Call vect_set_loop_condition
18710 instead of slpeel_make_loop_iterate_ntimes.
18711 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18712 (check_load_store_masking): New function.
18713 (prepare_load_store_mask): Likewise.
18714 (vectorizable_store): Handle fully-masked loops.
18715 (vectorizable_load): Likewise.
18716 (supportable_widening_operation): Use vect_halve_mask_nunits for
18718 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18719 (vect_gen_while): New function.
18720 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18721 (aarch64_uqdec<mode>): New insn.
18723 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18724 Alan Hayward <alan.hayward@arm.com>
18725 David Sherwood <david.sherwood@arm.com>
18727 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18728 (reduc_xor_scal_optab): New optabs.
18729 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18730 (reduc_xor_scal_@var{m}): Document.
18731 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18732 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18733 internal functions.
18734 * fold-const-call.c (fold_const_call): Handle them.
18735 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18736 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18737 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18738 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18739 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18740 (UNSPEC_XORV): New unspecs.
18741 (optab): Add entries for them.
18742 (BITWISEV): New int iterator.
18743 (bit_reduc_op): New int attributes.
18745 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18746 Alan Hayward <alan.hayward@arm.com>
18747 David Sherwood <david.sherwood@arm.com>
18749 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18750 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18751 * optabs.def (vec_shl_insert_optab): New optab.
18752 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18753 (duplicate_and_interleave): Likewise.
18754 * tree-vect-loop.c: Include internal-fn.h.
18755 (neutral_op_for_slp_reduction): New function, split out from
18756 get_initial_defs_for_reduction.
18757 (get_initial_def_for_reduction): Handle option 2 for variable-length
18758 vectors by loading the neutral value into a vector and then shifting
18759 the initial value into element 0.
18760 (get_initial_defs_for_reduction): Replace the code argument with
18761 the neutral value calculated by neutral_op_for_slp_reduction.
18762 Use gimple_build_vector for constant-length vectors.
18763 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18764 but the first group_size elements have a neutral value.
18765 Use duplicate_and_interleave otherwise.
18766 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18767 Update call to get_initial_defs_for_reduction. Handle SLP
18768 reductions for variable-length vectors by creating one vector
18769 result for each scalar result, with the elements associated
18770 with other scalar results stubbed out with the neutral value.
18771 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18772 Require IFN_VEC_SHL_INSERT for double reductions on
18773 variable-length vectors, or SLP reductions that have
18774 a neutral value. Require can_duplicate_and_interleave_p
18775 support for variable-length unchained SLP reductions if there
18776 is no neutral value, such as for MIN/MAX reductions. Also require
18777 the number of vector elements to be a multiple of the number of
18778 SLP statements when doing variable-length unchained SLP reductions.
18779 Update call to vect_create_epilog_for_reduction.
18780 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18781 and remove initial values.
18782 (duplicate_and_interleave): Make public.
18783 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18784 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18786 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18787 Alan Hayward <alan.hayward@arm.com>
18788 David Sherwood <david.sherwood@arm.com>
18790 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18791 (can_duplicate_and_interleave_p): New function.
18792 (vect_get_and_check_slp_defs): Take the vector of statements
18793 rather than just the current one. Remove excess parentheses.
18794 Restriction rejectinon of vect_constant_def and vect_external_def
18795 for variable-length vectors to boolean types, or types for which
18796 can_duplicate_and_interleave_p is false.
18797 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18798 (duplicate_and_interleave): New function.
18799 (vect_get_constant_vectors): Use gimple_build_vector for
18800 constant-length vectors and suitable variable-length constant
18801 vectors. Use duplicate_and_interleave for other variable-length
18802 vectors. Don't defer the update when inserting new statements.
18804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18805 Alan Hayward <alan.hayward@arm.com>
18806 David Sherwood <david.sherwood@arm.com>
18808 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18809 min_profitable_iters doesn't go negative.
18811 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18812 Alan Hayward <alan.hayward@arm.com>
18813 David Sherwood <david.sherwood@arm.com>
18815 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18816 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18817 * optabs.def (vec_mask_load_lanes_optab): New optab.
18818 (vec_mask_store_lanes_optab): Likewise.
18819 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18820 (MASK_STORE_LANES): Likewise.
18821 * internal-fn.c (mask_load_lanes_direct): New macro.
18822 (mask_store_lanes_direct): Likewise.
18823 (expand_mask_load_optab_fn): Handle masked operations.
18824 (expand_mask_load_lanes_optab_fn): New macro.
18825 (expand_mask_store_optab_fn): Handle masked operations.
18826 (expand_mask_store_lanes_optab_fn): New macro.
18827 (direct_mask_load_lanes_optab_supported_p): Likewise.
18828 (direct_mask_store_lanes_optab_supported_p): Likewise.
18829 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18831 (vect_load_lanes_supported): Likewise.
18832 * tree-vect-data-refs.c (strip_conversion): New function.
18833 (can_group_stmts_p): Likewise.
18834 (vect_analyze_data_ref_accesses): Use it instead of checking
18835 for a pair of assignments.
18836 (vect_store_lanes_supported): Take a masked_p parameter.
18837 (vect_load_lanes_supported): Likewise.
18838 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18839 vect_store_lanes_supported and vect_load_lanes_supported.
18840 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18841 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18842 parameter. Don't allow gaps for masked accesses.
18843 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18844 and vect_load_lanes_supported.
18845 (get_load_store_type): Take a masked_p parameter and update
18846 call to get_group_load_store_type.
18847 (vectorizable_store): Update call to get_load_store_type.
18848 Handle IFN_MASK_STORE_LANES.
18849 (vectorizable_load): Update call to get_load_store_type.
18850 Handle IFN_MASK_LOAD_LANES.
18852 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18853 Alan Hayward <alan.hayward@arm.com>
18854 David Sherwood <david.sherwood@arm.com>
18856 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18858 * config/aarch64/aarch64-protos.h
18859 (aarch64_sve_struct_memory_operand_p): Declare.
18860 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18861 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18862 (VPRED, vpred): Handle SVE structure modes.
18863 * config/aarch64/constraints.md (Utx): New constraint.
18864 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18865 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18866 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18867 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18868 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18869 structure modes. Split into pieces after RA.
18870 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18871 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18873 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18874 SVE structure modes.
18875 (aarch64_classify_address): Likewise.
18876 (sizetochar): Move earlier in file.
18877 (aarch64_print_operand): Handle SVE register lists.
18878 (aarch64_array_mode): New function.
18879 (aarch64_sve_struct_memory_operand_p): Likewise.
18880 (TARGET_ARRAY_MODE): Redefine.
18882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18883 Alan Hayward <alan.hayward@arm.com>
18884 David Sherwood <david.sherwood@arm.com>
18886 * target.def (array_mode): New target hook.
18887 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18888 * doc/tm.texi: Regenerate.
18889 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18890 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18891 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18892 targetm.array_mode.
18893 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18896 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18897 Alan Hayward <alan.hayward@arm.com>
18898 David Sherwood <david.sherwood@arm.com>
18900 * fold-const.c (fold_binary_loc): Check the argument types
18901 rather than the result type when testing for a vector operation.
18903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18905 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18906 * doc/tm.texi: Regenerate.
18908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18909 Alan Hayward <alan.hayward@arm.com>
18910 David Sherwood <david.sherwood@arm.com>
18912 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18913 (sve): Document new AArch64 extension.
18914 * doc/md.texi (w): Extend the description of the AArch64
18915 constraint to include SVE vectors.
18916 (Upl, Upa): Document new AArch64 predicate constraints.
18917 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18919 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18920 (msve-vector-bits=): New option.
18921 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18922 SVE when these are disabled.
18923 (sve): New extension.
18924 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18925 modes. Adjust their number of units based on aarch64_sve_vg.
18926 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18927 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18928 aarch64_addr_query_type.
18929 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18930 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18931 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18932 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18933 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18934 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18935 (aarch64_simd_imm_zero_p): Delete.
18936 (aarch64_check_zero_based_sve_index_immediate): Declare.
18937 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18938 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18939 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18940 (aarch64_sve_float_mul_immediate_p): Likewise.
18941 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18942 rather than an rtx.
18943 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18944 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18945 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18946 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18947 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18948 (aarch64_regmode_natural_size): Likewise.
18949 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18950 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18952 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18953 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18954 for VG and the SVE predicate registers.
18955 (V_ALIASES): Add a "z"-prefixed alias.
18956 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18957 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18958 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18959 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18960 (REG_CLASS_NAMES): Add entries for them.
18961 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18962 and the predicate registers.
18963 (aarch64_sve_vg): Declare.
18964 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18965 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18966 (REGMODE_NATURAL_SIZE): Define.
18967 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18969 * config/aarch64/aarch64.c: Include cfgrtl.h.
18970 (simd_immediate_info): Add a constructor for series vectors,
18971 and an associated step field.
18972 (aarch64_sve_vg): New variable.
18973 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18974 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18975 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18976 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18977 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18978 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18979 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18980 (aarch64_get_mask_mode): New functions.
18981 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18982 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18983 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18984 predicate modes and predicate registers. Explicitly restrict
18985 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18986 to store a vector mode if it is recognized by
18987 aarch64_classify_vector_mode.
18988 (aarch64_regmode_natural_size): New function.
18989 (aarch64_hard_regno_caller_save_mode): Return the original mode
18991 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18992 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18993 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18994 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18996 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18997 does not overlap dest if the function is frame-related. Handle
18999 (aarch64_split_add_offset): New function.
19000 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19001 them aarch64_add_offset.
19002 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19003 and update call to aarch64_sub_sp.
19004 (aarch64_add_cfa_expression): New function.
19005 (aarch64_expand_prologue): Pass extra temporary registers to the
19006 functions above. Handle the case in which we need to emit new
19007 DW_CFA_expressions for registers that were originally saved
19008 relative to the stack pointer, but now have to be expressed
19009 relative to the frame pointer.
19010 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19012 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19013 IP0 and IP1 values for SVE frames.
19014 (aarch64_expand_vec_series): New function.
19015 (aarch64_expand_sve_widened_duplicate): Likewise.
19016 (aarch64_expand_sve_const_vector): Likewise.
19017 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19018 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19019 into the register, rather than emitting a SET directly.
19020 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19021 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19022 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19023 (offset_9bit_signed_scaled_p): New functions.
19024 (aarch64_replicate_bitmask_imm): New function.
19025 (aarch64_bitmask_imm): Use it.
19026 (aarch64_cannot_force_const_mem): Reject expressions involving
19027 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19028 (aarch64_classify_index): Handle SVE indices, by requiring
19029 a plain register index with a scale that matches the element size.
19030 (aarch64_classify_address): Handle SVE addresses. Assert that
19031 the mode of the address is VOIDmode or an integer mode.
19032 Update call to aarch64_classify_symbol.
19033 (aarch64_classify_symbolic_expression): Update call to
19034 aarch64_classify_symbol.
19035 (aarch64_const_vec_all_in_range_p): New function.
19036 (aarch64_print_vector_float_operand): Likewise.
19037 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19038 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19039 and the FP immediates 1.0 and 0.5.
19040 (aarch64_print_address_internal): Handle SVE addresses.
19041 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19042 (aarch64_regno_regclass): Handle predicate registers.
19043 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19045 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19046 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19047 (aarch64_convert_sve_vector_bits): New function.
19048 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19049 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19050 rather than an rtx.
19051 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19052 Handle SVE vector and predicate modes. Accept VL-based constants
19053 that need only one temporary register, and VL offsets that require
19054 no temporary registers.
19055 (aarch64_conditional_register_usage): Mark the predicate registers
19056 as fixed if SVE isn't available.
19057 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19058 Return true for SVE vector and predicate modes.
19059 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19060 rather than an unsigned int. Handle SVE modes.
19061 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19063 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19065 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19066 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19067 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19068 (aarch64_sve_float_mul_immediate_p): New functions.
19069 (aarch64_sve_valid_immediate): New function.
19070 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19071 Explicitly reject structure modes. Check for INDEX constants.
19072 Handle PTRUE and PFALSE constants.
19073 (aarch64_check_zero_based_sve_index_immediate): New function.
19074 (aarch64_simd_imm_zero_p): Delete.
19075 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19076 vector modes. Accept constants in the range of CNT[BHWD].
19077 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19078 ask for an Advanced SIMD mode.
19079 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19080 (aarch64_simd_vector_alignment): Handle SVE predicates.
19081 (aarch64_vectorize_preferred_vector_alignment): New function.
19082 (aarch64_simd_vector_alignment_reachable): Use it instead of
19084 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19085 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19087 (MAX_VECT_LEN): Delete.
19088 (expand_vec_perm_d): Add a vec_flags field.
19089 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19090 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19091 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19093 (aarch64_evpc_rev): Rename to...
19094 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19095 (aarch64_evpc_rev_global): New function.
19096 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19097 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19099 (aarch64_evpc_sve_tbl): New function.
19100 (aarch64_expand_vec_perm_const_1): Update after rename of
19101 aarch64_evpc_rev. Handle SVE permutes too, trying
19102 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19103 than aarch64_evpc_tbl.
19104 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19105 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19106 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19107 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19108 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19109 (aarch64_expand_sve_vcond): New functions.
19110 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19111 of aarch64_vector_mode_p.
19112 (aarch64_dwarf_poly_indeterminate_value): New function.
19113 (aarch64_compute_pressure_classes): Likewise.
19114 (aarch64_can_change_mode_class): Likewise.
19115 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19116 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19117 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19118 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19119 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19120 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19121 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19122 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19124 (Dn, Dl, Dr): Accept const as well as const_vector.
19125 (Dz): Likewise. Compare against CONST0_RTX.
19126 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19127 of "vector" where appropriate.
19128 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19129 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19130 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19131 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19132 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19133 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19134 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19135 (v_int_equiv): Extend to SVE modes.
19136 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19138 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19139 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19140 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19141 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19142 (SVE_COND_FP_CMP): New int iterators.
19143 (perm_hilo): Handle the new unpack unspecs.
19144 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19146 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19147 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19148 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19149 (aarch64_equality_operator, aarch64_constant_vector_operand)
19150 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19151 (aarch64_sve_nonimmediate_operand): Likewise.
19152 (aarch64_sve_general_operand): Likewise.
19153 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19154 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19155 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19156 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19157 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19158 (aarch64_sve_float_arith_immediate): Likewise.
19159 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19160 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19161 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19162 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19163 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19164 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19165 (aarch64_sve_float_arith_operand): Likewise.
19166 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19167 (aarch64_sve_float_mul_operand): Likewise.
19168 (aarch64_sve_vec_perm_operand): Likewise.
19169 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19170 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19171 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19172 as well as const_vector.
19173 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19174 in file. Use CONST0_RTX and CONSTM1_RTX.
19175 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19176 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19177 Use aarch64_simd_imm_zero.
19178 * config/aarch64/aarch64-sve.md: New file.
19179 * config/aarch64/aarch64.md: Include it.
19180 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19181 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19182 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19183 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19184 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19185 (sve): New attribute.
19186 (enabled): Disable instructions with the sve attribute unless
19188 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19189 aarch64_expand_mov_immediate.
19190 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19191 CNT[BHSD] immediates.
19192 (movti): Split CONST_POLY_INT moves into two halves.
19193 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19194 Split additions that need a temporary here if the destination
19195 is the stack pointer.
19196 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19197 (*add<mode>3_poly_1): New instruction.
19198 (set_clobber_cc): New expander.
19200 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19202 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19203 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19204 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19205 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19206 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19207 Change innermode from fixed_mode_size to machine_mode.
19208 (simplify_subreg): Update call accordingly. Handle a constant-sized
19209 subreg of a variable-length CONST_VECTOR.
19211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19212 Alan Hayward <alan.hayward@arm.com>
19213 David Sherwood <david.sherwood@arm.com>
19215 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19216 (add_offset_to_base): New function, split out from...
19217 (create_mem_ref): ...here. When handling a scale other than 1,
19218 check first whether the address is valid without the offset.
19219 Add it into the base if so, leaving the index and scale as-is.
19221 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19224 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19225 fold_for_warn before checking if arg2 is INTEGER_CST.
19227 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19229 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19230 (store_multiple_operation): Delete.
19231 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19232 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19233 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19234 guarded by TARGET_STRING.
19235 (rs6000_output_load_multiple): Delete.
19236 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19237 OPTION_MASK_STRING / TARGET_STRING handling.
19238 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19239 (const rs6000_opt_masks) <"string">: Change mask to 0.
19240 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19241 (MASK_STRING): Delete.
19242 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19244 (load_multiple): Delete.
19251 (store_multiple): Delete.
19258 (movmemsi_8reg): Delete.
19259 (corresponding unnamed define_insn): Delete.
19260 (movmemsi_6reg): Delete.
19261 (corresponding unnamed define_insn): Delete.
19262 (movmemsi_4reg): Delete.
19263 (corresponding unnamed define_insn): Delete.
19264 (movmemsi_2reg): Delete.
19265 (corresponding unnamed define_insn): Delete.
19266 (movmemsi_1reg): Delete.
19267 (corresponding unnamed define_insn): Delete.
19268 * config/rs6000/rs6000.opt (mno-string): New.
19269 (mstring): Replace by deprecation warning stub.
19270 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19272 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19274 * regrename.c (regrename_do_replace): If replacing the same
19275 reg multiple times, try to reuse last created gen_raw_REG.
19278 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19279 main to workaround a bug in GDB.
19281 2018-01-12 Tom de Vries <tom@codesourcery.com>
19284 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19286 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19288 PR rtl-optimization/80481
19289 * ira-color.c (get_cap_member): New function.
19290 (allocnos_conflict_by_live_ranges_p): Use it.
19291 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19292 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19294 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19297 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19298 (*saddl_se_1): Ditto.
19299 (*ssubsi_1): Ditto.
19300 (*ssubl_se_1): Ditto.
19302 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19304 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19305 rather than wi::to_widest for DR_INITs.
19306 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19307 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19308 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19310 (vect_analyze_group_access_1): Note that here.
19312 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19314 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19315 polynomial type sizes.
19317 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19319 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19320 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19321 (gimple_add_tmp_var): Likewise.
19323 2018-01-12 Martin Liska <mliska@suse.cz>
19325 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19326 (gimple_alloc_sizes): Likewise.
19327 (dump_gimple_statistics): Use PRIu64 in printf format.
19328 * gimple.h: Change uint64_t to int.
19330 2018-01-12 Martin Liska <mliska@suse.cz>
19332 * tree-core.h: Use uint64_t instead of int.
19333 * tree.c (tree_node_counts): Likewise.
19334 (tree_node_sizes): Likewise.
19335 (dump_tree_statistics): Use PRIu64 in printf format.
19337 2018-01-12 Martin Liska <mliska@suse.cz>
19339 * Makefile.in: As qsort_chk is implemented in vec.c, add
19340 vec.o to linkage of gencfn-macros.
19341 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19342 passing the info to record_node_allocation_statistics.
19343 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19345 * ggc-common.c (struct ggc_usage): Add operator== and use
19346 it in operator< and compare function.
19347 * mem-stats.h (struct mem_usage): Likewise.
19348 * vec.c (struct vec_usage): Remove operator< and compare
19349 function. Can be simply inherited.
19351 2018-01-12 Martin Jambor <mjambor@suse.cz>
19354 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19355 * tree-ssa-math-opts.c: Include domwalk.h.
19356 (convert_mult_to_fma_1): New function.
19357 (fma_transformation_info): New type.
19358 (fma_deferring_state): Likewise.
19359 (cancel_fma_deferring): New function.
19360 (result_of_phi): Likewise.
19361 (last_fma_candidate_feeds_initial_phi): Likewise.
19362 (convert_mult_to_fma): Added deferring logic, split actual
19363 transformation to convert_mult_to_fma_1.
19364 (math_opts_dom_walker): New type.
19365 (math_opts_dom_walker::after_dom_children): New method, body moved
19366 here from pass_optimize_widening_mul::execute, added deferring logic
19368 (pass_optimize_widening_mul::execute): Moved most of code to
19369 math_opts_dom_walker::after_dom_children.
19370 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19371 * config/i386/i386.c (ix86_option_override_internal): Added
19372 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19374 2018-01-12 Richard Biener <rguenther@suse.de>
19377 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19378 inline instance vars.
19380 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19383 * config/rx/rx.c (rx_is_restricted_memory_address):
19384 Handle SUBREG case.
19386 2018-01-12 Richard Biener <rguenther@suse.de>
19388 PR tree-optimization/80846
19389 * target.def (split_reduction): New target hook.
19390 * targhooks.c (default_split_reduction): New function.
19391 * targhooks.h (default_split_reduction): Declare.
19392 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19393 target requests first reduce vectors by combining low and high
19395 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19396 (get_vectype_for_scalar_type_and_size): Export.
19397 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19398 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19399 * doc/tm.texi: Regenerate.
19400 * config/i386/i386.c (ix86_split_reduction): Implement
19401 TARGET_VECTORIZE_SPLIT_REDUCTION.
19403 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19406 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19407 in PIC mode except for TARGET_VXWORKS_RTP.
19408 * config/sparc/sparc.c: Include cfgrtl.h.
19409 (TARGET_INIT_PIC_REG): Define.
19410 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19411 (sparc_pic_register_p): New predicate.
19412 (sparc_legitimate_address_p): Use it.
19413 (sparc_legitimize_pic_address): Likewise.
19414 (sparc_delegitimize_address): Likewise.
19415 (sparc_mode_dependent_address_p): Likewise.
19416 (gen_load_pcrel_sym): Remove 4th parameter.
19417 (load_got_register): Adjust call to above. Remove obsolete stuff.
19418 (sparc_expand_prologue): Do not call load_got_register here.
19419 (sparc_flat_expand_prologue): Likewise.
19420 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19421 (sparc_use_pseudo_pic_reg): New function.
19422 (sparc_init_pic_reg): Likewise.
19423 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19424 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19426 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19428 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19429 Add item for branch_cost.
19431 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19433 PR rtl-optimization/83565
19434 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19435 not extend the result to a larger mode for rotate operations.
19436 (num_sign_bit_copies1): Likewise.
19438 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19441 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19443 Use values-Xc.o for -pedantic.
19444 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19446 2018-01-12 Martin Liska <mliska@suse.cz>
19449 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19451 (possible_polymorphic_call_targets): Use it.
19452 (ipa_devirt): Likewise.
19454 2018-01-12 Martin Liska <mliska@suse.cz>
19456 * profile-count.h (enum profile_quality): Use 0 as invalid
19457 enum value of profile_quality.
19459 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19461 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19462 -mext-string options.
19464 2018-01-12 Richard Biener <rguenther@suse.de>
19466 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19467 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19468 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19470 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19472 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19474 * configure.ac (--with-long-double-format): Add support for the
19475 configuration option to change the default long double format on
19477 * config.gcc (powerpc*-linux*-*): Likewise.
19478 * configure: Regenerate.
19479 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19480 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19481 used without modification.
19483 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19485 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19486 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19487 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19488 MISC_BUILTIN_SPEC_BARRIER.
19489 (rs6000_init_builtins): Likewise.
19490 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19492 (speculation_barrier): New define_insn.
19493 * doc/extend.texi: Document __builtin_speculation_barrier.
19495 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19498 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19499 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19500 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19502 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19503 integral modes instead of "ss" and "sd".
19504 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19505 vectors with 32-bit and 64-bit elements.
19506 (vecdupssescalarmodesuffix): New mode attribute.
19507 (vec_dup<mode>): Use it.
19509 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19512 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19513 frame if argument is passed on stack.
19515 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19518 * ree.c (combine_reaching_defs): Optimize also
19519 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19520 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19522 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19524 PR middle-end/83189
19525 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19527 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19529 PR middle-end/83718
19530 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19531 after they are computed.
19533 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19535 PR tree-optimization/83695
19536 * gimple-loop-linterchange.cc
19537 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19538 reset cached scev information after interchange.
19539 (pass_linterchange::execute): Remove call to scev_reset_htab.
19541 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19543 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19544 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19545 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19546 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19547 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19548 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19549 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19550 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19551 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19552 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19553 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19554 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19555 (V_lane_reg): Likewise.
19556 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19558 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19559 (vfmal_lane_low<mode>_intrinsic,
19560 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19561 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19562 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19563 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19564 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19565 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19567 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19569 * config/arm/arm-cpus.in (fp16fml): New feature.
19570 (ALL_SIMD): Add fp16fml.
19571 (armv8.2-a): Add fp16fml as an option.
19572 (armv8.3-a): Likewise.
19573 (armv8.4-a): Add fp16fml as part of fp16.
19574 * config/arm/arm.h (TARGET_FP16FML): Define.
19575 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19577 * config/arm/arm-modes.def (V2HF): Define.
19578 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19579 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19580 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19581 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19582 vfmsl_low, vfmsl_high): New set of builtins.
19583 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19584 (vfml_op): New code attribute.
19585 (VFMLHALVES): New int iterator.
19586 (VFML, VFMLSEL): New mode attributes.
19587 (V_reg): Define mapping for V2HF.
19588 (V_hi, V_lo): New mode attributes.
19589 (VF_constraint): Likewise.
19590 (vfml_half, vfml_half_selector): New int attributes.
19591 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19593 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19594 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19596 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19597 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19598 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19599 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19601 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19602 Document new effective target and option set.
19604 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19606 * config/arm/arm-cpus.in (armv8_4): New feature.
19607 (ARMv8_4a): New fgroup.
19608 (armv8.4-a): New arch.
19609 * config/arm/arm-tables.opt: Regenerate.
19610 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19611 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19612 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19613 Add matching rules for -march=armv8.4-a and extensions.
19614 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19616 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19619 * config/rx/rx.md (BW): New mode attribute.
19620 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19622 2018-01-11 Richard Biener <rguenther@suse.de>
19624 PR tree-optimization/83435
19625 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19626 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19627 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19629 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19630 Alan Hayward <alan.hayward@arm.com>
19631 David Sherwood <david.sherwood@arm.com>
19633 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19635 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19636 (aarch64_print_address_internal): Use it to check for a zero offset.
19638 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19639 Alan Hayward <alan.hayward@arm.com>
19640 David Sherwood <david.sherwood@arm.com>
19642 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19643 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19644 Return a poly_int64 rather than a HOST_WIDE_INT.
19645 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19646 rather than a HOST_WIDE_INT.
19647 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19648 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19649 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19650 final_offset from HOST_WIDE_INT to poly_int64.
19651 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19652 to_constant when getting the number of units in an Advanced SIMD
19654 (aarch64_builtin_vectorized_function): Check for a constant number
19656 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19658 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19659 attribute instead of GET_MODE_NUNITS.
19660 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19661 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19662 GET_MODE_SIZE for fixed-size registers.
19663 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19664 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19665 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19666 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19667 (aarch64_print_operand, aarch64_print_address_internal)
19668 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19669 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19670 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19671 Handle polynomial GET_MODE_SIZE.
19672 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19673 wider than SImode without modification.
19674 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19675 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19676 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19677 passing and returning SVE modes.
19678 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19679 rather than GEN_INT.
19680 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19681 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19682 (aarch64_allocate_and_probe_stack_space): Likewise.
19683 (aarch64_layout_frame): Cope with polynomial offsets.
19684 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19685 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19686 polynomial offsets.
19687 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19688 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19689 poly_int64 rather than a HOST_WIDE_INT.
19690 (aarch64_get_separate_components, aarch64_process_components)
19691 (aarch64_expand_prologue, aarch64_expand_epilogue)
19692 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19693 (aarch64_anchor_offset): New function, split out from...
19694 (aarch64_legitimize_address): ...here.
19695 (aarch64_builtin_vectorization_cost): Handle polynomial
19696 TYPE_VECTOR_SUBPARTS.
19697 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19699 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19700 number of elements from the PARALLEL rather than the mode.
19701 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19702 rather than GET_MODE_BITSIZE.
19703 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19704 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19705 (aarch64_expand_vec_perm_const_1): Handle polynomial
19706 d->perm.length () and d->perm elements.
19707 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19708 Apply to_constant to d->perm elements.
19709 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19710 polynomial CONST_VECTOR_NUNITS.
19711 (aarch64_move_pointer): Take amount as a poly_int64 rather
19713 (aarch64_progress_pointer): Avoid temporary variable.
19714 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19715 the mode attribute instead of GET_MODE.
19717 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19718 Alan Hayward <alan.hayward@arm.com>
19719 David Sherwood <david.sherwood@arm.com>
19721 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19722 x exists before using it.
19723 (aarch64_add_constant_internal): Rename to...
19724 (aarch64_add_offset_1): ...this. Replace regnum with separate
19725 src and dest rtxes. Handle the case in which they're different,
19726 including when the offset is zero. Replace scratchreg with an rtx.
19727 Use 2 additions if there is no spare register into which we can
19728 move a 16-bit constant.
19729 (aarch64_add_constant): Delete.
19730 (aarch64_add_offset): Replace reg with separate src and dest
19731 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19732 Use aarch64_add_offset_1.
19733 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19734 an rtx rather than an int. Take the delta as a poly_int64
19735 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19736 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19737 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19738 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19739 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19740 and aarch64_add_sp.
19741 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19742 aarch64_add_constant.
19744 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19746 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19747 Use scalar_float_mode.
19749 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19751 * config/aarch64/aarch64-simd.md
19752 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19753 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19754 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19755 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19756 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19757 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19758 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19759 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19760 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19761 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19763 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19766 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19767 targ_options->x_arm_arch_string is non NULL.
19769 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19771 * config/aarch64/aarch64.h
19772 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19774 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19777 * expmed.c (emit_store_flag_force): Swap if const op0
19778 and change VOIDmode to mode of op0.
19780 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19782 PR rtl-optimization/83761
19783 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19784 than bytes to mode_for_size.
19786 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19788 PR middle-end/83189
19789 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19790 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19793 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19795 PR middle-end/83575
19796 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19797 when in layout mode.
19798 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19799 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19802 2018-01-10 Michael Collison <michael.collison@arm.com>
19804 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19805 * config/aarch64/aarch64-option-extension.def: Add
19806 AARCH64_OPT_EXTENSION of 'fp16fml'.
19807 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19808 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19809 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19810 * config/aarch64/constraints.md (Ui7): New constraint.
19811 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19812 (VFMLA_SEL_W): Ditto.
19815 (VFMLA16_LOW): New int iterator.
19816 (VFMLA16_HIGH): Ditto.
19817 (UNSPEC_FMLAL): New unspec.
19818 (UNSPEC_FMLSL): Ditto.
19819 (UNSPEC_FMLAL2): Ditto.
19820 (UNSPEC_FMLSL2): Ditto.
19821 (f16mac): New code attribute.
19822 * config/aarch64/aarch64-simd-builtins.def
19823 (aarch64_fmlal_lowv2sf): Ditto.
19824 (aarch64_fmlsl_lowv2sf): Ditto.
19825 (aarch64_fmlalq_lowv4sf): Ditto.
19826 (aarch64_fmlslq_lowv4sf): Ditto.
19827 (aarch64_fmlal_highv2sf): Ditto.
19828 (aarch64_fmlsl_highv2sf): Ditto.
19829 (aarch64_fmlalq_highv4sf): Ditto.
19830 (aarch64_fmlslq_highv4sf): Ditto.
19831 (aarch64_fmlal_lane_lowv2sf): Ditto.
19832 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19833 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19834 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19835 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19836 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19837 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19838 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19839 (aarch64_fmlal_lane_highv2sf): Ditto.
19840 (aarch64_fmlsl_lane_highv2sf): Ditto.
19841 (aarch64_fmlal_laneq_highv2sf): Ditto.
19842 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19843 (aarch64_fmlalq_lane_highv4sf): Ditto.
19844 (aarch64_fmlsl_lane_highv4sf): Ditto.
19845 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19846 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19847 * config/aarch64/aarch64-simd.md:
19848 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19849 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19850 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19851 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19852 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19853 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19854 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19855 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19856 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19857 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19858 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19859 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19860 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19861 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19862 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19863 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19864 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19865 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19866 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19867 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19868 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19869 (vfmlsl_low_u32): Ditto.
19870 (vfmlalq_low_u32): Ditto.
19871 (vfmlslq_low_u32): Ditto.
19872 (vfmlal_high_u32): Ditto.
19873 (vfmlsl_high_u32): Ditto.
19874 (vfmlalq_high_u32): Ditto.
19875 (vfmlslq_high_u32): Ditto.
19876 (vfmlal_lane_low_u32): Ditto.
19877 (vfmlsl_lane_low_u32): Ditto.
19878 (vfmlal_laneq_low_u32): Ditto.
19879 (vfmlsl_laneq_low_u32): Ditto.
19880 (vfmlalq_lane_low_u32): Ditto.
19881 (vfmlslq_lane_low_u32): Ditto.
19882 (vfmlalq_laneq_low_u32): Ditto.
19883 (vfmlslq_laneq_low_u32): Ditto.
19884 (vfmlal_lane_high_u32): Ditto.
19885 (vfmlsl_lane_high_u32): Ditto.
19886 (vfmlal_laneq_high_u32): Ditto.
19887 (vfmlsl_laneq_high_u32): Ditto.
19888 (vfmlalq_lane_high_u32): Ditto.
19889 (vfmlslq_lane_high_u32): Ditto.
19890 (vfmlalq_laneq_high_u32): Ditto.
19891 (vfmlslq_laneq_high_u32): Ditto.
19892 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19893 (AARCH64_FL_FOR_ARCH8_4): New.
19894 (AARCH64_ISA_F16FML): New ISA flag.
19895 (TARGET_F16FML): New feature flag for fp16fml.
19896 (doc/invoke.texi): Document new fp16fml option.
19898 2018-01-10 Michael Collison <michael.collison@arm.com>
19900 * config/aarch64/aarch64-builtins.c:
19901 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19902 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19903 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19904 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19905 (AARCH64_ISA_SHA3): New ISA flag.
19906 (TARGET_SHA3): New feature flag for sha3.
19907 * config/aarch64/iterators.md (sha512_op): New int attribute.
19908 (CRYPTO_SHA512): New int iterator.
19909 (UNSPEC_SHA512H): New unspec.
19910 (UNSPEC_SHA512H2): Ditto.
19911 (UNSPEC_SHA512SU0): Ditto.
19912 (UNSPEC_SHA512SU1): Ditto.
19913 * config/aarch64/aarch64-simd-builtins.def
19914 (aarch64_crypto_sha512hqv2di): New builtin.
19915 (aarch64_crypto_sha512h2qv2di): Ditto.
19916 (aarch64_crypto_sha512su0qv2di): Ditto.
19917 (aarch64_crypto_sha512su1qv2di): Ditto.
19918 (aarch64_eor3qv8hi): Ditto.
19919 (aarch64_rax1qv2di): Ditto.
19920 (aarch64_xarqv2di): Ditto.
19921 (aarch64_bcaxqv8hi): Ditto.
19922 * config/aarch64/aarch64-simd.md:
19923 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19924 (aarch64_crypto_sha512su0qv2di): Ditto.
19925 (aarch64_crypto_sha512su1qv2di): Ditto.
19926 (aarch64_eor3qv8hi): Ditto.
19927 (aarch64_rax1qv2di): Ditto.
19928 (aarch64_xarqv2di): Ditto.
19929 (aarch64_bcaxqv8hi): Ditto.
19930 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19931 (vsha512h2q_u64): Ditto.
19932 (vsha512su0q_u64): Ditto.
19933 (vsha512su1q_u64): Ditto.
19934 (veor3q_u16): Ditto.
19935 (vrax1q_u64): Ditto.
19936 (vxarq_u64): Ditto.
19937 (vbcaxq_u16): Ditto.
19938 * config/arm/types.md (crypto_sha512): New type attribute.
19939 (crypto_sha3): Ditto.
19940 (doc/invoke.texi): Document new sha3 option.
19942 2018-01-10 Michael Collison <michael.collison@arm.com>
19944 * config/aarch64/aarch64-builtins.c:
19945 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19946 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19947 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19948 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19949 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19950 (AARCH64_ISA_SM4): New ISA flag.
19951 (TARGET_SM4): New feature flag for sm4.
19952 * config/aarch64/aarch64-simd-builtins.def
19953 (aarch64_sm3ss1qv4si): Ditto.
19954 (aarch64_sm3tt1aq4si): Ditto.
19955 (aarch64_sm3tt1bq4si): Ditto.
19956 (aarch64_sm3tt2aq4si): Ditto.
19957 (aarch64_sm3tt2bq4si): Ditto.
19958 (aarch64_sm3partw1qv4si): Ditto.
19959 (aarch64_sm3partw2qv4si): Ditto.
19960 (aarch64_sm4eqv4si): Ditto.
19961 (aarch64_sm4ekeyqv4si): Ditto.
19962 * config/aarch64/aarch64-simd.md:
19963 (aarch64_sm3ss1qv4si): Ditto.
19964 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19965 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19966 (aarch64_sm4eqv4si): Ditto.
19967 (aarch64_sm4ekeyqv4si): Ditto.
19968 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19969 (sm3part_op): Ditto.
19970 (CRYPTO_SM3TT): Ditto.
19971 (CRYPTO_SM3PART): Ditto.
19972 (UNSPEC_SM3SS1): New unspec.
19973 (UNSPEC_SM3TT1A): Ditto.
19974 (UNSPEC_SM3TT1B): Ditto.
19975 (UNSPEC_SM3TT2A): Ditto.
19976 (UNSPEC_SM3TT2B): Ditto.
19977 (UNSPEC_SM3PARTW1): Ditto.
19978 (UNSPEC_SM3PARTW2): Ditto.
19979 (UNSPEC_SM4E): Ditto.
19980 (UNSPEC_SM4EKEY): Ditto.
19981 * config/aarch64/constraints.md (Ui2): New constraint.
19982 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19983 * config/arm/types.md (crypto_sm3): New type attribute.
19984 (crypto_sm4): Ditto.
19985 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19986 (vsm3tt1aq_u32): Ditto.
19987 (vsm3tt1bq_u32): Ditto.
19988 (vsm3tt2aq_u32): Ditto.
19989 (vsm3tt2bq_u32): Ditto.
19990 (vsm3partw1q_u32): Ditto.
19991 (vsm3partw2q_u32): Ditto.
19992 (vsm4eq_u32): Ditto.
19993 (vsm4ekeyq_u32): Ditto.
19994 (doc/invoke.texi): Document new sm4 option.
19996 2018-01-10 Michael Collison <michael.collison@arm.com>
19998 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19999 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20000 (AARCH64_FL_FOR_ARCH8_4): New.
20001 (AARCH64_FL_V8_4): New flag.
20002 (doc/invoke.texi): Document new armv8.4-a option.
20004 2018-01-10 Michael Collison <michael.collison@arm.com>
20006 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20007 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20008 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20009 * config/aarch64/aarch64-option-extension.def: Add
20010 AARCH64_OPT_EXTENSION of 'sha2'.
20011 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20012 (crypto): Disable sha2 and aes if crypto disabled.
20013 (crypto): Enable aes and sha2 if enabled.
20014 (simd): Disable sha2 and aes if simd disabled.
20015 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20017 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20018 (TARGET_SHA2): New feature flag for sha2.
20019 (TARGET_AES): New feature flag for aes.
20020 * config/aarch64/aarch64-simd.md:
20021 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20022 conditional on TARGET_AES.
20023 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20024 (aarch64_crypto_sha1hsi): Make pattern conditional
20026 (aarch64_crypto_sha1hv4si): Ditto.
20027 (aarch64_be_crypto_sha1hv4si): Ditto.
20028 (aarch64_crypto_sha1su1v4si): Ditto.
20029 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20030 (aarch64_crypto_sha1su0v4si): Ditto.
20031 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20032 (aarch64_crypto_sha256su0v4si): Ditto.
20033 (aarch64_crypto_sha256su1v4si): Ditto.
20034 (doc/invoke.texi): Document new aes and sha2 options.
20036 2018-01-10 Martin Sebor <msebor@redhat.com>
20038 PR tree-optimization/83781
20039 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20042 2018-01-11 Martin Sebor <msebor@gmail.com>
20043 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20045 PR tree-optimization/83501
20046 PR tree-optimization/81703
20048 * tree-ssa-strlen.c (get_string_cst): Rename...
20049 (get_string_len): ...to this. Handle global constants.
20050 (handle_char_store): Adjust.
20052 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20053 Jim Wilson <jimw@sifive.com>
20055 * config/riscv/riscv-protos.h (riscv_output_return): New.
20056 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20057 (riscv_attribute_table, riscv_output_return),
20058 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20059 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20060 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20062 (riscv_expand_prologue): Add early return for naked function.
20063 (riscv_expand_epilogue): Likewise.
20064 (riscv_function_ok_for_sibcall): Return false for naked function.
20065 (riscv_set_current_function): New.
20066 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20067 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20068 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20069 * doc/extend.texi (RISC-V Function Attributes): New.
20071 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20073 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20074 check for 128-bit long double before checking TCmode.
20075 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20076 128-bit long doubles before checking TFmode or TCmode.
20077 (FLOAT128_IBM_P): Likewise.
20079 2018-01-10 Martin Sebor <msebor@redhat.com>
20081 PR tree-optimization/83671
20082 * builtins.c (c_strlen): Unconditionally return zero for the empty
20084 Use -Warray-bounds for warnings.
20085 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20086 for non-constant array indices with COMPONENT_REF, arrays of
20087 arrays, and pointers to arrays.
20088 (gimple_fold_builtin_strlen): Determine and set length range for
20089 non-constant character arrays.
20091 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20093 PR middle-end/81897
20094 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20097 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20099 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20101 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20104 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20105 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20106 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20107 indexed_or_indirect_operand predicate.
20108 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20109 (*vsx_le_perm_load_v8hi): Likewise.
20110 (*vsx_le_perm_load_v16qi): Likewise.
20111 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20112 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20113 (*vsx_le_perm_store_v8hi): Likewise.
20114 (*vsx_le_perm_store_v16qi): Likewise.
20115 (eight unnamed splitters): Likewise.
20117 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20119 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20120 * config/rs6000/emmintrin.h: Likewise.
20121 * config/rs6000/mmintrin.h: Likewise.
20122 * config/rs6000/xmmintrin.h: Likewise.
20124 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20127 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20129 * tree.c (tree_nop_conversion): Return true for location wrapper
20131 (maybe_wrap_with_location): New function.
20132 (selftest::check_strip_nops): New function.
20133 (selftest::test_location_wrappers): New function.
20134 (selftest::tree_c_tests): Call it.
20135 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20136 (maybe_wrap_with_location): New decl.
20137 (EXPR_LOCATION_WRAPPER_P): New macro.
20138 (location_wrapper_p): New inline function.
20139 (tree_strip_any_location_wrapper): New inline function.
20141 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20144 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20145 stack_realign_offset for the largest alignment of stack slot
20147 (ix86_find_max_used_stack_alignment): New function.
20148 (ix86_finalize_stack_frame_flags): Use it. Set
20149 max_used_stack_alignment if we don't realign stack.
20150 * config/i386/i386.h (machine_function): Add
20151 max_used_stack_alignment.
20153 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20155 * config/arm/arm.opt (-mbranch-cost): New option.
20156 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20159 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20162 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20163 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20165 2018-01-10 Richard Biener <rguenther@suse.de>
20168 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20169 early out so it also covers the case where we have a non-NULL
20172 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20174 PR tree-optimization/83753
20175 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20176 for non-strided grouped accesses if the number of elements is 1.
20178 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20181 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20182 * i386.h (TARGET_USE_GATHER): Define.
20183 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20185 2018-01-10 Martin Liska <mliska@suse.cz>
20188 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20189 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20191 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20192 CLEANUP_NO_PARTITIONING is not set.
20194 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20196 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20197 for vectors, as a partial revert of r254296.
20198 * rtl.h (const_vec_p): Delete.
20199 (const_vec_duplicate_p): Don't test for vector CONSTs.
20200 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20201 * expmed.c (make_tree): Likewise.
20204 * common.md (E, F): Use CONSTANT_P instead of checking for
20206 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20207 checking for CONST_VECTOR.
20209 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20211 PR middle-end/83575
20212 * predict.c (force_edge_cold): Handle in more sane way edges
20213 with no prediction.
20215 2018-01-09 Carl Love <cel@us.ibm.com>
20217 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20219 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20220 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20221 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20222 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20223 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20224 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20225 * config/rs6000/rs6000-protos.h: Add extern defition for
20226 rs6000_generate_float2_double_code.
20227 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20229 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20230 (float2_v2df): Add define_expand.
20232 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20235 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20236 op_mode in the force_to_mode call.
20238 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20240 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20241 instead of checking each element individually.
20242 (aarch64_evpc_uzp): Likewise.
20243 (aarch64_evpc_zip): Likewise.
20244 (aarch64_evpc_ext): Likewise.
20245 (aarch64_evpc_rev): Likewise.
20246 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20247 instead of checking each element individually. Return true without
20249 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20250 whether all selected elements come from the same input, instead of
20251 checking each element individually. Remove calls to gen_rtx_REG,
20252 start_sequence and end_sequence and instead assert that no rtl is
20255 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20257 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20258 order of HIGH and CONST checks.
20260 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20262 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20263 if the destination isn't an SSA_NAME.
20265 2018-01-09 Richard Biener <rguenther@suse.de>
20267 PR tree-optimization/83668
20268 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20270 (canonicalize_loop_form): ... here, renamed from ...
20271 (canonicalize_loop_closed_ssa_form): ... this and amended to
20272 swap successor edges for loop exit blocks to make us use
20273 the RPO order we need for initial schedule generation.
20275 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20277 PR tree-optimization/64811
20278 * match.pd: When optimizing comparisons with Inf, avoid
20279 introducing or losing exceptions from comparisons with NaN.
20281 2018-01-09 Martin Liska <mliska@suse.cz>
20284 * asan.c (shadow_mem_size): Add gcc_assert.
20286 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20288 Don't save registers in main().
20291 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20292 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20293 * config/avr/avr.c (avr_set_current_function): Don't error if
20294 naked, OS_task or OS_main are specified at the same time.
20295 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20297 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20299 * common/config/avr/avr-common.c (avr_option_optimization_table):
20300 Switch on -mmain-is-OS_task for optimizing compilations.
20302 2018-01-09 Richard Biener <rguenther@suse.de>
20304 PR tree-optimization/83572
20305 * graphite.c: Include cfganal.h.
20306 (graphite_transform_loops): Connect infinite loops to exit
20307 and remove fake edges at the end.
20309 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20311 * ipa-inline.c (edge_badness): Revert accidental checkin.
20313 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20316 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20317 symbols; not inline clones.
20319 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20322 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20323 hard registers. Formatting fixes.
20325 PR preprocessor/83722
20326 * gcc.c (try_generate_repro): Pass
20327 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20328 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20331 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20332 Kito Cheng <kito.cheng@gmail.com>
20334 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20335 (riscv_leaf_function_p): Delete.
20336 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20338 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20340 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20342 (do_ifelse): New function.
20343 (do_isel): New function.
20344 (do_sub3): New function.
20345 (do_add3): New function.
20346 (do_load_mask_compare): New function.
20347 (do_overlap_load_compare): New function.
20348 (expand_compare_loop): New function.
20349 (expand_block_compare): Call expand_compare_loop() when appropriate.
20350 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20351 option description.
20352 (-mblock-compare-inline-loop-limit): New option.
20354 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20357 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20358 Reverse order of second and third operands in first alternative.
20359 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20360 of first and second elements in UNSPEC_VPERMR vector.
20361 (altivec_expand_vec_perm_le): Likewise.
20363 2018-01-08 Jeff Law <law@redhat.com>
20365 PR rtl-optimizatin/81308
20366 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20367 (process_switch): If group_case_labels makes a change, then set
20369 (pass_convert_switch::execute): If a switch is converted, then
20370 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20372 PR rtl-optimization/81308
20373 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20376 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20378 PR target/83663 - Revert r255946
20379 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20380 generation for cases where splatting a value is not useful.
20381 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20382 across a vec_duplicate and a paradoxical subreg forming a vector
20383 mode to a vec_concat.
20385 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20387 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20388 -march=armv8.3-a variants.
20389 * config/arm/t-multilib: Likewise.
20390 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20392 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20394 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20396 (cceq_ior_compare_complement): Give it a name so I can use it, and
20397 change boolean_or_operator predicate to boolean_operator so it can
20398 be used to generate a crand.
20399 (eqne): New code iterator.
20400 (bd/bd_neg): New code_attrs.
20401 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20402 a single define_insn.
20403 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20404 decrement (bdnzt/bdnzf/bdzt/bdzf).
20405 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20406 with the new names of the branch decrement patterns, and added the
20407 names of the branch decrement conditional patterns.
20409 2018-01-08 Richard Biener <rguenther@suse.de>
20411 PR tree-optimization/83563
20412 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20415 2018-01-08 Richard Biener <rguenther@suse.de>
20417 PR middle-end/83713
20418 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20420 2018-01-08 Richard Biener <rguenther@suse.de>
20422 PR tree-optimization/83685
20423 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20424 references to abnormals.
20426 2018-01-08 Richard Biener <rguenther@suse.de>
20429 * dwarf2out.c (output_indirect_strings): Handle empty
20430 skeleton_debug_str_hash.
20431 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20433 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20435 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20436 (emit_store_direct): Likewise.
20437 (arc_trampoline_adjust_address): Likewise.
20438 (arc_asm_trampoline_template): New function.
20439 (arc_initialize_trampoline): Use asm_trampoline_template.
20440 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20441 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20442 * config/arc/arc.md (flush_icache): Delete pattern.
20444 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20446 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20447 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20450 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20453 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20454 by not USED_FOR_TARGET.
20455 (make_pass_resolve_sw_modes): Likewise.
20457 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20459 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20462 2018-01-08 Richard Biener <rguenther@suse.de>
20464 PR middle-end/83580
20465 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20467 2018-01-08 Richard Biener <rguenther@suse.de>
20469 PR middle-end/83517
20470 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20472 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20474 PR middle-end/81897
20475 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20476 basic blocks with a small number of successors.
20477 (convert_control_dep_chain_into_preds): Improve handling of
20479 (dump_predicates): Split apart into...
20480 (dump_pred_chain): ...here...
20481 (dump_pred_info): ...and here.
20482 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20483 (can_chain_union_be_invalidated_p): Improve check for invalidation
20485 (uninit_uses_cannot_happen): Avoid unnecessary if
20486 convert_control_dep_chain_into_preds yielded nothing.
20488 2018-01-06 Martin Sebor <msebor@redhat.com>
20490 PR tree-optimization/83640
20491 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20492 subtracting negative offset from size.
20493 (builtin_access::overlap): Adjust offset bounds of the access to fall
20494 within the size of the object if possible.
20496 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20498 PR rtl-optimization/83699
20499 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20500 extract_bit_field_as_subreg to cases in which the extracted
20501 value is also a vector.
20503 * lra-constraints.c (process_alt_operands): Test for the equivalence
20504 substitutions when detecting a possible reload cycle.
20506 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20509 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20510 by default if flag_selective_schedling{,2}. Formatting fixes.
20512 PR rtl-optimization/83682
20513 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20514 if it has non-VECTOR_MODE element mode.
20515 (vec_duplicate_p): Likewise.
20517 PR middle-end/83694
20518 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20519 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20521 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20524 * config/i386/i386-builtin.def
20525 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20526 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20527 Require also OPTION_MASK_ISA_AVX512F in addition to
20528 OPTION_MASK_ISA_GFNI.
20529 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20530 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20531 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20532 to OPTION_MASK_ISA_GFNI.
20533 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20534 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20535 OPTION_MASK_ISA_AVX512BW.
20536 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20537 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20538 addition to OPTION_MASK_ISA_GFNI.
20539 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20540 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20541 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20542 to OPTION_MASK_ISA_GFNI.
20543 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20544 a requirement for all ISAs rather than any of them with a few
20546 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20548 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20549 bitmasks to be enabled with 3 exceptions, instead of requiring any
20550 enabled ISA with lots of exceptions.
20551 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20552 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20553 Change avx512bw in isa attribute to avx512f.
20554 * config/i386/sgxintrin.h: Add license boilerplate.
20555 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20556 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20557 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20558 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20560 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20561 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20562 temporarily sse2 rather than sse if not enabled already.
20565 * config/i386/sse.md (VI248_VLBW): Rename to ...
20566 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20567 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20568 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20569 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20570 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20571 mode iterator instead of VI248_VLBW.
20573 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20575 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20576 (record_modified): Skip clobbers; add debug output.
20577 (param_change_prob): Use sreal frequencies.
20579 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20581 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20582 punt for user-aligned variables.
20584 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20586 * tree-chrec.c (chrec_contains_symbols): Return true for
20589 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20592 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20593 of (x|y) == x for BICS pattern.
20595 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20597 PR tree-optimization/83605
20598 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20599 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20602 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20604 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20605 * config/epiphany/rtems.h: New file.
20607 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20608 Uros Bizjak <ubizjak@gmail.com>
20611 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20612 QIreg_operand instead of register_operand predicate.
20613 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20614 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20615 comments instead of -fmitigate[-_]rop.
20617 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20620 * cgraphunit.c (symbol_table::compile): Switch to text_section
20621 before calling assembly_start debug hook.
20622 * run-rtl-passes.c (run_rtl_passes): Likewise.
20625 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20627 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20628 range_int_cst_p rather than !symbolic_range_p before calling
20629 extract_range_from_multiplicative_op_1.
20631 2018-01-04 Jeff Law <law@redhat.com>
20633 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20634 redundant test in assertion.
20636 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20638 * doc/rtl.texi: Document machine_mode wrapper classes.
20640 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20642 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20643 using tree_to_uhwi.
20645 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20647 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20648 the VEC_PERM_EXPR fold to fail.
20650 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20653 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20654 to switched_sections.
20656 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20659 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20660 test for d.testing.
20662 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20665 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20666 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20668 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20671 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20672 is BLKmode and bitpos not zero or mode change is needed.
20674 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20677 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20680 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20683 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20684 instead of MULT rtx. Update all corresponding splitters.
20685 (*saddl_se): Ditto.
20686 (*ssub<modesuffix>): Ditto.
20687 (*ssubl_se): Ditto.
20688 (*cmp_sadd_di): Update split patterns.
20689 (*cmp_sadd_si): Ditto.
20690 (*cmp_sadd_sidi): Ditto.
20691 (*cmp_ssub_di): Ditto.
20692 (*cmp_ssub_si): Ditto.
20693 (*cmp_ssub_sidi): Ditto.
20694 * config/alpha/predicates.md (const23_operand): New predicate.
20695 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20696 Look for ASHIFT, not MULT inner operand.
20697 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20699 2018-01-04 Martin Liska <mliska@suse.cz>
20701 PR gcov-profile/83669
20702 * gcov.c (output_intermediate_file): Add version to intermediate
20704 * doc/gcov.texi: Document new field 'version' in intermediate
20705 file format. Fix location of '-k' option of gcov command.
20707 2018-01-04 Martin Liska <mliska@suse.cz>
20710 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20712 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20714 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20716 2018-01-03 Martin Sebor <msebor@redhat.com>
20718 PR tree-optimization/83655
20719 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20720 checking calls with invalid arguments.
20722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20724 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20725 (vectorizable_mask_load_store): Delete.
20726 (vectorizable_call): Return false for masked loads and stores.
20727 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20728 instead of gimple_assign_rhs1.
20729 (vectorizable_load): Handle IFN_MASK_LOAD.
20730 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20734 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20736 (vectorizable_mask_load_store): ...here.
20737 (vectorizable_load): ...and here.
20739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20741 * tree-vect-stmts.c (vect_build_all_ones_mask)
20742 (vect_build_zero_merge_argument): New functions, split out from...
20743 (vectorizable_load): ...here.
20745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20747 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20749 (vectorizable_mask_load_store): ...here.
20750 (vectorizable_store): ...and here.
20752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20754 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20756 (vectorizable_mask_load_store): ...here.
20758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20760 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20761 (vect_model_store_cost): Take a vec_load_store_type instead of a
20763 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20764 (vect_model_store_cost): Take a vec_load_store_type instead of a
20766 (vectorizable_mask_load_store): Update accordingly.
20767 (vectorizable_store): Likewise.
20768 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20772 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20773 IFN_MASK_LOAD calls here rather than...
20774 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20777 Alan Hayward <alan.hayward@arm.com>
20778 David Sherwood <david.sherwood@arm.com>
20780 * expmed.c (extract_bit_field_1): For vector extracts,
20781 fall back to extract_bit_field_as_subreg if vec_extract
20784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20785 Alan Hayward <alan.hayward@arm.com>
20786 David Sherwood <david.sherwood@arm.com>
20788 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20789 they are variable or constant sized.
20790 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20791 slots for constant-sized data.
20793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20794 Alan Hayward <alan.hayward@arm.com>
20795 David Sherwood <david.sherwood@arm.com>
20797 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20798 handling COND_EXPRs with boolean comparisons, try to find a better
20799 basis for the mask type than the boolean itself.
20801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20803 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20804 is calculated and how it can be overridden.
20805 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20806 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20808 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20812 Alan Hayward <alan.hayward@arm.com>
20813 David Sherwood <david.sherwood@arm.com>
20815 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20816 Remove the mode argument.
20817 (aarch64_simd_valid_immediate): Remove the mode and inverse
20819 * config/aarch64/iterators.md (bitsize): New iterator.
20820 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20821 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20822 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20823 aarch64_simd_valid_immediate.
20824 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20825 (aarch64_reg_or_bic_imm): Likewise.
20826 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20827 with an insn_type enum and msl with a modifier_type enum.
20828 Replace element_width with a scalar_mode. Change the shift
20829 to unsigned int. Add constructors for scalar_float_mode and
20830 scalar_int_mode elements.
20831 (aarch64_vect_float_const_representable_p): Delete.
20832 (aarch64_can_const_movi_rtx_p)
20833 (aarch64_simd_scalar_immediate_valid_for_move)
20834 (aarch64_simd_make_constant): Update call to
20835 aarch64_simd_valid_immediate.
20836 (aarch64_advsimd_valid_immediate_hs): New function.
20837 (aarch64_advsimd_valid_immediate): Likewise.
20838 (aarch64_simd_valid_immediate): Remove mode and inverse
20839 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20840 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20841 and aarch64_float_const_representable_p on the result.
20842 (aarch64_output_simd_mov_immediate): Remove mode argument.
20843 Update call to aarch64_simd_valid_immediate and use of
20844 simd_immediate_info.
20845 (aarch64_output_scalar_simd_mov_immediate): Update call
20848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20849 Alan Hayward <alan.hayward@arm.com>
20850 David Sherwood <david.sherwood@arm.com>
20852 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20853 (mode_nunits): Likewise CONST_MODE_NUNITS.
20854 * machmode.def (ADJUST_NUNITS): Document.
20855 * genmodes.c (mode_data::need_nunits_adj): New field.
20856 (blank_mode): Update accordingly.
20857 (adj_nunits): New variable.
20858 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20860 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20861 listed in adj_nunits.
20862 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20863 listed in adj_nunits. Don't emit case statements for such modes.
20864 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20865 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20866 nothing if adj_nunits is nonnull.
20867 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20868 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20869 (emit_mode_fbit): Update use of print_maybe_const_decl.
20870 (emit_move_size): Likewise. Treat the array as non-const
20872 (emit_mode_adjustments): Handle adj_nunits.
20874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20876 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20877 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20878 (VECTOR_MODES): Use it.
20879 (make_vector_modes): Take the prefix as an argument.
20881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20882 Alan Hayward <alan.hayward@arm.com>
20883 David Sherwood <david.sherwood@arm.com>
20885 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20886 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20887 for MODE_VECTOR_BOOL.
20888 * machmode.def (VECTOR_BOOL_MODE): Document.
20889 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20890 (make_vector_bool_mode): New function.
20891 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20893 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20894 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20896 * stor-layout.c (int_mode_for_mode): Likewise.
20897 * tree.c (build_vector_type_for_mode): Likewise.
20898 * varasm.c (output_constant_pool_2): Likewise.
20899 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20900 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20901 for MODE_VECTOR_BOOL.
20902 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20903 of mode class checks.
20904 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20905 instead of a list of mode class checks.
20906 (expand_vector_scalar_condition): Likewise.
20907 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20910 Alan Hayward <alan.hayward@arm.com>
20911 David Sherwood <david.sherwood@arm.com>
20913 * machmode.h (mode_size): Change from unsigned short to
20915 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20916 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20917 or if measurement_type is not polynomial.
20918 (fixed_size_mode::includes_p): Check for constant-sized modes.
20919 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20920 return a poly_uint16 rather than an unsigned short.
20921 (emit_mode_size): Change the type of mode_size from unsigned short
20922 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20923 (emit_mode_adjustments): Cope with polynomial vector sizes.
20924 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20926 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20928 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20929 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20930 * caller-save.c (setup_save_areas): Likewise.
20931 (replace_reg_with_saved_mem): Likewise.
20932 * calls.c (emit_library_call_value_1): Likewise.
20933 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20934 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20935 (gen_lowpart_for_combine): Likewise.
20936 * convert.c (convert_to_integer_1): Likewise.
20937 * cse.c (equiv_constant, cse_insn): Likewise.
20938 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20939 (cselib_subst_to_values): Likewise.
20940 * dce.c (word_dce_process_block): Likewise.
20941 * df-problems.c (df_word_lr_mark_ref): Likewise.
20942 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20943 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20944 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20945 (rtl_for_decl_location): Likewise.
20946 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20947 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20948 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20949 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20950 (expand_expr_real_1): Likewise.
20951 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20952 (pad_below): Likewise.
20953 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20954 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20955 * ira.c (get_subreg_tracking_sizes): Likewise.
20956 * ira-build.c (ira_create_allocno_objects): Likewise.
20957 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20958 (ira_sort_regnos_for_alter_reg): Likewise.
20959 * ira-costs.c (record_operand_costs): Likewise.
20960 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20961 (resolve_simple_move): Likewise.
20962 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20963 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20964 (lra_constraints): Likewise.
20965 (CONST_POOL_OK_P): Reject variable-sized modes.
20966 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20967 (add_pseudo_to_slot, lra_spill): Likewise.
20968 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20969 * optabs-query.c (get_best_extraction_insn): Likewise.
20970 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20971 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20972 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20973 * recog.c (offsettable_address_addr_space_p): Likewise.
20974 * regcprop.c (maybe_mode_change): Likewise.
20975 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20976 * regrename.c (build_def_use): Likewise.
20977 * regstat.c (dump_reg_info): Likewise.
20978 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20979 (find_reloads, find_reloads_subreg_address): Likewise.
20980 * reload1.c (eliminate_regs_1): Likewise.
20981 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20982 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20983 (simplify_binary_operation_1, simplify_subreg): Likewise.
20984 * targhooks.c (default_function_arg_padding): Likewise.
20985 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20986 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20987 (verify_gimple_assign_ternary): Likewise.
20988 * tree-inline.c (estimate_move_cost): Likewise.
20989 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20990 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20991 (get_address_cost_ainc): Likewise.
20992 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20993 (vect_supportable_dr_alignment): Likewise.
20994 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20995 (vectorizable_reduction): Likewise.
20996 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20997 (vectorizable_operation, vectorizable_load): Likewise.
20998 * tree.c (build_same_sized_truth_vector_type): Likewise.
20999 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21000 * var-tracking.c (emit_note_insn_var_location): Likewise.
21001 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21002 (ADDR_VEC_ALIGN): Likewise.
21004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21005 Alan Hayward <alan.hayward@arm.com>
21006 David Sherwood <david.sherwood@arm.com>
21008 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21010 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21011 or if measurement_type is polynomial.
21012 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21013 * combine.c (make_extraction): Likewise.
21014 * dse.c (find_shift_sequence): Likewise.
21015 * dwarf2out.c (mem_loc_descriptor): Likewise.
21016 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21017 (extract_bit_field, extract_low_bits): Likewise.
21018 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21019 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21020 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21021 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21022 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21023 * reload.c (find_reloads): Likewise.
21024 * reload1.c (alter_reg): Likewise.
21025 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21026 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21027 * tree-if-conv.c (predicate_mem_writes): Likewise.
21028 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21029 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21030 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21031 * valtrack.c (dead_debug_insert_temp): Likewise.
21032 * varasm.c (mergeable_constant_section): Likewise.
21033 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21035 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21036 Alan Hayward <alan.hayward@arm.com>
21037 David Sherwood <david.sherwood@arm.com>
21039 * expr.c (expand_assignment): Cope with polynomial mode sizes
21040 when assigning to a CONCAT.
21042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21043 Alan Hayward <alan.hayward@arm.com>
21044 David Sherwood <david.sherwood@arm.com>
21046 * machmode.h (mode_precision): Change from unsigned short to
21048 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21050 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21051 or if measurement_type is not polynomial.
21052 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21053 in which the mode is already known to be a scalar_int_mode.
21054 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21055 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21057 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21058 for GET_MODE_PRECISION.
21059 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21060 for GET_MODE_PRECISION.
21061 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21063 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21064 (expand_field_assignment, make_extraction): Likewise.
21065 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21066 (get_last_value): Likewise.
21067 * convert.c (convert_to_integer_1): Likewise.
21068 * cse.c (cse_insn): Likewise.
21069 * expr.c (expand_expr_real_1): Likewise.
21070 * lra-constraints.c (simplify_operand_subreg): Likewise.
21071 * optabs-query.c (can_atomic_load_p): Likewise.
21072 * optabs.c (expand_atomic_load): Likewise.
21073 (expand_atomic_store): Likewise.
21074 * ree.c (combine_reaching_defs): Likewise.
21075 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21076 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21077 * tree.h (type_has_mode_precision_p): Likewise.
21078 * ubsan.c (instrument_si_overflow): Likewise.
21080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21081 Alan Hayward <alan.hayward@arm.com>
21082 David Sherwood <david.sherwood@arm.com>
21084 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21085 polynomial numbers of units.
21086 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21087 (valid_vector_subparts_p): New function.
21088 (build_vector_type): Remove temporary shim and take the number
21089 of units as a poly_uint64 rather than an int.
21090 (build_opaque_vector_type): Take the number of units as a
21091 poly_uint64 rather than an int.
21092 * tree.c (build_vector_from_ctor): Handle polynomial
21093 TYPE_VECTOR_SUBPARTS.
21094 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21095 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21096 (build_vector_from_val): If the number of units is variable,
21097 use build_vec_duplicate_cst for constant operands and
21098 VEC_DUPLICATE_EXPR otherwise.
21099 (make_vector_type): Remove temporary is_constant ().
21100 (build_vector_type, build_opaque_vector_type): Take the number of
21101 units as a poly_uint64 rather than an int.
21102 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21104 * cfgexpand.c (expand_debug_expr): Likewise.
21105 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21106 (store_constructor, expand_expr_real_1): Likewise.
21107 (const_scalar_mask_from_tree): Likewise.
21108 * fold-const-call.c (fold_const_reduction): Likewise.
21109 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21110 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21111 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21112 (fold_relational_const): Likewise.
21113 (native_interpret_vector): Likewise. Change the size from an
21114 int to an unsigned int.
21115 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21116 TYPE_VECTOR_SUBPARTS.
21117 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21118 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21119 duplicating a non-constant operand into a variable-length vector.
21120 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21121 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21122 * ipa-icf.c (sem_variable::equals): Likewise.
21123 * match.pd: Likewise.
21124 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21125 * print-tree.c (print_node): Likewise.
21126 * stor-layout.c (layout_type): Likewise.
21127 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21128 * tree-cfg.c (verify_gimple_comparison): Likewise.
21129 (verify_gimple_assign_binary): Likewise.
21130 (verify_gimple_assign_ternary): Likewise.
21131 (verify_gimple_assign_single): Likewise.
21132 * tree-pretty-print.c (dump_generic_node): Likewise.
21133 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21134 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21135 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21136 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21137 (vect_shift_permute_load_chain): Likewise.
21138 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21139 (expand_vector_condition, optimize_vector_constructor): Likewise.
21140 (lower_vec_perm, get_compute_type): Likewise.
21141 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21142 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21143 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21144 (vect_recog_mask_conversion_pattern): Likewise.
21145 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21146 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21147 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21148 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21149 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21150 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21151 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21152 (supportable_widening_operation): Likewise.
21153 (supportable_narrowing_operation): Likewise.
21154 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21156 * varasm.c (output_constant): Likewise.
21158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21159 Alan Hayward <alan.hayward@arm.com>
21160 David Sherwood <david.sherwood@arm.com>
21162 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21163 so that both the length == 3 and length != 3 cases set up their
21164 own permute vectors. Add comments explaining why we know the
21165 number of elements is constant.
21166 (vect_permute_load_chain): Likewise.
21168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21169 Alan Hayward <alan.hayward@arm.com>
21170 David Sherwood <david.sherwood@arm.com>
21172 * machmode.h (mode_nunits): Change from unsigned char to
21174 (ONLY_FIXED_SIZE_MODES): New macro.
21175 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21176 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21177 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21179 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21180 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21181 or if measurement_type is not polynomial.
21182 * genmodes.c (ZERO_COEFFS): New macro.
21183 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21185 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21186 Use ZERO_COEFFS when emitting initializers.
21187 * data-streamer.h (bp_pack_poly_value): New function.
21188 (bp_unpack_poly_value): Likewise.
21189 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21190 for GET_MODE_NUNITS.
21191 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21192 for GET_MODE_NUNITS.
21193 * tree.c (make_vector_type): Remove temporary shim and make
21194 the real function take the number of units as a poly_uint64
21195 rather than an int.
21196 (build_vector_type_for_mode): Handle polynomial nunits.
21197 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21198 * emit-rtl.c (const_vec_series_p_1): Likewise.
21199 (gen_rtx_CONST_VECTOR): Likewise.
21200 * fold-const.c (test_vec_duplicate_folding): Likewise.
21201 * genrecog.c (validate_pattern): Likewise.
21202 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21203 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21204 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21205 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21206 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21207 * rtlanal.c (subreg_get_info): Likewise.
21208 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21209 (vect_grouped_load_supported): Likewise.
21210 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21211 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21212 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21213 (simplify_const_unary_operation, simplify_binary_operation_1)
21214 (simplify_const_binary_operation, simplify_ternary_operation)
21215 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21216 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21217 instead of CONST_VECTOR_NUNITS.
21218 * varasm.c (output_constant_pool_2): Likewise.
21219 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21220 explicit-encoded elements in the XVEC for variable-length vectors.
21222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21224 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21227 Alan Hayward <alan.hayward@arm.com>
21228 David Sherwood <david.sherwood@arm.com>
21230 * coretypes.h (fixed_size_mode): Declare.
21231 (fixed_size_mode_pod): New typedef.
21232 * builtins.h (target_builtins::x_apply_args_mode)
21233 (target_builtins::x_apply_result_mode): Change type to
21234 fixed_size_mode_pod.
21235 * builtins.c (apply_args_size, apply_result_size, result_vector)
21236 (expand_builtin_apply_args_1, expand_builtin_apply)
21237 (expand_builtin_return): Update accordingly.
21239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21241 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21242 * cselib.c (cselib_hash_rtx): Likewise.
21243 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21244 CONST_VECTOR encoding.
21246 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21247 Jeff Law <law@redhat.com>
21250 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21251 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21252 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21253 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21256 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21257 explicitly probe *sp in a noreturn function if there were any callee
21258 register saves or frame pointer is needed.
21260 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21263 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21264 BLKmode for ternary, binary or unary expressions.
21267 * var-tracking.c (delete_vta_debug_insn): New inline function.
21268 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21269 insns from get_insns () to NULL instead of each bb separately.
21270 Use delete_vta_debug_insn. No longer static.
21271 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21272 delete_vta_debug_insns callers.
21273 * rtl.h (delete_vta_debug_insns): Declare.
21274 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21275 instead of variable_tracking_main.
21277 2018-01-03 Martin Sebor <msebor@redhat.com>
21279 PR tree-optimization/83603
21280 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21281 arguments past the endof the argument list in functions declared
21282 without a prototype.
21283 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21284 Avoid checking when arguments are null.
21286 2018-01-03 Martin Sebor <msebor@redhat.com>
21289 * doc/extend.texi (attribute const): Fix a typo.
21290 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21291 issuing -Wsuggest-attribute for void functions.
21293 2018-01-03 Martin Sebor <msebor@redhat.com>
21295 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21296 offset_int::from instead of wide_int::to_shwi.
21297 (maybe_diag_overlap): Remove assertion.
21298 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21299 * gimple-ssa-sprintf.c (format_directive): Same.
21300 (parse_directive): Same.
21301 (sprintf_dom_walker::compute_format_length): Same.
21302 (try_substitute_return_value): Same.
21304 2018-01-03 Jeff Law <law@redhat.com>
21306 PR middle-end/83654
21307 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21308 non-constant residual for zero at runtime and avoid probing in
21309 that case. Reorganize code for trailing problem to mirror handling
21312 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21314 PR tree-optimization/83501
21315 * tree-ssa-strlen.c (get_string_cst): New.
21316 (handle_char_store): Call get_string_cst.
21318 2018-01-03 Martin Liska <mliska@suse.cz>
21320 PR tree-optimization/83593
21321 * tree-ssa-strlen.c: Include tree-cfg.h.
21322 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21323 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21324 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21326 (strlen_dom_walker::before_dom_children): Call
21327 gimple_purge_dead_eh_edges. Dump tranformation with details
21329 (strlen_dom_walker::before_dom_children): Update call by adding
21330 new argument cleanup_eh.
21331 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21333 2018-01-03 Martin Liska <mliska@suse.cz>
21336 * cif-code.def (VARIADIC_THUNK): New enum value.
21337 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21340 2018-01-03 Jan Beulich <jbeulich@suse.com>
21342 * sse.md (mov<mode>_internal): Tighten condition for when to use
21343 vmovdqu<ssescalarsize> for TI and OI modes.
21345 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21347 Update copyright years.
21349 2018-01-03 Martin Liska <mliska@suse.cz>
21352 * ipa-visibility.c (function_and_variable_visibility): Skip
21353 functions with noipa attribure.
21355 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21357 * gcc.c (process_command): Update copyright notice dates.
21358 * gcov-dump.c (print_version): Ditto.
21359 * gcov.c (print_version): Ditto.
21360 * gcov-tool.c (print_version): Ditto.
21361 * gengtype.c (create_file): Ditto.
21362 * doc/cpp.texi: Bump @copying's copyright year.
21363 * doc/cppinternals.texi: Ditto.
21364 * doc/gcc.texi: Ditto.
21365 * doc/gccint.texi: Ditto.
21366 * doc/gcov.texi: Ditto.
21367 * doc/install.texi: Ditto.
21368 * doc/invoke.texi: Ditto.
21370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21372 * vector-builder.h (vector_builder::m_full_nelts): Change from
21373 unsigned int to poly_uint64.
21374 (vector_builder::full_nelts): Update prototype accordingly.
21375 (vector_builder::new_vector): Likewise.
21376 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21377 (vector_builder::operator ==): Likewise.
21378 (vector_builder::finalize): Likewise.
21379 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21380 Take the number of elements as a poly_uint64 rather than an
21382 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21383 from unsigned int to poly_uint64.
21384 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21385 (vec_perm_indices::new_vector): Likewise.
21386 (vec_perm_indices::length): Likewise.
21387 (vec_perm_indices::nelts_per_input): Likewise.
21388 (vec_perm_indices::input_nelts): Likewise.
21389 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21390 number of elements per input as a poly_uint64 rather than an
21391 unsigned int. Use the original encoding for variable-length
21392 vectors, rather than clamping each individual element.
21393 For the second and subsequent elements in each pattern,
21394 clamp the step and base before clamping their sum.
21395 (vec_perm_indices::series_p): Handle polynomial element counts.
21396 (vec_perm_indices::all_in_range_p): Likewise.
21397 (vec_perm_indices_to_tree): Likewise.
21398 (vec_perm_indices_to_rtx): Likewise.
21399 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21400 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21401 (tree_vector_builder::new_binary_operation): Handle polynomial
21402 element counts. Return false if we need to know the number
21403 of elements at compile time.
21404 * fold-const.c (fold_vec_perm): Punt if the number of elements
21405 isn't known at compile time.
21407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21409 * vec-perm-indices.h (vec_perm_builder): Change element type
21410 from HOST_WIDE_INT to poly_int64.
21411 (vec_perm_indices::element_type): Update accordingly.
21412 (vec_perm_indices::clamp): Handle polynomial element_types.
21413 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21414 (vec_perm_indices::all_in_range_p): Likewise.
21415 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21417 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21418 polynomial vec_perm_indices element types.
21419 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21420 * fold-const.c (fold_vec_perm): Likewise.
21421 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21422 * tree-vect-generic.c (lower_vec_perm): Likewise.
21423 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21424 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21425 element type to HOST_WIDE_INT.
21427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21428 Alan Hayward <alan.hayward@arm.com>
21429 David Sherwood <david.sherwood@arm.com>
21431 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21432 rather than an int. Use plus_constant.
21433 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21434 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21437 Alan Hayward <alan.hayward@arm.com>
21438 David Sherwood <david.sherwood@arm.com>
21440 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21441 a HOST_WIDE_INT to a poly_int64.
21443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21444 Alan Hayward <alan.hayward@arm.com>
21445 David Sherwood <david.sherwood@arm.com>
21447 * calls.c (load_register_parameters): Cope with polynomial
21448 mode sizes. Require a constant size for BLKmode parameters
21449 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21450 forces a parameter to be padded at the lsb end in order to
21451 fill a complete number of words, require the parameter size
21452 to be ordered wrt UNITS_PER_WORD.
21454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21455 Alan Hayward <alan.hayward@arm.com>
21456 David Sherwood <david.sherwood@arm.com>
21458 * reload1.c (spill_stack_slot_width): Change element type
21459 from unsigned int to poly_uint64_pod.
21460 (alter_reg): Treat mode sizes as polynomial.
21462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21463 Alan Hayward <alan.hayward@arm.com>
21464 David Sherwood <david.sherwood@arm.com>
21466 * reload.c (complex_word_subreg_p): New function.
21467 (reload_inner_reg_of_subreg, push_reload): Use it.
21469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21470 Alan Hayward <alan.hayward@arm.com>
21471 David Sherwood <david.sherwood@arm.com>
21473 * lra-constraints.c (process_alt_operands): Reject matched
21474 operands whose sizes aren't ordered.
21475 (match_reload): Refer to this check here.
21477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21478 Alan Hayward <alan.hayward@arm.com>
21479 David Sherwood <david.sherwood@arm.com>
21481 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21482 that the mode size is in the set {1, 2, 4, 8, 16}.
21484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21485 Alan Hayward <alan.hayward@arm.com>
21486 David Sherwood <david.sherwood@arm.com>
21488 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21489 Use plus_constant instead of gen_rtx_PLUS.
21491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21492 Alan Hayward <alan.hayward@arm.com>
21493 David Sherwood <david.sherwood@arm.com>
21495 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21496 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21497 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21498 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21499 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21500 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21501 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21502 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21503 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21504 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21506 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21507 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21508 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21509 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21510 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21511 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21512 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21513 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21514 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21515 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21517 * expr.c (emit_move_resolve_push): Treat the input and result
21518 of PUSH_ROUNDING as a poly_int64.
21519 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21520 (emit_push_insn): Likewise.
21521 * lra-eliminations.c (mark_not_eliminable): Likewise.
21522 * recog.c (push_operand): Likewise.
21523 * reload1.c (elimination_effects): Likewise.
21524 * rtlanal.c (nonzero_bits1): Likewise.
21525 * calls.c (store_one_arg): Likewise. Require the padding to be
21526 known at compile time.
21528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21529 Alan Hayward <alan.hayward@arm.com>
21530 David Sherwood <david.sherwood@arm.com>
21532 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21533 Use plus_constant instead of gen_rtx_PLUS.
21535 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21536 Alan Hayward <alan.hayward@arm.com>
21537 David Sherwood <david.sherwood@arm.com>
21539 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21540 rather than an int.
21542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21543 Alan Hayward <alan.hayward@arm.com>
21544 David Sherwood <david.sherwood@arm.com>
21546 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21547 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21548 via stack temporaries. Treat the mode size as polynomial too.
21550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21551 Alan Hayward <alan.hayward@arm.com>
21552 David Sherwood <david.sherwood@arm.com>
21554 * expr.c (expand_expr_real_2): When handling conversions involving
21555 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21556 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21557 as a poly_uint64 too.
21559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21560 Alan Hayward <alan.hayward@arm.com>
21561 David Sherwood <david.sherwood@arm.com>
21563 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21566 Alan Hayward <alan.hayward@arm.com>
21567 David Sherwood <david.sherwood@arm.com>
21569 * combine.c (can_change_dest_mode): Handle polynomial
21570 REGMODE_NATURAL_SIZE.
21571 * expmed.c (store_bit_field_1): Likewise.
21572 * expr.c (store_constructor): Likewise.
21573 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21574 and polynomial REGMODE_NATURAL_SIZE.
21575 (gen_lowpart_common): Likewise.
21576 * reginfo.c (record_subregs_of_mode): Likewise.
21577 * rtlanal.c (read_modify_subreg_p): Likewise.
21579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21580 Alan Hayward <alan.hayward@arm.com>
21581 David Sherwood <david.sherwood@arm.com>
21583 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21584 numbers of elements.
21586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21587 Alan Hayward <alan.hayward@arm.com>
21588 David Sherwood <david.sherwood@arm.com>
21590 * match.pd: Cope with polynomial numbers of vector elements.
21592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21593 Alan Hayward <alan.hayward@arm.com>
21594 David Sherwood <david.sherwood@arm.com>
21596 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21597 in a POINTER_PLUS_EXPR.
21599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21600 Alan Hayward <alan.hayward@arm.com>
21601 David Sherwood <david.sherwood@arm.com>
21603 * omp-simd-clone.c (simd_clone_subparts): New function.
21604 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21605 (ipa_simd_modify_function_body): Likewise.
21607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21608 Alan Hayward <alan.hayward@arm.com>
21609 David Sherwood <david.sherwood@arm.com>
21611 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21612 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21613 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21614 (expand_vector_condition, vector_element): Likewise.
21615 (subparts_gt): New function.
21616 (get_compute_type): Use subparts_gt.
21617 (count_type_subparts): Delete.
21618 (expand_vector_operations_1): Use subparts_gt instead of
21619 count_type_subparts.
21621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21622 Alan Hayward <alan.hayward@arm.com>
21623 David Sherwood <david.sherwood@arm.com>
21625 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21626 (vect_compile_time_alias): ...this new function. Do the calculation
21627 on poly_ints rather than trees.
21628 (vect_prune_runtime_alias_test_list): Update call accordingly.
21630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21631 Alan Hayward <alan.hayward@arm.com>
21632 David Sherwood <david.sherwood@arm.com>
21634 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21636 (vect_schedule_slp_instance): Likewise.
21638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21639 Alan Hayward <alan.hayward@arm.com>
21640 David Sherwood <david.sherwood@arm.com>
21642 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21643 constant and extern definitions for variable-length vectors.
21644 (vect_get_constant_vectors): Note that the number of units
21645 is known to be constant.
21647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21648 Alan Hayward <alan.hayward@arm.com>
21649 David Sherwood <david.sherwood@arm.com>
21651 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21652 of units as polynomial. Choose between WIDE and NARROW based
21655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21656 Alan Hayward <alan.hayward@arm.com>
21657 David Sherwood <david.sherwood@arm.com>
21659 * tree-vect-stmts.c (simd_clone_subparts): New function.
21660 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21663 Alan Hayward <alan.hayward@arm.com>
21664 David Sherwood <david.sherwood@arm.com>
21666 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21667 vectors as polynomial. Use build_index_vector for
21668 IFN_GOMP_SIMD_LANE.
21670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21671 Alan Hayward <alan.hayward@arm.com>
21672 David Sherwood <david.sherwood@arm.com>
21674 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21675 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21676 for variable-length vectors.
21677 (vectorizable_mask_load_store): Treat the number of units as
21678 polynomial, asserting that it is constant if the condition has
21679 already been enforced.
21680 (vectorizable_store, vectorizable_load): Likewise.
21682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21683 Alan Hayward <alan.hayward@arm.com>
21684 David Sherwood <david.sherwood@arm.com>
21686 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21687 of units as polynomial. Punt if we can't tell at compile time
21688 which vector contains the final result.
21690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21691 Alan Hayward <alan.hayward@arm.com>
21692 David Sherwood <david.sherwood@arm.com>
21694 * tree-vect-loop.c (vectorizable_induction): Treat the number
21695 of units as polynomial. Punt on SLP inductions. Use an integer
21696 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21697 cast of such a series for variable-length floating-point
21700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21701 Alan Hayward <alan.hayward@arm.com>
21702 David Sherwood <david.sherwood@arm.com>
21704 * tree.h (build_index_vector): Declare.
21705 * tree.c (build_index_vector): New function.
21706 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21707 of units as polynomial, forcibly converting it to a constant if
21708 vectorizable_reduction has already enforced the condition.
21709 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21710 to create a {1,2,3,...} vector.
21711 (vectorizable_reduction): Treat the number of units as polynomial.
21712 Choose vectype_in based on the largest scalar element size rather
21713 than the smallest number of units. Enforce the restrictions
21716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21717 Alan Hayward <alan.hayward@arm.com>
21718 David Sherwood <david.sherwood@arm.com>
21720 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21721 number of units as polynomial.
21723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21724 Alan Hayward <alan.hayward@arm.com>
21725 David Sherwood <david.sherwood@arm.com>
21727 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21728 * target.def (autovectorize_vector_sizes): Return the vector sizes
21729 by pointer, using vector_sizes rather than a bitmask.
21730 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21731 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21732 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21734 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21735 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21736 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21737 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21738 * omp-general.c (omp_max_vf): Likewise.
21739 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21740 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21741 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21742 * tree-vect-slp.c (vect_slp_bb): Likewise.
21743 * doc/tm.texi: Regenerate.
21744 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21746 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21747 the vector size as a poly_uint64 rather than an unsigned int.
21748 (current_vector_size): Change from an unsigned int to a poly_uint64.
21749 (get_vectype_for_scalar_type): Update accordingly.
21750 * tree.h (build_truth_vector_type): Take the size and number of
21751 units as a poly_uint64 rather than an unsigned int.
21752 (build_vector_type): Add a temporary overload that takes
21753 the number of units as a poly_uint64 rather than an unsigned int.
21754 * tree.c (make_vector_type): Likewise.
21755 (build_truth_vector_type): Take the number of units as a poly_uint64
21756 rather than an unsigned int.
21758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21759 Alan Hayward <alan.hayward@arm.com>
21760 David Sherwood <david.sherwood@arm.com>
21762 * target.def (get_mask_mode): Take the number of units and length
21763 as poly_uint64s rather than unsigned ints.
21764 * targhooks.h (default_get_mask_mode): Update accordingly.
21765 * targhooks.c (default_get_mask_mode): Likewise.
21766 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21767 * doc/tm.texi: Regenerate.
21769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21770 Alan Hayward <alan.hayward@arm.com>
21771 David Sherwood <david.sherwood@arm.com>
21773 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21774 * omp-general.c (omp_max_vf): Likewise.
21775 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21776 (expand_omp_simd): Handle polynomial safelen.
21777 * omp-low.c (omplow_simd_context): Add a default constructor.
21778 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21779 (lower_rec_simd_input_clauses): Update accordingly.
21780 (lower_rec_input_clauses): Likewise.
21782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21783 Alan Hayward <alan.hayward@arm.com>
21784 David Sherwood <david.sherwood@arm.com>
21786 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21787 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21788 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21789 (vect_analyze_slp_cost): Likewise.
21790 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21791 (vect_model_load_cost): Likewise.
21793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21794 Alan Hayward <alan.hayward@arm.com>
21795 David Sherwood <david.sherwood@arm.com>
21797 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21798 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21799 from an unsigned int * to a poly_uint64_pod *.
21800 (calculate_unrolling_factor): New function.
21801 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21804 Alan Hayward <alan.hayward@arm.com>
21805 David Sherwood <david.sherwood@arm.com>
21807 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21808 from an unsigned int to a poly_uint64.
21809 (_loop_vec_info::slp_unrolling_factor): Likewise.
21810 (_loop_vec_info::vectorization_factor): Change from an int
21812 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21813 (vect_get_num_vectors): New function.
21814 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21815 (vect_get_num_copies): Use vect_get_num_vectors.
21816 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21817 to an unsigned int *.
21818 (vect_analyze_data_refs): Change min_vf from an int * to a
21820 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21821 than an unsigned HOST_WIDE_INT.
21822 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21823 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21824 to an unsigned int *.
21825 (vect_analyze_data_ref_dependences): Likewise.
21826 (vect_compute_data_ref_alignment): Handle polynomial vf.
21827 (vect_enhance_data_refs_alignment): Likewise.
21828 (vect_prune_runtime_alias_test_list): Likewise.
21829 (vect_shift_permute_load_chain): Likewise.
21830 (vect_supportable_dr_alignment): Likewise.
21831 (dependence_distance_ge_vf): Take the vectorization factor as a
21832 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21833 (vect_analyze_data_refs): Change min_vf from an int * to a
21835 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21836 vfm1 as a poly_uint64 rather than an int. Make the same change
21837 for the returned bound_scalar.
21838 (vect_gen_vector_loop_niters): Handle polynomial vf.
21839 (vect_do_peeling): Likewise. Update call to
21840 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21841 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21843 * tree-vect-loop.c (vect_determine_vectorization_factor)
21844 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21845 (vect_get_known_peeling_cost): Likewise.
21846 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21847 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21848 (vect_transform_loop): Likewise. Use the lowest possible VF when
21849 updating the upper bounds of the loop.
21850 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21851 rather than an int.
21852 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21853 polynomial unroll factors.
21854 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21855 (vect_make_slp_decision): Likewise.
21856 (vect_supported_load_permutation_p): Likewise, and polynomial
21858 (vect_analyze_slp_cost): Handle polynomial vf.
21859 (vect_slp_analyze_node_operations): Likewise.
21860 (vect_slp_analyze_bb_1): Likewise.
21861 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21862 than an unsigned HOST_WIDE_INT.
21863 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21864 (vectorizable_load): Handle polynomial vf.
21865 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21867 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21870 Alan Hayward <alan.hayward@arm.com>
21871 David Sherwood <david.sherwood@arm.com>
21873 * match.pd: Handle bit operations involving three constants
21874 and try to fold one pair.
21876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21878 * tree-vect-loop-manip.c: Include gimple-fold.h.
21879 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21880 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21881 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21882 Add a path that uses a step of VF instead of 1, but disable it
21884 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21885 and niters_no_overflow parameters. Update calls to
21886 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21887 Create a new SSA name if the latter choses to use a ste other
21888 than zero, and return it via niters_vector_mult_vf_var.
21889 * tree-vect-loop.c (vect_transform_loop): Update calls to
21890 vect_do_peeling, vect_gen_vector_loop_niters and
21891 slpeel_make_loop_iterate_ntimes.
21892 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21893 (vect_gen_vector_loop_niters): Update declarations after above changes.
21895 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21897 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21898 128-bit round to integer instructions.
21899 (ceil<mode>2): Likewise.
21900 (btrunc<mode>2): Likewise.
21901 (round<mode>2): Likewise.
21903 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21905 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21906 unaligned VSX load/store on P8/P9.
21907 (expand_block_clear): Allow the use of unaligned VSX
21908 load/store on P8/P9.
21910 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21912 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21914 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21915 swap associated with both a load and a store.
21917 2018-01-02 Andrew Waterman <andrew@sifive.com>
21919 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21920 * config/riscv/riscv.md (clear_cache): Use it.
21922 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21924 * web.c: Remove out-of-date comment.
21926 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21928 * expr.c (fixup_args_size_notes): Check that any existing
21929 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21930 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21931 (emit_single_push_insn): ...here.
21933 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21935 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21936 (const_vector_encoded_nelts): New function.
21937 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21938 (const_vector_int_elt, const_vector_elt): Declare.
21939 * emit-rtl.c (const_vector_int_elt_1): New function.
21940 (const_vector_elt): Likewise.
21941 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21942 of CONST_VECTOR_ELT.
21944 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21946 * expr.c: Include rtx-vector-builder.h.
21947 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21948 directly on the tree encoding.
21949 (const_vector_from_tree): Likewise.
21950 * optabs.c: Include rtx-vector-builder.h.
21951 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21952 sequence of "u" values.
21953 * vec-perm-indices.c: Include rtx-vector-builder.h.
21954 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21955 directly on the vec_perm_indices encoding.
21957 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21959 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21960 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21961 * rtx-vector-builder.h: New file.
21962 * rtx-vector-builder.c: Likewise.
21963 * rtl.h (rtx_def::u2): Add a const_vector field.
21964 (CONST_VECTOR_NPATTERNS): New macro.
21965 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21966 (CONST_VECTOR_DUPLICATE_P): Likewise.
21967 (CONST_VECTOR_STEPPED_P): Likewise.
21968 (CONST_VECTOR_ENCODED_ELT): Likewise.
21969 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21970 (unwrap_const_vec_duplicate): Likewise.
21971 (const_vec_series_p): Check for a non-duplicated vector encoding.
21972 Say that the function only returns true for integer vectors.
21973 * emit-rtl.c: Include rtx-vector-builder.h.
21974 (gen_const_vec_duplicate_1): Delete.
21975 (gen_const_vector): Call gen_const_vec_duplicate instead of
21976 gen_const_vec_duplicate_1.
21977 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21978 (gen_const_vec_duplicate): Use rtx_vector_builder.
21979 (gen_const_vec_series): Likewise.
21980 (gen_rtx_CONST_VECTOR): Likewise.
21981 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21982 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21983 Build a new vector rather than modifying a CONST_VECTOR in-place.
21984 (handle_special_swappables): Update call accordingly.
21985 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21986 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21987 Build a new vector rather than modifying a CONST_VECTOR in-place.
21988 (handle_special_swappables): Update call accordingly.
21990 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21992 * simplify-rtx.c (simplify_const_binary_operation): Use
21993 CONST_VECTOR_ELT instead of XVECEXP.
21995 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21997 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21998 the selector elements to be different from the data elements
21999 if the selector is a VECTOR_CST.
22000 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22001 ssizetype for the selector.
22003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22005 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22006 before testing each element individually.
22007 * tree-vect-generic.c (lower_vec_perm): Likewise.
22009 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22011 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22012 * selftest-run-tests.c (selftest::run_tests): Call it.
22013 * vector-builder.h (vector_builder::operator ==): New function.
22014 (vector_builder::operator !=): Likewise.
22015 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22016 (vec_perm_indices::all_from_input_p): New function.
22017 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22018 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22019 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22020 instead of reading the VECTOR_CST directly. Detect whether both
22021 vector inputs are the same before constructing the vec_perm_indices,
22022 and update the number of inputs argument accordingly. Use the
22023 utility functions added above. Only construct sel2 if we need to.
22025 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22027 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22028 the broadcast of the low byte.
22029 (expand_mult_highpart): Use an explicit encoding for the permutes.
22030 * optabs-query.c (can_mult_highpart_p): Likewise.
22031 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22032 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22033 (vectorizable_bswap): Likewise.
22034 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22035 explicit encoding for the power-of-2 permutes.
22036 (vect_permute_store_chain): Likewise.
22037 (vect_grouped_load_supported): Likewise.
22038 (vect_permute_load_chain): Likewise.
22040 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22042 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22043 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22044 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22045 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22046 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22047 (vect_gen_perm_mask_any): Likewise.
22049 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22051 * int-vector-builder.h: New file.
22052 * vec-perm-indices.h: Include int-vector-builder.h.
22053 (vec_perm_indices): Redefine as an int_vector_builder.
22054 (auto_vec_perm_indices): Delete.
22055 (vec_perm_builder): Redefine as a stand-alone class.
22056 (vec_perm_indices::vec_perm_indices): New function.
22057 (vec_perm_indices::clamp): Likewise.
22058 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22059 (vec_perm_indices::new_vector): New function.
22060 (vec_perm_indices::new_expanded_vector): Update for new
22061 vec_perm_indices class.
22062 (vec_perm_indices::rotate_inputs): New function.
22063 (vec_perm_indices::all_in_range_p): Operate directly on the
22064 encoded form, without computing elided elements.
22065 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22066 encoding. Update for new vec_perm_indices class.
22067 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22068 the given vec_perm_builder.
22069 (expand_vec_perm_var): Update vec_perm_builder constructor.
22070 (expand_mult_highpart): Use vec_perm_builder instead of
22071 auto_vec_perm_indices.
22072 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22073 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22074 or double series encoding as appropriate.
22075 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22076 vec_perm_indices instead of auto_vec_perm_indices.
22077 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22078 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22079 (vect_permute_store_chain): Likewise.
22080 (vect_grouped_load_supported): Likewise.
22081 (vect_permute_load_chain): Likewise.
22082 (vect_shift_permute_load_chain): Likewise.
22083 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22084 (vect_transform_slp_perm_load): Likewise.
22085 (vect_schedule_slp_instance): Likewise.
22086 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22087 (vectorizable_mask_load_store): Likewise.
22088 (vectorizable_bswap): Likewise.
22089 (vectorizable_store): Likewise.
22090 (vectorizable_load): Likewise.
22091 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22092 vec_perm_indices instead of auto_vec_perm_indices. Use
22093 tree_to_vec_perm_builder to read the vector from a tree.
22094 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22095 vec_perm_builder instead of a vec_perm_indices.
22096 (have_whole_vector_shift): Use vec_perm_builder and
22097 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22098 truncation to calc_vec_perm_mask_for_shift.
22099 (vect_create_epilog_for_reduction): Likewise.
22100 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22101 from auto_vec_perm_indices to vec_perm_indices.
22102 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22103 instead of changing individual elements.
22104 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22105 the vector in d.perm.
22106 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22107 from auto_vec_perm_indices to vec_perm_indices.
22108 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22109 instead of changing individual elements.
22110 (arm_vectorize_vec_perm_const): Use new_vector to install
22111 the vector in d.perm.
22112 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22113 Update vec_perm_builder constructor.
22114 (rs6000_expand_interleave): Likewise.
22115 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22116 (rs6000_expand_interleave): Likewise.
22118 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22120 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22121 to qimode could truncate the indices.
22122 * optabs.c (expand_vec_perm_var): Likewise.
22124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22126 * Makefile.in (OBJS): Add vec-perm-indices.o.
22127 * vec-perm-indices.h: New file.
22128 * vec-perm-indices.c: Likewise.
22129 * target.h (vec_perm_indices): Replace with a forward class
22131 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22132 * optabs.h: Include vec-perm-indices.h.
22133 (expand_vec_perm): Delete.
22134 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22135 (expand_vec_perm_const): Declare.
22136 * target.def (vec_perm_const_ok): Replace with...
22137 (vec_perm_const): ...this new hook.
22138 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22139 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22140 * doc/tm.texi: Regenerate.
22141 * optabs.def (vec_perm_const): Delete.
22142 * doc/md.texi (vec_perm_const): Likewise.
22143 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22144 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22145 expand_vec_perm for constant permutation vectors. Assert that
22146 the mode of variable permutation vectors is the integer equivalent
22147 of the mode that is being permuted.
22148 * optabs-query.h (selector_fits_mode_p): Declare.
22149 * optabs-query.c: Include vec-perm-indices.h.
22150 (selector_fits_mode_p): New function.
22151 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22152 is defined, instead of checking whether the vec_perm_const_optab
22153 exists. Use targetm.vectorize.vec_perm_const instead of
22154 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22155 fit in the vector mode before using a variable permute.
22156 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22157 vec_perm_indices instead of an rtx.
22158 (expand_vec_perm): Replace with...
22159 (expand_vec_perm_const): ...this new function. Take the selector
22160 as a vec_perm_indices rather than an rtx. Also take the mode of
22161 the selector. Update call to shift_amt_for_vec_perm_mask.
22162 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22163 Use vec_perm_indices::new_expanded_vector to expand the original
22164 selector into bytes. Check whether the indices fit in the vector
22165 mode before using a variable permute.
22166 (expand_vec_perm_var): Make global.
22167 (expand_mult_highpart): Use expand_vec_perm_const.
22168 * fold-const.c: Includes vec-perm-indices.h.
22169 * tree-ssa-forwprop.c: Likewise.
22170 * tree-vect-data-refs.c: Likewise.
22171 * tree-vect-generic.c: Likewise.
22172 * tree-vect-loop.c: Likewise.
22173 * tree-vect-slp.c: Likewise.
22174 * tree-vect-stmts.c: Likewise.
22175 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22177 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22178 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22179 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22180 (aarch64_vectorize_vec_perm_const): ...this new function.
22181 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22182 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22183 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22184 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22185 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22186 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22187 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22189 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22190 check for NEON modes.
22191 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22192 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22193 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22194 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22196 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22197 the old VEC_PERM_CONST conditions.
22198 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22199 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22200 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22201 (ia64_vectorize_vec_perm_const_ok): Merge into...
22202 (ia64_vectorize_vec_perm_const): ...this new function.
22203 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22204 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22205 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22206 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22207 * config/mips/mips.c (mips_expand_vec_perm_const)
22208 (mips_vectorize_vec_perm_const_ok): Merge into...
22209 (mips_vectorize_vec_perm_const): ...this new function.
22210 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22211 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22212 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22213 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22214 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22215 (rs6000_expand_vec_perm_const): Delete.
22216 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22218 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22219 (altivec_expand_vec_perm_const_le): Take each operand individually.
22220 Operate on constant selectors rather than rtxes.
22221 (altivec_expand_vec_perm_const): Likewise. Update call to
22222 altivec_expand_vec_perm_const_le.
22223 (rs6000_expand_vec_perm_const): Delete.
22224 (rs6000_vectorize_vec_perm_const_ok): Delete.
22225 (rs6000_vectorize_vec_perm_const): New function.
22226 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22227 an element count and rtx array.
22228 (rs6000_expand_extract_even): Update call accordingly.
22229 (rs6000_expand_interleave): Likewise.
22230 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22231 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22232 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22233 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22234 (rs6000_expand_vec_perm_const): Delete.
22235 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22236 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22237 (altivec_expand_vec_perm_const_le): Take each operand individually.
22238 Operate on constant selectors rather than rtxes.
22239 (altivec_expand_vec_perm_const): Likewise. Update call to
22240 altivec_expand_vec_perm_const_le.
22241 (rs6000_expand_vec_perm_const): Delete.
22242 (rs6000_vectorize_vec_perm_const_ok): Delete.
22243 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22244 reference to the SPE evmerge intructions.
22245 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22246 an element count and rtx array.
22247 (rs6000_expand_extract_even): Update call accordingly.
22248 (rs6000_expand_interleave): Likewise.
22249 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22250 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22252 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22254 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22256 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22257 vector mode and that that mode matches the mode of the data
22259 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22260 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22261 directly using expand_vec_perm_1 when forcing selectors into
22263 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22265 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22267 * optabs-query.h (can_vec_perm_p): Delete.
22268 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22269 * optabs-query.c (can_vec_perm_p): Split into...
22270 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22271 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22272 particular selector is valid.
22273 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22274 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22275 (vect_grouped_load_supported): Likewise.
22276 (vect_shift_permute_load_chain): Likewise.
22277 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22278 (vect_transform_slp_perm_load): Likewise.
22279 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22280 (vectorizable_bswap): Likewise.
22281 (vect_gen_perm_mask_checked): Likewise.
22282 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22283 implementations of variable permutation vectors into account
22284 when deciding which selector to use.
22285 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22286 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22287 with a false third argument.
22288 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22289 to test whether the constant selector is valid and can_vec_perm_var_p
22290 to test whether a variable selector is valid.
22292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22294 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22295 * optabs-query.c (can_vec_perm_p): Likewise.
22296 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22297 instead of vec_perm_indices.
22298 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22299 (vect_gen_perm_mask_checked): Likewise,
22300 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22301 (vect_gen_perm_mask_checked): Likewise,
22303 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22305 * optabs-query.h (qimode_for_vec_perm): Declare.
22306 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22307 (qimode_for_vec_perm): ...this new function.
22308 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22310 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22312 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22313 does not have a conditional at the top.
22315 2018-01-02 Richard Biener <rguenther@suse.de>
22317 * ipa-inline.c (big_speedup_p): Fix expression.
22319 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22322 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22325 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22329 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22330 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22331 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22332 cond_taken_branch_cost 3->4.
22334 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22336 PR tree-optimization/83581
22337 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22338 TODO_cleanup_cfg if any changes have been made.
22340 PR middle-end/83608
22341 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22342 convert_modes if target mode has the right side, but different mode
22345 PR middle-end/83609
22346 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22347 last argument when extracting from CONCAT. If either from_real or
22348 from_imag is NULL, use expansion through memory. If result is not
22349 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22350 the parts directly to inner mode, if even that fails, use expansion
22353 PR middle-end/83623
22354 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22355 check for bswap in mode rather than HImode and use that in expand_unop
22358 Copyright (C) 2018 Free Software Foundation, Inc.
22360 Copying and distribution of this file, with or without modification,
22361 are permitted in any medium without royalty provided the copyright
22362 notice and this notice are preserved.