1 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4 Allow HFmode constants if TARGET_FP_F16INST.
6 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10 No longer check last store for clobber of address register.
12 2018-08-02 Martin Liska <mliska@suse.cz>
15 * gcov.c (process_all_functions): New function.
17 (process_file): Move functions processing to
18 process_all_functions.
20 2018-08-02 Thomas Preud'homme <thomas.preudhomme@linaro.org>
23 * target-insns.def (stack_protect_combined_set): Define new standard
25 (stack_protect_combined_test): Likewise.
26 * cfgexpand.c (stack_protect_prologue): Try new
27 stack_protect_combined_set pattern first.
28 * function.c (stack_protect_epilogue): Try new
29 stack_protect_combined_test pattern first.
30 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
31 parameters to control which register to use as PIC register and force
32 reloading PIC register respectively. Insert in the stream of insns if
34 (legitimize_pic_address): Expose above new parameters in prototype and
35 adapt recursive calls accordingly.
36 (arm_legitimize_address): Adapt to new legitimize_pic_address
38 (thumb_legitimize_address): Likewise.
39 (arm_emit_call_insn): Adapt to new require_pic_register prototype.
40 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
42 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
44 (stack_protect_combined_set): New insn_and_split pattern.
45 (stack_protect_set): New insn pattern.
46 (stack_protect_combined_test): New insn_and_split pattern.
47 (stack_protect_test): New insn pattern.
48 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
49 (UNSPEC_SP_TEST): Likewise.
50 * doc/md.texi (stack_protect_combined_set): Document new standard
52 (stack_protect_set): Clarify that the operand for guard's address is
54 (stack_protect_combined_test): Document new standard pattern name.
55 (stack_protect_test): Clarify that the operand for guard's address is
58 2018-08-02 David Malcolm <dmalcolm@redhat.com>
60 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
61 "const" to the "gimple *" and "rtx_insn *" parameters.
62 * dumpfile.h (dump_user_location_t::dump_user_location_t):
64 (dump_location_t::dump_location_t): Likewise.
66 2018-08-01 Martin Sebor <msebor@redhat.com>
68 PR tree-optimization/86650
69 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
70 rather than a "gcall *". Directly pass the data of interest
71 to percent_K_format, rather than building a temporary CALL_EXPR
73 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
74 (gimple_fold_builtin_strncat): Adjust.
75 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
76 gcall* argument with gimple*.
77 * gimple-ssa-warn-restrict.c (check_call): Same.
78 (wrestrict_dom_walker::before_dom_children): Same.
79 (builtin_access::builtin_access): Same.
80 (check_bounds_or_overlap): Same
81 (maybe_diag_overlap): Same.
82 (maybe_diag_offset_bounds): Same.
83 * tree-diagnostic.c (default_tree_printer): Move usage of
84 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
86 * tree-pretty-print.c (percent_K_format): Add argument.
87 * tree-pretty-print.h: Add argument.
88 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
89 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
90 (maybe_diag_stxncpy_trunc): Same.
91 (handle_builtin_stxncpy): Same.
92 (handle_builtin_strcat): Same.
94 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
96 * match.pd: Optimise pointer range checks.
98 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
100 PR tree-optimization/86758
101 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
102 to remove pattern statements.
104 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
106 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
107 result of dfs_enumerate_from when constructing stmt_vec_infos,
108 instead of additionally calling get_loop_body.
110 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
112 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
114 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
115 When creating an iv, assert that the step is not known to be zero.
116 (vect_setup_realignment): Update call accordingly.
117 * tree-vect-stmts.c (vectorizable_store): Likewise.
118 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
120 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
122 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
123 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
124 (vectorizable_reduction): Likewise.
125 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
126 (vect_detect_hybrid_slp_stmts): Likewise.
127 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
129 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
131 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
132 (wide_int_set_zero_nonzero_bits): ...this.
133 (zero_nonzero_bits_from_vr): Rename to...
134 (vrp_set_zero_nonzero_bits): ...this.
135 (extract_range_from_multiplicative_op_1): Abstract wide int
137 (wide_int_range_multiplicative_op): ...here.
138 (extract_range_from_binary_expr_1): Extract wide int binary
139 operations into their own functions.
140 (wide_int_range_lshift): New.
141 (wide_int_range_can_optimize_bit_op): New.
142 (wide_int_range_shift_undefined_p): New.
143 (wide_int_range_bit_xor): New.
144 (wide_int_range_bit_ior): New.
145 (wide_int_range_bit_and): New.
146 (wide_int_range_trunc_mod): New.
147 (extract_range_into_wide_ints): New.
148 (vrp_shift_undefined_p): New.
149 (extract_range_from_multiplicative_op): New.
150 (vrp_can_optimize_bit_op): New.
151 * tree-vrp.h (value_range::dump): New.
152 (wide_int_range_multiplicative_op): New.
153 (wide_int_range_lshift):New.
154 (wide_int_range_shift_undefined_p): New.
155 (wide_int_range_bit_xor): New.
156 (wide_int_range_bit_ior): New.
157 (wide_int_range_bit_and): New.
158 (wide_int_range_trunc_mod): New.
159 (zero_nonzero_bits_from_bounds): Rename to...
160 (wide_int_set_zero_nonzero_bits): ...this.
161 (zero_nonzero_bits_from_vr): Rename to...
162 (vrp_set_zero_nonzero_bits): ...this.
163 (range_easy_mask_min_max): Rename to...
164 (wide_int_range_can_optimize_bit_op): this.
165 * vr-values.c (simplify_bit_ops_using_ranges): Rename
166 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
168 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
170 * tree-vectorizer.h (vect_orig_stmt): New function.
171 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
172 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
173 (vect_create_epilog_for_reduction): Likewise.
174 (vectorizable_live_operation): Likewise.
175 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
176 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
177 * tree-vect-stmts.c (vectorizable_call): Likewise.
178 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
180 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
182 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
184 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
185 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
186 (vect_transform_loop): Likewise.
187 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
189 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
191 * tree-vectorizer.h (vect_schedule_slp): Return void.
192 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
193 (vect_schedule_slp): Likewise.
195 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
197 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
199 (vect_transform_loop): Update calls accordingly. Schedule SLP
200 instances before the main loop, if any exist.
202 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
204 PR tree-optimization/86749
205 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
206 If the lhs is used in a COND_EXPR, check that it is being used
207 as the "then" or "else" value.
209 2018-08-01 Tom de Vries <tdevries@suse.de>
212 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
213 speculation_safe_value_not_needed.
215 2018-08-01 Richard Biener <rguenther@suse.de>
217 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
220 2018-08-01 Martin Liska <mliska@suse.cz>
222 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
223 format how successful transformation is dumped.
224 (gimple_mod_pow2_value_transform): Likewise.
225 (gimple_mod_subtract_transform): Likewise.
226 (gimple_stringops_transform): Likewise.
228 2018-08-01 Martin Liska <mliska@suse.cz>
231 * value-prof.c (interesting_stringop_to_profile_p):
232 Simplify the code and add BUILT_IN_MEMMOVE.
233 (gimple_stringops_transform): Likewise.
235 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
237 * config/aarch64/aarch64-simd.md
238 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
239 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
240 use GPI iterator instead of SI mode.
242 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
244 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
245 rs6000_speculation_barrier.
246 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
247 new barrier pattern name.
249 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
251 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
252 (speculation_barrier): New insn.
254 2018-08-01 Richard Biener <rguenther@suse.de>
257 * graphite.h: Include isl/id.h and isl/space.h to allow build
260 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
263 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
264 mode for COFF targets.
265 * defaults.h (TARGET_COFF): Define.
266 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
267 TARGET_COFF): Define.
268 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
269 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
270 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
272 2018-07-31 Alexandre Oliva <oliva@adacore.com>
274 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
275 * gimple-streamer-out.c (output_bb): Save it.
276 * lto-streamer-in.c (input_struct_function_base): Restore
277 instance discriminator if available. Create map on demand.
278 * lto-streamer-out.c (output_struct_function_base): Save it if
280 * final.c (decl_to_instance_map): Document LTO strategy.
282 2018-07-31 Alexandre Oliva <oliva@adacore.com>
283 Olivier Hainque <hainque@adacore.com>
285 * debug.h (decl_to_instance_map_t): New type.
286 (decl_to_instance_map): Declare.
287 (maybe_create_decl_to_instance_map): New inline function.
288 * final.c (bb_discriminator, last_bb_discriminator): New statics,
289 to track basic block discriminators.
290 (final_start_function_1): Initialize them.
291 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
293 (decl_to_instance_map): New variable.
294 (map_decl_to_instance, maybe_set_discriminator): New functions.
295 (notice_source_line): Set discriminator.
297 2018-07-31 Ian Lance Taylor <iant@golang.org>
299 * targhooks.c (default_have_speculation_safe_value): Add
302 2018-07-31 David Malcolm <dmalcolm@redhat.com>
304 * dump-context.h: Include "pretty-print.h".
305 (dump_context::refresh_dumps_are_enabled): New decl.
306 (dump_context::emit_item): New decl.
307 (class dump_context): Add fields "m_test_pp" and
309 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
310 (temp_dump_context::get_dumped_text): New decl.
311 (class temp_dump_context): Add field "m_pp".
312 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
313 (dump_context::refresh_dumps_are_enabled): ...and add a test for
315 (set_dump_file): Update for above change.
316 (set_alt_dump_file): Likewise.
317 (dump_loc): New overload, taking a pretty_printer *.
318 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
319 to any test pretty-printer.
320 (make_item_for_dump_gimple_stmt): New function, adapted from
321 optinfo::add_gimple_stmt.
322 (dump_context::dump_gimple_stmt): Call it, and use the result,
323 eliminating the direct usage of dump_file and alt_dump_file in
324 favor of indirectly using them via emit_item.
325 (make_item_for_dump_gimple_expr): New function, adapted from
326 optinfo::add_gimple_expr.
327 (dump_context::dump_gimple_expr): Call it, and use the result,
328 eliminating the direct usage of dump_file and alt_dump_file in
329 favor of indirectly using them via emit_item.
330 (make_item_for_dump_generic_expr): New function, adapted from
332 (dump_context::dump_generic_expr): Call it, and use the result,
333 eliminating the direct usage of dump_file and alt_dump_file in
334 favor of indirectly using them via emit_item.
335 (make_item_for_dump_printf_va): New function, adapted from
336 optinfo::add_printf_va.
337 (make_item_for_dump_printf): New function.
338 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
339 and use the result, eliminating the direct usage of dump_file and
340 alt_dump_file in favor of indirectly using them via emit_item.
341 (make_item_for_dump_dec): New function.
342 (dump_context::dump_dec): Call it, and use the result,
343 eliminating the direct usage of dump_file and alt_dump_file in
344 favor of indirectly using them via emit_item.
345 (make_item_for_dump_symtab_node): New function, adapted from
346 optinfo::add_symtab_node.
347 (dump_context::dump_symtab_node): Call it, and use the result,
348 eliminating the direct usage of dump_file and alt_dump_file in
349 favor of indirectly using them via emit_item.
350 (dump_context::begin_scope): Reimplement, avoiding direct usage
351 of dump_file and alt_dump_file in favor of indirectly using them
353 (dump_context::emit_item): New member function.
354 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
355 Set up test pretty-printer on the underlying context. Call
356 refresh_dumps_are_enabled.
357 (temp_dump_context::~temp_dump_context): Call
358 refresh_dumps_are_enabled.
359 (temp_dump_context::get_dumped_text): New member function.
360 (selftest::verify_dumped_text): New function.
361 (ASSERT_DUMPED_TEXT_EQ): New macro.
362 (selftest::test_capture_of_dump_calls): Run all tests twice, with
363 and then without optinfo enabled. Add uses of
364 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
365 * dumpfile.h: Update comment for the dump_* API.
366 * optinfo-emit-json.cc
367 (selftest::test_building_json_from_dump_calls): Update for new
368 param for temp_dump_context ctor.
369 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
371 (optinfo_item::~optinfo_item): Likewise.
372 (optinfo::add_item): New member function.
373 (optinfo::emit): Update comment.
374 (optinfo::add_string): Delete.
375 (optinfo::add_printf): Delete.
376 (optinfo::add_printf_va): Delete.
377 (optinfo::add_gimple_stmt): Delete.
378 (optinfo::add_gimple_expr): Delete.
379 (optinfo::add_tree): Delete.
380 (optinfo::add_symtab_node): Delete.
381 (optinfo::add_dec): Delete.
382 * optinfo.h (class dump_context): New forward decl.
383 (optinfo::add_item): New decl.
384 (optinfo::add_string): Delete.
385 (optinfo::add_printf): Delete.
386 (optinfo::add_printf_va): Delete.
387 (optinfo::add_gimple_stmt): Delete.
388 (optinfo::add_gimple_expr): Delete.
389 (optinfo::add_tree): Delete.
390 (optinfo::add_symtab_node): Delete.
391 (optinfo::add_dec): Delete.
392 (optinfo::add_poly_int): Delete.
393 (optinfo_item::optinfo_item): Remove "owned" param.
394 (class optinfo_item): Remove field "m_owned".
396 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
399 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
400 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
401 requested variable alignment.
402 (expand_one_ssa_partition): Likewise.
403 (expand_one_var): Likewise.
405 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
407 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
408 to speculation_safe_value_not_needed.
410 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
412 * targhooks.h (speculation_safe_value_not_needed): New prototype.
413 * targhooks.c (speculation_safe_value_not_needed): New function.
414 * target.def (have_speculation_safe_value): Update documentation.
415 * doc/tm.texi: Regenerated.
417 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
419 * config/aarch64/iterators.md (ALLI_TI): New iterator.
420 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
422 (despeculate_copy<ALLI:mode>_insn): New insn.
423 (despeculate_copyti_insn): New insn.
424 (despeculate_simple<ALLI:mode>): New insn
425 (despeculate_simpleti): New insn.
426 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
428 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
429 aarch64_speculation_safe_value.
430 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
432 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
434 * config/aarch64/aarch64-speculation.cc: New file.
435 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
436 before pass_reorder_blocks.
437 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
439 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
440 X14 and X15 when tracking speculation.
441 * config/aarch64/aarch64.md (register name constants): Add
442 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
443 (unspec): Add UNSPEC_SPECULATION_TRACKER.
444 (speculation_barrier): New insn attribute.
445 (cmp<mode>): Allow SP in comparisons.
446 (speculation_tracker): New insn.
447 (speculation_barrier): Add speculation_barrier attribute.
448 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
449 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
450 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
452 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
454 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
455 aarch64_track_speculation is true.
456 (tb<optab><mode>1): Likewise.
457 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
458 generate CB[N]Z when tracking speculation.
459 (aarch64_split_compare_and_swap): Likewise.
460 (aarch64_split_atomic_op): Likewise.
462 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
464 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
466 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
468 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
469 (speculation_barrier): New insn.
471 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
473 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
474 * config/arm/arm.md (speculation_barrier): New expand.
475 (speculation_barrier_insn): New pattern.
477 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
479 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
480 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
481 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
482 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
484 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
485 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
486 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
487 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
488 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
489 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
490 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
491 * builtins.c (expand_speculation_safe_value): New function.
492 (expand_builtin): Call it.
493 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
494 * doc/extend.texi: Document __builtin_speculation_safe_value.
495 * doc/md.texi: Document "speculation_barrier" pattern.
496 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
497 TARGET_HAVE_SPECULATION_SAFE_VALUE.
498 * doc/tm.texi: Regenerated.
499 * target.def (have_speculation_safe_value, speculation_safe_value): New
501 * targhooks.c (default_have_speculation_safe_value): New function.
502 (default_speculation_safe_value): New function.
503 * targhooks.h (default_have_speculation_safe_value): Add prototype.
504 (default_speculation_safe_value): Add prototype.
506 2018-07-31 David Malcolm <dmalcolm@redhat.com>
508 * dump-context.h (dump_context::dump_loc): New decl.
509 * dumpfile.c (dump_context::dump_loc): New member function.
510 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
511 and dump_gimple_stmt.
512 (dump_context::dump_gimple_expr_loc): Likewise, using
514 (dump_context::dump_generic_expr_loc): Likewise, using
516 (dump_context::dump_printf_loc_va): Likewise, using
518 (dump_context::begin_scope): Explicitly using the global function
519 "dump_loc", rather than the member function.
521 2018-07-31 Martin Sebor <msebor@redhat.com>
523 PR tree-optimization/86741
524 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
526 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
528 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
529 depend on whether prefetch instructions will be emitted or not.
530 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
531 will be emitted or not.
532 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
533 (TARGET_SETMEM_PFD): New macros.
535 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
537 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
538 (NULL_STMT_VEC_INFO): Delete.
539 (stmt_vec_info::operator*): Likewise.
540 (stmt_vec_info::operator gimple *): Likewise.
541 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
542 of NULL_STMT_VEC_INFO.
543 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
544 (vect_reassociating_reduction_p): Likewise.
545 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
546 (vectorizable_store): Likewise.
547 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
548 (vec_info::free_stmt_vec_infos): Likewise.
550 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
552 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
553 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
555 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
557 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
558 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
559 (vec_info::free_stmt_vec_info): New private member functions.
560 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
561 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
562 * tree-parloops.c (gather_scalar_reductions): Remove calls to
563 set_stmt_vec_info_vec and free_stmt_vec_infos.
564 * tree-vect-loop.c (_loop_vec_info): Remove call to
565 set_stmt_vec_info_vec.
566 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
567 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
568 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
569 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
570 (vec_info::free_stmt_vec_info): ...these new functions. Remove
571 assignments in {vec_info::,}new_stmt_vec_info that are redundant
572 with the clearing in the xcalloc.
573 (stmt_vec_info_vec): Delete.
574 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
575 (vectorize_loops): Likewise.
576 (vec_info::~vec_info): Remove argument from call to
578 (vec_info::add_stmt): Remove vinfo argument from call to
581 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
583 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
584 rather than a gimple stmt.
585 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
586 information for pattern statements when passed the original
587 statement; instead wait to be passed the pattern statement itself.
588 Don't call set_vinfo_for_stmt here.
589 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
590 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
592 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
593 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
594 stmt_vec_infos entry.
596 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
598 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
599 * tree-vectorizer.c (vec_info::replace_stmt): New function.
600 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
601 * tree-vect-stmts.c (vectorizable_call): Likewise.
602 (vectorizable_simd_clone_call): Likewise.
604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
606 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
607 * tree-vectorizer.c (vec_info::remove_stmt): New function.
608 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
609 * tree-vect-loop.c (vect_transform_loop): Likewise.
610 * tree-vect-slp.c (vect_schedule_slp): Likewise.
611 * tree-vect-stmts.c (vect_remove_stores): Likewise.
613 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
615 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
616 (vect_dr_stmt): Delete.
617 * tree-vectorizer.c (vec_info::lookup_dr): New function.
618 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
620 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
621 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
622 (vect_verify_datarefs_alignment, vect_peeling_supportable)
623 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
624 (vect_analyze_data_refs): Likewise.
625 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
627 (vect_find_same_alignment_drs): Likewise.
628 (vect_slp_analyze_node_dependences): Update calls accordingly.
629 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
630 instead of DR_VECT_AUX.
631 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
632 of a vector data references. Use vec_info::lookup_dr instead of
634 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
635 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
636 instead of DR_VECT_AUX.
638 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
640 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
642 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
644 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
645 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
646 (vect_gen_prolog_loop_niters): Likewise.
648 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
650 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
651 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
652 (vect_known_alignment_in_bytes, vect_dr_behavior)
653 (vect_get_scalar_dr_size): Take references as dr_vec_infos
654 instead of data_references. Update calls to other routines for
655 which the same change has been made.
656 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
657 dr_vec_infos instead of stmt_vec_infos.
658 (vect_analyze_data_ref_dependence): Update call accordingly.
659 (vect_slp_analyze_data_ref_dependence)
660 (vect_record_base_alignments): Use DR_VECT_AUX.
661 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
662 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
663 (vector_alignment_reachable_p, vect_get_data_access_cost)
664 (vect_peeling_supportable, vect_analyze_group_access_1)
665 (vect_analyze_group_access, vect_analyze_data_ref_access)
666 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
667 (vect_compile_time_alias, vect_small_gap_p)
668 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
669 (vect_supportable_dr_alignment): Take references as dr_vec_infos
670 instead of data_references. Update calls to other routines for
671 which the same change has been made.
672 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
673 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
674 (vect_slp_analyze_and_verify_node_alignment)
675 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
676 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
677 (vect_setup_realignment): Use dr_vec_infos. Update calls after
679 (_vect_peel_info::dr): Replace with...
680 (_vect_peel_info::dr_info): ...this new field.
681 (vect_peeling_hash_get_most_frequent)
682 (vect_peeling_hash_choose_best_peeling): Update accordingly.
683 (vect_peeling_hash_get_lowest_cost):
684 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
685 routines for which the same change has been made.
686 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
688 * tree-vect-loop-manip.c (get_misalign_in_elems)
689 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
691 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
692 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
693 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
694 (get_group_load_store_type, get_negative_load_store_type)
695 (vect_get_data_ptr_increment, vectorizable_store)
696 (vectorizable_load): Likewise.
697 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
698 Update calls to other routines for which the same change has been made.
700 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
702 * tree-vectorizer.h (vec_info::move_dr): New member function.
703 (dataref_aux): Rename to...
704 (dr_vec_info): ...this and add "dr" and "stmt" fields.
705 (_stmt_vec_info::dr_aux): Update accordingly.
706 (_stmt_vec_info::data_ref_info): Delete.
707 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
708 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
709 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
710 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
712 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
713 (STMT_VINFO_DR_INFO): New macro.
714 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
715 (set_dr_misalignment): Update after rename of dataref_aux.
716 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
717 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
718 initialization of STMT_VINFO_DATA_REF.
719 * tree-vectorizer.c (vec_info::move_dr): New function.
720 * tree-vect-patterns.c (vect_recog_bool_pattern)
721 (vect_recog_mask_conversion_pattern)
722 (vect_recog_gather_scatter_pattern): Use it.
723 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
724 the "dr" and "stmt" fields of dr_vec_info instead of
727 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
729 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
730 (is_pattern_stmt_p): Use it.
731 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
732 on pattern statements.
734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
736 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
737 original stmt as a stmt_vec_info rather than a gimple stmt.
738 (vect_pattern_recog_1): Take the statement directly as a
739 stmt_vec_info, rather than via a gimple_stmt_iterator.
740 Update call to vect_mark_pattern_stmts.
741 (vect_pattern_recog): Update calls accordingly.
743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
745 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
746 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
747 a vect_def_type for the first argument.
748 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
749 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
750 operand if it isn't defined by a vectorized statement.
751 (vect_build_gather_load_calls): Remove the mask_dt argument and
752 update calls to vect_get_vec_def_for_stmt_copy.
753 (vectorizable_bswap): Likewise the dt argument.
754 (vectorizable_call): Update calls to vectorizable_bswap and
755 vect_get_vec_def_for_stmt_copy.
756 (vectorizable_simd_clone_call, vectorizable_assignment)
757 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
758 (vectorizable_comparison): Update calls to
759 vect_get_vec_def_for_stmt_copy.
760 (vectorizable_store): Likewise. Remove now-unnecessary calls to
762 (vect_get_loop_based_defs): Remove dt argument and update call
763 to vect_get_vec_def_for_stmt_copy.
764 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
765 and vect_get_vec_def_for_stmt_copy.
766 (vectorizable_load): Update calls to vect_build_gather_load_calls
767 and vect_get_vec_def_for_stmt_copy.
768 * tree-vect-loop.c (vect_create_epilog_for_reduction)
769 (vectorizable_reduction, vectorizable_live_operation): Update calls
770 to vect_get_vec_def_for_stmt_copy.
772 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
774 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
775 and gimple stmt arguments with a stmt_vec_info.
776 (vect_record_base_alignments): Update calls accordingly.
777 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
778 and gimple stmt arguments with a stmt_vec_info.
779 (vect_build_slp_tree_1): Remove vinfo argument and update call
780 to vect_record_max_nunits.
781 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
782 and vect_record_max_nunits.
784 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
786 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
787 file and take a stmt_vec_info instead of a gimple stmt.
788 (supportable_widening_operation, vect_finish_replace_stmt)
789 (vect_finish_stmt_generation, vect_get_store_rhs)
790 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
791 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
792 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
793 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
794 (vect_create_data_ref_ptr, bump_vector_ptr)
795 (vect_permute_store_chain, vect_setup_realignment)
796 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
797 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
798 (vectorizable_reduction, vectorizable_induction)
799 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
800 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
801 than gimple stmts as arguments.
802 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
803 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
804 (can_group_stmts_p, vect_check_gather_scatter)
805 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
806 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
807 (vect_permute_load_chain, vect_shift_permute_load_chain)
808 (vect_transform_grouped_load)
809 (vect_record_grouped_load_vectors): Likewise.
810 * tree-vect-loop.c (vect_fixup_reduc_chain)
811 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
812 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
813 (vectorizable_reduction, vectorizable_induction)
814 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
815 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
816 (vect_get_load_store_mask): Likewise.
817 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
818 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
819 * tree-vect-stmts.c (vect_mark_relevant)
820 (is_simple_and_all_uses_invariant)
821 (exist_non_indexing_operands_for_use_p, process_use)
822 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
823 (vect_get_vec_def_for_operand, vect_get_vec_defs)
824 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
825 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
826 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
827 (get_negative_load_store_type, get_load_store_type)
828 (vect_check_load_store_mask, vect_check_store_rhs)
829 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
830 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
831 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
832 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
833 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
834 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
835 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
836 (supportable_widening_operation): Likewise.
838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
840 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
841 a stmt_vec_info instead of a gcall.
842 (vect_check_gather_scatter): Update call accordingly.
843 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
845 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
846 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
847 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
848 instead of a gimple stmt.
849 (vect_transform_loop): Update calls accordingly.
850 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
851 stmt_vec_infos instead of gimple stmts.
852 (vect_analyze_slp_instance): Update use accordingly.
853 * tree-vect-stmts.c (read_vector_array, write_vector_array)
854 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
855 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
856 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
857 (vect_gen_widened_results_half, vect_get_loop_based_defs)
858 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
859 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
862 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
864 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
865 of the worklist from a vector of gimple stmts to a vector of
867 * tree-vect-stmts.c (vect_mark_relevant, process_use)
868 (vect_mark_stmts_to_be_vectorized): Likewise
870 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
872 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
873 statement before passing it to vect_analyze_stmt.
874 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
875 the chain of phi vector definitions. Track the exit phi via its
877 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
878 STMT_VINFO_REDUC_DEF.
879 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
880 stmt_vec_infos to handle the statement chains.
881 (vect_get_slp_defs): Record the first statement in the node
882 using a stmt_vec_info.
883 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
884 statements here and pass their stmt_vec_info down to subroutines.
885 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
886 down to vect_finish_stmt_generation.
887 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
888 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
889 stmt_vec_infos to subroutines.
890 (vect_remove_stores): Use stmt_vec_infos to handle the statement
893 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
895 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
896 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
897 (vect_permute_store_chain, vect_setup_realignment)
898 (vect_permute_load_chain, vect_shift_permute_load_chain)
899 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
900 stmts internally, and when passing values to other vectorizer routines.
901 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
902 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
903 (vect_analyze_loop_operations, get_initial_def_for_reduction)
904 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
905 (vectorizable_reduction, vectorizable_induction)
906 (vectorizable_live_operation, vect_transform_loop_stmt)
907 (vect_transform_loop): Likewise.
908 * tree-vect-patterns.c (vect_reassociating_reduction_p)
909 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
910 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
911 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
912 (vect_slp_analyze_node_operations_1): Likewise.
913 * tree-vect-stmts.c (vect_mark_relevant, process_use)
914 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
915 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
916 (vect_finish_stmt_generation_1, get_group_load_store_type)
917 (get_load_store_type, vect_build_gather_load_calls)
918 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
919 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
920 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
921 (vectorizable_store, vectorizable_load, vectorizable_condition)
922 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
923 (supportable_widening_operation): Likewise.
924 (vect_get_vector_types_for_stmt): Likewise.
925 * tree-vectorizer.h (vect_dr_behavior): Likewise.
927 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
929 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
930 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
931 (vect_permute_store_chain, vect_permute_load_chain)
932 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
933 repeated stmt_vec_info lookups.
934 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
935 (vect_update_ivs_after_vectorizer): Likewise.
936 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
937 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
938 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
939 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
940 (vect_bb_slp_scalar_cost): Likewise.
941 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
943 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
945 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
946 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
947 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
948 to get gassigns and gcalls, rather than operating on generc gimple
950 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
951 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
952 (vectorizable_load, vect_analyze_stmt): Likewise.
953 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
955 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
957 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
958 return stmt_vec_infos rather than gimple stmts. Do not accept
960 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
962 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
963 Update use of get_later_stmt.
964 (vect_get_constant_vectors): Update call accordingly.
965 (vect_schedule_slp_instance): Likewise
966 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
967 (vect_slp_analyze_instance_dependence): Likewise.
968 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
970 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
972 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
973 (stmt_info_for_cost::stmt_info): ...this new field.
974 (add_stmt_costs): Update accordingly.
975 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
976 (vect_get_known_peeling_cost): Likewise.
977 (vect_estimate_min_profitable_iters): Likewise.
978 * tree-vect-stmts.c (record_stmt_cost): Likewise.
980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
982 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
983 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
984 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
986 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
988 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
990 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
991 a gimple stmt to a stmt_vec_info.
992 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
994 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
996 * tree-vectorizer.h (vec_info::grouped_stores): Change from
997 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
998 (_loop_vec_info::reduction_chains): Likewise.
999 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1001 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1003 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1005 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1006 a gimple stmt to a stmt_vec_info.
1007 (_stmt_vec_info::next_element): Likewise.
1008 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1009 (vect_slp_analyze_and_verify_node_alignment)
1010 (vect_analyze_group_access_1, vect_analyze_group_access)
1011 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1012 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1013 (vect_supportable_dr_alignment): Update accordingly.
1014 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1015 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1016 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1017 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1018 * tree-vect-slp.c (vect_build_slp_tree_1)
1019 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1020 (vect_split_slp_store_group, vect_analyze_slp_instance)
1021 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1022 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1023 (get_group_load_store_type, get_load_store_type)
1024 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1025 (vect_transform_stmt, vect_remove_stores): Likewise.
1027 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1029 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1031 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1032 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1033 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1034 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1035 (vector_alignment_reachable_p, vect_get_data_access_cost)
1036 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1037 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1038 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1039 (vect_analyze_group_access_1, vect_analyze_group_access)
1040 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1041 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1042 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1043 result of vect_dr_stmt and use the stmt_vec_info instead of
1044 the associated gimple stmt.
1045 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1046 (vect_gen_prolog_loop_niters): Likewise.
1047 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1051 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1052 to a vec<stmt_vec_info>.
1053 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1054 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1056 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1057 to a vec<stmt_vec_info>.
1058 (bst_traits::value_type, bst_traits::value_type): Likewise.
1059 (bst_traits::hash): Update accordingly.
1060 (vect_get_and_check_slp_defs): Change the stmts parameter from
1061 a vec<gimple *> to a vec<stmt_vec_info>.
1062 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1063 (vect_build_slp_tree): Likewise.
1064 (vect_build_slp_tree_2): Likewise. Update uses of
1065 SLP_TREE_SCALAR_STMTS.
1066 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1067 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1068 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1069 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1070 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1071 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1072 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1073 (vect_get_constant_vectors, vect_get_slp_defs)
1074 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1075 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1076 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1077 instead of gimple stmts.
1078 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1079 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1080 (vect_slp_analyze_instance_dependence): Update uses of
1081 SLP_TREE_SCALAR_STMTS.
1082 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1083 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1084 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1085 (get_initial_defs_for_reduction): Likewise.
1086 (vect_create_epilog_for_reduction): Likewise.
1087 (vectorize_fold_left_reduction): Likewise.
1088 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1089 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1090 (can_vectorize_live_stmts): Likewise.
1092 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1094 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1095 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1096 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1098 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1100 (gather_scalar_reductions): Update after above interface changes.
1101 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1102 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1104 (vect_force_simple_reduction): Likewise.
1105 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1106 LOOP_VINFO_REDUCTIONS.
1107 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1111 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1112 a gimple stmt to a stmt_vec_info.
1113 * tree-vect-loop.c (vect_active_double_reduction_p)
1114 (vect_force_simple_reduction, vectorizable_reduction): Update
1117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1119 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1120 vec<gimple *> to a vec<stmt_vec_info>.
1121 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1122 the reduction_phis argument from a vec<gimple *> to a
1124 (vectorizable_reduction): Likewise the phis local variable that
1125 is passed to vect_create_epilog_for_reduction. Update for new type
1126 of SLP_TREE_VEC_STMTS.
1127 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1128 (vectorizable_live_operation): Likewise.
1129 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1130 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1132 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1134 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1135 a gimple stmt to a stmt_vec_info.
1136 (vectorizable_condition, vectorizable_live_operation)
1137 (vectorizable_reduction, vectorizable_induction): Pass back the
1138 vectorized statement as a stmt_vec_info.
1139 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1140 use of STMT_VINFO_VEC_STMT.
1141 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1142 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1143 as stmt_vec_infos rather than gimple stmts.
1144 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1146 (vectorizable_live_operation): Likewise.
1147 (vectorizable_reduction, vectorizable_induction): Likewise,
1148 updating use of STMT_VINFO_VEC_STMT.
1149 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1150 of STMT_VINFO_VEC_STMT.
1151 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1152 (vectorizable_simd_clone_call, vectorizable_conversion)
1153 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1154 (vectorizable_store, vectorizable_load, vectorizable_condition)
1155 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1156 from a gimple stmt to a stmt_vec_info.
1157 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1158 pointer to a stmt_vec_info to the vectorizable_* routines.
1160 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1162 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1163 a gimple stmt to a stmt_vec_info.
1164 (is_pattern_stmt_p): Update accordingly.
1165 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1166 (vect_record_grouped_load_vectors): Likewise.
1167 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1168 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1169 (vect_model_reduction_cost): Likewise.
1170 (vect_create_epilog_for_reduction): Likewise.
1171 (vectorizable_reduction, vectorizable_induction): Likewise.
1172 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1173 Return the stmt_vec_info for the pattern statement.
1174 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1175 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1176 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1177 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1178 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1179 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1180 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1181 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1183 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1185 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1186 (vect_finish_stmt_generation): Likewise.
1187 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1188 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1189 (vect_build_gather_load_calls): Use the return value of the above
1190 functions instead of a separate call to vinfo_for_stmt. Use narrow
1191 scopes for the input gimple stmt and wider scopes for the associated
1192 stmt_vec_info. Use vec_info::lookup_def when setting these
1193 stmt_vec_infos from an SSA_NAME definition.
1194 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1195 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1196 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1197 (vectorizable_store, vectorizable_load, vectorizable_condition)
1198 (vectorizable_comparison): Likewise.
1199 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1200 (vectorizable_reduction): Likewise.
1202 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1204 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1205 stmt_vec_info * parameter before the optional gimple **.
1206 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1207 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1208 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1209 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1210 (vectorizable_live_operation): Likewise.
1211 * tree-vect-patterns.c (type_conversion_p): Likewise.
1212 (vect_look_through_possible_promotion): Likewise.
1213 (vect_recog_rotate_pattern): Likewise.
1214 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1218 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1219 a typedef to a wrapper class.
1220 (NULL_STMT_VEC_INFO): New macro.
1221 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1222 (stmt_vec_info::operator*): New function.
1223 (stmt_vec_info::operator gimple *): Likewise.
1224 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1225 (add_stmt_costs): Likewise.
1226 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1227 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1228 (vect_get_known_peeling_cost): Likewise.
1229 (vect_estimate_min_profitable_iters): Likewise.
1230 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1231 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1232 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1233 (vectorizable_store, free_stmt_vec_infos): Likewise.
1234 (new_stmt_vec_info): Change return type of xcalloc to
1237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1239 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1240 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1241 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1242 a single_imm_use-based sequence.
1243 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1247 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1248 * tree-vectorizer.c (vec_info::lookup_def): New function.
1249 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1250 (vect_widened_op_tree): Likewise.
1251 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1252 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1253 (vectorizable_reduction): Likewise.
1254 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1256 (vect_is_slp_reduction): Update calls accordingly. Use
1257 vec_info::lookup_def.
1258 (vect_is_simple_reduction): Likewise
1259 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1263 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1264 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1265 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1267 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1268 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1269 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1270 (vect_is_slp_reduction, vectorizable_induction)
1271 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1272 * tree-vect-patterns.c (vect_init_pattern_stmt):
1273 (vect_determine_min_output_precision_1, vect_determine_precisions)
1274 (vect_pattern_recog): Likewise.
1275 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1276 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1277 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1278 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1279 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1280 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1281 info field from a loop to a loop_vec_info.
1283 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1285 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1286 (vec_info::add_stmt): Declare.
1287 * tree-vectorizer.c (vec_info::add_stmt): New function.
1288 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1289 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1290 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1291 (vectorizable_induction): Likewise.
1292 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1293 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1294 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1295 (vectorizable_load): Likewise.
1296 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1297 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1298 (vect_recog_gather_scatter_pattern): Likewise.
1299 (append_pattern_def_seq): Likewise. Remove a check that is
1300 performed by add_stmt itself.
1302 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1304 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1305 which make_ssa_name was called with new_stmt before new_stmt
1308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1310 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1312 (vect_is_slp_reduction): ...here...
1313 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1314 that are already known to be false.
1316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1318 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1319 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1320 STMT_VINFO_NUM_SLP_USES when it's true.
1321 (vect_free_slp_instance): Add a final_p parameter and pass it to
1323 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1324 (vect_analyze_slp_instance): Likewise.
1325 (vect_slp_analyze_operations): Likewise.
1326 (vect_slp_analyze_bb_1): Likewise.
1327 * tree-vectorizer.c (vec_info): Likewise.
1328 * tree-vect-loop.c (vect_transform_loop): Likewise.
1330 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1332 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1333 function is not called for second and subsequent members of
1336 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1338 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1339 cases for nested loops from here to ...
1340 (vect_create_epilog_for_reduction): ...here. Only call
1341 vect_is_simple_use for inner-loop reductions.
1343 2018-07-31 Martin Liska <mliska@suse.cz>
1345 PR gcov-profile/85338
1346 PR gcov-profile/85350
1347 PR gcov-profile/85372
1348 * profile.c (struct location_triplet): New.
1349 (struct location_triplet_hash): Likewise.
1350 (output_location): Do not output a BB that
1351 is already recorded for a line.
1352 (branch_prob): Use streamed_locations.
1354 2018-07-31 Martin Liska <mliska@suse.cz>
1356 PR gcov-profile/85370
1357 * coverage.c (coverage_begin_function): Do not mark target
1358 clones as artificial functions.
1360 2018-07-31 Martin Liska <mliska@suse.cz>
1362 PR gcov-profile/83813
1363 PR gcov-profile/84758
1364 PR gcov-profile/85217
1365 PR gcov-profile/85332
1366 * profile.c (branch_prob): Do not record GOTO expressions
1367 for GIMPLE statements which locations are already streamed.
1369 2018-07-31 Olivier Hainque <hainque@adacore.com>
1371 * gcc.c (handle_spec_function): Accept a soft_matched_part
1372 argument, as do_spec_1. Pass it down to ...
1373 (eval_spec_function): Accept a soft_matched_part argument,
1374 and pass it down to ...
1375 (do_spec_2): Accept a soft_matched_part argument, and pass
1376 it down to do_spec_1.
1377 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1378 (handle_braces): Update call to handle_spec_function.
1379 (driver::set_up_specs): Update calls to do_spec_2.
1380 (compare_debug_dump_opt_spec_function): Likewise.
1381 (compare_debug_self_opt_spec_function): Likewise.
1383 2018-07-31 Olivier Hainque <hainque@adacore.com>
1385 * common.opt (nolibc): New option.
1386 * doc/invoke.texi (Link Options): Document it.
1387 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1388 * config/alpha/linux.h: Likewise.
1389 * config/arc/elf.h: Likewise.
1390 * config/arm/uclinux-elf.h: Likewise.
1391 * config/arm/unknown-elf.h: Likewise.
1392 * config/avr/avrlibc.h: Likewise.
1393 * config/bfin/bfin.h: Likewise.
1394 * config/bfin/linux.h: Likewise.
1395 * config/bfin/uclinux.h: Likewise.
1396 * config/darwin.h: Likewise.
1397 * config/darwin10.h: Likewise.
1398 * config/darwin12.h: Likewise.
1399 * config/gnu-user.h: Likewise.
1400 * config/lm32/uclinux-elf.h: Likewise.
1401 * config/pa/pa-hpux11.h: Likewise.
1402 * config/pa/pa64-hpux.h: Likewise.
1403 * config/sparc/sparc.h: Likewise.
1405 2018-07-31 Olivier Hainque <hainque@adacore.com>
1407 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1408 undefined variables.
1410 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1413 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1416 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1418 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1419 terminated string literal.
1421 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1423 PR rtl-optimization/85160
1424 * combine.c (is_just_move): New function.
1425 (try_combine): Allow combining two instructions into two if neither of
1426 the original instructions was a move.
1428 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1431 * doc/extend.texi (Global Register Variables): Discourage use of type
1433 (Local Register Variables): Likewise.
1435 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1437 PR tree-optimization/86506
1438 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1440 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1443 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1444 hard_regno, make sure no insn between `from` and `to` clobbers it.
1446 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1447 Tom de Vries <tdevries@suse.de>
1449 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1450 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1451 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1452 PTX_DEFAULT_RUNTIME_DIM.
1453 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1455 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1457 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1458 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1459 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1461 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1463 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1465 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1466 predicate to reflect toc fusion has been deleted.
1467 (toc_fusion_mem_raw): Delete, no longer used.
1468 (toc_fusion_mem_wrapped): Likewise.
1469 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1471 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1472 Delete, no longer used.
1473 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1474 meant to be used for toc fusion.
1475 (rs6000_debug_print_mode): Delete toc fusion debugging.
1476 (rs6000_debug_reg_global): Likewise.
1477 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1478 fusion and secondary reload support that were never used.
1479 (rs6000_option_override_internal): Delete TOC fusion, that was only
1480 partially defined, and it did not work unless you also used the
1482 (rs6000_legitimate_address_p): Delete TOC fusion support.
1483 (rs6000_opt_masks): Likewise.
1484 (fusion_wrap_memory_address): Delete function, no longer used.
1485 (fusion_split_address); Delete TOC fusion support.
1486 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1487 longer used with toc fusion being deleted.
1488 (TARGET_TOC_FUSION_FP): Likewise.
1489 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1491 (toc fusion spliter): Delete TOC fusion support.
1492 (toc_fusionload_<mode>): Likewise.
1493 (toc_fusionload_di): Likewise.
1494 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1495 longer needs to be named. Rename predicate to delete TOC fusion.
1496 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1497 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1498 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1499 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1500 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1502 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1504 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1505 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1506 __int128 in built-in function prototypes.
1507 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1508 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1510 2018-07-27 Martin Sebor <msebor@redhat.com>
1512 PR tree-optimization/86696
1513 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1514 types, including enums.
1515 (handle_char_store): Be prepared for the above function to fail.
1517 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1519 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1520 when optimization level is lower than 2 or optimize for size.
1522 2018-07-26 Martin Sebor <msebor@redhat.com>
1524 PR tree-optimization/86043
1525 PR tree-optimization/86042
1526 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1527 (get_string_cst_length): Rename...
1528 (get_min_string_length): ...to this. Add argument.
1529 (handle_char_store): Extend to handle multi-character stores by
1531 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1532 * tree.h (initializer_zerop): Add argument.
1534 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1537 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1538 declare target to variables if they have always,{to,from,tofrom} map
1541 2018-07-26 Martin Liska <mliska@suse.cz>
1544 * lto-wrapper.c: Add linker_output as prefix
1545 for ltrans_output_file.
1547 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1549 PR rtl-optimization/85805
1550 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1551 value for hard registers if that was written in the same mode.
1553 2018-07-26 Martin Liska <mliska@suse.cz>
1555 PR gcov-profile/86536
1556 * gcov.c (format_gcov): Use printf format %.*f directly
1557 and do not handle special values.
1559 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1561 * common/config/arc/arc-common.c (arc_option_optimization_table):
1562 Update default optimizations for size.
1564 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1566 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1567 * config/arc/constraints.md (CfZ): New constraint.
1568 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1569 (subsf3_fpu): Likewise.
1570 (cmpsf_fpu): Likewise.
1571 (cmpsf_fpu_uneq): Likewise.
1573 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1575 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1577 (arc_is_uncached_mem_p): uncached applies to both the variable and
1580 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1582 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1585 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1587 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1588 field "m_scopes" from vec to auto_vec.
1590 2018-07-25 Martin Liska <mliska@suse.cz>
1592 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1595 2018-07-25 Richard Biener <rguenther@suse.de>
1598 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1599 special wrt context_die late.
1600 (gen_subprogram_die): Re-use DIEs in local scope.
1602 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1604 PR tree-optimization/86644
1605 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1607 2018-07-25 Martin Liska <mliska@suse.cz>
1610 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1611 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1613 2018-07-25 Martin Liska <mliska@suse.cz>
1616 * params.def: Explain ASan abbreviation and provide
1617 a documentation link.
1619 2018-07-24 Martin Sebor <msebor@redhat.com>
1621 PR tree-optimization/86622
1622 PR tree-optimization/86532
1623 * builtins.h (string_length): Declare.
1624 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1625 (check_access): Be prepared for non-constant length ranges.
1626 (string_length): Make extern.
1627 * expr.c (string_constant): Only handle the minor non-constant
1628 array index. Use string_constant to compute the length of
1629 a generic string constant.
1631 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1633 PR tree-optimization/86618
1634 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1635 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1637 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1639 PR tree-optimization/86636
1640 * json.cc (json::object::set): Fix comment. Add assertions.
1641 (json::array::append): Move here from json.h. Add comment and an
1643 (json::string::string): Likewise.
1644 * json.h (json::array::append): Move to json.cc.
1645 (json::string::string): Likewise.
1646 * optinfo-emit-json.cc
1647 (optrecord_json_writer::impl_location_to_json): Assert that we
1648 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1649 wrapper around it. Expand the location once, rather than three
1651 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1652 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1654 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1655 places. Fix some overlong lines.
1657 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1659 * config/aarch64/aarch64-simd.md
1660 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1661 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1662 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1663 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1664 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1665 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1666 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1667 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1668 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1670 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1673 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1674 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1675 and abs_d == d, do the power of two handling if profitable.
1677 2018-07-24 Richard Biener <rguenther@suse.de>
1679 * match.pd: Add BIT_FIELD_REF canonicalizations.
1681 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1684 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1686 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1688 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1689 terminated STRING_CST object.
1691 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1693 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1695 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1697 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1698 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1699 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1700 the elements into a register.
1701 (rs6000_split_v4si_init_di_reg): Delete.
1702 (rs6000_split_v4si_init): Delete.
1703 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1704 (vsx_init_v4si): Rewrite as a define_expand.
1706 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1708 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1709 zero_extend argument from memory): New.
1711 2018-07-22 Martin Sebor <msebor@redhat.com>
1714 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1715 diagnosing calls with unknown arguments unless -Walloca-larger-than
1716 is restricted to less than PTRDIFF_MAX bytes.
1718 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1720 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1722 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1724 * pretty-print.c (text_info::set_location): Remove redundant
1725 "line_table" parameter from call to rich_location::set_range.
1727 2018-07-20 Martin Sebor <msebor@redhat.com>
1730 * builtins.c (expand_builtin_alloca): Adjust.
1731 * calls.c (alloc_max_size): Simplify.
1732 * cgraphunit.c (cgraph_node::expand): Adjust.
1733 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1735 (frame_larger_than_size): Same.
1736 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1737 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1739 * doc/invoke.texi (GCC Command Options): Document option arguments.
1740 Explain byte-size arguments and suffixes.
1741 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1742 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1743 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1744 * doc/options.texi (UInteger): Expand.
1745 (Host_Wide_Int, ByteSize): Document new properties.
1746 * final.c (final_start_function_1): Include sizes in an error message.
1747 * function.c (frame_offset_overflow): Same.
1748 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1749 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1750 Diagnose unbounded alloca calls only for limits of less than
1752 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1753 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1755 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1756 only for limits of less than PTRDIFF_MAX.
1757 * langhooks-def.h (lhd_handle_option): Change function argument
1759 * langhooks.c (lhd_handle_option): Same.
1760 * langhooks.h (handle_option): Same.
1761 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1763 (var_type, var_type_struct): Same.
1764 (var_set): Handle ByteSize flag.
1765 * optc-gen.awk: Add comments to output to ease debugging. Make
1766 use of HOST_WIDE_INT where appropriate.
1767 * opts-gen-save.awk: Use %lx to format unsigned long.
1768 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1769 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1770 arguments. Parse bytes-size suffixes.
1771 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1772 (enum_value_to_arg): Same.
1773 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1774 (handle_option): Adjust.
1775 (generate_option): Change function argument to HOST_WIDE_INT.
1776 (cmdline_handle_error): Adjust.
1777 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1778 (set_option): Change function argument to HOST_WIDE_INT.
1779 (option_enabled): Handle cl_host_wide_int.
1780 (get_option_state): Handle CLVC_SIZE.
1781 (control_warning_option): Same.
1782 * opts.c (common_handle_option): Change function argument to
1783 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1784 OPT_Wvla_larger_than_.
1785 * opts.h (enum cl_var_type): Add an enumerator.
1786 * stor-layout.c (layout_decl): Print a more meaningful warning.
1787 * toplev.c (output_stack_usage): Adjust.
1789 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1791 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1792 call to inline_expand_builtin_string_cmp.
1793 (expand_builtin_strcmp): Likewise.
1794 (expand_builtin_strncmp): Likewise.
1795 (inline_string_cmp): Delete the last parameter, change char_type_node
1796 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1798 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1799 the inlining expansion on target where the type of the call has same or
1800 narrower precision than unsigned char.
1802 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1804 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1805 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1806 * common.opt (fsave-optimization-record): New option.
1807 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1808 * doc/invoke.texi (-fsave-optimization-record): New option.
1809 * dumpfile.c: Include "optinfo-emit-json.h".
1810 (struct kv_pair): Move to coretypes.h.
1811 (optgroup_options): Make non-static.
1812 (dump_context::end_scope): Call
1813 optimization_records_maybe_pop_dump_scope.
1814 * dumpfile.h (optgroup_options): New decl.
1815 * json.cc: New file.
1817 * optinfo-emit-json.cc: New file.
1818 * optinfo-emit-json.h: New file.
1819 * optinfo.cc: Include "optinfo-emit-json.h".
1820 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1821 (optinfo_enabled_p): Check optimization_records_enabled_p.
1822 (optinfo_wants_inlining_info_p): Likewise.
1823 * optinfo.h: Update comment.
1824 * profile-count.c (profile_quality_as_string): New function.
1825 * profile-count.h (profile_quality_as_string): New decl.
1826 (profile_count::quality): New accessor.
1827 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1828 and optinfo_emit_json_cc_tests.
1829 * selftest.h (selftest::json_cc_tests): New decl.
1830 (selftest::optinfo_emit_json_cc_tests): New decl.
1831 * toplev.c: Include "optinfo-emit-json.h".
1832 (compile_file): Call optimization_records_finish.
1833 (do_compile): Call optimization_records_start.
1834 * tree-ssa-live.c: Include optinfo.h.
1835 (remove_unused_scope_block_p): Retain inlining information if
1836 optinfo_wants_inlining_info_p returns true.
1838 2018-07-20 Richard Biener <rguenther@suse.de>
1841 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1842 to cover -flto-partition=none.
1844 2018-07-20 Martin Liska <mliska@suse.cz>
1846 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1847 (get_decl_source_range): Remove unused function.
1849 2018-07-20 Richard Biener <rguenther@suse.de>
1851 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1852 (struct vn_phi_s): Likewise.
1853 (struct vn_reference_s): Likewise.
1854 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1855 for searching the slot of an entry known to be in the hash itself.
1856 (vn_phi_hasher::equal): Likewise.
1857 (vn_reference_hasher::equal): Likewise.
1858 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1860 (optimistic_info, current_info): Remove, keeping only valid_info.
1861 (vn_reference_lookup_1): Remove fallback lookup.
1862 (vn_reference_lookup_2): Likewise.
1863 (vn_nary_op_lookup_1): Likewise.
1864 (vn_phi_lookup): Likewise.
1865 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1867 (vn_reference_insert): Adjust, chain the inserted hash element
1868 at last_inserted_ref.
1869 (vn_reference_insert_pieces): Likewise.
1870 (visit_reference_op_call): Likewise.
1871 (vn_nary_op_insert_into): Chain the inserted hash element at
1873 (vn_nary_op_insert_pieces): Adjust.
1874 (vn_nary_op_insert): Likewise.
1875 (vn_nary_op_insert_stmt): Likewise.
1876 (vn_phi_insert): Adjust, chain the inserted hash element at
1878 (process_scc): Remove clearing and copying the optimistic
1879 table. Instead remove elements inserted during an optimistic
1880 iteration from the single table we maintain.
1881 (init_scc_vn): Adjust.
1882 (free_scc_vn): Likewise.
1883 (sccvn_dom_walker::record_cond): Likewise.
1884 (sccvn_dom_walker::after_dom_children): Likewise.
1886 2018-07-19 Martin Sebor <msebor@redhat.com>
1888 PR tree-optimization/84047
1889 PR tree-optimization/83776
1890 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1891 (check_array_bounds): Call it.
1893 2018-07-19 Martin Sebor <msebor@redhat.com>
1895 * align.h (align_flags): Use member initialization.
1897 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1899 * Makefile.in (OBJS): Add optinfo.o.
1900 * coretypes.h (class symtab_node): New forward decl.
1901 (struct cgraph_node): New forward decl.
1902 (class varpool_node): New forward decl.
1903 * dump-context.h: New file.
1904 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1906 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1907 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1908 (set_alt_dump_file): Likewise.
1909 (dump_context::~dump_context): New dtor.
1910 (dump_gimple_stmt): Move implementation to...
1911 (dump_context::dump_gimple_stmt): ...this new member function.
1912 Add the stmt to any pending optinfo, creating one if need be.
1913 (dump_gimple_stmt_loc): Move implementation to...
1914 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1915 Start a new optinfo and add the stmt to it.
1916 (dump_gimple_expr): Move implementation to...
1917 (dump_context::dump_gimple_expr): ...this new member function.
1918 Add the stmt to any pending optinfo, creating one if need be.
1919 (dump_gimple_expr_loc): Move implementation to...
1920 (dump_context::dump_gimple_expr_loc): ...this new member function.
1921 Start a new optinfo and add the stmt to it.
1922 (dump_generic_expr): Move implementation to...
1923 (dump_context::dump_generic_expr): ...this new member function.
1924 Add the tree to any pending optinfo, creating one if need be.
1925 (dump_generic_expr_loc): Move implementation to...
1926 (dump_context::dump_generic_expr_loc): ...this new member
1927 function. Add the tree to any pending optinfo, creating one if
1929 (dump_printf): Move implementation to...
1930 (dump_context::dump_printf_va): ...this new member function. Add
1931 the text to any pending optinfo, creating one if need be.
1932 (dump_printf_loc): Move implementation to...
1933 (dump_context::dump_printf_loc_va): ...this new member function.
1934 Start a new optinfo and add the stmt to it.
1935 (dump_dec): Move implementation to...
1936 (dump_context::dump_dec): ...this new member function. Add the
1937 value to any pending optinfo, creating one if need be.
1938 (dump_context::dump_symtab_node): New member function.
1939 (dump_context::get_scope_depth): New member function.
1940 (dump_context::begin_scope): New member function.
1941 (dump_context::end_scope): New member function.
1942 (dump_context::ensure_pending_optinfo): New member function.
1943 (dump_context::begin_next_optinfo): New member function.
1944 (dump_context::end_any_optinfo): New member function.
1945 (dump_context::s_current): New global.
1946 (dump_context::s_default): New global.
1947 (dump_scope_depth): Delete global.
1948 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1949 (dump_symtab_node): New function.
1950 (get_dump_scope_depth): Reimplement in terms of dump_context.
1951 (dump_begin_scope): Likewise.
1952 (dump_end_scope): Likewise.
1953 (selftest::temp_dump_context::temp_dump_context): New ctor.
1954 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1955 (selftest::verify_item): New function.
1956 (ASSERT_IS_TEXT): New macro.
1957 (ASSERT_IS_TREE): New macro.
1958 (ASSERT_IS_GIMPLE): New macro.
1959 (selftest::test_capture_of_dump_calls): New test.
1960 (selftest::dumpfile_c_tests): Call it.
1961 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1962 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1963 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1964 descriptive comment.
1965 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1966 (dump_node, dump_bb): Move these unrelated decls.
1967 (class dump_manager): Add leading comment.
1968 * optinfo.cc: New file.
1969 * optinfo.h: New file.
1971 2018-07-19 Michael Collison <michael.collison@arm.com>
1972 Richard Henderson <rth@redhat.com>
1974 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1975 (subti): Handle op1 zero.
1976 (subvti4, usub4ti4): New.
1977 (*sub<GPI>3_compare1_imm): New.
1978 (sub<GPI>3_carryinCV): New.
1979 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1980 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1982 2018-07-19 Michael Collison <michael.collison@arm.com>
1983 Richard Henderson <rth@redhat.com>
1985 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1986 (addti3): Create simpler code if low part is already known to be 0.
1987 (addvti4, uaddvti4): New.
1988 (*add<GPI>3_compareC_cconly_imm): New.
1989 (*add<GPI>3_compareC_cconly): New.
1990 (*add<GPI>3_compareC_imm): New.
1991 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1992 handle constants within this pattern..
1993 (*add<GPI>3_compareV_cconly_imm): New.
1994 (*add<GPI>3_compareV_cconly): New.
1995 (*add<GPI>3_compareV_imm): New.
1996 (add<GPI>3_compareV): New.
1997 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1998 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1999 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2000 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2001 with 'comparison' operator.
2002 (*add<GPI>3_compareV_cconly_imm): Ditto.
2003 (*add<GPI>3_compareV_cconly): Ditto.
2004 (*add<GPI>3_compareV_imm): Ditto.
2005 (add<GPI>3_compareV): Ditto.
2006 (add<mode>3_carryinC): Ditto.
2007 (*add<mode>3_carryinC_zero): Ditto.
2008 (*add<mode>3_carryinC): Ditto.
2009 (add<mode>3_carryinV): Ditto.
2010 (*add<mode>3_carryinV_zero): Ditto.
2011 (*add<mode>3_carryinV): Ditto.
2013 2018-07-19 Michael Collison <michael.collison@arm.com>
2014 Richard Henderson <rth@redhat.com>
2016 * config/aarch64/aarch64-modes.def (CC_V): New.
2017 * config/aarch64/aarch64-protos.h
2018 (aarch64_addti_scratch_regs): Declare
2019 (aarch64_subvti_scratch_regs): Declare.
2020 (aarch64_expand_subvti): Declare.
2021 (aarch64_gen_unlikely_cbranch): Declare
2022 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2023 for signed overflow using CC_Vmode.
2024 (aarch64_get_condition_code_1): Handle CC_Vmode.
2025 (aarch64_gen_unlikely_cbranch): New function.
2026 (aarch64_addti_scratch_regs): New function.
2027 (aarch64_subvti_scratch_regs): New function.
2028 (aarch64_expand_subvti): New function.
2030 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2032 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2034 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2035 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2038 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2041 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2042 address check not strict.
2044 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2046 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2048 (store_pair_lanes<mode>): Likewise.
2049 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2050 enum value 'ADDR_QUERY_LDP_STP_N'.
2051 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2052 (aarch64_print_address_internal): Add declaration.
2053 (aarch64_print_ldpstp_address): Remove.
2054 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2055 (aarch64_print_operand): Change printing of 'y'.
2056 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2057 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2058 'true' rather than '1'.
2059 * config/aarch64/constraints.md (Uml): Likewise.
2060 (Uml): Rename to Umn.
2063 2018-07-19 Richard Biener <rguenther@suse.de>
2065 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2067 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2068 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2069 (vn_reference_hasher): Likewise.
2070 (struct vn_tables_s): Remove obstack and alloc-pool members.
2071 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2072 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2073 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2074 (vn_reference_insert_pieces): Likewise.
2075 (alloc_vn_nary_op_noinit): Adjust.
2076 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2077 (vn_phi_eq): Adjust.
2078 (shared_lookup_phiargs): Remove.
2079 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2080 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2081 (visit_reference_op_call): Likewise.
2082 (copy_nary, copy_phi, copy_reference): Remove.
2083 (process_scc): Rewind the obstack when iterating. Do not
2084 copy the elements to valid_info but just move them from one
2085 hashtable to the other.
2086 (allocate_vn_table): Adjust.
2087 (free_vn_table): Likewise.
2088 (init_scc_vn): Likewise.
2089 (free_scc_vn): Likewise.
2091 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2094 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2095 indirect_return as function type attribute.
2096 (ix86_attribute_table): Change indirect_return to function
2098 * doc/extend.texi: Update indirect_return attribute.
2100 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2102 * wide-int.h (widest2_int): New.
2103 * gimple-fold.c (arith_overflowed_p): Use it.
2104 * tree.h (widest2_int_cst): New.
2105 * tree-vrp.c (wide_int_binop_overflow): Rename from
2106 vrp_int_const_binop.
2107 Rewrite to work on trees.
2108 (extract_range_from_multiplicative_op_1): Abstract code to...
2109 (wide_int_range_min_max): ...here.
2110 (wide_int_range_cross_product): ...and here.
2111 (extract_range_from_binary_expr_1): Abstract overflow code to...
2112 (wide_int_range_mult_wrapping): ...here.
2113 * tree-vrp.h (wide_int_range_cross_product): New.
2114 (wide_int_range_mult_wrapping): New.
2116 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2117 Julia Koval <julia.koval@intel.com>
2119 * config/i386/x86-tune-costs.h (skylake_memcpy,
2120 skylake_memset): Replace rep_prefix with unrolling for size 512.
2122 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2125 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2128 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2130 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2131 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2132 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2133 previously known as "PowerPC AltiVec Built-in Functions". Move
2134 some material to new subsubsections "PowerPC AltiVec Built-in
2135 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2137 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2138 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2139 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2140 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2142 2018-07-18 Richard Biener <rguenther@suse.de>
2144 PR tree-optimization/86557
2145 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2148 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2150 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2152 2018-07-17 Jeff Law <law@redhat.com>
2154 * config/arm/arm.c (get_label_padding): Update for recent
2155 changes to label_to_alignment.
2157 PR tree-optimization/86010
2158 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2160 * config/mips/mips.c (vr4130_align_insns): Update for recent
2161 changes to label_to_alignment.
2163 * config/frv/frv.c (frv_label_align): Update for recent changes
2164 to label_to_alignment.
2166 * config/nios2/nios2.c (nios2_label_align): Update for recent
2167 changes which dropped ALIGN_LABELS_LOG.
2169 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2171 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2172 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2174 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2176 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2177 deprecated align_labels_log.
2179 2018-07-17 Richard Biener <rguenther@suse.de>
2182 * dwarf2out.c (init_sections_and_labels): Always generate
2183 a debug_line_str_section for early LTO debug.
2184 (dwarf2out_finish): Reset debug_line_str_hash output early.
2185 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2187 (dwarf2out_early_finish): Output debug_line_str.
2189 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2191 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2192 index register on z196 or later.
2194 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2196 * config/s390/s390.c (s390_default_align): Set default function
2198 (s390_override_options_after_change): Call s390_default align.
2199 (s390_option_override_internal): Call s390_default_align.
2200 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2202 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2205 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2206 to _looptemp_ clauses, other than the first two.
2208 2018-07-17 Martin Liska <mliska@suse.cz>
2210 * opts.c: Do not enable OPT_falign_* for -Os.
2212 2018-07-17 Martin Liska <mliska@suse.cz>
2214 * align.h (MAX_CODE_ALIGN): New.
2215 (MAX_CODE_ALIGN_VALUE): New.
2216 * common/config/i386/i386-common.c (ix86_handle_option):
2217 (MAX_CODE_ALIGN): Moved to align.h.
2218 * final.c (MAX_CODE_ALIGN): Likewise.
2219 * opts.c (parse_and_check_align_values):
2220 (MAX_CODE_ALIGN): Likewise.
2221 (MAX_CODE_ALIGN_VALUE): Likewise.
2223 2018-07-17 Martin Liska <mliska@suse.cz>
2225 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2226 in order to fulfil coding style.
2227 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2228 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2229 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2230 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2231 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2232 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2233 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2234 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2235 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2237 2018-07-17 Martin Liska <mliska@suse.cz>
2239 * align.h: New file.
2240 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2241 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2242 align_flags of label_to_alignment.
2243 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2245 * config/m68k/m68k.c: Do not use removed align_labels_value and
2247 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2248 (LOOP_ALIGN): Likewise.
2249 (LABEL_ALIGN): Likewise.
2250 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2251 Remove not used macro.
2252 (rs6000_loop_align): Change return type to align_flags.
2253 (rs6000_loop_align_max_skip): Remove.
2254 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2255 Change return type to align_flags.
2256 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2257 Remove not used macro.
2258 (rs6000_loop_align): Change return type to align_flags.
2259 (rs6000_loop_align_max_skip): Remove.
2260 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2261 * config/rx/rx-protos.h (rx_align_for_label): Make it
2263 * config/rx/rx.c (rx_align_for_label): Change return type
2265 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2267 into align_flags class.
2268 (LABEL_ALIGN): Likewise.
2269 (LOOP_ALIGN): Likewise.
2270 * config/s390/s390.c (s390_label_align): Use align_flags
2272 (s390_asm_output_function_label): Likewise.
2273 * config/sh/sh.c (sh_override_options_after_change):
2274 Use align_flags class directly without macros.
2275 (find_barrier): Likewise.
2276 (barrier_align): Likewise.
2277 (sh_loop_align): Likewise.
2278 * config/spu/spu.c (spu_option_override):
2279 Use align_flags_tuple::get_value instead of removed macros.
2280 (spu_sched_init): Likewise.
2281 * config/spu/spu.h (GTY): Likewise.
2282 * config/visium/visium.c (visium_option_override):
2283 Set "8" as default secondary alignment.
2284 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2285 in order to guarantee secondary alignment of 8.
2286 * coretypes.h: Include align.h header file.
2287 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2288 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2289 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2290 * doc/tm.texi.in: Likewise.
2291 * final.c (struct label_alignment): Remove not used structure.
2292 (LABEL_ALIGN): Change type to align_flags.
2293 (LOOP_ALIGN): Likewise.
2294 (JUMP_ALIGN): Likewise.
2295 (default_loop_align_max_skip): Remove.
2296 (default_label_align_max_skip): Likewise.
2297 (default_jump_align_max_skip): Likewise.
2298 (default_label_align_after_barrier_max_skip):
2299 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2300 (LABEL_TO_MAX_SKIP): Remove.
2301 (label_to_alignment): Return align_flags type instead of integer.
2302 (label_to_max_skip): Remove.
2303 (align_fuzz): Use align_flags type.
2304 (compute_alignments): Use align_flags type and use align_flags::max
2305 to combine multiple alignments.
2306 (grow_label_align): Grow vec instead of C array.
2307 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2308 (shorten_branches): Use align_flags type and use align_flags::max
2309 to combine multiple alignments.
2310 (final_scan_insn_1): Remove usage of secondary alignment that comes
2311 from label alignment, but instead use proper secondary alignment
2312 which is computed in grow_label_align.
2313 * flags.h (struct align_flags_tuple): Move to align.h.
2314 (struct align_flags): Likewise.
2315 (state_align_loops): Rename to align_loops.
2316 (state_align_jumps): Rename to align_jumps.
2317 (state_align_labels): Rename to align_labels.
2318 (state_align_functions): Rename to align_functions.
2319 (align_loops_log): Remove.
2320 (align_jumps_log): Remove.
2321 (align_labels_log): Remove.
2322 (align_functions_log): Remove.
2323 (align_loops_max_skip): Remove.
2324 (align_jumps_max_skip): Remove.
2325 (align_labels_max_skip): Remove.
2326 (align_functions_max_skip): Remove.
2327 (align_loops_value): Remove.
2328 (align_jumps_value): Remove.
2329 (align_labels_value): Remove.
2330 (align_functions_value): Remove.
2331 * output.h (label_to_alignment): Change return type to align_flags.
2332 (label_to_max_skip): Remove.
2333 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2334 jump_align_max_skip macros.
2335 * targhooks.h (default_loop_align_max_skip): Remove.
2336 (default_label_align_max_skip): Likewise.
2337 (default_jump_align_max_skip): Likewise.
2338 (default_label_align_after_barrier_max_skip): Remove.
2339 * toplev.c (read_log_maxskip): Use ::normalize function.
2340 (parse_N_M): Remove not used argument and also call ::normalize.
2341 (parse_alignment_opts): Do not pass unused arguments.
2342 * varasm.c (assemble_start_function): Use directly align_functions
2343 instead of removed macros.
2344 * system.h: Do not poison removed macros.
2346 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2349 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2350 and cond temporaries don't have reference type if iterator has
2351 pointer type. For init use &for_pre_body instead of pre_p if
2352 for_pre_body is non-empty.
2354 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2356 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2357 double-double modes to SFmode directly directly.
2358 (trunc<mode>sf2_fprs): Delete.
2360 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2362 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2363 for conversions between IFmode and the decimal floating point modes.
2364 (init_float128_ieee): Use the correct names for conversions between
2365 KFmode and the decimal floating point modes.
2367 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2369 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2370 for the conversions between TDmode and IFmode.
2371 (init_float128_ieee): Use more correct names for the conversions
2372 between TDmode and KFmode.
2374 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2376 PR tree-optimization/86526
2377 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2378 (inline_expand_builtin_string_cmp): Likewise.
2379 (inline_string_cmp): Likewise. Use c_readstr instead of
2380 builtin_memcpy_read_str. Add unit_mode temporary.
2382 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2385 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2386 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2388 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2390 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2391 Alphabetize prototypes of built-in functions, separating out
2392 built-in functions that are listed in this section but should be
2393 described elsewhere.
2395 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2398 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2399 conditional move when trapping comparison was split to a
2400 non-trapping one (and vice versa).
2402 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2404 * config/s390/s390.c (s390_function_profiler): Generate nops
2405 instead of profiler call sequences.
2406 * config/s390/s390.opt: Add the new option.
2408 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2410 * config/s390/s390.c (s390_function_profiler): Generate
2411 __mcount_loc section.
2412 * config/s390/s390.opt: Add the new option.
2414 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2416 * common.opt: Add the new warning.
2417 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2418 %r0,__fentry__" when -mfentry is specified.
2419 (s390_option_override_internal): Disallow -mfentry for 31-bit
2421 * config/s390/s390.opt: Add the new option.
2423 2018-07-16 Richard Biener <rguenther@suse.de>
2426 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2427 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2429 2018-07-16 Martin Liska <mliska@suse.cz>
2432 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2435 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2437 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2439 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2441 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2443 * config/arc/arc-cpus.def (hs4x): New cpu.
2445 * config/arc/arc-tables.opt: Regenerate.
2446 * config/arc/arc.c (arc_sched_issue_rate): New function.
2447 (TARGET_SCHED_ISSUE_RATE): Define.
2448 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2449 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2451 (attr tune): Add ARCHS4x tune values.
2452 (attr tune_dspmpy): Define.
2453 (*tst): Correct instruction type.
2454 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2455 * config/arc/arcHS4x.md: New file.
2456 * config/arc/fpu.md: Update instruction type attributes.
2457 * config/arc/t-multilib: Regenerate.
2459 2018-07-16 Tom de Vries <tdevries@suse.de>
2462 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2464 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2466 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2469 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2471 PR tree-optimization/86514
2472 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2473 conversion to a boolean type from a type with greater precision.
2475 2018-07-16 Tom de Vries <tdevries@suse.de>
2477 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2478 dump_flags request TDF_SLIM.
2480 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2482 * fold-const.c (int_const_binop_1): Abstract...
2483 (wide_int_binop): ...wide int code here.
2484 (poly_int_binop): ...poly int code here.
2485 Abstract the rest of int_const_binop_1 into int_const_binop.
2486 * fold-const.h (wide_int_binop): New.
2487 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2488 Remove useless PLUS/MINUS_EXPR case.
2489 (zero_nonzero_bits_from_vr): Move wide int code...
2490 (zero_nonzero_bits_from_bounds): ...here.
2491 (extract_range_from_binary_expr_1): Move mask optimization code...
2492 (range_easy_mask_min_max): ...here.
2493 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2494 (range_easy_mask_min_max): New.
2496 2018-07-15 Jeff Law <law@redhat.com>
2499 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2502 2018-07-14 Jim Wilson <jimw@sifive.com>
2504 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2506 2018-07-14 Paul Koning <ni1d@arrl.net>
2508 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2510 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2512 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2515 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2516 Steve Munroe <munroesj52@gmail.com>
2518 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2519 (_mm_andnot_si128): Likewise.
2520 (_mm_or_si128): Likewise.
2521 (_mm_xor_si128): Likewise.
2523 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2526 * builtins.c (expand_builtin_memcmp): Inline the calls first
2527 when result_eq is false.
2528 (expand_builtin_strcmp): Inline the calls first.
2529 (expand_builtin_strncmp): Likewise.
2530 (inline_string_cmp): New routine. Expand a string compare
2531 call by using a sequence of char comparison.
2532 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2533 a call to str(n)cmp/memcmp.
2534 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2536 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2538 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2540 * config/arm/driver-arm.c: Include arm-native.h.
2541 (host_detect_local_cpu): Use auto-generated data tables.
2542 (vendors, arm_cpu_table): Delete. Move part information to ...
2543 * config/arm/arm-cpus.in: ... here.
2544 * config/arm/parsecpu.awk (gen_native): New function.
2545 (vendor, part): New CPU fields.
2546 (END): Add support for building the native CPU detection tables.
2547 * config/arm/t-arm (arm-native.h): Add build rule.
2548 (driver-arm.o): Add dependency on arm-native.h.
2550 2018-07-13 Richard Biener <rguenther@suse.de>
2553 * match.pd (addr1 - addr2): Allow either of the operand to
2556 2018-07-13 Tom de Vries <tdevries@suse.de>
2558 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2561 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2563 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2564 arrays instead of numbered variables.
2566 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2568 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2569 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2571 2018-07-13 Richard Biener <rguenther@suse.de>
2574 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2575 instead of get_context_die.
2577 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2578 Richard Biener <rguenther@suse.de>
2581 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2582 that the loop latch destination where phi is defined.
2584 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2586 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2587 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2588 (riscv_set_current_function): Extract getting interrupt type to new
2590 (riscv_get_interrupt_type): New function.
2591 (riscv_merge_decl_attributes): New function, checking interrupt type is
2593 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2595 2018-07-12 Paul Koning <ni1d@arrl.net>
2597 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2600 2018-07-12 Paul Koning <ni1d@arrl.net>
2602 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2603 zero reference, add doloop_end instead.
2604 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2605 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2606 detail for doloop_end.
2608 2018-07-12 Martin Sebor <msebor@redhat.com>
2611 * attribs.c (decl_attributes): Reject conflicting attributes before
2612 calling attribute handlers.
2614 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2616 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2618 (gcc::dump_manager::get_dump_file_name): likewise.
2619 (dump_begin): Likewise.
2620 * dumpfile.h (dump_begin): Update prototype.
2621 (gcc::dump_manager::get_dump_file_name,
2622 gcc::dump_manager::get_dump_file_name): Update prototype.
2624 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2626 * internal-fn.h (vectorizable_internal_fn_p): New function.
2627 * tree-vect-slp.c (compatible_calls_p): Likewise.
2628 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2629 to internal functions.
2630 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2632 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2634 * fold-const.h (inverse_conditions_p): Declare.
2635 * fold-const.c (inverse_conditions_p): New function.
2636 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2637 that test the inverse condition of a conditional internal function.
2638 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2639 * internal-fn.c (internal_fn_mask_index): Handle conditional
2641 (vectorized_internal_fn_supported_p): New function.
2642 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2643 (any_pred_load_store): Replace with...
2644 (need_to_predicate): ...this new variable.
2645 (redundant_ssa_names): New variable.
2646 (ifcvt_can_use_mask_load_store): Move initial checks to...
2647 (ifcvt_can_predicate): ...this new function. Handle tree codes
2648 for which a conditional internal function exists.
2649 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2650 instead of ifcvt_can_use_mask_load_store. Update after variable
2652 (predicate_load_or_store): New function, split out from
2653 predicate_mem_writes.
2654 (check_redundant_cond_expr): New function.
2655 (value_available_p): Likewise.
2656 (predicate_rhs_code): Likewise.
2657 (predicate_mem_writes): Rename to...
2658 (predicate_statements): ...this. Use predicate_load_or_store
2659 and predicate_rhs_code.
2660 (combine_blocks, tree_if_conversion): Update after above name changes.
2661 (ifcvt_local_dce): Handle redundant_ssa_names.
2662 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2663 general conditional functions.
2664 * tree-vect-stmts.c (vectorizable_call): Likewise.
2666 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2667 Alan Hayward <alan.hayward@arm.com>
2668 David Sherwood <david.sherwood@arm.com>
2670 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2671 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2672 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2673 plus and minus and convert them into IFN_COND_FMA-based sequences.
2674 (convert_mult_to_fma): Handle conditional plus and minus.
2676 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2678 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2679 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2680 (cond_fnms_optab): New optabs.
2681 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2683 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2684 * internal-fn.h (get_conditional_internal_fn): Declare.
2685 (get_unconditional_internal_fn): Likewise.
2686 * internal-fn.c (cond_ternary_direct): New macro.
2687 (expand_cond_ternary_optab_fn): Likewise.
2688 (direct_cond_ternary_optab_supported_p): Likewise.
2689 (FOR_EACH_COND_FN_PAIR): Likewise.
2690 (get_conditional_internal_fn): New function.
2691 (get_unconditional_internal_fn): Likewise.
2692 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2693 (gimple_match_op::gimple_match_op): Add a new overload for 5
2695 (gimple_match_op::set_op): Likewise.
2696 (gimple_resimplify5): Declare.
2697 * genmatch.c (decision_tree::gen): Generate simplifications for
2699 * gimple-match-head.c (gimple_simplify): Define an overload for
2700 5 operands. Handle calls with 5 arguments in the top-level overload.
2701 (convert_conditional_op): Handle conversions from unconditional
2702 internal functions to conditional ones.
2703 (gimple_resimplify5): New function.
2704 (build_call_internal): Pass a fifth operand.
2705 (maybe_push_res_to_seq): Likewise.
2706 (try_conditional_simplification): Try converting conditional
2707 internal functions to unconditional internal functions.
2708 Handle 3-operand unconditional forms.
2709 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2710 Define ternary equivalents of the current rules for binary conditional
2712 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2714 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2715 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2716 (optab): Handle them.
2717 (SVE_COND_FP_TERNARY): New int iterator.
2718 (sve_fmla_op, sve_fmad_op): New int attributes.
2719 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2720 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2721 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2723 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2725 * target.def (preferred_else_value): New target hook.
2726 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2727 * doc/tm.texi: Regenerate.
2728 * targhooks.h (default_preferred_else_value): Declare.
2729 * targhooks.c (default_preferred_else_value): New function.
2730 * internal-fn.h (conditional_internal_fn_code): Declare.
2731 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2732 (get_conditional_internal_fn): Use it.
2733 (conditional_internal_fn_code): New function.
2734 * gimple-match.h (gimple_match_cond): New struct.
2735 (gimple_match_op): Add a cond member function.
2736 (gimple_match_op::gimple_match_op): Update all forms to take a
2738 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2739 for the suboperation, but don't specify a particular else_value.
2740 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2741 (visit_nary_op, visit_reference_op_load): Pass
2742 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2743 * gimple-match-head.c: Include tree-eh.h
2744 (convert_conditional_op): New function.
2745 (maybe_resimplify_conditional_op): Likewise.
2746 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2747 (gimple_resimplify2): Likewise.
2748 (gimple_resimplify3): Likewise.
2749 (gimple_resimplify4): Likewise.
2750 (maybe_push_res_to_seq): Return null for conditional operations.
2751 (try_conditional_simplification): New function.
2752 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2754 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2756 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2758 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2760 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2762 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2764 (hash_tree): Do not hash DECL_FCONTEXT
2765 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2766 Do not stream DECL_FCONTEXT.
2767 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2768 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2770 2018-07-12 Richard Biener <rguenther@suse.de>
2773 * dwarf2out.c (gen_block_die): Only output blocks when they have
2774 at least one !DECL_IGNORED_P variable.
2776 2018-07-12 Richard Biener <rguenther@suse.de>
2779 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2780 Remove -mieee-fp handling.
2782 2018-07-12 Richard Biener <rguenther@suse.de>
2784 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2785 left-over from last patch.
2787 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2789 PR tree-optimization/86492
2790 * gimple-ssa-store-merging.c
2791 (imm_store_chain_info::coalesce_immediate_stores): Call
2792 check_no_overlap even for the merge_overlapping case. Formatting fix.
2794 2018-07-12 Richard Biener <rguenther@suse.de>
2797 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2798 move possibly trapping operations into the conditional.
2800 2018-07-12 Richard Biener <rguenther@suse.de>
2802 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2803 (vn_lookup_simplify_result): Remove recursion limit applied
2805 (vn_nary_build_or_lookup_1): Adjust.
2806 (try_to_simplify): Likewise.
2807 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2809 (gimple_resimplify2): Likewise.
2810 (gimple_resimplify3): Likewise.
2811 (gimple_resimplify4): Likewise.
2813 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2815 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2816 Use __mmask64 type instead of __mmask8 for __M argument.
2817 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2818 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2820 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2821 __mmask16 for __M argument.
2822 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2823 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2824 to __mmask16 instead of __mmask8.
2825 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2826 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2827 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2828 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2829 instead of __mmask16 for __U argument.
2830 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2831 __mmask16 instead of __mmask8 for __U argument.
2832 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2834 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2836 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2838 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2840 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2842 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2844 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2846 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2848 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2850 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2852 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2853 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2854 return type as well as __M argument type and all casts from __mmask8
2856 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2857 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2858 return type as well as __M argument type and all casts from __mmask8
2860 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2861 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2862 return type as well as __M argument type and all casts from __mmask8
2864 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2865 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2866 return type as well as __M argument type and all casts from __mmask8
2868 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2869 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2872 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2874 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2875 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2878 2018-07-11 Paul Koning <ni1d@arrl.net>
2880 * doc/md.texi (define_subst): Document how multiple occurrences of
2881 the same argument in the replacement pattern are handled.
2883 2018-07-11 Paul Koning <ni1d@arrl.net>
2885 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2887 (Common Type Attributes): Add "mode" attribute.
2889 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2891 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2892 stream DECL_ORIGINAL_TYPE.
2893 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2894 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2895 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2896 Do not walk original type.
2897 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2899 (write_ts_decl_non_common_tree_pointers): Do not stream
2901 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2902 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2904 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2906 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2907 thread twice from the same starting edge.
2909 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2911 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2912 * gimple.c (gimple_call_nonnull_result_p): ...here...
2913 (gimple_call_nonnull_arg): ...and here.
2914 * gimple.h (gimple_call_nonnull_result_p): New.
2915 (gimple_call_nonnull_arg): New.
2917 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2919 * config/arm/arm-cpus.in: Move information from fpu field of each
2920 cpu definition to the isa field.
2921 * config/arm/parsecpu.awk (fpu): Delete match rule.
2922 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2924 2018-07-11 Richard Biener <rguenther@suse.de>
2927 * dwarf2out.c (init_sections_and_labels): Use
2928 output_asm_line_debug_info consistently.
2929 (dwarf2out_early_finish): Likewise.
2930 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2933 2018-07-11 Richard Biener <rguenther@suse.de>
2935 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2936 Rework father_bb setting in a way to avoid propagating constants
2937 multiple times on a loop body.
2939 2018-07-10 Mark Wielaard <mark@klomp.org>
2942 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2944 2018-07-10 Richard Biener <rguenther@suse.de>
2946 * hash-map.h (hash_map::iterator::operator*): Return
2947 references to key and value.
2949 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2952 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2953 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2954 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2955 (gimplify_omp_for): For composite loops, move outer
2956 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2957 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2958 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2959 TREE_LIST for both the original class iterator and the "last" helper
2960 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2961 loop, remember has_decl_expr from outer composite loops for the
2962 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2964 2018-07-09 Martin Sebor <msebor@redhat.com>
2968 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2969 accessing implicitly initialized array elements.
2970 * expr.c (string_constant): Handle string initializers of
2971 character arrays within aggregates.
2972 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2973 Store element offset. As a special case, handle zero size.
2974 (fold_nonarray_ctor_reference): Same.
2975 (fold_ctor_reference): Add argument. Store subobject offset.
2976 * gimple-fold.h (fold_ctor_reference): Add argument.
2978 2018-07-09 Paul Koning <ni1d@arrl.net>
2980 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2981 (pdp11_insn_cost): New function.
2982 (pdp11_md_asm_adjust): New function.
2983 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2984 (pdp11_rtx_costs): Update to match machine better.
2985 (output_addr_const_pdp11): Correct format mismatch warnings.
2986 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2987 * config/pdp11/pdp11.md: General change to add base_cost and/or
2988 length attributes for use by new pdp11_insn_cost function.
2989 (MIN_BRANCH): Correct definition.
2991 (doloop_end): Use standard pattern name for looping pattern.
2992 (doloop_end_nocc): New.
2993 (movsf): Add another constraint alternative.
2994 (zero_extendqihi2): Add constraint alternatives for not in place
2996 (zero_extendhisi2): Remove.
2997 (shift patterns): Add CC handling variants.
3001 (define_peephole2): New peephole to recognize mov that sets CC for
3004 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3006 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3007 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3010 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3013 * real.c (real_nextafter): Return true if result is denormal.
3015 2018-07-09 Martin Liska <mliska@suse.cz>
3017 * common.opt: Add back wrongly removed attribute.
3019 2018-07-09 Richard Biener <rguenther@suse.de>
3022 * dwarf2out.c (gen_block_die): For an early generated DIE
3023 always output high/low PC attributes.
3025 2018-07-09 Tom de Vries <tdevries@suse.de>
3027 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3028 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3029 onto VAR_DECL with abstract origin.
3031 2018-07-07 Jim Wilson <jimw@sifive.com>
3033 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3035 2018-07-07 Tom de Vries <tdevries@suse.de>
3037 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3039 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3041 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3043 (combine_bound): Use wide-int overflow calculation instead of
3045 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3047 * fold-const.c (int_const_binop_2): Same.
3048 (extract_muldiv_1): Same.
3049 (fold_div_compare): Same.
3050 (fold_abs_const): Same.
3052 * poly-int.h (add): Same.
3056 * predict.c (predict_iv_comparison): Same.
3057 * profile-count.c (slow_safe_scale_64bit): Same.
3058 * simplify-rtx.c (simplify_const_binary_operation): Same.
3059 * tree-chrec.c (tree_fold_binomial): Same.
3060 * tree-data-ref.c (split_constant_offset_1): Same.
3061 * tree-if-conv.c (idx_within_array_bound): Same.
3062 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3063 * tree-ssa-phiopt.c (minmax_replacement): Same.
3064 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3065 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3066 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3067 * wide-int.cc (wi::add_large): Same.
3068 (wi::mul_internal): Same.
3069 (wi::sub_large): Same.
3070 (wi::divmod_internal): Same.
3071 * wide-int.h: Change overflow type to overflow_type for neg, add,
3072 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3073 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3074 mul_internal, divmod_internal.
3075 (overflow_type): New enum.
3076 (accumulate_overflow): New.
3078 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3080 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3081 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3083 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3085 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3086 argument is checked for zero before entering loop, avoid checking again.
3088 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3090 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3091 * gimplify.h (generic_expr_could_trap_p): Likwise.
3092 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3094 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3096 PR tree-optimization/86401
3097 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3098 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3099 (fold_bit_and_mask): ... here. New helper function for match.pd.
3100 * fold-const.h (fold_bit_and_mask): Declare.
3101 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3103 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3106 * target.def (translate_mode_attribute): New hook.
3107 * targhooks.h (default_translate_mode_attribute): Declare.
3108 * targhooks.c (default_translate_mode_attribute): New function.
3109 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3110 * doc/tm.texi: Regenerate.
3111 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3112 (rs6000_translate_mode_attribute): New function.
3114 2018-07-06 Paul Koning <ni1d@arrl.net>
3116 * doc/md.texi (define_split): Document DONE and FAIL.
3117 (define_peephole2): Ditto.
3119 2018-07-05 Jeff Law <law@redhat.com>
3121 PR tree-optimization/86010
3122 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3123 both the head and tail of mem* and str* calls.
3125 2018-07-05 Jim Wilson <jimw@sifive.com>
3127 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3129 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3131 * config/aarch64/aarch64-simd.md: correct flags text for
3132 MIN_EXPR replacement.
3134 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3136 * configure: Regenerated.
3138 2018-07-05 Carl Love <cel@us.ibm.com>
3140 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3141 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3142 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3143 VSX_BUILTIN_DOUBLEL_V4SF.
3145 2018-07-05 Martin Sebor <msebor@redhat.com>
3148 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3149 than its domain to compute its the upper bound of a char array.
3151 2018-07-05 Nathan Sidwell <nathan@acm.org>
3153 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3154 * doc/cpp.texi: Update comment.
3155 * doc/tm.texi: Rebuilt.
3156 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3157 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3158 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3159 headers affected by extern "C".
3160 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3161 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3162 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3163 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3164 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3165 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3166 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3167 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3168 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3169 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3170 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3171 config/sparc/sp64-elf.h, config/spu/spu.h,
3172 config/stormy16/stormy16.h, config/v850/v850.h,
3173 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3174 define NO_IMPLICIT_EXTERN_C.
3175 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3177 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3180 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3181 instead of GET_MODE_SIZE when comparing Units.
3183 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3186 * rtlanal.c (set_noop_p): Constrain on mode change,
3187 include hard-reg-set.h
3189 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3191 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3193 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3196 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3199 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3201 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3203 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3206 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3208 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3210 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3213 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3215 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3217 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3218 neg_*_op* variables.
3220 2018-07-04 Martin Liska <mliska@suse.cz>
3222 * tree-switch-conversion.c: Define
3223 max_ratio_for_speed and max_ratio_for_size constants.
3225 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3226 Martin Liska <mliska@suse.cz>
3231 * common.opt: Rename align options with 'str_' prefix.
3232 * common/config/i386/i386-common.c (set_malign_value): New
3234 (ix86_handle_option): Use it to set -falign-* options/
3235 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3236 type from int to string.
3237 * config/aarch64/aarch64.c: Update default values from int
3239 * config/alpha/alpha.c (alpha_override_options_after_change):
3241 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3242 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3243 max skip conditionally.
3244 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3245 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3246 max skip conditionally.
3247 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3248 max skip conditionally.
3249 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3250 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3251 max skip conditionally.
3252 * config/i386/i386.c (struct ptt): Change type from int to
3254 (ix86_default_align): Set default values.
3255 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3256 max skip conditionally.
3257 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3258 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3259 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3260 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3261 max skip conditionally.
3262 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3263 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3264 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3265 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3266 max skip conditionally.
3267 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3268 * config/ia64/ia64.c (ia64_option_override): Set default values
3269 for alignment options.
3270 * config/m68k/m68k.c: Handle new str_align_* options.
3271 * config/mips/mips.c (mips_set_compression_mode): Change
3273 (mips_option_override): Set default values for options.
3274 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3276 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3278 * config/rx/rx.c (rx_option_override): Likewise.
3279 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3280 (LABEL_ALIGN): Use align_labels_log.
3281 (LOOP_ALIGN): Use align_loops_align.
3282 * config/s390/s390.c (s390_asm_output_function_label): Use new
3284 * config/sh/sh.c (sh_override_options_after_change):
3285 Change type of constants.
3286 * config/spu/spu.c (spu_sched_init): Likewise.
3287 * config/sparc/sparc.c (sparc_option_override): Set default
3289 * config/visium/visium.c (visium_option_override): Likewise.
3290 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3291 emit p2align format with last argument if it's not needed.
3292 * doc/invoke.texi: Document extended format of -falign-*.
3293 * final.c: Use align_labels alignment.
3294 * flags.h (struct target_flag_state): Change type to use
3296 (struct align_flags_tuple): New.
3297 (struct align_flags): Likewise.
3298 (align_loops_log): Redefine macro to use new types.
3299 (align_loops_max_skip): Redefine macro to use new types.
3300 (align_jumps_log): Redefine macro to use new types.
3301 (align_jumps_max_skip): Redefine macro to use new types.
3302 (align_labels_log): Redefine macro to use new types.
3303 (align_labels_max_skip): Redefine macro to use new types.
3304 (align_functions_log): Redefine macro to use new types.
3305 (align_loops): Redefine macro to use new types.
3306 (align_jumps): Redefine macro to use new types.
3307 (align_labels): Redefine macro to use new types.
3308 (align_functions): Redefine macro to use new types.
3309 (align_functions_max_skip): Redefine macro to use new types.
3310 (align_loops_value): New macro.
3311 (align_jumps_value): New macro.
3312 (align_labels_value): New macro.
3313 (align_functions_value): New macro.
3314 * function.c (invoke_set_current_function_hook): Propagate
3315 alignment values from flags to global variables default in
3317 * ipa-icf.c (sem_function::equals_wpa): Use
3318 cl_optimization_option_eq instead of memcmp.
3319 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3321 (cl_optimization_stream_in): Likewise.
3322 * optc-save-gen.awk: Support strings in cl_optimization.
3323 * opth-gen.awk: Likewise.
3324 * opts.c (finish_options): Remove error checking of invalid
3326 (MAX_CODE_ALIGN): Remove.
3327 (MAX_CODE_ALIGN_VALUE): Likewise.
3328 (parse_and_check_align_values): New function.
3329 (check_alignment_argument): Likewise.
3330 (common_handle_option): Use check_alignment_argument.
3331 * opts.h (parse_and_check_align_values): Declare.
3332 * toplev.c (init_alignments): Remove.
3333 (read_log_maxskip): New.
3334 (parse_N_M): Likewise.
3335 (parse_alignment_opts): Likewise.
3336 (backend_init_target): Remove usage of init_alignments.
3337 * toplev.h (parse_alignment_opts): Declare.
3338 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3340 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3341 * tree.c (cl_option_hasher::equal): New.
3342 * varasm.c: Use new global macros.
3344 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3346 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3347 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3348 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3349 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3350 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3351 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3352 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3353 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3354 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3355 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3356 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3357 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3358 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3360 2018-07-04 Martin Liska <mliska@suse.cz>
3361 Jonathan Wakely <jwakely@redhat.com>
3363 * coverage.c: Use correct type.
3364 * doc/invoke.texi: Language correction.
3366 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3369 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3370 ENDBRANCH for non-tail call which may return via indirect branch.
3371 * doc/extend.texi: Document indirect_return attribute.
3373 2018-07-03 Martin Sebor <msebor@redhat.com>
3375 PR tree-optimization/86274
3376 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3378 (format_floating): Correct handling of infinities and NaNs.
3380 2018-07-03 Martin Sebor <msebor@redhat.com>
3382 * print-tree.c (print_real_cst): New function.
3383 (print_node_brief): Call it.
3384 (print_node): Ditto.
3386 2018-07-03 Jeff Law <law@redhat.com>
3388 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3389 into a single pattern.
3391 * config/h8300/h8300.md (ors code_iterator): New.
3392 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3393 a single pattern and single splitter.
3394 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3395 (iorqi3_1, xorqi3_1): Likewise.
3396 (iorqi3, xorqi3 expanders): Similarly.
3398 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3399 (movmd_internal) into a single pattern using the P mode iterator.
3400 (movmd splitters): Similarly.
3401 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3402 (movsd splitters): Similarly.
3404 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3405 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3406 right table based on the size of the operand.
3407 * config/h8300/h8300.md (length_table): Corresponding changes. All
3408 references to "addb", "addw" and "addl" changed to "add".
3409 (btst patterns): Merge two variants into a single pattern.
3410 (tstqi, tsthi): Likewise.
3411 (addhi3_incdec, addsi3_incdec): Likewise.
3412 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3413 (mulhi3, mulsi3): Likewise.
3414 (udivhi3, udivsi3): Likewise.
3415 (divhi3, divsi3): Likewise.
3416 (andorqi3, andorhi3, andorsi3): Likewise.
3418 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3421 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3422 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3424 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3426 PR tree-optimization/85694
3427 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3428 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3430 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3431 (<u>avg<mode>3_ceil): New patterns.
3433 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3435 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3436 scan-tree-dump directive.
3437 * gcc.dg/vect/slp-perm-2.c: Likewise.
3438 * gcc.dg/vect/slp-perm-3.c: Likewise.
3439 * gcc.dg/vect/slp-perm-5.c: Likewise.
3440 * gcc.dg/vect/slp-perm-6.c: Likewise.
3441 * gcc.dg/vect/slp-perm-7.c: Likewise.
3442 * gcc.dg/vect/slp-perm-8.c: Likewise.
3444 2018-07-03 Marek Polacek <polacek@redhat.com>
3447 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3449 2018-07-03 Richard Biener <rguenther@suse.de>
3452 * tree-ssa-structalias.c (find_func_clobbers): Properly
3453 handle indirect calls.
3455 2018-07-03 Jeff Law <law@redhat.com>
3457 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3458 (shifts): New code iterator.
3459 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3460 expander. Fix HImode handling on H8/SX.
3461 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3462 (subqi3, subhi3, subsi3 expanders): Likewise.
3463 (andqi3, andhi3, andsi3 expanders): Likewise.
3464 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3465 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3466 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3467 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3468 (zero_extendqihi2, zero_extendqisi2): Likewise.
3469 (extendqihi2, extendqisi2): Likewise.
3470 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3471 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3472 (rotlqi3_1, rotlhi3_1): Likewise.
3473 (logicalhi3_sn, logicalsi3_sn): Likewise.
3474 (logicalhi3, logicalsi3): Likewise.
3476 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3478 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3479 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3480 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3481 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3482 type to append_pattern_def_seq instead of creating a stmt_vec_info
3484 (build_mask_conversion): Likewise. Remove vinfo argument.
3485 (vect_add_conversion_to_patterm): Likewise, renaming to...
3486 (vect_add_conversion_to_pattern): ...this.
3487 (vect_recog_mask_conversion_pattern): Update call to
3488 build_mask_conversion. Pass the vector type to
3489 append_pattern_def_seq here too.
3490 (vect_recog_gather_scatter_pattern): Update call to
3491 vect_add_conversion_to_pattern.
3493 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3495 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3496 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3497 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3498 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3499 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3500 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3501 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3502 append_pattern_def_seq instead of new_pattern_def_seq.
3503 (vect_recog_divmod_pattern): Do both of the above.
3504 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3507 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3509 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3510 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3511 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3512 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3513 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3514 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3515 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3516 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3517 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3518 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3519 parameter with a single stmt_vec_info.
3520 (vect_recog_func_ptr): Likewise.
3521 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3522 (vect_try_gather_scatter_pattern): ...this.
3523 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3524 the stmt_vec_info of the statement to be matched. Don't clear
3525 STMT_VINFO_RELATED_STMT.
3526 (vect_pattern_recog): Update call accordingly.
3528 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3530 PR tree-optimization/85694
3531 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3532 (uavgM3_ceil): Document new optabs.
3533 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3534 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3536 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3537 (savg_ceil_optab): New optabs.
3538 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3539 (vect_vect_recog_func_ptrs): Add it.
3540 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3541 constant directly from the associated lhs.
3543 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3545 * tree-vect-patterns.c (vect_split_statement): New function.
3546 (vect_convert_input): Use it to try to split an existing cast.
3548 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3550 * poly-int.h (print_hex): New function.
3551 * dumpfile.h (dump_dec, dump_hex): Declare.
3552 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3553 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3554 min_input_precision, operation_precision and operation_sign.
3555 * tree-vect-patterns.c (vect_get_range_info): New function.
3556 (vect_same_loop_or_bb_p, vect_single_imm_use)
3557 (vect_operation_fits_smaller_type): Delete.
3558 (vect_look_through_possible_promotion): Add an optional
3559 single_use_p parameter.
3560 (vect_recog_over_widening_pattern): Rewrite to use new
3561 stmt_vec_info infomration. Handle one operation at a time.
3562 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3563 (vect_truncatable_operation_p, vect_set_operation_type)
3564 (vect_set_min_input_precision): New functions.
3565 (vect_determine_min_output_precision_1): Likewise.
3566 (vect_determine_min_output_precision): Likewise.
3567 (vect_determine_precisions_from_range): Likewise.
3568 (vect_determine_precisions_from_users): Likewise.
3569 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3570 (vect_vect_recog_func_ptrs): Put over_widening first.
3572 (vect_pattern_recog): Call vect_determine_precisions.
3574 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3576 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3577 statements that have been replaced by further pattern statements.
3578 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3580 2018-07-03 Richard Biener <rguenther@suse.de>
3582 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3583 always set *dt. Dump vectype in vectype overload.
3584 * dumpfile.h (dump_gimple_expr): New function.
3585 (dump_gimple_expr_loc): Likewise.
3586 * dumpfile.c (dump_gimple_expr): New function.
3587 (dump_gimple_expr_loc): Likewise.
3589 2018-07-02 Jeff Law <law@redhat.com>
3591 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3592 the H8/300, H8/300H and H8/S variants into a single pattern.
3593 (movhi_h8300, movqi_h8300hs): Similarly.
3594 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3595 (QHI mode iterator): New.
3597 * config/h8300/h8300.md: Remove trailing whitespace.
3599 2018-07-02 Jim Wilson <jimw@sifive.com>
3601 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3602 instead of emit_insn for interrupt returns.
3603 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3604 (riscv_sret, riscv_uret): Likewise.
3606 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3608 * pretty-print.c (selftest::test_pp_format): Move save and restore
3609 of quotes to class auto_fix_quotes, and add an instance.
3610 * selftest.c: Include "intl.h".
3611 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3612 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3613 * selftest.h (selftest::auto_fix_quotes): New class.
3615 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3617 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3618 (aarch64_sve_prepare_conditional_op): Remove.
3619 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3620 Allow aarch64_simd_reg_or_zero as select operand; remove
3621 the aarch64_sve_prepare_conditional_op call.
3622 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3623 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3624 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3625 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3626 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3627 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3628 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3629 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3630 and a splitters to match all of the *_any patterns.
3631 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3633 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3634 (SVE_COND_FP_BINARY_REV): Remove.
3635 (sve_int_op_rev, sve_fp_op_rev): New.
3636 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3637 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3638 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3639 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3640 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3641 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3642 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3643 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3644 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3646 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3647 Remove match_dup 1 from the inner unspec.
3648 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3650 * config/aarch64/aarch64.md (movprfx): New attr.
3651 (length): Default movprfx to 8.
3652 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3653 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3654 (*<su>mul<SVE_I>3_highpart): Likewise.
3655 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3656 (*v<ASHIFT><SVE_I>3): Likewise.
3657 (*<su><MAXMIN><SVE_I>3): Likewise.
3658 (*<su><MAXMIN><SVE_F>3): Likewise.
3659 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3660 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3661 (*div<SVE_F>4): Likewise.
3663 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3665 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3668 2018-07-02 Richard Biener <rguenther@suse.de>
3670 PR tree-optimization/86363
3671 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3672 memset argument refers to a non-variable address.
3674 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3676 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3677 {PLUS,MINUS}_EXPR code to...
3678 (adjust_symbolic_bound): ...here,
3679 (combine_bound): ...here,
3680 (set_value_range_with_overflow): ...and here.
3682 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3684 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3686 (extract_range_from_abs_expr): ...here.
3688 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3690 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3691 -fno-omit-frame-pointer when not optimizing.
3693 2018-07-02 Martin Liska <mliska@suse.cz>
3696 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3697 (propagate_nothrow): Likewise.
3699 2018-07-02 Martin Liska <mliska@suse.cz>
3702 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3704 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3706 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3707 function in r262149, changing "loc" param from source_location to
3708 const dump_location_t &.
3709 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3710 declaration, as above.
3712 2018-07-01 Paul Koning <ni1d@arrl.net>
3714 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3715 -munit-asm, -mgnu-asm, -mdec-asm.
3716 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3717 (pdp11_output_labelref): New.
3718 (pdp11_output_def): New.
3719 (pdp11_output_addr_vec_elt): New.
3720 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3721 %# and %@ format codes.
3722 (pdp11_option_override): New.
3723 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3724 (pdp11_output_ident): New.
3725 (pdp11_asm_named_section): New.
3726 (pdp11_asm_init_sections): New.
3727 (pdp11_file_start): New.
3728 (pdp11_file_end): New.
3729 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3730 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3731 %o, like %c but octal.
3732 (pdp11_option_override): New.
3733 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3735 (DATA_SECTION_ASM_OP): Ditto.
3736 (READONLY_DATA_SECTION_ASM_OP): New.
3737 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3738 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3739 (ASM_OUTPUT_LABELREF): Ditto.
3740 (ASM_OUTPUT_DEF): Ditto.
3741 (ASM_OUTPUT_EXTERNAL): New.
3742 (ASM_OUTPUT_SOURCE_FILENAME): New.
3743 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3744 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3745 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3746 %# and %@ format codes.
3747 * config/pdp11/pdp11.opt (mgnu-asm): New.
3748 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3749 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3750 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3752 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3754 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3755 dereferencing path[] beyond its length.
3757 (debug_all_paths): New.
3758 (rewire_first_differing_edge): New.
3759 (adjust_paths_after_duplication): New.
3760 (duplicate_thread_path): Call adjust_paths_after_duplication.
3762 (thread_through_all_blocks): Add new argument to
3763 duplicate_thread_path.
3765 2018-06-30 Jim Wilson <jimw@sifive.com>
3767 * config/riscv/predicates.md (p2m1_shift_operand): New.
3768 (high_mask_shift_operand): New.
3769 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3770 pattern using p2m1_shift_operand.
3771 (lshsi3_zero_extend_3+2): New combiner pattern using
3772 high_mask_shift_operand.
3774 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3776 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3778 (vect_recog_rotate_pattern): ...here.
3779 (vect_convert_input): Try to insert casts of invariants in the
3781 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3782 preheader to be empty.
3784 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3786 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3787 vector type. If given, install it in the new statement's
3789 (vect_element_precision): New function.
3790 (vect_unpromoted_value): New struct.
3791 (vect_unpromoted_value::vect_unpromoted_value): New function.
3792 (vect_unpromoted_value::set_op): Likewise.
3793 (vect_look_through_possible_promotion): Likewise.
3794 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3795 (vect_widened_op_tree, vect_convert_input): Likewise.
3796 (vect_convert_inputs, vect_convert_output): Likewise.
3797 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3798 to handle the optional cast of the multiplication result and
3799 vect_widened_op_tree to detect the widened multiplication itself.
3800 Do not require the input and output of promotion casts to have
3801 the same sign, but base the signedness of the operation on the
3802 input rather than the result. If the pattern includes two
3803 promotions, check that those promotions have the same sign.
3804 Do not restrict the MULT_EXPR handling to a double-width result;
3805 handle quadruple-width results and wider. Use vect_convert_inputs
3806 to convert the inputs to the common type.
3807 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3808 to handle the optional cast of the ABS result. Also allow a sign
3809 change or a sign extension between the ABS and MINUS.
3810 Use vect_widened_op_tree to detect the widened subtraction and use
3811 vect_convert_inputs to convert the inputs to the common type.
3812 (vect_handle_widen_op_by_const): Delete.
3813 (vect_recog_widen_op_pattern): New function.
3814 (vect_recog_widen_mult_pattern): Use it.
3815 (vect_recog_widen_shift_pattern): Likewise.
3816 (vect_recog_widen_sum_pattern): Use
3817 vect_look_through_possible_promotion to handle the promoted
3820 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3822 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3823 the containing gimple_seq *.
3824 * gimple-iterator.h (gsi_for_stmt): Declare it.
3825 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3826 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3827 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3828 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3829 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3831 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3833 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3834 statement being replaced is part of an existing pattern
3835 definition sequence, inserting the new pattern statements before
3837 (vect_pattern_recog_1): Don't return a bool. If the statement
3838 is already part of a pattern, instead apply pattern matching
3839 to the pattern definition statements. Don't clear the
3840 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3841 (vect_pattern_recog): Don't break after the first match;
3842 continue processing the pattern definition statements instead.
3843 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3845 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3847 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3848 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3849 (vect_recog_widen_sum_pattern): Use it.
3851 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3853 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3854 phi is not a pattern statement and has not been replaced by
3855 a pattern statement.
3856 * tree-vect-patterns.c (type_conversion_p): Don't check
3857 STMT_VINFO_IN_PATTERN_P.
3858 (vect_recog_vector_vector_shift_pattern): Likewise.
3859 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3860 the pattern statement rather than the original statement; check
3861 directly for a WIDEN_MULT_EXPR here.
3862 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3863 vect_is_simple_use to return the pattern statement rather
3864 than the original statement; use is_pattern_stmt_p to check
3865 for such a pattern statement.
3866 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3867 to return the pattern statement rather than the original statement;
3868 don't do the same transformation here.
3869 (vect_is_simple_use): If the defining statement has been replaced
3870 by a pattern statement, return the pattern statement instead.
3871 Remove the corresponding (local) transformation from the vectype
3874 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3876 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3877 end and default to null.
3878 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3879 (vectorizable_reduction): Update calls accordingly, dropping the
3880 gimple ** argument if the passed-back statement isn't needed.
3881 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3882 (vect_recog_rotate_pattern): Likewise.
3883 (vect_recog_mask_conversion_pattern): Likewise.
3884 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3885 (vect_mask_constant_operand_p): Likewise.
3886 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3887 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3888 (get_group_load_store_type, get_load_store_type): Likewise.
3889 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3890 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3891 (vectorizable_conversion, vectorizable_assignment): Likewise.
3892 (vectorizable_shift, vectorizable_operation): Likewise.
3893 (vectorizable_store, vect_is_simple_cond): Likewise.
3894 (vectorizable_condition, vectorizable_comparison): Likewise.
3895 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3896 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3897 and move it to the end. Cope with null def_stmt_outs.
3899 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3901 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3903 2018-06-29 Jeff Law <law@redhat.com>
3905 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3906 displacements for TARGET_V850E2V3 and newer.
3907 (TARGET_LRA_P): Remove. Defaults to LRA now.
3908 * config/v850/v850.md (sign23byte_load): Remove.
3909 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3910 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3912 2018-06-29 Martin Liska <mliska@suse.cz>
3915 * coverage.c (coverage_init): Mangle full path name.
3916 * doc/invoke.texi: Document the change.
3917 * gcov-io.c (mangle_path): New.
3918 * gcov-io.h (mangle_path): Likewise.
3919 * gcov.c (mangle_name): Use mangle_path for path mangling.
3921 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3923 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3924 if starting source register is not even.
3926 2018-06-29 Martin Liska <mliska@suse.cz>
3928 PR tree-optimization/86263
3929 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3930 Make edge redirection.
3932 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3934 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3935 (dump_scope_depth): New variable.
3936 (get_dump_scope_depth): New function.
3937 (dump_begin_scope): New function.
3938 (dump_end_scope): New function.
3939 * dumpfile.h (get_dump_scope_depth): New declaration.
3940 (dump_begin_scope): New declaration.
3941 (dump_end_scope): New declaration.
3942 (class auto_dump_scope): New class.
3943 (AUTO_DUMP_SCOPE): New macro.
3944 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3947 2018-06-29 Richard Biener <rguenther@suse.de>
3949 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3950 compute_all_dependences succeeds.
3951 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3952 exceed --param loop-max-datarefs-for-datadeps.
3954 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3956 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3958 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3961 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3962 alternative 0 in preferred_for_speed attribute.
3964 2018-06-28 Paul Koning <ni1d@arrl.net>
3966 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3967 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3968 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3969 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3970 for shift insn patterns.
3972 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3974 * cgraph.c (cgraph_node::get_body): Replace assignments to
3975 "dump_file" with calls to set_dump_file.
3976 * dumpfile.c (alt_dump_file): Make static, and group with...
3977 (alt_flags): ...this definition.
3978 (dumps_are_enabled): New variable.
3979 (refresh_dumps_are_enabled): New function.
3980 (set_dump_file): New function.
3981 (set_alt_dump_file): New function.
3982 (gcc::dump_manager::dump_start): Replace assignments to
3983 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3985 (gcc::dump_manager::dump_finish): Likewise.
3986 * dumpfile.h (alt_dump_file): Delete decl.
3987 (dumps_are_enabled): New variable decl.
3988 (set_dump_file): New function decl.
3989 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3991 * tree-nested.c (lower_nested_functions): Replace assignments to
3992 "dump_file" with calls to set_dump_file.
3994 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3996 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3997 goto_locus of each outgoing edge of each basic block.
3999 2018-06-28 Richard Biener <rguenther@suse.de>
4001 * dwarf2out.c (decl_scope_table): Remove.
4002 (push_decl_scope): Likewise.
4003 (pop_decl_scope): Likewise.
4004 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4005 (gen_struct_or_union_type_die): Likewise.
4006 (gen_tagged_type_die): Likewise.
4007 (dwarf2out_init): Do not initialize decl_scope_table.
4008 (dwarf2out_c_finalize): Do not free it.
4010 2018-06-28 Richard Biener <rguenther@suse.de>
4012 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4013 deciding whether to not re-use a DIE.
4015 2018-06-28 Richard Biener <rguenther@suse.de>
4017 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4018 DW_AT_abstract_origin attribute.
4020 2018-06-28 Martin Liska <mliska@suse.cz>
4022 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4023 Use newly introduced constants.
4024 * tree-switch-conversion.h (struct jump_table_cluster):
4025 Define max_ratio_for_size and max_ratio_for_speed.
4027 2018-06-28 Martin Liska <mliska@suse.cz>
4029 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4030 Add new checking assert to catch invalid state.
4031 (jump_table_cluster::can_be_handled): Handle single case
4033 (jump_table_cluster::is_beneficial): Bail out for such case.
4034 (bit_test_cluster::find_bit_tests):
4035 Add new checking assert to catch invalid state.
4036 (bit_test_cluster::can_be_handled): Handle single case
4038 (bit_test_cluster::is_beneficial): Bail out for such case.
4039 (switch_decision_tree::analyze_switch_statement):
4042 2018-06-28 Martin Liska <mliska@suse.cz>
4044 * common.opt: Introduce -completion option.
4045 * gcc.c (driver_handle_option): Handle it.
4046 (driver::main): Print completions if completion
4048 * opt-suggestions.c (option_proposer::get_completions):
4050 (option_proposer::suggest_completion): Likewise.
4051 (option_proposer::find_param_completions): Likewise.
4052 (verify_autocompletions): Likewise.
4053 (test_completion_valid_options): Likewise.
4054 (test_completion_valid_params): Likewise.
4055 (in_completion_p): Likewise.
4056 (empty_completion_p): Likewise.
4057 (test_completion_partial_match): Likewise.
4058 (test_completion_garbage): Likewise.
4059 (opt_proposer_c_tests): Likewise.
4060 * opt-suggestions.h: Declare new functions.
4061 * opts.c (common_handle_option): Handle OPT__completion_.
4062 * selftest-run-tests.c (selftest::run_tests): Add
4063 opt_proposer_c_tests.
4064 * selftest.c (assert_str_startswith): New.
4065 * selftest.h (assert_str_startswith): Likewise.
4066 (opt_proposer_c_tests): New.
4067 (ASSERT_STR_STARTSWITH): Likewise.
4069 2018-06-28 Martin Liska <mliska@suse.cz>
4071 * Makefile.in: Add opt-suggestions.o.
4072 * gcc-main.c: Include opt-suggestions.h.
4073 * gcc.c (driver::driver): Likewise.
4074 (driver::~driver): Remove m_option_suggestions.
4075 (driver::build_option_suggestions): Moved to option_proposer.
4076 (driver::suggest_option): Likewise.
4077 (driver::handle_unrecognized_options): Use option_proposer.
4078 * gcc.h (class driver): Add new memver m_option_proposer.
4079 * opt-suggestions.c: New file.
4080 * opt-suggestions.h: New file.
4082 2018-06-28 Martin Liska <mliska@suse.cz>
4084 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4085 (auto_string_vec::~auto_string_vec): Likewise.
4087 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4089 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4090 prevent_decl_creation_for_types fields up and add reset_location field.
4091 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4092 statement if id->reset_location is true.
4093 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4094 id->reset_location is true.
4095 (copy_phis_for_bb): Force input_location on the arguments if
4096 id->reset_location is true.
4097 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4098 is set on the function to be inlined.
4100 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4102 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4104 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4106 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4107 registers for Pmode.
4108 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4109 hard registers for the clobbered pseudo.
4111 2018-06-27 Paul Koning <ni1d@arrl.net>
4113 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4114 mutually exclusive options.
4115 * config/pdp11/constraints.md (h): New constraint.
4116 (O): Update definition to match shift code generation.
4117 (D): New constraint.
4118 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4120 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4122 (output_jump): Change arguments.
4123 (pdp11_fixed_cc_regs): New function.
4124 (pdp11_cc_mode): Ditto.
4125 (pdp11_expand_shift): Ditto.
4126 (pdp11_assemble_shift): Ditto.
4127 (pdp11_small_shift): Ditto.
4128 (pdp11_branch_cost): Remove.
4129 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4131 (pdp11_register_move_cost): Update for CC registers.
4132 (pdp11_rtx_costs): Add case for LSHIFTRT.
4133 (pdp11_output_jump): Add CCNZ mode conditional branches.
4134 (notice_update_cc_on_set): Remove.
4135 (pdp11_cc_mode): New function.
4136 (simple_memory_operand): Correct pre/post decrement case.
4137 (no_side_effect_operand): New function.
4138 (pdp11_regno_reg_class): Add CC_REGS class.
4139 (pdp11_fixed_cc_regs): New function.
4140 (pdp11_small_shift): New function.
4141 (pdp11_expand_shift): New function to expand shift insns.
4142 (pdp11_assemble_shift): New function to output shifts.
4143 (pdp11_branch_cost): Remove.
4144 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4145 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4146 (WCHAR_TYPE): Ditto.
4147 (PTRDIFF_TYPE): Ditto.
4148 (ADJUST_INSN_LENGTH): New macro.
4149 (FIXED_REGISTERS): Add CC registers.
4150 (CALL_USED_REGISTERS): Ditto.
4152 (REG_CLASS_NAMES): Ditto.
4153 (REG_CLASS_CONTENTS): Ditto.
4154 (SELECT_CC_MODE): Use new function.
4155 (TARGET_FLAGS_REGNUM): New macro.
4156 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4157 (cc0_reg_rtx): Remove.
4158 (CC_STATUS_MDEP): Remove.
4159 (CC_STATUS_MDEFP_INIT): Remove.
4160 (CC_IN_FPU): Remove.
4161 (NOTICE_UPDATE_CC): Remove.
4162 (REGISTER_NAMES): Add CC registers.
4163 (BRANCH_COST): Change to constant 1.
4164 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4166 * config/pdp11/pdp11.opt (mbcopy): Remove.
4167 (mbcopy-builtin): Remove.
4168 (mbranch-cheap): Remove.
4169 (mbranch-expensive): Remove.
4170 * config/pdp11/predicates.md (expand_shift_operand): Update to
4171 match shift code generation.
4172 (ccnz_operator): New predicate.
4173 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4174 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4175 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4177 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4178 description of O constraint.
4180 2018-06-27 Jeff Law <law@redhat.com>
4181 Austin Law <austinklaw@gmail.com>
4183 * config/v850/v850.md (addsi3_set_flags): New pattern.
4184 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4185 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4186 (zero_extendhisi2_v850_set_flags): Likewise.
4187 (zero_extendqisi2_v850_set_flags): Likewise.
4188 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4189 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4190 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4192 * config/v850/v850-protos.h (notice_update_cc): Remove.
4193 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4194 (v850_print_operand): Handle 'D' and "d".
4195 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4196 Add handling of arithmetic/logical operations compared against zero.
4197 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4198 Do not look at v850_compare_op, instead get mode from last argument.
4199 (v850_gen_compare): Remove
4200 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4201 after reload for prologue insns.
4202 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4204 (construct_save_jarl): Likewise.
4205 (TARGET_FLAGS_REGNUM): Define.
4206 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4207 (NOTICE_UPDATE_CC): Remove.
4208 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4209 than cc0. Conditionalize on reload_completed.
4210 (cmpsi_insn, setfcc_insn): Likewise.
4211 (tst1 splitter): Turn into define_and_split which sets the flags
4213 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4214 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4215 (cstoresf4, cstoredf4): Clobber the flags.
4216 (cmpsi, cmpsf, cmpdf): Remove expanders.
4217 (setf_insn): Remove pattern.
4218 (addsi3): Turn into define_and_split which clobbers the flags after
4219 reload and a suitable pattern (addsi3_clobber_flags) for use after
4221 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4222 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4223 (ashrsi3, ashrsi3_v850e2): Likewise.
4224 (bins): Clobber the flags.
4225 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4226 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4227 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4228 (call_value_internal_short, call_value_internal_long): Likewise.
4229 (callt_save_interrupt, callt_return_interrupt): Likewise.
4230 (save_interrupt, return_interrupt): Likewise.
4231 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4232 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4233 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4234 (All FP comparisons): Only allow after reload has completed.
4236 (divh, divhu): Tweak output template.
4237 (branch_z_normal, branch_z_invert): Remove
4238 (branch_nz_normal, branch_nz_invert): Likewise.
4239 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4241 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4242 * config/v850/v850.c (notice_update_cc): Remove.
4243 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4244 (CC_NO_CARRY): Likewise.
4245 (NOTICE_UPDATE_CC): Define to nothing.
4246 * config/v850/v850.md: Remove block comment on cc0 handling
4247 Remove "cc" attribute from all patterns. Remove cc_status handling
4248 from all patterns. Minor formatting fixes.
4250 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4252 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4253 (cortex-a76.cortex-a55): Likewise.
4254 * config/aarch64/aarch64-tune.md: Regenerate.
4255 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4256 cortex-a76.cortex-a55.
4258 2018-06-27 Jeff Law <law@redhat.com>
4260 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4261 (MULTILIB_DIRNAMES): Similarly.
4263 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4265 * gimple.h (gimple_return_retbnd): Delete.
4266 (gimple_return_set_retbnd): Likewise.
4267 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4268 gimple_return_set_retbnd.
4269 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4270 gimple_return_retbnd and adjust.
4271 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4272 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4273 Explicitly return NULL in a couple more cases. Move assertion
4274 on debug statements and remove unreachable code.
4275 (reset_debug_binding): Do not test id->retbnd.
4276 (expand_call_inline): Do not set it.
4278 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4280 * configure.ac: Add --disable-gcov option.
4281 * configure: Regenerate.
4282 * Makefile.in: Honour @enable_gcov@.
4283 * doc/install.texi: Document --disable-gcov.
4285 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4287 * config/arm/arm-cpus.in (cortex-a76): New entry.
4288 (cortex-a76.cortex-a55): Likewise.
4289 * config/arm/arm-tables.opt: Regenerate.
4290 * config/arm/arm-tune.md: Likewise.
4291 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4292 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4293 cortex-a76.cortex-a55.
4295 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4298 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4300 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4302 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4304 (EPILOGUE_USES): Likewise.
4306 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4308 * tree-inline.c (remap_location): New function extracted from...
4309 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4310 (copy_phis_for_bb): ...here. Call remap_location.
4311 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4313 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4315 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4316 unaligned vsx for 16B memset.
4318 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4321 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4322 ieee128_float_type_node to long_double_type_node unless
4323 TARGET_LONG_DOUBLE_128 is set.
4325 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4327 * cfgloop.c (get_loop_location): Convert return type from
4328 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4329 by implicit construction from rtx_insn *, and using
4330 dump_user_location_t::from_function_decl for the fallback case.
4331 * cfgloop.h (get_loop_location): Convert return type from
4332 location_t to dump_user_location_t.
4333 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4334 dump_printf_loc to pass in a dump_location_t rather than a
4335 location_t, via the gimple stmt.
4336 * coverage.c (get_coverage_counts): Update calls to
4337 dump_printf_loc to pass in dump_location_t rather than a
4339 * doc/optinfo.texi (Dump types): Convert example of
4340 dump_printf_loc from taking "locus" to taking "insn". Update
4341 description of the "_loc" calls to cover dump_location_t.
4342 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4344 (dump_user_location_t::dump_user_location_t): New constructors,
4345 from gimple *stmt and rtx_insn *.
4346 (dump_user_location_t::from_function_decl): New function.
4347 (dump_loc): Make static.
4348 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4349 const dump_location_t &.
4350 (dump_generic_expr_loc): Delete.
4351 (dump_printf_loc): Convert param "loc" from location_t to
4352 const dump_location_t &.
4353 (selftest::test_impl_location): New function.
4354 (selftest::dumpfile_c_tests): New function.
4355 * dumpfile.h: Include "profile-count.h".
4356 (class dump_user_location_t): New class.
4357 (struct dump_impl_location_t): New struct.
4358 (class dump_location_t): New class.
4359 (dump_printf_loc): Convert 2nd param from source_location to
4360 const dump_location_t &.
4361 (dump_generic_expr_loc): Delete.
4362 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4363 const dump_location_t &.
4364 * gimple-fold.c (fold_gimple_assign): Update call to
4365 dump_printf_loc to pass in a dump_location_t rather than a
4366 location_t, via the gimple stmt.
4367 (gimple_fold_call): Likewise.
4368 * gimple-loop-interchange.cc
4369 (loop_cand::analyze_iloop_reduction_var): Update for change to
4370 check_reduction_path.
4371 (tree_loop_interchange::interchange): Update for change to
4373 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4374 change in return-type of find_loop_location.
4375 (graphite_regenerate_ast_isl): Likewise.
4376 * graphite-optimize-isl.c (optimize_isl): Likewise.
4377 * graphite.c (graphite_transform_loops): Likewise.
4378 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4379 pass in a dump_location_t rather than a location_t, via the
4381 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4382 * ipa.c (walk_polymorphic_call_targets): Likewise.
4383 * loop-unroll.c (report_unroll): Convert "locus" param from
4384 location_t to dump_location_t.
4385 (decide_unrolling): Update for change to get_loop_location's
4387 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4388 location_t to dump_user_location_t.
4389 (grid_find_single_omp_among_assignments_1): Updates calls to
4390 dump_printf_loc to pass in a dump_location_t rather than a
4391 location_t, via the gimple stmt.
4392 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4393 location_t to dump_location_t. Updates calls to dump_printf_loc
4394 to pass in a dump_location_t rather than a location_t, via the
4396 (grid_inner_loop_gridifiable_p): Likewise.
4397 (grid_dist_follows_simple_pattern): Likewise.
4398 (grid_gfor_follows_tiling_pattern): Likewise.
4399 (grid_target_follows_gridifiable_pattern): Likewise.
4400 (grid_attempt_target_gridification): Convert initialization
4401 of local "grid" from memset to zero-initialization; FIXME: does
4402 this require C++11? Update call to dump_printf_loc to pass in a
4403 optinfo_location rather than a location_t, via the gimple stmt.
4404 * profile.c (read_profile_edge_counts): Updates call to
4405 dump_printf_loc to pass in a dump_location_t rather than a
4407 (compute_branch_probabilities): Likewise.
4408 * selftest-run-tests.c (selftest::run_tests): Call
4410 * selftest.h (dumpfile_c_tests): New decl.
4411 * tree-loop-distribution.c (pass_loop_distribution::execute):
4412 Update for change in return type of find_loop_location.
4413 * tree-parloops.c (parallelize_loops): Likewise.
4414 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4415 "locus" from location_t to dump_user_location_t.
4416 (canonicalize_loop_induction_variables): Likewise.
4417 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4418 for change in return type of find_loop_location.
4419 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4420 to dump_printf_loc to pass in a dump_location_t rather than a
4421 location_t, via the stmt.
4422 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4424 * tree-vect-loop-manip.c (find_loop_location): Convert return
4425 type from source_location to dump_user_location_t.
4426 (vect_do_peeling): Update for above change.
4427 (vect_loop_versioning): Update for change in type of
4429 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4430 from location_t to dump_user_location_t.
4431 (vect_estimate_min_profitable_iters): Update for change in type
4433 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4434 location_t to dump_location_t.
4435 (vect_slp_bb): Update for change in type of vect_location.
4436 * tree-vectorizer.c (vect_location): Convert from source_location
4437 to dump_user_location_t.
4438 (try_vectorize_loop_1): Update for change in vect_location's type.
4439 (vectorize_loops): Likewise.
4440 (increase_alignment): Likewise.
4441 * tree-vectorizer.h (vect_location): Convert from source_location
4442 to dump_user_location_t.
4443 (find_loop_location): Convert return type from source_location to
4444 dump_user_location_t.
4445 (check_reduction_path): Convert 1st param from location_t to
4446 dump_user_location_t.
4447 * value-prof.c (check_counter): Update call to dump_printf_loc to
4448 pass in a dump_user_location_t rather than a location_t; update
4449 call to error_at for change in type of "locus".
4450 (check_ic_target): Update call to dump_printf_loc to
4451 pass in a dump_user_location_t rather than a location_t, via the
4454 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4456 * config/s390/s390.h (enum processor_flags): Do not use
4457 default tune parameter when -march was specified.
4459 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4462 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4463 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4466 2018-06-26 Richard Biener <rguenther@suse.de>
4468 PR tree-optimization/86287
4470 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4471 (vect_analyze_loop): Initialize n_stmts.
4473 2018-06-26 Richard Biener <rguenther@suse.de>
4476 * fold-const.c (fold_convertible_p): Pointer extension
4479 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4482 * dwarf2out.c (loc_list_has_views): Adjust comments.
4483 (dw_loc_list): Split single cross-partition range with
4486 2018-06-25 Jeff Law <law@redhat.com>
4488 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4489 on -mbig-switch by default.
4491 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4493 (const_float_0_operand): Remove unused predicate.
4494 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4495 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4496 (recipsf2): New expander. Original pattern now called
4498 (recipdf2, recipdf2_insn): Similarly.
4499 (rsqrtsf2, rsqrtsf2_insn): Similarly
4500 (rsqrtdf2, rsqrtdf2_insn): Similarly
4502 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4504 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4505 Simplify logic for FreeBSD (twice).
4507 2018-06-25 Martin Sebor <msebor@redhat.com>
4509 PR tree-optimization/86204
4510 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4511 a strnlen result if it's less than the length of the string.
4513 2018-06-25 Martin Sebor <msebor@redhat.com>
4515 PR tree-optimization/85700
4516 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4517 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4518 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4520 2018-06-25 Martin Sebor <msebor@redhat.com>
4522 * doc/extend.texi (Zero-length arrays): Update and clarify.
4524 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4526 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4527 added IEEE/IBM long double multilib support on PowerPC little
4528 endian Linux systems.
4529 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4530 (MULTILIB_DEFAULTS): Likewise.
4531 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4533 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4534 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4535 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4537 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4540 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4541 (REORDER_45): Likewise.
4543 2018-06-25 Jeff Law <law@redhat.com>
4545 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4546 dividend to 32 bits. Adjust length.
4547 (udivmodhi4): Cleanup output template. Fix length.
4549 2018-06-25 Carl Love <cel@us.ibm.com>
4551 * config/rs6000/vsx.md: Change word selector to prefered location.
4553 2018-06-25 Richard Biener <rguenther@suse.de>
4555 PR tree-optimization/86304
4556 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4557 epilogue-if-converted loops as well.
4559 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4561 * lto-section-out.c (lto_begin_section): Do not print section
4562 name for noaddr and unnumbered dumps.
4564 2018-06-25 Richard Biener <rguenther@suse.de>
4566 * tree-vectorizer.h (struct vec_info_shared): New structure
4567 with parts split out from struct vec_info and loop_nest from
4568 struct _loop_vec_info.
4569 (struct vec_info): Adjust accordingly.
4570 (struct _loop_vec_info): Likewise.
4571 (LOOP_VINFO_LOOP_NEST): Adjust.
4572 (LOOP_VINFO_DATAREFS): Likewise.
4573 (LOOP_VINFO_DDRS): Likewise.
4574 (struct _bb_vec_info): Likewise.
4575 (BB_VINFO_DATAREFS): Likewise.
4576 (BB_VINFO_DDRS): Likewise.
4577 (struct _stmt_vec_info): Add dr_aux member.
4578 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4579 (DR_MISALIGNMENT_UNINITIALIZED): New.
4580 (set_dr_misalignment): Adjust.
4581 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4582 (vect_analyze_loop): Adjust prototype.
4583 (vect_analyze_loop_form): Likewise.
4584 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4585 Compute dependences lazily.
4586 (vect_record_base_alignments): Use shared datarefs/ddrs.
4587 (vect_verify_datarefs_alignment): Likewise.
4588 (vect_analyze_data_refs_alignment): Likewise.
4589 (vect_analyze_data_ref_accesses): Likewise.
4590 (vect_analyze_data_refs): Likewise.
4591 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4592 constructor parameter for shared part.
4593 (vect_analyze_loop_form): Pass in shared part and adjust.
4594 (vect_analyze_loop_2): Pass in storage for the number of
4595 stmts. Move loop nest finding to the caller. Compute
4597 (vect_analyze_loop): Pass in shared part.
4598 (vect_transform_loop): Verify shared datarefs are unchanged.
4599 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4600 constructor parameter for shared part.
4601 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4602 (vect_slp_bb): Verify shared datarefs are unchanged before
4604 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4606 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4607 DR_MISALIGNMENT_UNINITIALIZED.
4608 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4609 parameter for shared part.
4610 (vec_info::~vec_info): Adjust.
4611 (vec_info_shared::vec_info_shared): New.
4612 (vec_info_shared::~vec_info_shared): Likewise.
4613 (vec_info_shared::save_datarefs): Likewise.
4614 (vec_info_shared::check_datarefs): Likewise.
4615 (try_vectorize_loop_1): Construct shared part live for analyses
4616 of a single loop for multiple vector sizes.
4617 * tree-parloops.c (gather_scalar_reductions): Adjust.
4619 2018-06-25 Richard Biener <rguenther@suse.de>
4621 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4622 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4623 (vect_analyze_data_refs): Remove similar code from here and
4624 simplify accordingly.
4626 2018-06-25 Richard Biener <rguenther@suse.de>
4628 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4629 for reverse storage order accesses rather than asserting
4630 they cannot happen here.
4632 2018-06-25 Tom de Vries <tdevries@suse.de>
4635 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4636 Use data16 instead of .byte for insn prefix.
4638 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4641 * parser.c (make_char_string_pack): Pass this literal chars
4642 through cpp_interpret_string.
4643 (cp_parser_userdef_numeric_literal): Check the result of
4644 make_char_string_pack.
4646 2018-06-24 Maya Rashish <coypu@sdf.org>
4648 * ginclude/stddef.h: Simplify conditions around avoiding
4649 re-definition of __size_t.
4651 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4653 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4654 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4656 2018-06-22 Maya Rashish <coypu@sdf.org>
4658 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4659 made to OpenBSD and NetBSD through the years.
4661 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4663 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4664 behavior of vec_pack (vector double, vector double) to match
4665 behavior of vec_float2 (vector double, vector double).
4667 2018-06-22 Olivier Hainque <hainque@adacore.com>
4669 * gimplify.c (gimplify_function_tree): Prevent creation
4670 of a trampoline for the address of the current function
4671 passed to entry/exit instrumentation hooks.
4673 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4676 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4679 2018-06-22 Martin Liska <mliska@suse.cz>
4681 PR tree-optimization/86263
4682 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4683 Bail out if is_enabled is false.
4684 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4686 (jump_table_cluster::is_enabled): New function.
4688 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4690 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4691 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4692 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4693 (lto_input_ts_binfo_tree_pointers): Likewise.
4694 * tree-streamer-out.c (streamer_write_tree_bitfields,
4695 write_ts_binfo_tree_pointers): Likewise.
4696 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4698 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4700 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4702 2018-06-22 Martin Liska <mliska@suse.cz>
4704 * symbol-summary.h (get): Make it pure and inline move
4705 functionality from ::get function.
4706 (get): Remove and inline into ::get and ::get_create.
4707 (get_create): Move code from ::get function.
4709 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4712 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4713 -x assembler-with-cpp.
4715 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4717 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4718 _FILE_OFFSET_BITS=64 for C++.
4720 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4722 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4723 conversion insn that shows up when pr85657-3.c is compiled using
4724 IEEE 128-bit long double.
4725 (neg<mode>2_internal): Use the correct mode to check whether the
4726 mode is IBM extended.
4727 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4728 multiply and divide external functions from being created more
4731 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4733 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4735 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4736 the edge can be forwarded.
4737 (cfg_layout_merge_blocks): Likewise.
4739 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4741 * except.c (finish_eh_generation): Commit edge insertions only after
4742 the EH edges have been redirected from post-landing to landing pads.
4744 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4746 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4747 create_tmp_var_for to create the FRAME decl.
4748 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4750 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4752 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4753 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4754 debug statement when resetting its value.
4755 (expand_call_inline): Copy the locus of the call onto the assignment
4756 of the return value, if any. Use local variable in more cases.
4758 2018-06-21 Martin Liska <mliska@suse.cz>
4760 * ipa-pure-const.c (propagate_nothrow): Use
4761 funct_state_summaries->get.
4762 (dump_malloc_lattice): Likewise.
4763 (propagate_malloc): Likewise.
4765 2018-06-21 Richard Biener <rguenther@suse.de>
4767 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4768 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4769 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4771 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4772 BLOCK_ABSTRACT_ORIGIN unconditionally.
4774 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4776 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4778 * ipa-reference.c (ipa_reference_c_finalize): Delete
4779 ipa_ref_opt_sum_summaries and set it to NULL.
4781 2018-06-21 Tom de Vries <tdevries@suse.de>
4783 PR tree-optimization/85859
4784 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4785 test with comment from bb_no_side_effects_p.
4787 2018-06-21 Richard Biener <rguenther@suse.de>
4789 PR tree-optimization/86232
4790 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4791 max for constant niter.
4793 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4795 * config/aarch64/aarch64-simd.md
4796 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4798 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4800 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4801 Make opernads of the unspec commutative.
4803 2018-06-21 Richard Biener <rguenther@suse.de>
4805 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4806 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4807 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4808 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4810 (vect_record_base_alignments): Do not record base alignment
4811 for gathers or scatters.
4812 (vect_compute_data_ref_alignment): Drop return value that is always
4813 true. Bail out early for gathers or scatters.
4814 (vect_enhance_data_refs_alignment): Bail out early for gathers
4816 (vect_find_same_alignment_drs): Likewise.
4817 (vect_analyze_data_refs_alignment): Remove dead code.
4818 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4819 (vect_analyze_data_refs): For possible gathers or scatters do
4820 not create an alternate DR, just check their possible validity
4821 and mark them. Adjust DECL_NONALIASED handling to not rely
4823 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4824 update inits of gathers or scatters.
4825 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4826 Also copy gather/scatter flag to pattern vinfo.
4828 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4830 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4831 behavior of vec_packsu (vector unsigned long long, vector unsigned
4832 long long) to match behavior of vec_packs with same signature.
4834 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4835 Thomas Schwinge <thomas@codesourcery.com>
4836 Cesar Philippidis <cesar@codesourcery.com>
4838 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4839 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4840 (gimplify_adjust_omp_clauses): Likewise.
4841 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4842 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4843 (gimplify_omp_target_update): Update handling of acc update and
4845 * omp-low.c (install_var_field): Remove unused parameter
4846 base_pointers_restrict.
4847 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4848 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4850 (omp_target_base_pointers_restrict_p): Delete.
4851 (scan_omp_target): Update call to scan_sharing_clauses.
4852 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4854 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4855 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4856 (convert_local_omp_clauses): Likewise.
4857 * tree-pretty-print.c (dump_omp_clause): Likewise.
4858 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4860 (omp_clause_code_name): Likewise.
4862 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4865 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4868 PR tree-optimization/86231
4869 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4870 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4872 2018-06-20 Tom de Vries <tdevries@suse.de>
4874 PR tree-optimization/86097
4875 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4876 iv type if signedness of iv type is not the same as that of *nit.
4878 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4880 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4881 EDGE_EH edges, verify they are all EDGE_EH.
4883 2018-06-20 Maya Rashish <coypu@sdf.org>
4885 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4887 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4889 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4890 * config/aarch64/aarch64.c (xgene1_tunings): Add
4891 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4892 (aarch64_mode_valid_for_sched_fusion_p):
4893 Allow 16-byte modes.
4894 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4895 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4897 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4899 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4900 * config/aarch64/iterators.md (VQ2): New mode iterator.
4902 2018-06-20 Martin Liska <mliska@suse.cz>
4904 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4905 Change default ratio from 10 to 8.
4907 2018-06-20 Martin Liska <mliska@suse.cz>
4909 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4911 (bit_test_cluster::find_bit_tests): Likewise.
4912 (switch_decision_tree::analyze_switch_statement): Find clusters.
4913 * tree-switch-conversion.h (struct jump_table_cluster): Document
4916 2018-06-20 Martin Liska <mliska@suse.cz>
4918 * tree-switch-conversion.c (switch_conversion::collect):
4919 Record m_uniq property.
4920 (switch_conversion::expand): Bail out for special conditions.
4921 (group_cluster::~group_cluster): New.
4922 (group_cluster::group_cluster): Likewise.
4923 (group_cluster::dump): Likewise.
4924 (jump_table_cluster::emit): New.
4925 (switch_decision_tree::fix_phi_operands_for_edges): New.
4926 (struct case_node): Remove struct.
4927 (jump_table_cluster::can_be_handled): New.
4928 (case_values_threshold): Moved to header.
4929 (reset_out_edges_aux): Likewise.
4930 (jump_table_cluster::is_beneficial): New.
4931 (bit_test_cluster::can_be_handled): Likewise.
4932 (add_case_node): Remove.
4933 (bit_test_cluster::is_beneficial): New.
4934 (case_bit_test::cmp): New.
4935 (bit_test_cluster::emit): New.
4936 (expand_switch_as_decision_tree_p): Remove.
4937 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4938 (fix_phi_operands_for_edge): Likewise.
4939 (switch_decision_tree::analyze_switch_statement): New.
4940 (compute_cases_per_edge): Move ...
4941 (switch_decision_tree::compute_cases_per_edge): ... here.
4942 (try_switch_expansion): Likewise.
4943 (switch_decision_tree::try_switch_expansion): Likewise.
4944 (record_phi_operand_mapping): Likewise.
4945 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4946 (emit_case_decision_tree): Likewise.
4947 (switch_decision_tree::emit): Likewise.
4948 (balance_case_nodes): Likewise.
4949 (switch_decision_tree::balance_case_nodes): Likewise.
4950 (dump_case_nodes): Likewise.
4951 (switch_decision_tree::dump_case_nodes): Likewise.
4952 (emit_jump): Likewise.
4953 (switch_decision_tree::emit_jump): Likewise.
4954 (emit_cmp_and_jump_insns): Likewise.
4955 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4956 (emit_case_nodes): Likewise.
4957 (switch_decision_tree::emit_case_nodes): Likewise.
4958 (conditional_probability): Remove.
4959 * tree-switch-conversion.h (enum cluster_type): New.
4961 (struct cluster): Likewise.
4962 (cluster::cluster): Likewise.
4963 (struct simple_cluster): Likewise.
4964 (simple_cluster::simple_cluster): Likewise.
4965 (struct group_cluster): Likewise.
4966 (struct jump_table_cluster): Likewise.
4967 (struct bit_test_cluster): Likewise.
4968 (struct min_cluster_item): Likewise.
4969 (struct case_tree_node): Likewise.
4970 (case_tree_node::case_tree_node): Likewise.
4971 (jump_table_cluster::case_values_threshold): Likewise.
4972 (struct case_bit_test): Likewise.
4973 (struct switch_decision_tree): Likewise.
4974 (struct switch_conversion): Likewise.
4975 (switch_decision_tree::reset_out_edges_aux): Likewise.
4977 2018-06-20 Martin Liska <mliska@suse.cz>
4979 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4980 (hoist_edge_and_branch_if_true): Likewise.
4981 (expand_switch_using_bit_tests_p): Likewise.
4982 (struct case_bit_test): Likewise.
4983 (case_bit_test_cmp): Likewise.
4984 (emit_case_bit_tests): Likewise.
4985 (switch_conversion::switch_conversion): New class.
4986 (struct switch_conv_info): Remove old struct.
4987 (collect_switch_conv_info): More to ...
4988 (switch_conversion::collect): ... this.
4989 (check_range): Likewise.
4990 (switch_conversion::check_range): Likewise.
4991 (check_all_empty_except_final): Likewise.
4992 (switch_conversion::check_all_empty_except_final): Likewise.
4993 (check_final_bb): Likewise.
4994 (switch_conversion::check_final_bb): Likewise.
4995 (create_temp_arrays): Likewise.
4996 (switch_conversion::create_temp_arrays): Likewise.
4997 (free_temp_arrays): Likewise.
4998 (gather_default_values): Likewise.
4999 (switch_conversion::gather_default_values): Likewise.
5000 (build_constructors): Likewise.
5001 (switch_conversion::build_constructors): Likewise.
5002 (constructor_contains_same_values_p): Likewise.
5003 (switch_conversion::contains_same_values_p): Likewise.
5004 (array_value_type): Likewise.
5005 (switch_conversion::array_value_type): Likewise.
5006 (build_one_array): Likewise.
5007 (switch_conversion::build_one_array): Likewise.
5008 (build_arrays): Likewise.
5009 (switch_conversion::build_arrays): Likewise.
5010 (gen_def_assigns): Likewise.
5011 (switch_conversion::gen_def_assigns): Likewise.
5012 (prune_bbs): Likewise.
5013 (switch_conversion::prune_bbs): Likewise.
5014 (fix_phi_nodes): Likewise.
5015 (switch_conversion::fix_phi_nodes): Likewise.
5016 (gen_inbound_check): Likewise.
5017 (switch_conversion::gen_inbound_check): Likewise.
5018 (process_switch): Use the newly created class.
5019 (switch_conversion::expand): New.
5020 (switch_conversion::~switch_conversion): New.
5021 * tree-switch-conversion.h: New file.
5023 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5025 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5026 tree-vect-patterns.c.
5027 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5028 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5029 (vect_recog_sad_pattern): Likewise.
5030 (vect_recog_widen_sum_pattern): Likewise.
5031 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5032 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5033 (vect_recog_rotate_pattern): Likewise.
5034 (vect_recog_mult_pattern): Likewise.
5035 (vect_recog_vector_vector_shift_pattern): Likewise.
5036 (vect_recog_divmod_pattern): Likewise.
5037 (vect_recog_mixed_size_cond_pattern): Likewise.
5038 (vect_recog_bool_pattern): Likewise.
5039 (vect_recog_mask_conversion_pattern): Likewise.
5040 (vect_try_gather_scatter_pattern): Likewise.
5041 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5042 (vect_recog_over_widening_pattern): Likewise.
5043 (vect_recog_gather_scatter_pattern): Likewise.
5044 (vect_recog_func_ptr): Move from tree-vectorizer.h
5045 (vect_vect_recog_func_ptrs): Move further down the file.
5046 (vect_recog_func): Likewise. Remove the third argument.
5047 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5048 (vect_pattern_recog_1): Expect the pattern function to do any
5049 necessary target tests. Also expect it to provide a vector type.
5050 Remove the type_in handling.
5052 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5054 * tree-vect-patterns.c (vect_pattern_detected): New function.
5055 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5056 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5057 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5058 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5059 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5060 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5061 (vect_recog_mask_conversion_pattern)
5062 (vect_try_gather_scatter_pattern): Likewise.
5064 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5066 * tree-vect-patterns.c (vect_get_internal_def): New function.
5067 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5068 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5069 (search_type_for_mask_1): Use it.
5071 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5073 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5074 redundant WIDEN_SUM_EXPR handling.
5075 (vect_recog_sad_pattern): Likewise.
5077 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5079 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5080 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5081 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5082 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5083 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5085 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5087 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5088 use the stmt_vec_info of the original bb statement for the
5089 new zero assignment, even if the call is part of a pattern.
5091 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5093 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5094 that the sequence is attached to the original statement rather
5095 than the pattern statement.
5096 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5097 PATTERN_DEF_SEQ from the original statement rather than
5098 the main pattern statement.
5099 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5100 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5101 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5103 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5105 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5106 definition statements before the early exit for statements that aren't
5108 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5110 (vect_transform_loop): ...here. Process pattern definition
5111 statements without first checking whether the main pattern
5112 statement is live or relevant.
5114 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5116 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5117 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5119 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5121 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5122 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5123 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5124 (expand_block_compare): Change select_block_compare_mode call.
5125 (expand_strncmp_align_check): Use new functions, fix comment.
5126 (emit_final_str_compare_gpr): New function.
5127 (expand_strn_compare): Refactor and clean up code.
5128 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5130 2018-06-19 Tony Reix <tony.reix@atos.com>
5131 Damien Bergamini <damien.bergamini@atos.com>
5132 David Edelsohn <dje.gcc@gmail.com>
5134 * collect2.c (static_obj): New variable.
5135 (static_libs): New variable.
5136 (is_in_list): Uncomment declaration.
5137 (main): Track AIX libraries linked statically.
5138 (is_in_list): Uncomment definition.
5139 (scan_prog_file): Don't add AIX shared libraries initializer
5140 to constructor list if linking statically.
5142 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5144 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5146 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5148 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5150 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5153 2018-06-19 Martin Liska <mliska@suse.cz>
5155 * config/i386/i386.c (ix86_can_inline_p): Do not use
5156 ipa_fn_summaries::get_create.
5157 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5159 (devirtualization_time_bonus): Likewise.
5160 (ipcp_propagate_stage): Likewise.
5161 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5162 (edge_set_predicate): Likewise.
5163 (evaluate_conditions_for_known_args): Likewise.
5164 (evaluate_properties_for_edge): Likewise.
5165 (ipa_call_summary::reset): Tranform to ...
5166 (ipa_call_summary::~ipa_call_summary): ... this.
5167 (ipa_fn_summary::reset): Transform to ...
5168 (ipa_fn_summary::~ipa_fn_summary): ... this.
5169 (ipa_fn_summary_t::remove): Rename to ...
5170 (ipa_fn_summary_t::remove_callees): ... this.
5171 (ipa_fn_summary_t::duplicate): Use placement new
5172 instead of memory copy.
5173 (ipa_call_summary_t::duplicate): Likewise.
5174 (ipa_call_summary_t::remove): Remove.
5175 (dump_ipa_call_summary): Change get_create to get.
5176 (ipa_dump_fn_summary): Dump only when summary exists.
5177 (analyze_function_body): Use symbol_summary::get instead
5179 (compute_fn_summary): Likewise.
5180 (estimate_edge_devirt_benefit): Likewise.
5181 (estimate_edge_size_and_time): Likewise.
5182 (inline_update_callee_summaries): Likewise.
5183 (remap_edge_change_prob): Likewise.
5184 (remap_edge_summaries): Likewise.
5185 (ipa_merge_fn_summary_after_inlining): Likewise.
5186 (write_ipa_call_summary): Likewise.
5187 (ipa_fn_summary_write): Likewise.
5188 (ipa_free_fn_summary): Likewise.
5189 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5190 (struct ipa_call_summary): Likewise.
5191 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5193 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5194 (estimate_size_after_inlining): Likewise.
5195 (estimate_growth): Likewise.
5196 (growth_likely_positive): Likewise.
5197 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5198 (inline_call): Likewise.
5199 * ipa-inline.c (caller_growth_limits): Likewise.
5200 (can_inline_edge_p): Likewise.
5201 (can_inline_edge_by_limits_p): Likewise.
5202 (compute_uninlined_call_time): Likewise.
5203 (compute_inlined_call_time): Likewise.
5204 (want_inline_small_function_p): Likewise.
5205 (edge_badness): Likewise.
5206 (update_caller_keys): Likewise.
5207 (update_callee_keys): Likewise.
5208 (inline_small_functions): Likewise.
5209 (inline_to_all_callers_1): Likewise.
5210 (dump_overall_stats): Likewise.
5211 (early_inline_small_functions): Likewise.
5212 (early_inliner): Likewise.
5213 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5214 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5215 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5216 * ipa-split.c (execute_split_functions): Likewise.
5217 * symbol-summary.h: Likewise.
5218 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5220 2018-06-19 Richard Biener <rguenther@suse.de>
5222 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5223 (vectorize_loops): ... here. Fix dbgcnt handling.
5224 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5226 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5229 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5230 ieee128 argument takes up only one (vector) register, not two (floating
5233 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5235 * gimplify.c (gimplify_init_constructor): Really never clear for an
5236 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5238 2018-06-19 Richard Biener <rguenther@suse.de>
5240 PR tree-optimization/86179
5241 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5242 after failed recognition.
5244 2018-06-18 Martin Sebor <msebor@redhat.com>
5247 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5248 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5249 Handle integer subtraction.
5250 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5251 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5253 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5255 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5256 param from rtx to rtx_insn *.
5257 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5259 (frv_ifcvt_modify_insn): Likwise.
5260 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5261 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5262 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5263 as_a <rtx_insn *> cast to local "unprotected_region" once
5264 it's been established that it's not NULL or pc_rtx.
5265 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5266 param "sethi" from rtx to rtx_insn *.
5267 (nds32_group_float_insns): Likewise for param "insn".
5268 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5270 (vax_output_int_subtract): Likewise.
5271 * config/vax/vax.c (vax_output_int_add): Likewise for param
5273 (vax_output_int_subtract): Likewise.
5274 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5275 (emit_pattern_after): Likewise for param "after".
5276 (emit_insn_after): Likewise.
5277 (emit_jump_insn_after): Likewise.
5278 (emit_call_insn_after): Likewise.
5279 (emit_debug_insn_after): Likewise.
5280 (emit_pattern_before): Likewise for param "before".
5281 (emit_insn_before): Likewise.
5282 (emit_jump_insn_before): Likewise.
5283 * final.c (get_insn_template): Likewise for param "insn", removing
5285 * output.h (get_insn_template): Likewise for 2nd param.
5286 * rtl.h (emit_insn_before): Likewise.
5287 (emit_jump_insn_before): Likewise.
5288 (emit_debug_insn_before_noloc): Likewise.
5289 (emit_insn_after): Likewise.
5290 (emit_jump_insn_after): Likewise.
5291 (emit_call_insn_after): Likewise.
5292 (emit_debug_insn_after): Likewise.
5293 (set_insn_deleted): Likewise for param.
5295 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5298 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5299 floating point modes, so that IFmode is numerically greater than
5300 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5301 to declare the ordering. This prevents IFmode from being
5302 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5303 machine. Include rs6000-modes.h to share the fractional values
5304 between genmodes* and the rest of the compiler.
5308 * config/rs6000/rs6000-modes.h: New file.
5309 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5310 meaning of rs6000_long_double_size so that 126..128 selects an
5311 appropriate 128-bit floating point type.
5312 (rs6000_option_override_internal): Likewise.
5313 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5314 (TARGET_LONG_DOUBLE_128): Change the meaning of
5315 rs6000_long_double_size so that 126..128 selects an appropriate
5316 128-bit floating point type.
5317 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5318 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5319 source and destination to match the standard usage.
5320 (truncifkf2): Likewise.
5321 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5322 ISA 2.07 to use an explicit clobber, instead of passing in a
5324 (copysign<mode>3_soft): Likewise.
5326 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5328 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5329 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5330 (vect_slp_analyze_instance_dependence): Likewise.
5331 (vect_enhance_data_refs_alignment): Likewise.
5332 (vect_analyze_data_refs_alignment): Likewise.
5333 (vect_slp_analyze_and_verify_instance_alignment
5334 (vect_analyze_data_ref_accesses): Likewise.
5335 (vect_prune_runtime_alias_test_list): Likewise.
5336 (vect_analyze_data_refs): Likewise.
5337 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5338 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5339 (vect_analyze_scalar_cycles_1): Likewise.
5340 (vect_get_loop_niters): Likewise.
5341 (vect_analyze_loop_form_1): Likewise.
5342 (vect_update_vf_for_slp): Likewise.
5343 (vect_analyze_loop_operations): Likewise.
5344 (vect_analyze_loop): Likewise.
5345 (vectorizable_induction): Likewise.
5346 (vect_transform_loop): Likewise.
5347 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5348 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5349 (vect_make_slp_decision): Likewise.
5350 (vect_detect_hybrid_slp): Likewise.
5351 (vect_slp_analyze_operations): Likewise.
5352 (vect_slp_bb): Likewise.
5353 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5354 (vectorizable_bswap): Likewise.
5355 (vectorizable_call): Likewise.
5356 (vectorizable_simd_clone_call): Likewise.
5357 (vectorizable_conversion): Likewise.
5358 (vectorizable_assignment): Likewise.
5359 (vectorizable_shift): Likewise.
5360 (vectorizable_operation): Likewise.
5361 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5363 2018-06-18 Martin Sebor <msebor@redhat.com>
5365 PR tree-optimization/81384
5366 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5367 * builtins.c (expand_builtin_strnlen): New function.
5368 (expand_builtin): Call it.
5369 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5370 * builtins.def (BUILT_IN_STRNLEN): New.
5371 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5372 Warn for bounds in excess of maximum object size.
5373 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5374 single-value ranges. Handle strnlen.
5375 (handle_builtin_strlen): Handle strnlen.
5376 (strlen_check_and_optimize_stmt): Same.
5377 * doc/extend.texi (Other Builtins): Document strnlen.
5379 2018-06-18 Maya Rashish <coypu@sdf.org>
5381 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5382 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5383 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5385 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5387 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5389 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5391 * tree.c (escaped_string::escape): Replace cast to char * by
5392 const_cast<char *> (unescaped).
5394 2018-06-18 Nick Clifton <nickc@redhat.com>
5397 * tree.c (escaped_string): New class. Converts an unescaped
5398 string into its escaped equivalent.
5399 (warn_deprecated_use): Use the new class to convert the
5400 deprecation message, if present.
5401 (test_escaped_strings): New self test.
5402 (test_c_tests): Add test_escaped_strings.
5403 * doc/extend.texi (deprecated): Add a note that the
5404 deprecation message is affected by the -fmessage-length
5405 option, and that control characters will be escaped.
5406 (#pragma GCC error): Document this pragma.
5407 (#pragma GCC warning): Likewise.
5408 * doc/invoke.texi (-fmessage-length): Document this option's
5409 effect on the #warning and #error preprocessor directives and
5410 the deprecated attribute.
5412 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5414 * tree.c (decl_value_expr_lookup): Revert latest change.
5415 (decl_value_expr_insert): Likewise.
5417 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5419 * gimplify.c (nonlocal_vlas): Delete.
5420 (nonlocal_vla_vars): Likewise.
5421 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5423 (gimplify_body): Do not create and destroy nonlocal_vlas.
5424 * tree-nested.c: Include diagnostic.h.
5425 (use_pointer_in_frame): Tweak.
5426 (lookup_field_for_decl): Add assertion and declare the transformation.
5427 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5428 internal error when the reference is in a wrong context. Do not
5429 create a debug decl by default.
5430 (note_nonlocal_block_vlas): Delete.
5431 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5432 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5433 create a debug decl by default.
5434 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5435 call is in a wrong context.
5436 (fixup_vla_decls): New function.
5437 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5438 debug variables were created.
5439 * tree.c (decl_value_expr_lookup): Add checking assertion.
5440 (decl_value_expr_insert): Likewise.
5442 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5445 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5446 * tree-scalar-evolution.c (interpret_expr): Likewise.
5447 (expression_expensive_p): Likewise.
5448 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5449 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5450 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5451 (ssa_defined_by_minus_one_stmt_p): New.
5453 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5456 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5457 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5458 * dojump.c (do_jump): Likewise.
5459 * expr.c (expand_expr_real_2): Check operand type's sign.
5460 * fold-const.c (const_unop): Handle ABSU_EXPR.
5461 (fold_abs_const): Likewise.
5462 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5463 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5464 (strip_sign_op_1): Likesise.
5465 * match.pd: Add new pattern to generate ABSU_EXPR.
5466 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5467 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5468 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5469 * tree-inline.c (estimate_operator_cost): Likewise.
5470 * tree-pretty-print.c (dump_generic_node): Likewise.
5471 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5472 * tree.def (ABSU_EXPR): New.
5474 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5477 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5478 documented as preserved for backward compatibility only.
5479 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5481 PR rtl-optimization/86108
5482 * bb-reorder.c (create_forwarder_block): Renamed to ...
5483 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5484 jump from new landing pad to the second part.
5485 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5488 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5491 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5492 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5493 Only call store_expr for halves if the mode is the same.
5496 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5497 Fix up comment formatting.
5499 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5501 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5502 (typed_splay_tree::closure,
5503 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5504 (typed_splay_tree::typed_splay_tree,
5505 typed_splay_tree::operator =): Declared private.
5506 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5507 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5508 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5509 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5510 typed_splay_tree::splay_tree_splay,
5511 typed_splay_tree::splay_tree_foreach_helper,
5512 typed_splay_tree::splay_tree_insert,
5513 typed_splay_tree::splay_tree_remove,
5514 typed_splay_tree::splay_tree_lookup,
5515 typed_splay_tree::splay_tree_predecessor,
5516 typed_splay_tree::splay_tree_successor,
5517 typed_splay_tree::splay_tree_min,
5518 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5519 (typed_splay_tree::root, typed_splay_tree::comp,
5520 typed_splay_tree::delete_key,
5521 typed_splay_tree::delete_value): New data members.
5522 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5523 typed_splay_tree::remove.
5525 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5527 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5528 -mginv and -mno-ginv to the assembler.
5529 * config/mips/mips.opt (-mcrc): New option.
5531 * doc/invoke.text (-mcrc): Document.
5534 2018-06-15 Nick Clifton <nickc@redhat.com>
5537 * tree.c (escaped_string): New class. Converts an unescaped
5538 string into its escaped equivalent.
5539 (warn_deprecated_use): Use the new class to convert the
5540 deprecation message, if present.
5541 (test_escaped_strings): New self test.
5542 (test_c_tests): Add test_escaped_strings.
5543 * doc/extend.texi (deprecated): Add a note that the
5544 deprecation message is affected by the -fmessage-length
5545 option, and that control characters will be escaped.
5546 (#pragma GCC error): Document this pragma.
5547 (#pragma GCC warning): Likewise.
5548 * doc/invoke.texi (-fmessage-length): Document this option's
5549 effect on the #warning and #error preprocessor directives and
5550 the deprecated attribute.
5552 2018-06-15 Richard Biener <rguenther@suse.de>
5554 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5555 here, also noting vector size used.
5556 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5557 size used in MSG_OPTIMIZED_LOCATIONS dump.
5558 (pass_slp_vectorize::execute): Adjust.
5560 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5563 * config/arc/arc.c (arc_return_address_register): Fix
5566 2018-06-15 Richard Biener <rguenther@suse.de>
5569 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5570 leave useless conversion stripping to force_gimple_operand_gsi.
5571 (gimplify_build2): Likewise.
5572 (gimplify_build1): Likewise.
5574 2018-06-15 Richard Biener <rguenther@suse.de>
5577 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5578 before adjusting their block.
5580 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5582 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5583 multilibs for *-*-rtems*.
5584 * config/riscv/t-rtems: New file.
5586 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5589 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5590 unsigned_type_for returns NULL.
5593 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5594 subregs of multi-word pseudos unless the float mode has word size.
5596 2018-06-14 Richard Biener <rguenther@suse.de>
5599 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5600 duplicate and harmful type_hash_canon.
5601 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5603 2018-06-14 Richard Biener <rguenther@suse.de>
5606 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5609 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5611 * config/rtems.h (STDINT_LONG32): Define.
5613 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5614 Prachi Godbole <prachi.godbole@imgtec.com>
5616 * config/mips/mips-cpus.def: Define P6600.
5617 * config/mips/mips-tables.opt: Regenerate.
5618 * config/mips/mips.c (mips_ucbranch_type): New enum.
5619 (mips_rtx_cost_data): Add support for P6600.
5620 (mips_issue_rate): Likewise.
5621 (mips_multipass_dfa_lookahead): Likewise.
5622 (mips_avoid_hazard): Likewise.
5623 (mips_reorg_process_insns): Likewise.
5624 (mips_classify_branch_p6600): New function.
5625 * config/mips/mips.h (TUNE_P6600): New define.
5626 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5627 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5628 * config/mips/mips.md: Include p6600.md.
5629 (processor): Add p6600.
5630 * config/mips/p6600.md: New file.
5631 * doc/invoke.texi: Add p6600 to supported architectures.
5633 2018-06-13 Martin Sebor <msebor@redhat.com>
5635 PR tree-optimization/86114
5636 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5638 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5640 2018-06-13 Richard Biener <rguenther@suse.de>
5642 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5643 Properly set vector type of the intermediate stmt.
5644 * tree-vect-stmts.c (vectorizable_operation): The destination
5645 var always has vectype_out type.
5647 2018-06-13 Jeff Law <law@redhat.com>
5649 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5650 integer 0 for argument to print_rtl_with_bb.
5651 (rl78_reorg): Likewise.
5653 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5655 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5656 from rtx to rtx_insn *.
5657 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5659 (add_sched_insns_for_speculation): Likewise for local "target",
5660 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5661 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5662 from rtx_insn ** to rtx_code_label **.
5663 (reorg_emit_nops): Likewise.
5664 (c6x_reorg): Likewise for local "call_labels".
5665 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5667 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5668 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5669 the loops over LABEL_REFS.
5670 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5672 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5673 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5674 (split_branches): Strengthen local "olabel" from rtx to
5675 rtx_insn *, adding a safe_as_a cast.
5676 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5678 (add_insn_after): Likewise for first two params.
5679 (add_insn_before): Likewise.
5680 (remove_insn): Likewise for param.
5681 (emit_pattern_before_noloc): Likewise for second and third params.
5682 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5683 (emit_call_insn_before_noloc): Likewise.
5684 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5686 (emit_barrier_before): Likewise.
5687 (emit_label_before): Strengthen "label" param from "rtx" to
5688 "rtx_code_label *". Strengthen "before" param from "rtx" to
5690 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5692 (emit_pattern_after_noloc): Likewise.
5693 (emit_insn_after_noloc): Likewise.
5694 (emit_jump_insn_after_noloc): Likewise.
5695 (emit_call_insn_after_noloc): Likewise.
5696 (emit_debug_insn_after_noloc): Likewise.
5697 (emit_barrier_after): Likewise.
5698 (emit_label_after): Likewise for both params.
5699 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5700 "loc" param from "int" to "location_t".
5701 (emit_insn_after_setloc): Likewise.
5702 (emit_jump_insn_after_setloc): Likewise.
5703 (emit_call_insn_after_setloc): Likewise.
5704 (emit_debug_insn_after_setloc): Likewise.
5705 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5706 "loc" param from "int" to "location_t".
5707 (emit_pattern_before): Convert NULL_RTX to NULL.
5708 (emit_insn_before_setloc): Convert "loc" param from "int" to
5710 (emit_jump_insn_before_setloc): Likewise.
5711 (emit_call_insn_before_setloc): Likewise.
5712 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5713 rtx_insn *. Convert "loc" param from "int" to "location_t".
5714 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5715 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5716 Convert 3rd param from "int" to "location_t".
5717 (emit_barrier_before, emit_barrier_after, next_real_insn):
5718 Strengthen param from rtx to rtx_insn *.
5719 (emit_label_before): Strengthen 1st param from "rtx" to
5720 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5722 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5723 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5724 Strengthen 2nd param from "rtx" to "rtx_insn *".
5725 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5726 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5727 Likewise. Convert 3rd param from "int" to "location_t".
5728 (emit_label_after): Strengthen 1st param from "rtx" to
5730 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5732 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5733 from "rtx" to "rtx_insn *".
5735 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5737 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5738 bodies streamed in with -Q.
5739 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5740 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5741 * gimple-streamer-out.c: Include gimple-pretty-print.h
5742 (output_bb): Dump stmts streamed.
5743 * lto-section-out.c: Include print-tree.h
5744 (lto_begin_section): Dump sections created.
5745 (lto_output_decl_index): Dump decl encoded.
5746 * lto-streamer-out.c: Include print-tree.h
5747 (create_output_block): Dump output block created.
5748 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5749 (output_function): Dump function output.
5750 (output_constructor): Dump constructor streamed.
5751 (write_global_stream): Output indexes encoded.
5752 (produce_asm_for_decls): Dump streams encoded.
5753 * lto-streamer.c (streamer_dump_file): New global var.
5754 * lto-streamer.h (streamer_dump_file): Declare.
5755 * passes.c (ipa_write_summaries): Initialize streamer dump.
5756 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5759 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5762 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5763 offsets for register save directives. Emit a second batch of save
5764 directives, if need be, when the function accesses prior frames.
5766 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5768 * config/arc/fpu.md (fmasf4): Force operand to register.
5769 (fnmasf4): Likewise.
5771 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5773 * config/arc/arc-protos.h (arc_pad_return): Remove.
5774 * config/arc/arc.c (machine_function): Remove force_short_suffix
5776 (arc_print_operand): Adjust printing of '&'.
5777 (arc_verify_short): Remove conditional printing of short suffix.
5778 (arc_final_prescan_insn): Remove reference to size_reason.
5779 (pad_return): New function.
5780 (arc_reorg): Call pad_return.
5781 (arc_pad_return): Remove.
5782 (arc_init_machine_status): Remove reference to force_short_suffix.
5783 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5784 (attr length): When attribute iscompact is true force to 2
5785 regardless; in the case of maybe check if we want to force the
5786 instruction to have 4 bytes length.
5787 (nopv): Change it to generate 4 byte long nop as well.
5788 (blockage): New pattern.
5789 (simple_return): Remove call to arc_pad_return.
5790 (p_return_i): Likewise.
5792 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5794 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5796 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5798 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5801 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5803 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5804 for ARC700 and ARCv2.
5806 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5809 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5810 operands[2] instead of operands[1].
5813 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5815 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5816 case, check whether the outer register overlaps an unallocatable
5817 register, not just whether it fits the required class.
5819 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5821 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5823 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5824 (memrefs_conflict_p): Likewise.
5825 (init_alias_analysis): Likewise.
5826 * cfgexpand.c (expand_debug_expr): Likewise.
5827 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5828 * cse.c (fold_rtx): Likewise.
5829 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5830 * expr.c (emit_block_move_hints): Likewise.
5831 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5832 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5833 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5834 (emit_group_store): Likewise.
5835 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5836 to read the PRE/POST_MODIFY increment.
5837 * calls.c (store_one_arg): Use strip_offset.
5838 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5840 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5842 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5843 (simplify_binary_operation_1): Extend CONST_INT handling to
5845 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5846 than a HOST_WIDE_INT.
5847 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5849 (adjust_mems, add_stores): Update accodingly.
5850 (vt_canonicalize_addr): Track polynomial offsets.
5851 (emit_note_insn_var_location): Likewise.
5852 (vt_add_function_parameter): Likewise.
5853 (vt_initialize): Likewise.
5855 2018-06-12 Jeff Law <law@redhat.com>
5857 * config.gcc (alpha*-*-freebsd*): Remove.
5858 * config/alpha/freebsd.h: Remove.
5860 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5863 * spellcheck-tree.c (levenshtein_distance): Rename to...
5864 (get_edit_distance): ...this, and update for underlying renaming.
5865 * spellcheck-tree.h (levenshtein_distance): Rename to...
5866 (get_edit_distance): ...this.
5867 * spellcheck.c (levenshtein_distance): Rename to...
5868 (get_edit_distance): ...this. Convert from Levenshtein distance
5869 to Damerau-Levenshtein distance by supporting transpositions of
5870 adjacent characters. Rename "v1" to "v_next" and "v0" to
5872 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5873 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5874 update for underlying renaming.
5875 (selftest::levenshtein_distance_unit_test): Rename to...
5876 (selftest::test_get_edit_distance_unit): ...this, and update for
5877 underlying renaming.
5878 (selftest::test_find_closest_string): Add example from PR 69968
5879 where transposition helps
5880 (selftest::test_metric_conditions): Update for renaming.
5881 (selftest::test_metric_conditions): Likewise.
5882 (selftest::spellcheck_c_tests): Likewise.
5883 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5884 (get_edit_distance): ...this.
5885 (best_match::consider): Update for renaming.
5887 2018-06-12 Martin Sebor <msebor@redhat.com>
5889 PR tree-optimization/85259
5890 * builtins.c (compute_objsize): Handle constant offsets.
5891 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5892 true iff a warning has been issued.
5893 * gimple.h (gimple_nonartificial_location): New function.
5894 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5895 gimple_nonartificial_location and handle -Wno-system-headers.
5896 (handle_builtin_stxncpy): Same.
5898 2018-06-12 Martin Sebor <msebor@redhat.com>
5901 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5903 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5905 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5906 BUILTIN_VEC_XST entries for pointer to double and long long.
5908 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5911 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5913 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5916 2018-06-12 Martin Liska <mliska@suse.cz>
5918 * doc/options.texi: Document IntegerRange.
5920 2018-06-12 Martin Liska <mliska@suse.cz>
5922 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5923 * opt-functions.awk: Handle Deprecated flag.
5924 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5926 (read_cmdline_option): Report warning for a deprecated option.
5927 * opts.h (struct cl_option): Add new field cl_deprecated.
5928 (CL_ERR_DEPRECATED): New.
5930 2018-06-12 Martin Liska <mliska@suse.cz>
5932 * doc/options.texi: Document Deprecated option flag.
5934 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5936 * config/arc/arc-arch.h (arc_extras): New enum.
5937 (arc_cpu_t):Add field extra.
5938 (arc_cpu_types): Consider the extras.
5939 * config/arc/arc-cpus.def: Add extras info.
5940 * config/arc/arc-opts.h (processor_type): Consider extra field.
5941 * config/arc/arc.c (arc_override_options): Handle extra field.
5943 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5945 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5946 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5948 * config/arc/arc.c (arc_init): Update pic warning.
5949 (irq_range): Update irq range parsing warnings.
5950 (arc_override_options): Update various warning messages.
5951 (arc_handle_aux_attribute): Likewise.
5953 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5955 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5957 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5959 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5960 compiler messages directives.
5962 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5964 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5965 * config/mips/mips-tables.opt: Regenerate.
5966 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5968 * doc/invoke.texi: Document -march=i6500.
5970 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5972 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5973 (i6400_gpmul): Add cpu_unit.
5974 (i6400_gpdiv): Likewise.
5975 (i6400_msa_add_d): Update reservations.
5976 (i6400_msa_int_add) Likewise.
5977 (i6400_msa_short_logic3) Likewise.
5978 (i6400_msa_short_logic2) Likewise.
5979 (i6400_msa_short_logic) Likewise.
5980 (i6400_msa_move) Likewise.
5981 (i6400_msa_cmp) Likewise.
5982 (i6400_msa_short_float2) Likewise.
5983 (i6400_msa_div_d) Likewise.
5984 (i6400_msa_long_logic1) Likewise.
5985 (i6400_msa_long_logic2) Likewise.
5986 (i6400_msa_mult) Likewise.
5987 (i6400_msa_long_float2) Likewise.
5988 (i6400_msa_long_float4) Likewise.
5989 (i6400_msa_long_float5) Likewise.
5990 (i6400_msa_long_float8) Likewise.
5991 (i6400_fpu_fadd): Include frint type.
5992 (i6400_fpu_store): New define_insn_reservation.
5993 (i6400_fpu_load): Likewise.
5994 (i6400_fpu_move): Likewise.
5995 (i6400_fpu_fcmp): Likewise.
5996 (i6400_fpu_fmadd): Likewise.
5997 (i6400_int_mult): Include imul3nc type and update reservation.
5998 (i6400_int_div): Include idiv3 type and update reservation.
5999 (i6400_int_load): Update to check type not move_type.
6000 (i6400_int_store): Likewise.
6001 (i6400_int_prefetch): Set zero latency.
6003 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6005 * gcc.c: Document new %@{...} sequence.
6006 (LINK_COMMAND_SPEC): Use it for the -L switches.
6007 (cpp_unique_options): Use it for the -I switches.
6008 (at_file_argbuf): New global variable.
6009 (in_at_file): Likewise.
6010 (alloc_args): Create at_file_argbuf.
6011 (clear_args): Truncate at_file_argbuf.
6012 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6013 (open_at_file): New function.
6014 (close_at_file): Likewise.
6015 (create_at_file): Delete.
6016 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6019 (validate_switches_from_spec): Deal with %@{...} sequence.
6020 (validate_switches): Likewise.
6021 (driver::finalize): Call clear_args.
6023 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6025 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6027 2018-06-11 Martin Sebor <msebor@redhat.com>
6029 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6030 (Wno-class-memaccess): Add @opindex.
6031 (Wno-templates, Wno-multiple-inheritance): Same.
6032 (Wno-virtual-inheritance, Wno-namespaces): Same.
6033 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6034 (Wno-format-overflow, Wno-format-truncation): Same.
6035 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6036 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6037 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6038 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6039 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6040 (Wno-misspelled-isr): Same.
6042 2018-06-11 Martin Sebor <msebor@redhat.com>
6044 * PR tree-optimization/86083
6045 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6047 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6049 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6051 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6054 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6055 on the correct operand.
6056 (*movdi_internal64): Ditto.
6058 2018-06-11 Martin Liska <mliska@suse.cz>
6060 PR tree-optimization/86089
6061 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6063 2018-06-11 Julia Koval <julia.koval@intel.com>
6065 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6066 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6067 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6069 2018-06-11 Olivier Hainque <hainque@adacore.com>
6071 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6072 for Ada with strict dwarf2.
6074 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6077 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6080 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6082 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6084 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6086 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6089 2018-06-08 Martin Liska <mliska@suse.cz>
6091 * tree-cfg.h (debug_function): Fix argument type to match
6094 2018-06-08 Martin Liska <mliska@suse.cz>
6096 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6097 Remove usage of MPX-related (and removed) fields.
6098 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6100 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6102 * cfg.c (debug): Use TDF_NONE rather than 0.
6103 * cfghooks.c (debug): Likewise.
6104 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6105 (struct dump_option_value_info): Convert to...
6106 (struct kv_pair): ...this template type.
6107 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6109 (optinfo_verbosity_options): Likewise.
6110 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6112 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6113 than int for "optgroup_flags" param.
6114 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6116 (dump_dec): Likewise.
6117 (dump_finish): Use TDF_NONE rather than 0.
6118 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6119 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6120 than 0. Update for change to option_ptr.
6121 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6122 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6123 0. Update for changes to optinfo_verbosity_options and
6125 (opt_info_switch_p): Convert optgroup_flags from int to
6127 (dump_basic_block): Use dump_flags_t rather than int
6128 for "dump_kind" param.
6129 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6130 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6131 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6132 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6133 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6134 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6135 TDF_NONE): Convert from macros to...
6136 (enum dump_flag): ...this new enum.
6137 (dump_flags_t): Update to use enum.
6138 (operator|, operator&, operator~, operator|=, operator&=):
6139 Implement for dump_flags_t.
6140 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6141 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6142 Convert from macros to...
6143 (enum optgroup_flag): ...this new enum.
6144 (optgroup_flags_t): New typedef.
6145 (operator|, operator|=): Implement for optgroup_flags_t.
6146 (struct dump_file_info): Convert field "alt_flags" to
6147 dump_flags_t. Convert field "optgroup_flags" to
6149 (dump_basic_block): Use dump_flags_t rather than int for param.
6150 (dump_generic_expr_loc): Likewise.
6151 (dump_dec): Likewise.
6152 (dump_register): Convert param "optgroup_flags" to
6154 (opt_info_enable_passes): Likewise.
6155 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6157 * gimple-pretty-print.c (debug): Likewise.
6158 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6159 (merged_store_group::apply_stores): Likewise.
6160 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6161 * gimple.c (verify_gimple_pp): Likewise.
6162 * graphite-poly.c (print_pbb_body): Likewise.
6163 * passes.c (pass_manager::register_one_dump_file): Convert
6164 local "optgroup_flags" to optgroup_flags_t.
6165 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6167 (debug_body): Likewise.
6168 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6169 to optgroup_flags_t.
6170 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6172 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6173 (convert_mult_to_fma): Likewise.
6174 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6175 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6176 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6177 "dump_kind" to dump_flags_t.
6179 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6181 * config/rs6000/rs6000.c (min, max): Delete.
6183 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6185 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6186 -mabi=spe and -mabi=no-spe.
6188 2018-06-08 Martin Liska <mliska@suse.cz>
6190 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6191 where we expect an existing summary.
6193 2018-06-08 Martin Liska <mliska@suse.cz>
6195 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6196 * ipa-inline.h (estimate_edge_growth): Likewise.
6198 2018-06-08 Martin Liska <mliska@suse.cz>
6200 * cgraph.c (function_version_hasher::hash): Use
6201 cgraph_node::get_uid ().
6202 (function_version_hasher::equal):
6203 * cgraph.h (cgraph_node::get_uid): New method.
6204 * ipa-inline.c (update_caller_keys): Use
6205 cgraph_node::get_uid ().
6206 (update_callee_keys): Likewise.
6207 * ipa-utils.c (searchc): Likewise.
6208 (ipa_reduced_postorder): Likewise.
6209 * lto-cgraph.c (input_node): Likewise.
6210 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6211 * symbol-summary.h (symtab_insertion): Likewise.
6212 (symtab_removal): Likewise.
6213 (symtab_duplication): Likewise.
6214 * tree-pretty-print.c (dump_function_header): Likewise.
6215 * tree-sra.c (convert_callers_for_node): Likewise.
6217 2018-06-08 Martin Liska <mliska@suse.cz>
6219 * cgraph.c (symbol_table::create_edge): Always assign a new
6221 (symbol_table::free_edge): Do not recycle numbers.
6222 * cgraph.h (cgraph_edge::get): New method.
6223 * symbol-summary.h (symtab_removal): Use it.
6224 (symtab_duplication): Likewise.
6225 (call_summary::hashable_uid): Remove.
6227 2018-06-08 Martin Liska <mliska@suse.cz>
6229 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6230 (initialize_growth_caches): Remove.
6231 (free_growth_caches): Likewise.
6232 (do_estimate_edge_time): Use edge_growth_cache.
6233 (do_estimate_edge_size): Likewise.
6234 (do_estimate_edge_hints): Likewise.
6235 * ipa-inline.c (reset_edge_caches): Likewise.
6236 (recursive_inlining): Likewise.
6237 (inline_small_functions): Likewise.
6238 * ipa-inline.h (initialize_growth_caches): Remove.
6239 (estimate_edge_size): Likewise.
6240 (estimate_edge_time): Likewise.
6241 (estimate_edge_hints): Likewise.
6242 (reset_edge_growth_cache): Likewise.
6243 * symbol-summary.h (call_summary::remove): New method.
6245 2018-06-08 Martin Liska <mliska@suse.cz>
6247 * ipa-cp.c (class edge_clone_summary): New summary.
6248 (grow_edge_clone_vectors): Remove.
6249 (ipcp_edge_duplication_hook): Remove.
6250 (class edge_clone_summary_t): New call_summary class.
6251 (ipcp_edge_removal_hook): Remove.
6252 (edge_clone_summary_t::duplicate): New function.
6253 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6254 (create_specialized_node): Likewise.
6255 (ipcp_driver): Initialize edge_clone_summaries and do not
6258 2018-06-08 Martin Liska <mliska@suse.cz>
6260 * symbol-summary.h (get): New function.
6261 (call_summary::m_initialize_when_cloning): New class member.
6263 2018-06-08 Martin Liska <mliska@suse.cz>
6265 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6266 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6267 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6268 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6269 (remove_cgraph_node_from_order): Use the removed_nodes set.
6270 (do_per_function_toporder): Likwise.
6271 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6272 instead of summary_uid.
6273 (symtab_removal): Likewise.
6274 (symtab_duplication): Likewise.
6276 2018-06-08 Martin Liska <mliska@suse.cz>
6278 * ipa-cp.c (ipcp_store_bits_results): Use
6279 ipcp_transformation_sum.
6280 (ipcp_store_vr_results): Likewise.
6281 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6283 (ipcp_transformation_initialize): ... this.
6284 (ipa_set_node_agg_value_chain):
6285 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6286 (write_ipcp_transformation_info): Likewise.
6287 (read_ipcp_transformation_info): Likewise.
6288 (ipcp_update_bits): Likewise.
6289 (ipcp_update_vr): Likewise.
6290 (ipcp_transform_function): Likewise.
6291 * ipa-prop.h: Rename ipcp_transformation_summary to
6292 ipcp_transformation.
6293 (class ipcp_transformation_t): New function summary.
6294 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6295 (ipa_get_agg_replacements_for_node): Likewise.
6297 2018-06-08 Martin Liska <mliska@suse.cz>
6299 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6301 (class funct_state_summary_t): New function_summary class.
6302 (has_function_state): Remove.
6303 (get_function_state): Likewise.
6304 (set_function_state): Likewise.
6305 (add_new_function): Likewise.
6306 (funct_state_summary_t::insert): New function.
6307 (duplicate_node_data): Remove.
6308 (remove_node_data): Remove.
6309 (funct_state_summary_t::duplicate): New function.
6310 (register_hooks): Create new funct_state_summaries.
6311 (pure_const_generate_summary): Use it.
6312 (pure_const_write_summary): Likewise.
6313 (pure_const_read_summary): Likewise.
6314 (propagate_pure_const): Likewise.
6315 (propagate_nothrow): Likewise.
6316 (dump_malloc_lattice): Likewise.
6317 (propagate_malloc): Likewise.
6318 (execute): Do not register hooks, just remove summary
6320 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6323 2018-06-08 Martin Liska <mliska@suse.cz>
6325 * ipa-reference.c (remove_node_data): Remove.
6326 (duplicate_node_data): Likewise.
6327 (class ipa_ref_var_info_summary_t): New class.
6328 (class ipa_ref_opt_summary_t): Likewise.
6329 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6330 (get_reference_optimization_summary): Use
6331 ipa_ref_opt_sum_summaries.
6332 (set_reference_vars_info): Remove.
6333 (set_reference_optimization_summary): Likewise.
6334 (ipa_init): Create summaries.
6335 (init_function_info): Use function summary.
6336 (ipa_ref_opt_summary_t::duplicate): New function.
6337 (ipa_ref_opt_summary_t::remove): New function.
6338 (get_read_write_all_from_node): Fix GNU coding style.
6339 (propagate): Use function summary.
6340 (write_node_summary_p): Fix GNU coding style.
6341 (stream_out_bitmap): Likewise.
6342 (ipa_reference_read_optimization_summary): Use function summary.
6343 (ipa_reference_c_finalize): Do not release hooks.
6345 2018-06-08 Martin Liska <mliska@suse.cz>
6347 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6348 (analyze_function_body): Extract multiple calls of get_create.
6349 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6350 * ipa-inline.c (recursive_inlining): Use ::get method.
6351 * ipa-inline.h (estimate_edge_growth): Likewise.
6353 2018-06-08 Martin Liska <mliska@suse.cz>
6355 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6357 (hsa_function_summary::hsa_function_summary): Use the new enum
6359 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6360 * hsa-gen.c (hsa_get_host_function): Likewise.
6361 (get_brig_function_name): Likewise.
6362 * ipa-hsa.c (process_hsa_functions): Likewise.
6363 (ipa_hsa_write_summary): Likewise.
6364 * symbol-summary.h (symtab_duplication): Use ::get function/
6365 (get): New function.
6367 2018-06-08 Martin Liska <mliska@suse.cz>
6369 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6371 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6372 (hsa_register_kernel): Likewise.
6373 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6374 * hsa-gen.c (hsa_get_host_function): Likewise.
6375 (get_brig_function_name): Likewise.
6376 (generate_hsa): Likewise.
6377 (pass_gen_hsail::execute): Likewise.
6378 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6379 (devirtualization_time_bonus): Likewise.
6380 (ipcp_propagate_stage): Likewise.
6381 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6382 (edge_set_predicate): Likewise.
6383 (evaluate_conditions_for_known_args): Likewise.
6384 (evaluate_properties_for_edge): Likewise.
6385 (ipa_fn_summary::reset): Likewise.
6386 (ipa_fn_summary_t::duplicate): Likewise.
6387 (dump_ipa_call_summary): Likewise.
6388 (ipa_dump_fn_summary): Likewise.
6389 (analyze_function_body): Likewise.
6390 (compute_fn_summary): Likewise.
6391 (estimate_edge_devirt_benefit): Likewise.
6392 (estimate_edge_size_and_time): Likewise.
6393 (estimate_calls_size_and_time): Likewise.
6394 (estimate_node_size_and_time): Likewise.
6395 (inline_update_callee_summaries): Likewise.
6396 (remap_edge_change_prob): Likewise.
6397 (remap_edge_summaries): Likewise.
6398 (ipa_merge_fn_summary_after_inlining): Likewise.
6399 (ipa_update_overall_fn_summary): Likewise.
6400 (read_ipa_call_summary): Likewise.
6401 (inline_read_section): Likewise.
6402 (write_ipa_call_summary): Likewise.
6403 (ipa_fn_summary_write): Likewise.
6404 (ipa_free_fn_summary): Likewise.
6405 * ipa-hsa.c (process_hsa_functions): Likewise.
6406 (ipa_hsa_write_summary): Likewise.
6407 (ipa_hsa_read_section): Likewise.
6408 * ipa-icf.c (sem_function::merge): Likewise.
6409 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6410 (do_estimate_edge_time): Likewise.
6411 (estimate_size_after_inlining): Likewise.
6412 (estimate_growth): Likewise.
6413 (growth_likely_positive): Likewise.
6414 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6415 (inline_call): Likewise.
6416 * ipa-inline.c (caller_growth_limits): Likewise.
6417 (can_inline_edge_p): Likewise.
6418 (can_inline_edge_by_limits_p): Likewise.
6419 (compute_uninlined_call_time): Likewise.
6420 (compute_inlined_call_time): Likewise.
6421 (want_inline_small_function_p): Likewise.
6422 (edge_badness): Likewise.
6423 (update_caller_keys): Likewise.
6424 (update_callee_keys): Likewise.
6425 (recursive_inlining): Likewise.
6426 (inline_small_functions): Likewise.
6427 (inline_to_all_callers_1): Likewise.
6428 (dump_overall_stats): Likewise.
6429 (early_inline_small_functions): Likewise.
6430 (early_inliner): Likewise.
6431 * ipa-inline.h (estimate_edge_growth): Likewise.
6432 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6433 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6434 * ipa-prop.h (IPA_NODE_REF): Likewise.
6435 (IPA_EDGE_REF): Likewise.
6436 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6437 (propagate_malloc): Likewise.
6438 * ipa-split.c (execute_split_functions): Likewise.
6439 * symbol-summary.h: Rename get to get_create.
6441 (get_create): Likewise.
6442 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6444 2018-06-08 Martin Liska <mliska@suse.cz>
6446 * symbol-summary.h (release): Move definition out of class
6448 (symtab_removal): Likewise.
6449 (symtab_duplication): Likewise.
6451 2018-06-08 Martin Liska <mliska@suse.cz>
6453 * symbol-summary.h (function_summary): Move constructor
6454 implementation out of class declaration.
6455 (release): Likewise.
6456 (symtab_insertion): Likewise.
6457 (symtab_removal): Likewise.
6458 (symtab_duplication): Likewise.
6461 2018-06-08 Martin Liska <mliska@suse.cz>
6463 * Makefile.in: Remove support for MPX (macros, related functions,
6464 fields in cgraph_node, ...).
6465 * builtin-types.def (BT_BND): Likewise.
6466 (BT_FN_BND_CONST_PTR): Likewise.
6467 (BT_FN_CONST_PTR_BND): Likewise.
6468 (BT_FN_VOID_PTR_BND): Likewise.
6469 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6470 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6471 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6472 (expand_builtin_mempcpy_with_bounds): Likewise.
6473 (expand_builtin_memset_with_bounds): Likewise.
6474 (expand_builtin_memset_args): Likewise.
6475 (std_expand_builtin_va_start): Likewise.
6476 (expand_builtin): Likewise.
6477 (expand_builtin_with_bounds): Likewise.
6478 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6479 (DEF_LIB_BUILTIN_CHKP): Likewise.
6480 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6481 (DEF_CHKP_BUILTIN): Likewise.
6482 (BUILT_IN_MEMCPY): Likewise.
6483 (BUILT_IN_MEMMOVE): Likewise.
6484 (BUILT_IN_MEMPCPY): Likewise.
6485 (BUILT_IN_MEMSET): Likewise.
6486 (BUILT_IN_STPCPY): Likewise.
6487 (BUILT_IN_STRCAT): Likewise.
6488 (BUILT_IN_STRCHR): Likewise.
6489 (BUILT_IN_STRCPY): Likewise.
6490 (BUILT_IN_STRLEN): Likewise.
6491 (BUILT_IN_MEMCPY_CHK): Likewise.
6492 (BUILT_IN_MEMMOVE_CHK): Likewise.
6493 (BUILT_IN_MEMPCPY_CHK): Likewise.
6494 (BUILT_IN_MEMSET_CHK): Likewise.
6495 (BUILT_IN_STPCPY_CHK): Likewise.
6496 (BUILT_IN_STRCAT_CHK): Likewise.
6497 (BUILT_IN_STRCPY_CHK): Likewise.
6498 * calls.c (store_bounds): Likewise.
6499 (emit_call_1): Likewise.
6500 (special_function_p): Likewise.
6501 (maybe_warn_nonstring_arg): Likewise.
6502 (initialize_argument_information): Likewise.
6503 (finalize_must_preallocate): Likewise.
6504 (compute_argument_addresses): Likewise.
6505 (expand_call): Likewise.
6506 * cfgexpand.c (expand_call_stmt): Likewise.
6507 (expand_return): Likewise.
6508 (expand_gimple_stmt_1): Likewise.
6509 (pass_expand::execute): Likewise.
6510 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6511 (cgraph_node::remove): Likewise.
6512 (cgraph_node::dump): Likewise.
6513 (cgraph_node::verify_node): Likewise.
6514 * cgraph.h (chkp_function_instrumented_p): Likewise.
6515 (symtab_node::get_alias_target): Likewise.
6516 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6517 (cgraph_local_p): Likewise.
6518 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6519 (cgraph_edge::rebuild_references): Likewise.
6520 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6521 (walk_polymorphic_call_targets): Likewise.
6522 (cgraph_node::expand_thunk): Likewise.
6523 (symbol_table::output_weakrefs): Likewise.
6524 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6525 (ix86_handle_option): Likewise.
6526 * config/i386/constraints.md: Likewise.
6527 * config/i386/i386-builtin-types.def (BND): Likewise.
6531 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6532 (BDESC_FIRST): Likewise.
6534 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6535 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6536 * config/i386/i386.c (enum reg_class): Likewise.
6537 (ix86_target_string): Likewise.
6538 (ix86_option_override_internal): Likewise.
6539 (ix86_conditional_register_usage): Likewise.
6540 (ix86_valid_target_attribute_inner_p): Likewise.
6541 (ix86_set_indirect_branch_type): Likewise.
6542 (ix86_set_current_function): Likewise.
6543 (ix86_function_arg_regno_p): Likewise.
6544 (init_cumulative_args): Likewise.
6545 (ix86_function_arg_advance): Likewise.
6546 (ix86_function_arg): Likewise.
6547 (ix86_pass_by_reference): Likewise.
6548 (ix86_function_value_regno_p): Likewise.
6549 (ix86_function_value_1): Likewise.
6550 (ix86_function_value_bounds): Likewise.
6551 (ix86_return_in_memory): Likewise.
6552 (ix86_setup_incoming_vararg_bounds): Likewise.
6553 (ix86_va_start): Likewise.
6554 (indirect_thunk_need_prefix): Likewise.
6555 (print_reg): Likewise.
6556 (ix86_print_operand): Likewise.
6557 (ix86_expand_call): Likewise.
6558 (ix86_output_function_return): Likewise.
6559 (reg_encoded_number): Likewise.
6560 (BDESC_VERIFYS): Likewise.
6561 (ix86_init_mpx_builtins): Likewise.
6562 (ix86_init_builtins): Likewise.
6563 (ix86_emit_cmove): Likewise.
6564 (ix86_emit_move_max): Likewise.
6565 (ix86_expand_builtin): Likewise.
6566 (ix86_builtin_mpx_function): Likewise.
6567 (ix86_get_arg_address_for_bt): Likewise.
6568 (ix86_load_bounds): Likewise.
6569 (ix86_store_bounds): Likewise.
6570 (ix86_load_returned_bounds): Likewise.
6571 (ix86_store_returned_bounds): Likewise.
6572 (ix86_class_likely_spilled_p): Likewise.
6573 (ix86_hard_regno_mode_ok): Likewise.
6574 (x86_order_regs_for_local_alloc): Likewise.
6575 (ix86_mitigate_rop): Likewise.
6576 (ix86_bnd_prefixed_insn_p): Likewise.
6577 (ix86_mpx_bound_mode): Likewise.
6578 (ix86_make_bounds_constant): Likewise.
6579 (ix86_initialize_bounds): Likewise.
6580 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6581 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6582 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6583 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6584 (TARGET_CHKP_BOUND_MODE): Likewise.
6585 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6586 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6587 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6588 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6589 * config/i386/i386.h (TARGET_MPX): Likewise.
6590 (TARGET_MPX_P): Likewise.
6591 (VALID_BND_REG_MODE): Likewise.
6592 (FIRST_BND_REG): Likewise.
6593 (LAST_BND_REG): Likewise.
6594 (enum reg_class): Likewise.
6595 (BND_REG_P): Likewise.
6596 (BND_REGNO_P): Likewise.
6597 (BNDmode): Likewise.
6598 (ADJUST_INSN_LENGTH): Likewise.
6599 * config/i386/i386.md: Likewise.
6600 * config/i386/i386.opt: Likewise.
6601 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6602 (defined): Likewise.
6603 (LINK_MPX): Likewise.
6604 (MPX_SPEC): Likewise.
6605 (LIBMPX_SPEC): Likewise.
6606 (LIBMPXWRAPPERS_SPEC): Likewise.
6607 (CHKP_SPEC): Likewise.
6608 * config/i386/predicates.md: Likewise.
6609 * dbxout.c (dbxout_type): Likewise.
6610 * doc/extend.texi: Likewise.
6611 * doc/invoke.texi: Likewise.
6612 * doc/md.texi: Likewise.
6613 * doc/tm.texi: Likewise.
6614 * doc/tm.texi.in: Likewise.
6615 * dwarf2out.c (is_base_type): Likewise.
6616 (gen_formal_types_die): Likewise.
6617 (gen_subprogram_die): Likewise.
6618 (gen_type_die_with_usage): Likewise.
6619 (gen_decl_die): Likewise.
6620 (dwarf2out_late_global_decl): Likewise.
6621 * expr.c (expand_assignment): Likewise.
6622 (emit_storent_insn): Likewise.
6623 (store_expr_with_bounds): Likewise.
6624 (store_expr): Likewise.
6625 (expand_expr_real_1): Likewise.
6626 * expr.h (store_expr_with_bounds): Likewise.
6627 * function.c (use_register_for_decl): Likewise.
6628 (struct bounds_parm_data): Likewise.
6629 (assign_parms_augmented_arg_list): Likewise.
6630 (assign_parm_find_entry_rtl): Likewise.
6631 (assign_parm_is_stack_parm): Likewise.
6632 (assign_parm_load_bounds): Likewise.
6633 (assign_bounds): Likewise.
6634 (assign_parms): Likewise.
6635 (expand_function_start): Likewise.
6636 * gcc.c (CHKP_SPEC): Likewise.
6637 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6638 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6639 (wrestrict_dom_walker::check_call): Likewise.
6640 * gimple.c (gimple_build_call_from_tree): Likewise.
6641 * gimple.h (enum gf_mask): Likewise.
6642 (gimple_call_with_bounds_p): Likewise.
6643 (gimple_call_set_with_bounds): Likewise.
6644 * gimplify.c (gimplify_init_constructor): Likewise.
6645 * ipa-cp.c (initialize_node_lattices): Likewise.
6646 (propagate_constants_across_call): Likewise.
6647 (find_more_scalar_values_for_callers_subset): Likewise.
6648 * ipa-hsa.c (process_hsa_functions): Likewise.
6649 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6650 * ipa-icf.c (sem_function::merge): Likewise.
6651 * ipa-inline.c (early_inliner): Likewise.
6652 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6653 (warn_function_cold): Likewise.
6654 (propagate_pure_const): Likewise.
6655 * ipa-ref.h (enum GTY): Likewise.
6656 * ipa-split.c (find_retbnd): Likewise.
6657 (consider_split): Likewise.
6658 (split_function): Likewise.
6659 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6660 * ipa.c (walk_polymorphic_call_targets): Likewise.
6661 (symbol_table::remove_unreachable_nodes): Likewise.
6662 (process_references): Likewise.
6663 (cgraph_build_static_cdtor_1): Likewise.
6664 * lto-cgraph.c (lto_output_node): Likewise.
6665 (output_refs): Likewise.
6666 (compute_ltrans_boundary): Likewise.
6667 (input_overwrite_node): Likewise.
6668 (input_node): Likewise.
6669 (input_cgraph_1): Likewise.
6670 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6671 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6672 (class pass_chkp_instrumentation_passes): Likewise.
6673 (make_pass_chkp_instrumentation_passes): Likewise.
6674 * passes.def: Likewise.
6675 * rtl.h (struct GTY): Likewise.
6676 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6677 * stor-layout.c (layout_type): Likewise.
6678 * symtab.c: Likewise.
6679 * target.def: Likewise.
6680 * targhooks.c (default_chkp_bound_type): Likewise.
6681 (default_chkp_bound_mode): Likewise.
6682 (default_builtin_chkp_function): Likewise.
6683 (default_chkp_function_value_bounds): Likewise.
6684 (default_chkp_make_bounds_constant): Likewise.
6685 (default_chkp_initialize_bounds): Likewise.
6686 * targhooks.h (default_chkp_bound_type): Likewise.
6687 (default_chkp_bound_mode): Likewise.
6688 (default_builtin_chkp_function): Likewise.
6689 (default_chkp_function_value_bounds): Likewise.
6690 (default_chkp_make_bounds_constant): Likewise.
6691 (default_chkp_initialize_bounds): Likewise.
6692 * toplev.c (compile_file): Likewise.
6693 (process_options): Likewise.
6694 * tree-core.h (DEF_BUILTIN): Likewise.
6695 (DEF_BUILTIN_CHKP): Likewise.
6696 * tree-inline.c (declare_return_variable): Likewise.
6697 (remap_gimple_stmt): Likewise.
6698 (copy_bb): Likewise.
6699 (initialize_inlined_parameters): Likewise.
6700 (expand_call_inline): Likewise.
6701 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6702 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6703 (make_pass_ipa_chkp_produce_thunks): Likewise.
6704 (make_pass_chkp): Likewise.
6705 (make_pass_chkp_opt): Likewise.
6706 (make_pass_chkp_instrumentation_passes): Likewise.
6707 * tree-pretty-print.c (dump_generic_node): Likewise.
6708 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6709 * tree-ssa-dce.c (propagate_necessity): Likewise.
6710 (eliminate_unnecessary_stmts): Likewise.
6711 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6712 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6713 * tree-ssa-sccvn.h: Likewise.
6714 * tree-ssa-strlen.c (get_string_length): Likewise.
6715 (valid_builtin_call): Likewise.
6716 (adjust_last_stmt): Likewise.
6717 (handle_builtin_strchr): Likewise.
6718 (handle_builtin_strcpy): Likewise.
6719 (handle_builtin_stxncpy): Likewise.
6720 (handle_builtin_memcpy): Likewise.
6721 (handle_builtin_strcat): Likewise.
6722 (strlen_check_and_optimize_stmt): Likewise.
6723 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6724 * tree-streamer-in.c: Likewise.
6725 * tree-streamer.c (record_common_node): Likewise.
6726 * tree.c (tree_code_size): Likewise.
6727 (wide_int_to_tree_1): Likewise.
6728 (type_contains_placeholder_1): Likewise.
6729 (build_common_tree_nodes): Likewise.
6730 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6731 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6732 (POINTER_BOUNDS_P): Likewise.
6733 (BOUNDED_TYPE_P): Likewise.
6734 (BOUNDED_P): Likewise.
6735 (CALL_WITH_BOUNDS_P): Likewise.
6736 (pointer_bounds_type_node): Likewise.
6737 * value-prof.c (gimple_ic): Likewise.
6738 * var-tracking.c (vt_add_function_parameters): Likewise.
6739 * varasm.c (make_decl_rtl): Likewise.
6740 (assemble_start_function): Likewise.
6741 (output_constant): Likewise.
6742 (maybe_assemble_visibility): Likewise.
6743 * varpool.c (ctor_for_folding): Likewise.
6744 * chkp-builtins.def: Remove.
6745 * ipa-chkp.c: Remove.
6746 * ipa-chkp.h: Remove.
6747 * rtl-chkp.c: Remove.
6748 * rtl-chkp.h: Remove.
6749 * tree-chkp-opt.c: Remove.
6750 * tree-chkp.c: Remove.
6751 * tree-chkp.h: Remove.
6753 2018-06-07 Carl Love <cel@us.ibm.com>
6755 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6756 vextract_fp_from_shortl): Add BE support.
6758 2018-06-07 Paul Koning <ni1d@arrl.net>
6760 * compare-elim.c (try_merge_compare): Don't merge compare if
6761 address contains a side effect.
6762 (try_eliminate_compare): Likewise.
6764 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6766 * config.gcc: Support "tremont".
6767 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6768 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6770 * config/i386/i386.c (m_TREMONT): Define.
6771 (processor_target_table): Add "tremont".
6772 (PTA_TREMONT): Define.
6773 (ix86_lea_outperforms): Add TARGET_TREMONT.
6774 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6775 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6776 and M_INTEL_GOLDMONT_PLUS.
6777 (fold_builtin_cpu): Add "tremont".
6778 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6779 (ix86_option_override_internal): Add "tremont".
6780 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6781 (processor_type): Add PROCESSOR_TREMONT.
6782 * config/i386/x86-tune.def: Add m_TREMONT.
6783 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6785 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6787 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6788 symbol defined for msp430i* devices to be lower case.
6790 2018-06-07 Richard Biener <rguenther@suse.de>
6792 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6793 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6794 Properly wrap signed arithmetic if overflow wraps.
6796 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6798 PR tree-optimization/69615
6799 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6800 of a cast from a same precision integral SSA_NAME in a bb dominated
6801 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6802 cast to utype if rhs2 has already a compatible type.
6804 2018-06-07 Richard Biener <rguenther@suse.de>
6806 PR tree-optimization/85935
6807 * graphite-scop-detection.c (find_params_in_bb): Analyze
6808 condition operands with respect to the correct loop. Assert
6809 the analysis doesn't fail.
6811 2018-06-04 Carl Love <cel@us.ibm.com>
6813 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6814 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6815 as it is slightly cheaper.
6816 (first_match_or_eos_index_<mode>):
6817 Calculate index using natural element order.
6818 (first_match_index_<mode>):
6819 Calculate index using natural element order.
6820 (first_match_or_eos_index_<mode>):
6821 Calculate index using natural order.
6822 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6823 for BE and LE modes.
6824 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6825 P9V_BUILTIN_VCLZLSBB_V16QI.
6826 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6829 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6831 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6832 indentation and line wrap for many prototypes. Add missing
6833 @smallexample directives around block of prototypes for vec_xl and
6836 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6838 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6839 track if we pass or return IEEE 128-bit floating point.
6840 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6841 C++ mangling that is compatible with GCC 8.1.
6842 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6843 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6844 floating point types.
6845 (rs6000_function_arg_advance_1): Likewise.
6846 (rs6000_mangle_type): Optionally generate mangled names that match
6847 what GCC 8.1 generated for IEEE 128-bit floating point types.
6848 (rs6000_globalize_decl_name): If we have an external function that
6849 passes or returns IEEE 128-bit types, generate a weak reference
6850 from the mangled name used in GCC 8.1 to the current mangled
6852 (rs6000_init_builtins): Make __ibm128 use the long double type if
6853 long double is IBM extended double. Make __float128 use the long
6854 double type if long double is IEEE 128-bit.
6857 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6858 macro for __ibm128 built-in functions.
6859 (PACK_IF): Add __ibm128 pack/unpack functions.
6860 (UNPACK_IF): Likewise.
6861 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6862 enable long double built-in functions if long double is IEEE
6863 128-bit floating point.
6864 (rs6000_invalid_builtin): Update long double built-in function
6866 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6867 functions, adjust the built-in function to use the long double
6868 built-in function if __ibm128 and long double are the same type.
6869 * doc/extend.texi (PowerPC builtins): Update documention for
6870 __builtin_{,un}pack_longdouble. Add documentation for
6871 __builtin_{,un}pack_ibm128.
6873 2018-06-06 Jim Wilson <jimw@sifive.com>
6875 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6876 (struct machine_function): New field interrupt_mode.
6877 (riscv_handle_type_attribute): New function. Add forward declaration.
6878 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6879 (riscv_expand_epilogue): Check interrupt_mode field.
6880 (riscv_set_current_function): Check interrupt attribute args and
6881 set interrupt_mode field.
6882 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6883 (riscv_sret, riscv_uret): New.
6884 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6885 new arguments to interrupt attribute.
6887 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6890 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6891 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6893 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6895 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6896 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6897 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6898 several redundant entries.
6900 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6902 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6903 type from "rtx" to "rtx_insn *".
6904 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6905 for local "call_insn", removing cast.
6906 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6908 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6910 PR tree-optimization/86066
6911 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6912 for BIT_INSERT_EXPR stores.
6914 2018-06-06 Richard Biener <rguenther@suse.de>
6916 PR tree-optimization/86062
6917 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6918 component refs ontop
6919 of to be offsetted base.
6921 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6923 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6924 to be static and remove check on interrupt attribute name.
6926 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6928 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6929 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6931 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6934 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6936 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6937 Remove second argument, change how error is called.
6938 (aarch64_layout_arg): Remove second argument from
6939 aarch64_err_no_fpadvsimd call.
6940 (aarch64_init_cumulative_args): Ditto.
6941 (aarch64_gimplify_va_arg_expr): Ditto.
6942 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6944 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6946 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6947 (*simple_return_indirect_internal<mode>): Rename from
6948 simple_return_indirect_internal. Use W mode iterator.
6949 (rstorssp): New expander.
6950 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6951 (clrssbsy): New expander.
6952 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6954 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6956 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6958 (cmse_check_pointed_object): Likewise.
6960 2018-06-05 Martin Liska <mliska@suse.cz>
6962 PR gcov-profile/47618
6963 * doc/invoke.texi: Document how -fprofile-dir format
6966 2018-06-05 Richard Biener <rguenther@suse.de>
6968 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6969 removal pretend DOM info isn't available so we do not update
6970 it and only remove edges, not dominated blocks. Actually free
6971 DOM info in case we removed something. Remove unreachable blocks.
6972 (mfb_keep_latches): Work with either DOM info or marked backedges.
6973 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6974 first. Mark backedges if DOM info isn't available.
6975 (Re-)compute DOM info after cleanup_control_flow_pre.
6977 2018-06-05 Richard Biener <rguenther@suse.de>
6979 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6980 (locus_discrim_hasher::hash): Adjust.
6981 (locus_discrim_hasher::equal): Likewise.
6982 (next_discriminator_for_locus): Work on line directly.
6983 (same_line_p): Pass in expanded locus1 as well.
6984 (assign_discriminators): Avoid redundant location expansions.
6986 2018-06-05 Richard Biener <rguenther@suse.de>
6988 PR tree-optimization/86046
6989 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6990 if required after clearing TREE_ADDRESSABLE.
6992 2018-06-05 Richard Biener <rguenther@suse.de>
6994 PR tree-optimization/86047
6995 * tree-ssa-loop.c (for_each_index): Glob handling of all
6996 decls and constants and really handle all of them.
6998 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7001 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7002 qualifier_void_pointer and qualifier_const_void_pointer.
7003 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7004 (arm_init_builtins): Handle the above.
7005 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7006 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7007 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7010 2018-06-05 Martin Liska <mliska@suse.cz>
7012 * auto-profile.c (read_autofdo_file): Do not use
7013 gcov_ctr_summary struct.
7014 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7015 * coverage.c (struct counts_entry): Likewise.
7016 (read_counts_file): Read just single summary entry.
7017 (get_coverage_counts): Use gcov_summary struct.
7018 * coverage.h (get_coverage_counts): Likewise.
7019 * gcov-dump.c (dump_working_sets): Likewise.
7020 (tag_summary): Dump just single summary.
7021 * gcov-io.c (gcov_write_summary): Write just histogram
7023 (gcov_read_summary): Read just single summary.
7024 (compute_working_sets): Use gcov_summary struct.
7025 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7026 of GCOV_COUNTERS_SUMMABLE.
7027 (GCOV_COUNTERS_SUMMABLE): Remove.
7028 (GCOV_FIRST_VALUE_COUNTER): Replace with
7029 GCOV_COUNTER_V_INTERVAL.
7030 (struct gcov_ctr_summary): Remove.
7031 (struct gcov_summary): Directly use fields of former
7033 (compute_working_sets): Use gcov_summary struct.
7034 * gcov.c (read_count_file): Do not use ctrs fields.
7035 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7037 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7039 * profile.c: Likewise.
7040 * profile.h: Likewise.
7042 2018-06-05 Martin Liska <mliska@suse.cz>
7044 PR gcov-profile/84846
7045 * gcov.c (output_lines): Print working directory only
7046 in intermediate format.
7048 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7050 * config/s390/s390-builtin-types.def: Add void function type.
7051 * config/s390/s390-builtins.def: Use the function type for the
7054 2018-06-04 Jim Wilson <jimw@sifive.com>
7056 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7058 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7059 and maybe_eh_return. Change regno to unsigned int. Use new args to
7060 handle EH_RETURN_DATA_REGNO registers properly.
7061 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7062 (riscv_expand_epilogue): Update comment. Change argument name and
7063 type. Update code to use new name and type. Pass new args to
7064 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7066 * config/riscv/riscv.md (NORMAL_RETURN): New.
7067 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7068 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7069 (eh_return): Call gen_eh_return_internal and emit barrier.
7070 (eh_return_internal): Call riscv_expand_epilogue.
7072 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7074 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7075 bit_insertion field and declare can_be_merged_into method.
7076 (merged_store_group::can_be_merged_into): New method.
7077 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7078 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7079 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7081 2018-06-04 Richard Biener <rguenther@suse.de>
7083 PR tree-optimization/85955
7084 * builtins.c (fold_builtin_sincos): Convert pointers to
7085 destination to appropriate type before dereferencing.
7087 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7089 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7091 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7093 * expr.c (expand_expr_real_1): Force the operand into memory if
7094 its TYPE_MODE is BLKmode and if there is no integer mode for
7095 the number of bits being extracted.
7097 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7101 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7102 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7104 2018-06-04 Richard Biener <rguenther@suse.de>
7106 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7107 (cleanup_tree_cfg_noloop): ... single caller. Do
7108 start_recording_case_labels later.
7110 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7112 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7113 to _IMMINTRIN_H_INCLUDED.
7114 * config/i386/pconfigintrin.h: Ditto.
7115 * config/i386/waitpkgintrin.h: Ditto.
7116 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7117 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7118 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7119 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7120 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7121 waitpkgintrin.h and cldemoteintrin.h.
7123 2018-06-04 Richard Biener <rguenther@suse.de>
7125 PR tree-optimization/86038
7126 * tracer.c (find_best_successor): Check probability for
7127 being initialized, bail out if not.
7129 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7132 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7133 of bits to ignore when comparing architectures.
7135 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7137 PR tree-optimization/69615
7138 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7139 maximum or minimum of the type, try to merge it also as if
7140 range1 is + [-, x - 1] or + [x + 1, -].
7143 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7145 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7147 PR tree-optimization/86034
7148 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7149 the unsigned bitfield type in a bit insertion sequence if it does not
7150 have a larger precision than the bitfield size.
7151 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7153 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7155 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7157 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7159 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7160 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7161 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7162 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7164 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7166 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7167 Disable -fdelete-null-pointer-checks for ELF toolchain.
7169 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7170 Kito Cheng <kito.cheng@gmail.com>
7172 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7173 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7174 (nds32*-*-*): Add glibc and uclibc conditions.
7175 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7176 (TARGET_EXCEPT_UNWIND_INFO): Define.
7177 * config/nds32/elf.h: New file.
7178 * config/nds32/linux.h: New file.
7179 * config/nds32/nds32-elf.opt: New file.
7180 * config/nds32/nds32-linux.opt: New file.
7181 * config/nds32/nds32-fp-as-gp.c
7182 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7183 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7185 (nds32_asm_file_end): Ditto.
7186 (nds32_print_operand): Ditto.
7187 (nds32_insert_attributes): Ditto.
7188 (nds32_init_libfuncs): New function.
7189 (TARGET_HAVE_TLS): Define.
7190 (TARGET_INIT_LIBFUNCS): Define.
7191 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7193 (TARGET_ELF): Apply different mcmodel setting.
7194 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7195 been migrated into elf.h and linux.h files.
7196 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7197 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7198 (mcmodel): The content has been migrated into nds32-elf.opt and
7199 nds32-linux.opt files.
7200 * config/nds32/t-elf: New file.
7201 * config/nds32/t-linux: New file.
7203 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7204 Shiva Chen <shiva0217@gmail.com>
7206 * config/nds32/constants.md (unspec_volatile_element): Add
7207 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7208 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7210 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7211 (make_pass_nds32_fp_as_gp): Declare.
7212 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7214 (nds32_asm_function_end_prologue): Remove unused asm output.
7215 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7216 (nds32_asm_file_start): Output necessary fp_as_gp information.
7217 (nds32_option_override): Adjust register usage.
7218 (nds32_expand_prologue): Consider fp_as_gp situation.
7219 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7220 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7223 (simple_return): Ditto.
7224 (omit_fp_begin): Output special directive for fp_as_gp.
7225 (omit_fp_end): Output special directive for fp_as_gp.
7226 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7227 mforbid-fp-as-gp): New options.
7229 2018-06-01 Mark Wielaard <mark@klomp.org>
7231 * dwarf2out.c (dwarf2out_finish): Remove generation of
7232 DW_AT_loclists_base.
7234 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7236 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7237 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7238 (struct merged_store_group): Add bit_insertion field.
7239 (dump_char_array): Use standard hexadecimal format.
7240 (merged_store_group::merged_store_group): Set bit_insertion to false.
7241 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7242 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7243 also print the mask in the dump file.
7244 (pass_store_merging::gate): Minor tweak.
7245 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7246 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7247 stores with INTEGER_CST stores.
7248 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7249 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7250 and use it throughout. Generate bit insertion sequences if need be.
7251 (pass_store_merging::process_store): Remove redundant condition.
7252 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7254 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7256 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7257 the 128-bit floating point types. Fix function comment.
7259 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7261 * config/aarch64/aarch64-simd.md
7262 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7264 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7267 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7269 PR tree-optimization/85989
7270 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7272 (backprop::intersect_uses): Check it when deciding whether this
7273 is a backedge reference.
7274 (backprop::process_block): Add each phi to m_visited_phis
7275 after visiting it, then clear it at the end.
7277 2018-06-01 Richard Biener <rguenther@suse.de>
7279 * tree-vectorizer.h (vect_dr_stmt): New function.
7280 (vect_get_load_cost): Adjust.
7281 (vect_get_store_cost): Likewise.
7282 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7283 Use vect_dr_stmt instead of DR_SMTT.
7284 (vect_record_base_alignments): Likewise.
7285 (vect_calculate_target_alignment): Likewise.
7286 (vect_compute_data_ref_alignment): Likewise and make static.
7287 (vect_update_misalignment_for_peel): Likewise.
7288 (vect_verify_datarefs_alignment): Likewise.
7289 (vector_alignment_reachable_p): Likewise.
7290 (vect_get_data_access_cost): Likewise. Pass down
7291 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7292 (vect_get_peeling_costs_all_drs): Likewise.
7293 (vect_peeling_hash_get_lowest_cost): Likewise.
7294 (vect_enhance_data_refs_alignment): Likewise.
7295 (vect_find_same_alignment_drs): Likewise.
7296 (vect_analyze_data_refs_alignment): Likewise.
7297 (vect_analyze_group_access_1): Likewise.
7298 (vect_analyze_group_access): Likewise.
7299 (vect_analyze_data_ref_access): Likewise.
7300 (vect_analyze_data_ref_accesses): Likewise.
7301 (vect_vfa_segment_size): Likewise.
7302 (vect_small_gap_p): Likewise.
7303 (vectorizable_with_step_bound_p): Likewise.
7304 (vect_prune_runtime_alias_test_list): Likewise.
7305 (vect_analyze_data_refs): Likewise.
7306 (vect_supportable_dr_alignment): Likewise.
7307 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7308 (vect_gen_prolog_loop_niters): Likewise.
7309 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7310 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7312 (vect_recog_mask_conversion_pattern): Likewise.
7313 (vect_try_gather_scatter_pattern): Likewise.
7314 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7315 to vect_get_store_cost.
7316 (vect_get_store_cost): Get stmt_info instead of DR.
7317 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7318 (vect_get_load_cost): Get stmt_info instead of DR.
7320 2018-06-01 Richard Biener <rguenther@suse.de>
7323 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7324 vars wrapped in MEM_REFs.
7326 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7328 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7329 Fix subreg tests so that we only return a choice between
7330 GENERAL_REGS and FP_REGS if the original classes included both.
7332 2018-06-01 Richard Biener <rguenther@suse.de>
7335 * tree-ssa-structalias.c (get_function_part_constraint):
7336 Handle NULL fi->decl.
7337 (find_func_aliases_for_call): Properly handle indirect
7338 fi from direct call.
7339 (find_func_clobbers): Likewise.
7340 (ipa_pta_execute): Likewise.
7341 (create_variable_info_for): For functions that are ifunc_resolver
7342 resolve to a varinfo that contains the result of the resolver call.
7343 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7346 2018-05-31 Michael Collison <michael.collison@arm.com>
7348 * config/aarch64/aarch64.md:
7349 (*fix_to_zero_extenddfdi2): New pattern.
7350 * gcc.target/aarch64/fix_extend1.c: New testcase.
7352 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7356 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7357 and BUILT_IN_STRNCMP_EQ.
7358 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7359 BUILT_IN_STRNCMP_EQ.
7360 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7361 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7362 (gimple_fold_builtin): Likewise.
7363 * tree-ssa-strlen.c (compute_string_length): New function.
7364 (determine_min_obsize): New function.
7365 (handle_builtin_string_cmp): New function to handle calls to
7366 string compare functions.
7367 (strlen_optimize_stmt): Add handling to builtin string compare
7369 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7370 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7371 * tree.c (build_common_builtin_nodes): Add new defines of
7372 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7374 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7377 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7378 functions with naked attribute.
7380 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7382 * config/i386/sse.md (avx_vec_concat<mode>):
7383 Substitute concat_tg_mode mode attribute with xtg_mode.
7384 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7385 (concat_tg_mode): Remove mode attribute.
7387 2018-05-31 Martin Sebor <msebor@redhat.com>
7390 * calls.c (alloc_max_size): Correct a logic error/typo.
7391 Treat excessive arguments as infinite. Warn for invalid arguments.
7392 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7394 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7397 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7398 and movx for Haswell.
7400 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7401 Cesar Philippidis <cesar@codesourcery.com>
7404 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7405 when emitting error on private/firstprivate reductions.
7406 * omp-low.c (lower_omp_target): Avoid reference-type processing
7407 on pointers for firstprivate clause.
7409 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7411 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7414 * config/aarch64/aarch64-simd.md
7415 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7416 (aarch64_ld1_x3_<mode>): Likewise
7417 (aarch64_st1x2<VALLDIF:mode>): Likewise
7418 (aarch64_st1_x2_<mode>): Likewise
7419 (aarch64_st1x3<VALLDIF:mode>): Likewise
7420 (aarch64_st1_x3_<mode>): Likewise
7421 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7422 (vld1_s8_x3): Likewise.
7423 (vld1_u16_x3): Likewise.
7424 (vld1_s16_x3): Likewise.
7425 (vld1_u32_x3): Likewise.
7426 (vld1_s32_x3): Likewise.
7427 (vld1_u64_x3): Likewise.
7428 (vld1_s64_x3): Likewise.
7429 (vld1_f16_x3): Likewise.
7430 (vld1_f32_x3): Likewise.
7431 (vld1_f64_x3): Likewise.
7432 (vld1_p8_x3): Likewise.
7433 (vld1_p16_x3): Likewise.
7434 (vld1_p64_x3): Likewise.
7435 (vld1q_u8_x3): Likewise.
7436 (vld1q_s8_x3): Likewise.
7437 (vld1q_u16_x3): Likewise.
7438 (vld1q_s16_x3): Likewise.
7439 (vld1q_u32_x3): Likewise.
7440 (vld1q_s32_x3): Likewise.
7441 (vld1q_u64_x3): Likewise.
7442 (vld1q_s64_x3): Likewise.
7443 (vld1q_f16_x3): Likewise.
7444 (vld1q_f32_x3): Likewise.
7445 (vld1q_f64_x3): Likewise.
7446 (vld1q_p8_x3): Likewise.
7447 (vld1q_p16_x3): Likewise.
7448 (vld1q_p64_x3): Likewise.
7449 (vst1_s64_x2): Likewise.
7450 (vst1_u64_x2): Likewise.
7451 (vst1_f64_x2): Likewise.
7452 (vst1_s8_x2): Likewise.
7453 (vst1_p8_x2): Likewise.
7454 (vst1_s16_x2): Likewise.
7455 (vst1_p16_x2): Likewise.
7456 (vst1_s32_x2): Likewise.
7457 (vst1_u8_x2): Likewise.
7458 (vst1_u16_x2): Likewise.
7459 (vst1_u32_x2): Likewise.
7460 (vst1_f16_x2): Likewise.
7461 (vst1_f32_x2): Likewise.
7462 (vst1_p64_x2): Likewise.
7463 (vst1q_s8_x2): Likewise.
7464 (vst1q_p8_x2): Likewise.
7465 (vst1q_s16_x2): Likewise.
7466 (vst1q_p16_x2): Likewise.
7467 (vst1q_s32_x2): Likewise.
7468 (vst1q_s64_x2): Likewise.
7469 (vst1q_u8_x2): Likewise.
7470 (vst1q_u16_x2): Likewise.
7471 (vst1q_u32_x2): Likewise.
7472 (vst1q_u64_x2): Likewise.
7473 (vst1q_f16_x2): Likewise.
7474 (vst1q_f32_x2): Likewise.
7475 (vst1q_f64_x2): Likewise.
7476 (vst1q_p64_x2): Likewise.
7477 (vst1_s64_x3): Likewise.
7478 (vst1_u64_x3): Likewise.
7479 (vst1_f64_x3): Likewise.
7480 (vst1_s8_x3): Likewise.
7481 (vst1_p8_x3): Likewise.
7482 (vst1_s16_x3): Likewise.
7483 (vst1_p16_x3): Likewise.
7484 (vst1_s32_x3): Likewise.
7485 (vst1_u8_x3): Likewise.
7486 (vst1_u16_x3): Likewise.
7487 (vst1_u32_x3): Likewise.
7488 (vst1_f16_x3): Likewise.
7489 (vst1_f32_x3): Likewise.
7490 (vst1_p64_x3): Likewise.
7491 (vst1q_s8_x3): Likewise.
7492 (vst1q_p8_x3): Likewise.
7493 (vst1q_s16_x3): Likewise.
7494 (vst1q_p16_x3): Likewise.
7495 (vst1q_s32_x3): Likewise.
7496 (vst1q_s64_x3): Likewise.
7497 (vst1q_u8_x3): Likewise.
7498 (vst1q_u16_x3): Likewise.
7499 (vst1q_u32_x3): Likewise.
7500 (vst1q_u64_x3): Likewise.
7501 (vst1q_f16_x3): Likewise.
7502 (vst1q_f32_x3): Likewise.
7503 (vst1q_f64_x3): Likewise.
7504 (vst1q_p64_x3): Likewise.
7506 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7508 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7509 user_label_prefix to name.
7511 * tree-core.h: Update comment about the format of NAME string
7512 passed to handler in attribute_spec.
7514 * config/msp430/msp430.md: Remove erroneous subreg expression from
7515 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7516 zero_extend{q,h}isi2.
7518 2018-05-30 Borislav Petkov <bp@suse.de>
7520 * doc/extend.texi: Document some architecture specific
7521 constraints and sort entries.
7523 2018-05-30 Martin Sebor <msebor@redhat.com>
7526 * builtins.c (expand_builtin_stpcpy_1): New function.
7527 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7528 only if the former succeeds.
7530 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7532 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7535 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7537 * doc/invoke.texi (-flinker-output): Document
7539 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7541 * passes.c (ipa_write_summaries): Only modify statements if body
7543 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7544 incrementally linking.
7545 (ipa_passes): Likewise.
7546 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7547 pass down resolution info.
7548 * common.opt (flag_incremental_link): Update info.
7549 * gcc.c (plugin specs): Turn flinker-output=* to
7550 -plugin-opt=-linker-output-known
7551 * toplev.c (compile_file): Also cut compilation when doing incremental
7553 * flag-types. (enum lto_partition_model): Add
7554 LTO_LINKER_OUTPUT_NOLTOREL.
7555 (invoke.texi): Add -flinker-output docs.
7556 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7557 link same way as WPA; do not stream in dead initializers.
7559 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7560 darf2out_register_external_decl): Support incremental link.
7562 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7564 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7566 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7568 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7569 it down to simple_object_copy_lto_debug_sections.
7570 (run_gcc): Determine incremental LTO link time and configure
7571 lto1 into non-wpa mode, disable renaming of debug sections.
7573 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7575 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7576 descriptions of various incorrectly documented functions.
7578 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7581 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7582 address check not strict.
7584 2018-05-30 Richard Biener <rguenther@suse.de>
7586 PR tree-optimization/85964
7587 * tracer.c (better_p): Drop initialized count check, we only
7588 call the function with initialized counts now.
7589 (find_best_successor): Do find a best edge if one
7590 has uninitialized count.
7591 (find_best_predecessor): Likewise. Do BB frequency check only
7592 if count is initialized.
7594 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7596 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7597 (aarch64_ldrstr_offset_compare): New.
7598 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7599 load/store orderings.
7600 (aarch64_gen_adjusted_ldpstp): Likewise.
7602 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7604 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7605 Check for subset of GENERAL_REGS and FP_REGS.
7606 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7609 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7611 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7612 and wi::to_poly_offset. Add the current offset and then check
7613 whether the sum fits, rather than using an unchecked addition of
7614 a checked term. Check for a shwi rather than a uhwi.
7615 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7616 (store_constructor): Use poly_int_tree_p.
7617 (expand_expr_real_1): Likewise.
7618 * function.c (assign_temp): Likewise.
7619 * fold-const.c (const_binop): Use poly_int_tree_p and
7621 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7623 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7624 to_poly_offset for MEM offsets.
7625 * ipa-icf.c (sem_variable::equals): Likewise.
7626 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7627 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7628 wi::to_poly_offset for BIT_FIELD_REF offsets.
7629 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7631 * var-tracking.c (emit_note_insn_var_location): Use
7632 tree_to_poly_uint64.
7634 2018-05-29 Jim Wilson <jimw@sifive.com>
7636 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7638 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7641 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7642 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7644 (sse4_1_round<mode>2): Use nonimmediate_operand
7645 for operand 1 predicate.
7647 2018-05-29 Martin Sebor <msebor@redhat.com>
7648 Richard Biener <rguenther@suse.de>
7651 * calls.c (get_size_range): Call determine_value_range instead
7652 of get_value_range..
7653 * tree-vrp.h (determine_value_range): Declared new function.
7654 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7656 2018-05-29 Richard Biener <rguenther@suse.de>
7658 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7659 sure to use non-pattern stmts for get_earlier_stmt arguments.
7660 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7661 called on pattern stmts.
7662 (get_later_stmt): Likewise.
7664 2018-05-29 Martin Liska <mliska@suse.cz>
7666 PR gcov-profile/85759
7667 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7670 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7672 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7674 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7678 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7679 VEC_PACK_FLOAT_EXPR): New tree codes.
7680 * tree-pretty-print.c (op_code_prio): Handle
7681 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7682 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7683 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7684 * tree-inline.c (estimate_operator_cost): Likewise.
7685 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7686 * fold-const.c (const_binop): Likewise.
7687 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7688 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7689 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7690 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7691 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7692 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7693 * expr.c (expand_expr_real_2): Likewise.
7694 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7695 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7696 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7698 * optabs.c (expand_widen_pattern_expr): For
7699 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7700 sign from result type rather than operand's type.
7701 (expand_binop_directly): For vec_packu_float_optab and
7702 vec_packs_float_optab allow result type to be different from operand's
7704 * optabs-tree.c (optab_for_tree_code): Handle
7705 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7706 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7707 * tree-vect-generic.c (expand_vector_operations_1): Handle
7708 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7709 VEC_PACK_FLOAT_EXPR.
7710 * tree-vect-stmts.c (supportable_widening_operation): Handle
7712 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7713 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7714 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7715 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7716 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7718 (vec_pack<floatprefix>_float_<mode>): New expander.
7719 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7721 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7722 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7723 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7724 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7725 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7727 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7728 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7729 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7730 VEC_PACK_FLOAT_EXPR): Document.
7732 2018-05-29 Richard Biener <rguenther@suse.de>
7734 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7736 (stmt_vec_info_vec): Make pointer.
7737 (init_stmt_vec_info_vec): Remove.
7738 (free_stmt_vec_info_vec): Likewise.
7739 (set_stmt_vec_info_vec): New function.
7740 (free_stmt_vec_infos): Likewise.
7741 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7742 (set_vinfo_for_stmt): Likewise.
7743 (get_earlier_stmt): Likewise.
7744 (get_later_stmt): Likewise.
7745 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7746 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7747 (vec_info::~vec_info): Free stmt_vec_infos.
7748 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7749 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7750 (pass_slp_vectorize::execute): Likewise.
7751 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7752 (free_stmt_vec_info_vec): Likewise.
7753 (set_stmt_vec_info_vec): New function.
7754 (free_stmt_vec_infos): Likewise.
7755 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7756 the global stmt_vec_info_vec.
7757 * tree-parloops.c (gather_scalar_reductions): Use
7758 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7761 2018-05-29 Richard Biener <rguenther@suse.de>
7763 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7765 2018-05-29 Martin Liska <mliska@suse.cz>
7766 David Malcolm <dmalcolm@redhat.com>
7768 * vec.c (test_reverse): New.
7769 (vec_c_tests): Add new test.
7770 * vec.h (vl_ptr>::reverse): New function.
7772 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7774 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7776 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7779 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7781 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7783 2018-05-28 Richard Biener <rguenther@suse.de>
7785 PR tree-optimization/85933
7786 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7787 look at stmts marked as vectorizable.
7789 2018-05-28 Richard Biener <rguenther@suse.de>
7791 PR tree-optimization/85934
7792 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7793 vector boolean check before scalar optimization.
7795 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7797 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7800 2018-05-28 Mark Wielaard <mark@klomp.org>
7802 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7803 if it is an expression containing a minus sign.
7805 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7807 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7809 2018-05-27 Paul Koning <ni1d@arrl.net>
7811 * config/pdp11/pdp11.md (truncsihi2): Remove.
7813 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7814 Chung-Ju Wu <jasonwucj@gmail.com>
7816 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7818 (unaligned_store_dw): Ditto.
7819 * config/nds32/nds32-memory-manipulation.c
7820 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7821 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7822 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7823 (emit_setmem_word_loop): Rename to ...
7824 (emit_setmem_doubleword_loop): ... this.
7825 (nds32_gen_dup_4_byte_to_word_value): New function.
7826 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7827 (nds32_expand_setmem_loop): Refine implementation.
7828 (nds32_expand_setmem_loop_v3m): Ditto.
7829 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7832 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7834 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7836 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7838 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7839 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7840 machine->attr_no_prologue_p.
7841 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7842 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7843 (nds32_expand_epilogue): Consider attr_naked_p.
7844 (nds32_expand_epilogue_v3pop): Likewise.
7845 (nds32_can_use_return_insn): Likewise.
7846 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7847 attr_no_prologue_p fields.
7848 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7850 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7853 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7855 * config/i386/sse.md
7856 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7858 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7860 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7862 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7864 (*<floatsuffix>floatv2div2sf2): Rename to ...
7865 (*float<floatunssuffix>v2div2sf2): ... this.
7866 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7867 (float<floatunssuffix>v2div2sf2_mask): ... this.
7868 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7869 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7870 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7872 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7874 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7876 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7878 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7880 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7882 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7883 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7884 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7885 gen_ufix_truncv8dfv8si2.
7886 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7887 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7888 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7889 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7890 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7891 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7892 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7893 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7895 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7899 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7901 2018-05-25 Jim Wilson <jimw@sifive.com>
7903 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7904 * config/riscv/riscv.c (struct machine_function): Add
7905 interrupt_handler_p and attribute_checked_p fields.
7906 (riscv_attribute_table): Add interrupt.
7907 (riscv_interrupt_type_p): New.
7908 (riscv_save_reg_p): Save extra regs for interrupt handler.
7909 (riscv_use_save_libcall): Return false for interrupt handler.
7910 (riscv_first_stack_step): Add forward declaration.
7911 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7912 for interrupt handler with large frame. Use it for saved reg list.
7913 (riscv_expand_prologue): Move flag_stack_usage_info support to
7914 eliminate duplication.
7915 (riscv_expand_epilogue): Generate mret for interrupt handler.
7916 (riscv_epilogue_uses): New.
7917 (riscv_can_use_return_insn): Return false for interrupt handler.
7918 (riscv_function_ok_for_sibcall): Likewise.
7919 (riscv_set_current_function): Add interrupt handler support.
7920 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7921 * config/riscv/riscv.md (UNSPECV_MRET): New.
7923 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7925 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7927 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7929 PR tree-optimization/85712
7930 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7931 this candidate has already been replaced in-situ by a copy.
7933 2018-05-25 Jason Merrill <jason@redhat.com>
7935 PR c++/80485 - inline function non-zero address.
7936 * symtab.c (nonzero_address): Check DECL_COMDAT.
7938 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7941 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7942 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7943 extension of SImode operation. Use const123_operand predicate.
7944 (*saddsi_1): Remove.
7945 (*saddl_se_1): Ditto.
7947 (*ssubl_se_1): Ditto.
7948 * config/alpha/predicates.md (const123_operand): New predicate.
7949 * config/alpha/constraints.md (P): Use IN_RANGE.
7951 2018-05-25 Richard Biener <rguenther@suse.de>
7953 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7955 (ref_maybe_used_by_stmt_p): Likewise.
7956 (stmt_may_clobber_ref_p): Likewise.
7957 (stmt_may_clobber_ref_p_1): Likewise.
7958 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7960 (ref_maybe_used_by_stmt_p): Likewise.
7961 (stmt_may_clobber_ref_p): Likewise.
7962 (stmt_may_clobber_ref_p_1): Likewise.
7963 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7964 the alias oracle to disambiguate DRs with stmts DR analysis
7966 (vect_analyze_data_refs): Do not give up on not analyzable
7967 DRs for BB vectorization. Remove code truncating the dataref
7970 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7973 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7974 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7975 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7977 2018-05-25 Richard Biener <rguenther@suse.de>
7979 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7980 function, combining stmt data ref gathering and fatal analysis
7982 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7983 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7984 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7985 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7986 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7988 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7990 PR tree-optimization/85720
7991 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7992 SCC if all partitions are builtins.
7993 (version_loop_by_alias_check): New parameter. Generate cancelable
7994 runtime alias check if all partitions are builtins.
7995 (distribute_loop): Update call to above function.
7997 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7999 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8000 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8001 (parm_default_def_partition_arg): Ditto.
8002 (set_parm_default_def_partition): Ditto.
8003 (get_parm_default_def_partitions): Ditto and make it static.
8004 (get_undefined_value_partitions): Ditto and make it static.
8005 (remove_ssa_form): Refactor call to init_var_map here.
8006 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8007 computation for loop region.
8008 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8009 (register_default_def): Delete.
8010 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8011 (parm_default_def_partition_arg): Ditto.
8012 (set_parm_default_def_partition): Ditto.
8013 (get_parm_default_def_partitions): Ditto and make it static.
8014 (get_undefined_value_partitions): Ditto and make it static.
8015 (coalesce_with_default, coalesce_with_default): Update comment.
8016 (create_coalesce_list_for_region): New func factored out from
8017 create_outofssa_var_map.
8018 (populate_coalesce_list_for_outofssa): New func factored out from
8019 create_outofssa_var_map and coalesce_ssa_name.
8020 (create_outofssa_var_map): Delete.
8021 (coalesce_ssa_name): Refactor to support live range computation.
8022 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8023 (get_parm_default_def_partitions): Delete.
8024 (get_undefined_value_partitions): Ditto.
8025 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8026 computation for loop region.
8027 (new_tree_live_info, loe_visit_block): Ditto.
8028 (live_worklist, set_var_live_on_entry): Ditto.
8029 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8030 * tree-ssa-live.h (struct _var_map): New fields.
8031 (init_var_map): Change decl.
8032 (region_contains_p): New.
8034 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8036 * tree-ssa-live.h (live_merge_and_clear): Delete.
8038 2018-05-25 Richard Biener <rguenther@suse.de>
8041 * tree-dump.c (dequeue_and_dump): Remove access to removed
8042 operand 2 of a SWITCH_EXPR.
8044 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8046 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8047 multiplication and division.
8048 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8049 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8050 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8051 (cond_udiv_optab, cond_umod_optab): New optabs.
8052 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8053 (IFN_COND_RDIV): New internal functions.
8054 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8055 TRUNC_MOD_EXPR and RDIV_EXPR.
8056 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8057 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8059 (SVE_INT_BINARY): Include mult.
8060 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8061 (optab, sve_int_op): Handle mult.
8062 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8064 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8065 for SVE_INT_BINARY_SD.
8067 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8069 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8070 (optab, sve_int_op): Handle div and udiv.
8071 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8072 for SVE_INT_BINARY_SD.
8073 (*<optab><mode>3): New insn for the same.
8075 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8077 * tree-vect-patterns.c: Include predict.h.
8078 (vect_recog_divmod_pattern): Restrict check for division support
8079 to when optimizing for size.
8081 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8083 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8084 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8085 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8086 (gimple_match_op::set_op): Likewise.
8087 (gimple_resimplify4): Declare.
8088 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8089 (expr::gen_transform): Likewise.
8090 (decision_tree::gen): Generate a simplification routine for 4 operands.
8091 * gimple-match-head.c (gimple_simplify): Add an overload for
8092 4 operands. In the top-level function, handle up to 4 call
8093 arguments and call gimple_resimplify4.
8094 (gimple_resimplify4): New function.
8095 (build_call_internal): Pass a fourth operand.
8096 (maybe_push_to_seq): Likewise.
8097 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8098 Fold VEC_COND_EXPRs of an operation and a default value into
8099 an IFN_COND_* function if possible.
8100 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8102 (SVE_COND_FP_BINARY): Include them.
8103 (optab, sve_fp_op): Handle them.
8104 (SVE_INT_BINARY_REV): New code iterator.
8105 (SVE_COND_FP_BINARY_REV): New int iterator.
8106 (commutative): New int attribute.
8107 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8109 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8111 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8112 (*cond_<optab><mode>): New patterns for reversed operands.
8114 2018-05-25 Richard Biener <rguenther@suse.de>
8116 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8117 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8118 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8119 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8120 * tree-vect-data-refs.c (everywhere): Adjust users.
8121 * tree-vect-loop.c (everywhere): Likewise.
8122 * tree-vect-slp.c (everywhere): Likewise.
8123 * tree-vect-stmts.c (everywhere): Likewise.
8124 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8126 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8128 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8130 (gcc_cv_as_section_exclude): ... this.
8131 Try Solaris as #exclude syntax.
8132 * configure: Regenerate.
8133 * config.in: Regenerate.
8134 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8136 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8137 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8139 * varasm.c (default_elf_asm_named_section): Don't check if
8140 HAVE_GAS_SECTION_EXCLUDE is defined.
8142 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8144 * doc/md.texi: Update the documentation of the cond_* optabs
8145 to mention the new final operand. Fix GET_MODE_NUNITS call.
8146 Describe the scalar case too.
8147 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8148 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8150 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8151 (get_conditional_internal_fn): Update comment.
8152 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8153 accumulator value as a final argument to conditional functions.
8154 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8155 a define_expand and add an "else" operand. Assert for now that
8156 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8157 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8158 (*cond_<optab><mode>): New patterns.
8159 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8160 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8161 (UNSPEC_COND_EOR): Delete.
8162 (optab): Remove associated mappings.
8163 (SVE_INT_BINARY): New code iterator.
8164 (sve_int_op): Remove int attribute and add "minus" to the code
8166 (SVE_COND_INT_OP): Delete.
8167 (SVE_COND_FP_OP): Rename to...
8168 (SVE_COND_FP_BINARY): ...this.
8170 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8172 * optabs.c (can_reuse_operands_p): New function.
8173 (maybe_legitimize_operands): Try to reuse the results for
8176 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8178 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8179 Add {q} suffix to insn mnemonic.
8181 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8183 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8184 (msp430_warn_func_return): New.
8186 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8188 * fold-const.c (tree_nonzero_bits): New function.
8189 * fold-const.h (tree_nonzero_bits): Likewise.
8190 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8191 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8193 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8197 * varasm.c (assemble_alias): Check ifunc_resolver only on
8200 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8203 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8204 when memory input operand is handled.
8206 2018-05-24 Luis Machado <luis.machado@linaro.org>
8208 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8210 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8212 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8214 * match.pd: Delay FMA folds until after vectorization.
8216 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8219 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8220 address check not strict.
8222 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8224 * gimple-match.h (gimple_match_op): New class.
8225 (mprts_hook): Replace parameters with a gimple_match_op *.
8226 (maybe_build_generic_op): Likewise.
8227 (gimple_simplified_result_is_gimple_val): Replace parameters with
8228 a const gimple_match_op *.
8229 (gimple_simplify): Replace code_helper * and tree * parameters with
8230 a gimple_match_op * parameter.
8231 (gimple_resimplify1): Replace code_helper *, tree and tree *
8232 parameters with a gimple_match_op * parameter.
8233 (gimple_resimplify2): Likewise.
8234 (gimple_resimplify3): Likewise.
8235 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8236 parameters with a gimple_match_op * parameter.
8237 * gimple-match-head.c (gimple_simplify): Change prototypes of
8238 auto-generated functions to take a gimple_match_op * instead of
8239 separate code_helper * and tree * parameters. Make the same
8240 change in the top-level overload and update calls to the
8241 gimple_resimplify routines. Update calls to the auto-generated
8242 functions and to maybe_push_res_to_seq in the publicly-facing
8243 operation-specific gimple_simplify overloads.
8244 (gimple_match_op::MAX_NUM_OPS): Define.
8245 (gimple_resimplify1): Replace rcode and ops with a single res_op
8246 parameter. Update call to gimple_simplify.
8247 (gimple_resimplify2): Likewise.
8248 (gimple_resimplify3): Likewise.
8249 (mprts_hook): Replace parameters with a gimple_match_op *.
8250 (maybe_build_generic_op): Likewise.
8251 (build_call_internal): Replace type, nargs and ops with
8252 a gimple_match_op *.
8253 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8254 with a single gimple_match_op *. Update calls to mprts_hook,
8255 build_call_internal and gimple_simplified_result_is_gimple_val.
8256 Factor out code that is common to the tree_code and combined_fn cases.
8257 * genmatch.c (expr::gen_transform): Replace tem_code and
8258 tem_ops with a gimple_match_op called tem_op. Update calls
8259 to the gimple_resimplify functions and maybe_push_res_to_seq.
8260 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8261 res_ops. Update call to the gimple_resimplify functions.
8262 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8263 (decision_tree::gen): Make the functions take a gimple_match_op *
8264 called res_op instead of separate res_code and res_ops parameters.
8265 Update call accordingly.
8266 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8267 and ops with a single res_op parameter. Update calls to
8268 maybe_build_generic_op and maybe_push_res_to_seq.
8269 (fold_stmt_1): Update calls to gimple_simplify and
8270 replace_stmt_with_simplification.
8271 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8272 and gimple_simplified_result_is_gimple_val.
8273 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8275 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8276 with a gimple_match_op *.
8277 (vn_nary_build_or_lookup): Likewise. Update call to
8278 vn_nary_build_or_lookup_1.
8279 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8280 gimple_match_op *. Update calls to the gimple_resimplify routines
8281 and to gimple_simplified_result_is_gimple_val.
8282 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8283 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8284 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8285 (visit_nary_op): Likewise.
8286 (visit_reference_op_load): Likewise.
8288 2018-05-23 Luis Machado <luis.machado@linaro.org>
8290 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8291 modifier for printing the step amount.
8293 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8296 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8299 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8301 * doc/sourcebuild.texi (Endianness): New subsubsection.
8303 2018-05-23 Luis Machado <luis.machado@linaro.org>
8305 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8306 <prefetch_dynamic_strides>: New const bool field.
8307 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8308 prefetch_dynamic_strides.
8309 (exynosm1_prefetch_tune): Likewise.
8310 (thunderxt88_prefetch_tune): Likewise.
8311 (thunderx_prefetch_tune): Likewise.
8312 (thunderx2t99_prefetch_tune): Likewise.
8313 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8315 (aarch64_override_options_internal): Update to set
8316 PARAM_PREFETCH_DYNAMIC_STRIDES.
8317 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8318 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8319 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8320 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8321 prefetch-dynamic-strides setting.
8323 2018-05-23 Luis Machado <luis.machado@linaro.org>
8325 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8326 <minimum_stride>: New const int field.
8327 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8328 minimum_stride field defaulting to -1.
8329 (exynosm1_prefetch_tune): Likewise.
8330 (thunderxt88_prefetch_tune): Likewise.
8331 (thunderx_prefetch_tune): Likewise.
8332 (thunderx2t99_prefetch_tune): Likewise.
8333 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8334 <default_opt_level>: Set to 3.
8335 (aarch64_override_options_internal): Update to set
8336 PARAM_PREFETCH_MINIMUM_STRIDE.
8337 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8338 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8339 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8340 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8341 stride is constant and is below the minimum stride threshold.
8343 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8345 * config/arm/arm-cpus.in (mode26): Delete.
8346 (armv4): Delete mode26 reference.
8347 * config/arm/arm.c (arm_configure_build_target): Delete use of
8350 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8352 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8354 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8355 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8357 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8358 (floatunsdidf2): Ditto.
8360 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8362 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8363 (fixuns_trunc<mode>si2_avx512f): Ditto.
8364 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8365 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8366 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8368 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8370 PR rtl-optimization/79985
8371 * df-scan.c (df_insn_refs_collect): Remove special case for
8372 global registers and asm statements.
8374 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8376 * extend.texi (Global Register Variables): Rewrite the bullet list.
8377 Note that the register is available for allocation. Note that access
8378 via inline asm must use constraints. Add note about async-signal
8379 handlers. Remove paragraph about automagic register selection.
8381 2018-05-23 Richard Biener <rguenther@suse.de>
8383 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8384 of fixed offset from memset VN.
8386 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8388 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8390 (alloc_cand_and_find_basis): Initialize first_interp field.
8391 (slsr_process_mul): Modify first_interp field.
8392 (slsr_process_add): Likewise.
8393 (slsr_process_cast): Modify first_interp field for each new
8395 (slsr_process_copy): Likewise.
8396 (dump_candidate): Dump first_interp field.
8397 (replace_mult_candidate): Process all interpretations, not just
8399 (replace_rhs_if_not_dup): Likewise.
8400 (replace_one_candidate): Likewise.
8402 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8404 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8406 (aarch64_needs_frame_chain): New function.
8407 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8409 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8412 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8413 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8414 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8415 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8416 as true for strict-align.
8417 (aarch64_can_inline_p): Perform checks even when callee has no
8418 attributes to check for strict alignment.
8419 * doc/extend.texi (AArch64 Function Attributes): Document
8421 * doc/invoke.texi: (AArch64 Options): Likewise.
8423 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8425 PR tree-optimization/85853
8426 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8427 the handling of the root of the node to...
8428 (vect_slp_analyze_node_operations_1): ...this new function,
8429 and run the whole thing with the child nodes' def types
8430 set according to their SLP node's def type.
8432 2018-05-23 Richard Biener <rguenther@suse.de>
8435 * tree-data-ref.c (create_runtime_alias_checks): Defer
8436 and ignore overflow warnings.
8438 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8440 PR tree-optimization/85822
8441 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8444 2018-05-23 Richard Biener <rguenther@suse.de>
8446 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8447 memset constants via native_interpret_expr.
8449 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8452 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8454 (cgraph_node::create_alias): Likewise.
8455 (cgraph_node::get_availability): Check ifunc_resolver instead
8456 of looking up ifunc attribute.
8457 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8458 * varasm.c (do_assemble_alias): Likewise.
8459 (assemble_alias): Likewise.
8460 (default_binds_local_p_3): Likewise.
8461 * cgraph.h (cgraph_node): Add ifunc_resolver.
8462 (cgraph_node::only_called_directly_or_aliased_p): Return false
8464 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8466 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8467 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8468 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8469 instead of looking up ifunc attribute.
8471 2018-05-22 Luis Machado <luis.machado@linaro.org>
8473 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8475 2018-05-22 Martin Sebor <msebor@redhat.com>
8478 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8479 only when expasion succeeds.
8480 (expand_builtin_strcmp): Same.
8481 (expand_builtin_strncmp): Same.
8483 2018-05-22 Martin Sebor <msebor@redhat.com>
8485 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8487 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8488 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8490 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8491 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8493 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8494 Add check for legitimate_address.
8495 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8496 (aarch64_swap_ldrstr_operands): New.
8497 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8500 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8501 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8503 * config/aarch64/aarch64.md: New patterns to generate stp
8505 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8506 single words and double words.
8507 (load_pair_sw, load_pair_dw): Likewise.
8508 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8510 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8512 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8513 for different mode ldpstp and add peephole for merged zero stores.
8515 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8517 (aarch64_gen_store_pair): Rename calls to match new patterns.
8518 (aarch64_gen_load_pair): Rename calls to match new patterns.
8519 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8520 (load_pair<DREG:mode><DREG2:mode>): ... This.
8521 (store_pair<mode>): Rename to...
8522 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8523 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8525 (V_INT_EQUIV): Handle SImode.
8526 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8529 2018-05-22 Martin Sebor <msebor@redhat.com>
8532 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8533 or ajust the presumed bound on an operation to avoid unnecessary
8536 2018-05-22 Martin Sebor <msebor@redhat.com>
8538 PR tree-optimization/85826
8539 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8540 assuming that a DECL necesarily has a constant size.
8542 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8545 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8547 2018-05-22 Richard Biener <rguenther@suse.de>
8549 PR tree-optimization/85834
8550 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8551 non-constant and non-zero memset arguments.
8553 2018-05-22 Martin Liska <mliska@suse.cz>
8556 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8558 2018-05-22 Richard Biener <rguenther@suse.de>
8560 PR tree-optimization/85863
8561 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8562 comparisons when vectype is specified.
8563 (vectorizable_condition): Do not specify vectype for
8564 vect_is_simple_cond when SLP vectorizing.
8566 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8569 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8570 define __ibm128 as long double.
8571 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8572 as a distinct type when IEEE 128-bit support is enabled.
8573 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8574 128-bit types to use the correct functions.
8575 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8576 convert between 128-bit floating point types that have different
8577 modes but the same representation, instead of using gen_lowpart to
8579 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8581 (IFKF_reg): New attributes to give the register constraints for
8583 (extend<mode>tf2_internal): New insns to mark an explicit
8584 conversion between 128-bit floating point types that have a
8585 different mode but share the same representation.
8587 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8589 PR tree-optimization/85814
8590 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8591 a null return from get_strinfo when unsharing the next
8592 strinfo in the chain.
8594 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8597 * varasm.c (weak_finish): Clean up weak_decls.
8599 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8601 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8602 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8603 UNSPEC_UADALP values.
8604 * config/aarch64/iterators.md (ABAL): New int iterator.
8607 (sur): Add mappings for the above.
8608 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8610 (aarch64_<sur>abal<mode>_4): Likewise.
8611 (aarch64_<sur>adalp<mode>_3): Likewise.
8612 (<sur>sadv16qi): New define_expand.
8614 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8616 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8617 (*movdf_internal): Ditto.
8618 (*rcpsf2_sse): Ditto.
8619 (*rsqrtsf2_sse): Ditto.
8620 (*sqrt<mode>2_sse): Ditto.
8622 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8624 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8626 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8627 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8628 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8629 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8631 * config/aarch64/arm_neon.h: Likewise.
8632 * config/aarch64/iterators.md (VQ_I): New.
8634 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8636 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8638 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8641 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8643 * config/nds32/constraints.md (S): New constraint.
8644 * config/nds32/nds32.md (call_internal): Use constraint S.
8645 (call_value_internal): Likewise.
8646 (sibcall_internal): Likewise.
8647 (sibcall_value_internal): Likewise.
8649 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8650 Chung-Ju Wu <jasonwucj@gmail.com>
8652 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8655 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8656 Chung-Ju Wu <jasonwucj@gmail.com>
8658 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8659 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8660 (nds32_rtx_costs_impl): Simplify.
8661 (nds32_address_cost_impl): Simplify.
8662 (nds32_init_rtx_costs): New function.
8663 (nds32_rtx_costs_speed_prefer): Likewise.
8664 (nds32_rtx_costs_size_prefer): Likewise.
8665 (nds32_address_cost_speed_prefer): Likewise.
8666 (nds32_address_cost_speed_fwprop): Likewise.
8667 (nds32_address_cost_size_prefer): Likewise.
8668 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8669 * config/nds32/nds32.c (nds32_option_override): Use
8670 nds32_init_rtx_costs function.
8672 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8674 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8675 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8676 (TARGET_PIPELINE_N8): Likewise.
8677 (TARGET_PIPELINE_N10): Likewise.
8678 (TARGET_PIPELINE_N13): Likewise.
8679 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8681 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8683 * config/nds32/nds32-fpu.md: Update copyright year.
8685 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8687 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8689 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8691 * config/nds32/nds32.c
8692 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8693 * config/nds32/nds32.opt (minline-asm-r15): New option.
8695 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8697 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8699 * config/nds32/nds32.md (abssi2): New pattern.
8701 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8703 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8704 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8705 Merge insn pattern from sse_cvtsi2ss<round_name> and
8706 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8707 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8708 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8709 using SWI48 mode iterator.
8710 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8711 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8712 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8713 pattern from sse_cvttss2si<round_saeonly_name>
8714 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8715 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8716 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8717 using SWI48 mode iterator.
8718 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8719 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8720 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8721 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8722 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8723 using SWI48 mode iterator.
8724 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8725 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8726 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8727 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8728 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8729 SWI48 mode iterator.
8730 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8731 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8732 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8733 pattern from sse_cvttsd2si<round_saeonly_name>
8734 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8736 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8738 * config/nds32/nds32-md-auxiliary.c
8739 (nds32_valid_smw_lwm_base_p): Refine.
8740 (nds32_output_smw_single_word): Refine.
8741 (nds32_output_smw_double_word): New.
8742 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8744 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8746 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8747 (nds32_output_stack_pop): Refine.
8748 (nds32_expand_unaligned_load): Refine.
8749 (nds32_expand_unaligned_store): Refine.
8751 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8752 Chung-Ju Wu <jasonwucj@gmail.com>
8754 * config/nds32/constants.md: Add TP_REGNUM constant.
8755 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8756 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8758 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8759 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8760 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8761 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8762 and PIC code generation.
8763 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8765 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8767 * config/nds32/nds32.md: Support TLS and PIC.
8768 * config/nds32/nds32.c: Support TLS and PIC.
8769 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8770 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8773 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8775 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8776 mode with E_ prefix.
8778 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8779 Chung-Ju Wu <jasonwucj@gmail.com>
8781 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8782 * config/nds32/nds32-md-auxiliary.c
8783 (symbolic_reference_mentioned_p): New.
8784 (nds32_legitimize_ict_address): New.
8785 (nds32_expand_ict_move): New.
8786 (nds32_indirect_call_referenced_p): New.
8787 (nds32_symbol_binds_local_p): Delete.
8788 (nds32_long_call_p): Modify.
8789 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8790 * config/nds32/nds32-protos.h
8791 (symbolic_reference_mentioned_p): Declare.
8792 (nds32_legitimize_ict_address): Declare.
8793 (nds32_expand_ict_move): Declare.
8794 (nds32_indirect_call_referenced_p): Declare.
8795 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8796 (nds32_relax_group): Use nds32_ict_const_p as condition.
8797 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8798 (nds32_asm_file_start): Output ict_model directive in asm code.
8799 (nds32_legitimate_address_p): Consider indirect call.
8800 (nds32_print_operand): Consider indirect call.
8801 (nds32_print_operand_address): Consider indirect call.
8802 (nds32_insert_attributes): Handle "indirect_call" attribute.
8803 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8804 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8805 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8806 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8807 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8808 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8809 (TARGET_ICT_MODEL_SMALL): Define.
8810 (TARGET_ICT_MODEL_LARGE): Define.
8811 * config/nds32/nds32.md (movsi): Consider ict model.
8812 (call, call_value): Consider ict model.
8813 (sibcall, sibcall_value): Consider ict model.
8814 * config/nds32/nds32.opt (mict-model): New option.
8815 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8818 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8819 Monk Chiang <sh.chiang04@gmail.com>
8820 Jim Wilson <jimw@sifive.com>
8822 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8823 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8824 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8825 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8826 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8827 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8828 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8829 compute save_libcall_adjustment properly.
8830 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8831 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8832 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8833 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8834 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8835 (ABI_SPEC): Handle mabi=ilp32e.
8836 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8837 (RVE): Add RVE mask.
8838 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8839 <-march>: Add rv32e as an example.
8841 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8844 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8845 (intra_create_variable_infos): Handle C++ constructors.
8847 2018-05-18 Martin Liska <mliska@suse.cz>
8849 * passes.def: Remove a redundant pass.
8851 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8854 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8856 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8858 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8860 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8862 (armv2, armv2a, armv3, armv3m): Delete architectures.
8863 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8864 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8865 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8867 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8868 (*mulsidi3adddi): Likewise.
8869 (mulsidi3): Likewise.
8870 (*mulsidi3_nov6): Likewise.
8871 (umulsidi3): Likewise.
8872 (umulsidi3_nov6): Likewise.
8873 (umaddsidi4): Likewise.
8874 (*umulsidi3adddi): Likewise.
8875 (smulsi3_highpart): Likewise.
8876 (*smulsi3_highpart_nov6): Likewise.
8877 (umulsi3_highpart): Likewise.
8878 (*umulsi3_highpart_nov6): Likewise.
8879 * config/arm/arm.h (arm_arch3m): Delete.
8880 * config/arm/arm.c (arm_arch3m): Delete.
8881 (arm_option_override_internal): Update armv3-related comment.
8882 (arm_configure_build_target): Delete use of isa_bit_mode32.
8883 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8884 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8885 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8887 (mulusa3): Likewise.
8888 * config/arm/arm-protos.h (arm_arch3m): Delete.
8889 * config/arm/arm-tables.opt: Regenerate.
8890 * config/arm/arm-tune.md: Likewise.
8891 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8892 deleted architectures.
8894 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8896 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8897 (armv5t, armv5te): New features.
8898 (ARMv5, ARMv5e): Delete fgroups.
8899 (ARMv5t, ARMv5te): Adjust for above changes.
8901 (armv5, armv5e): Delete arches.
8902 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8904 (*call_reg_arm): Likewise.
8905 (*call_value_reg_armv5): Likewise.
8906 (*call_value_reg_arm): Likewise.
8907 (*call_symbol): Likewise.
8908 (*call_value_symbol): Likewise.
8909 (*sibcall_insn): Likewise.
8910 (*sibcall_value_insn): Likewise.
8912 (prefetch): Likewise.
8913 (define_split and define_peephole2 dependent on arm_arch5):
8915 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8917 (TARGET_ARM_QBIT): Likewise.
8918 (TARGET_DSP_MULTIPLY): Likewise.
8919 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8920 (arm_arch5, arm_arch5e): Delete.
8921 (arm_arch5t, arm_arch5te): Declare.
8922 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8923 (arm_arch5t): Declare.
8924 (arm_option_reconfigure_globals): Update for the above.
8925 (arm_options_perform_arch_sanity_checks): Update comment, replace
8926 use of arm_arch5 with arm_arch5t.
8927 (use_return_insn): Likewise.
8928 (arm_emit_call_insn): Likewise.
8929 (output_return_instruction): Likewise.
8930 (arm_final_prescan_insn): Likewise.
8931 (arm_coproc_builtin_available): Likewise.
8932 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8933 arm_arch5e with arm_arch5t and arm_arch5te.
8934 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8935 (arm_arch5t, arm_arch5te): Declare.
8936 * config/arm/arm-tables.opt: Regenerate.
8937 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8938 * config/arm/t-multilib: Likewise.
8939 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8940 instead of arm_arch5.
8941 (*call_reg_thumb1): Likewise.
8942 (*call_value_reg_thumb1_v5): Likewise.
8943 (*call_value_reg_thumb1): Likewise.
8944 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8946 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8948 2018-05-18 Martin Liska <mliska@suse.cz>
8950 PR gcov-profile/84846
8951 * doc/gcov.texi: Document -t option of gcov tool.
8953 2018-05-18 Martin Liska <mliska@suse.cz>
8955 PR gcov-profile/84846
8956 * gcov.c (print_usage): Add new -t option.
8957 (process_args): Handle the option.
8958 (generate_results): Use stdout as output when requested by
8961 2018-05-18 Martin Liska <mliska@suse.cz>
8963 PR gcov-profile/84846
8964 * coverage.c (coverage_init): Write PWD to .gcno file.
8965 * doc/gcov.texi: Document how working directory is printed.
8966 * gcov-dump.c (dump_gcov_file): Print PWD.
8967 * gcov.c (output_intermediate_file): Likewise.
8968 (read_graph_file): Read PWD string.
8969 (output_lines): Print PWD.
8971 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8974 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8975 for retval and return false if all args to phi are zero.
8977 2018-05-18 Richard Biener <rguenther@suse.de>
8979 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8981 (evrp_dom_walker::before_dom_children): Call it.
8983 2018-05-18 Richard Biener <rguenther@suse.de>
8985 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8986 results when processing array refs with variable index.
8988 2018-05-18 Toon Moene <toon@moene.org>
8990 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8991 directly after that of -floop-interchange. Indicate that both
8992 options are enabled by default when specifying -O3.
8994 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8996 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8997 iterator. Delete separate integer-mode vec_set<mode> expander.
8998 (aarch64_simd_vec_setv2di): Delete.
8999 (vec_setv2di): Delete.
9000 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9001 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9002 the "w, r" alternative.
9004 2018-05-18 Martin Liska <mliska@suse.cz>
9006 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9007 * tree-pass.h (make_pass_lower_switch_O0): New function.
9008 * tree-switch-conversion.c (node_has_low_bound): Remove.
9009 (node_has_high_bound): Likewise.
9010 (node_is_bounded): Likewise.
9011 (class pass_lower_switch): Make it a template type and create
9013 (pass_lower_switch::execute): Add template argument.
9014 (make_pass_lower_switch): New function.
9015 (make_pass_lower_switch_O0): New function.
9016 (do_jump_if_equal): Remove.
9017 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9018 all the hard work to tree optimization passes.
9020 2018-05-18 Martin Liska <mliska@suse.cz>
9022 * dbgcnt.c (limit_low): Renamed from limit.
9023 (limit_high): New variable.
9024 (dbg_cnt_is_enabled): Check for upper limit.
9025 (dbg_cnt): Adjust dumping.
9026 (dbg_cnt_set_limit_by_index): Add new argument for high
9028 (dbg_cnt_set_limit_by_name): Likewise.
9029 (dbg_cnt_process_single_pair): Parse new format.
9030 (dbg_cnt_process_opt): Use strtok.
9031 (dbg_cnt_list_all_counters): Remove 'value' and add
9033 * doc/invoke.texi: Document changes.
9035 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9037 * doc/sourcebuild.texi (scalar_all_fma): Document.
9038 * tree.def (FMA_EXPR): Delete.
9039 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9040 * internal-fn.c (ternary_direct): New macro.
9041 (expand_ternary_optab_fn): Likewise.
9042 (direct_ternary_optab_supported_p): Likewise.
9043 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9044 * builtins.c (fold_builtin_fma): Delete.
9045 (fold_builtin_3): Don't call it.
9046 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9047 * expr.c (expand_expr_real_2): Likewise.
9048 * fold-const.c (operand_equal_p): Likewise.
9049 (fold_ternary_loc): Likewise.
9050 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9051 * gimple.c (DEFTREECODE): Likewise.
9052 * gimplify.c (gimplify_expr): Likewise.
9053 * optabs-tree.c (optab_for_tree_code): Likewise.
9054 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9055 * tree-eh.c (operation_could_trap_p): Likewise.
9056 (stmt_could_throw_1_p): Likewise.
9057 * tree-inline.c (estimate_operator_cost): Likewise.
9058 * tree-pretty-print.c (dump_generic_node): Likewise.
9059 (op_code_prio): Likewise.
9060 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9061 * tree-ssa-operands.c (get_expr_operands): Likewise.
9062 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9063 * fold-const-call.h (fold_fma): Delete.
9064 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9065 CFN_FNMA and CFN_FNMS.
9067 * genmatch.c (combined_fn): New enum.
9068 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9069 (commutative_op): New function.
9070 (commutate): Use it. Handle more than 2 operands.
9071 (dt_operand::gen_gimple_expr): Use commutative_op.
9072 (parser::parse_expr): Allow :c to be used with non-binary
9073 operators if the commutative operand is known.
9074 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9075 CFN_FMS, CFN_FNMA and CFN_FNMS.
9076 (backprop::process_assign_use): Remove FMA_EXPR handling.
9077 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9078 (gen_hsa_fma): New function.
9079 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9080 IFN_FNMA and IFN_FNMS.
9081 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9082 * gimple-fold.h (follow_all_ssa_edges): Declare.
9083 * gimple-fold.c (follow_all_ssa_edges): New function.
9084 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9085 gimple_build interface and use follow_all_ssa_edges to fold the result.
9086 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9087 instead of checking for optabs directly.
9088 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9089 rather than FMA_EXPRs.
9090 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9091 call to IFN_FMA instead of an FMA_EXPR.
9093 2018-05-17 Jim Wilson <jimw@sifive.com>
9095 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9096 sign extended promoted subreg, and the range does not have the sign bit
9097 set, then do a sign extend.
9099 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9100 test, check for sign extended subreg and/or constant operands, and
9101 do a sign extend in that case.
9103 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9105 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9106 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9108 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9109 Change logics_shift_reg to logics_shift_imm.
9110 (thunderx2t99_fp_loadpair_basic): Delete.
9111 (thunderx2t99_fp_storepair_basic): Delete.
9112 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9113 (thunderx2t99_asimd_polynomial): Delete.
9114 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9115 and neon_fp_mul_d_scalar_q.
9116 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9117 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9118 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9119 (thunderx2t99_asimd_lut): Add missing tbl types.
9120 (thunderx2t99_asimd_ext): Delete.
9121 (thunderx2t99_asimd_load1_1_mult): Delete.
9122 (thunderx2t99_asimd_load1_2_mult): Delete.
9123 (thunderx2t99_asimd_load1_ldp): New.
9124 (thunderx2t99_asimd_load1): New.
9125 (thunderx2t99_asimd_load2): Add missing *load2* types.
9126 (thunderx2t99_asimd_load3): New.
9127 (thunderx2t99_asimd_load4): New.
9128 (thunderx2t99_asimd_store1_1_mult): Delete.
9129 (thunderx2t99_asimd_store1_2_mult): Delete.
9130 (thunderx2t99_asimd_store2_mult): Delete.
9131 (thunderx2t99_asimd_store2_onelane): Delete.
9132 (thunderx2t99_asimd_store_stp): New.
9133 (thunderx2t99_asimd_store1): New.
9134 (thunderx2t99_asimd_store2): New.
9135 (thunderx2t99_asimd_store3): New.
9136 (thunderx2t99_asimd_store4): New.
9138 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9140 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9141 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9143 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9144 Segher Boessenkool <segher@kernel.crashing.org>
9147 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9150 2018-05-17 Richard Biener <rguenther@suse.de>
9152 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9153 for pruning loop and prune defs feeding only already visited PHIs.
9155 2018-05-17 Richard Biener <rguenther@suse.de>
9157 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9159 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9160 Richard Biener <rguenther@suse.de>
9162 PR tree-optimization/85793
9163 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9164 for VMAT_ELEMENTWISE.
9166 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9168 * internal-fn.h (lookup_internal_fn): Declare
9169 * internal-fn.c (lookup_internal_fn): New function.
9170 * gimple.c (gimple_build_call_from_tree): Handle calls to
9172 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9173 internal function names.
9174 * tree-pretty-print.c (dump_generic_node): Likewise.
9175 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9177 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9179 * gimple-fold.h (gimple_build): Make the function forms take
9180 combined_fn rather than built_in_function.
9181 (gimple_simplify): Likewise.
9182 * gimple-match-head.c (gimple_simplify): Likewise.
9183 * gimple-fold.c (gimple_build): Likewise.
9184 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9185 rather than gimple_build_call_internal.
9186 (get_initial_defs_for_reduction): Likewise.
9187 (vect_create_epilog_for_reduction): Likewise.
9188 (vectorizable_live_operation): Likewise.
9190 2018-05-17 Martin Liska <mliska@suse.cz>
9192 * gimple-ssa-sprintf.c (format_directive): Do not use
9193 space in between 'G_' and '('.
9195 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9198 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9199 even if the mask is not all ones.
9202 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9204 (ix86_gimple_fold_builtin): Likewise.
9207 * config/i386/i386.c: Include tree-vector-builder.h.
9208 (ix86_vector_shift_count): New function.
9209 (ix86_fold_builtin): Fold shift builtins by scalar count.
9210 (ix86_gimple_fold_builtin): Likewise.
9212 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9213 _mm512_setzero): New intrinsics.
9215 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9216 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9218 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9219 code generation for cases where splatting a value is not useful.
9220 * simplify-rtx.c (simplify_ternary_operation): Simplify
9221 vec_merge across a vec_duplicate and a paradoxical subreg forming
9222 a vector mode to a vec_concat.
9224 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9226 * config.gcc: Support "goldmont-plus".
9227 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9229 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9230 PROCESSOR_GOLDMONT_PLUS.
9231 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9232 (processor_target_table): Add "goldmont-plus".
9233 (PTA_GOLDMONT_PLUS): Define.
9234 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9235 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9236 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9237 (fold_builtin_cpu): Add "goldmont-plus".
9238 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9239 (ix86_option_override_internal): Add "goldmont-plus".
9240 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9241 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9242 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9243 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9245 2018-05-17 Richard Biener <rguenther@suse.de>
9247 PR tree-optimization/85757
9248 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9249 remove defs that only feed that PHI from further processing.
9251 2018-05-16 Jim Wilson <jimw@sifive.com>
9253 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9255 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9257 2018-05-16 Mark Wielaard <mark@klomp.org>
9259 * dwarf2out.c (count_index_strings): New function.
9260 (output_indirect_strings): Call count_index_strings and generate
9261 header for dwarf_version >= 5.
9263 2018-05-16 Mark Wielaard <mark@klomp.org>
9265 * dwarf2out.c (dwarf_FORM): New function.
9266 (set_indirect_string): Use dwarf_FORM.
9267 (reset_indirect_string): Likewise.
9268 (size_of_die): Likewise.
9269 (value_format): Likewise.
9270 (output_die): Likewise.
9271 (add_skeleton_AT_string): Likewise.
9272 (output_macinfo_op): Likewise.
9273 (index_string): Likewise.
9274 (output_index_string_offset): Likewise.
9275 (output_index_string): Likewise.
9276 (count_index_strings): Likewise.
9278 2018-05-16 Carl Love <cel@us.ibm.com>
9280 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9281 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9283 2018-05-16 Martin Jambor <mjambor@suse.cz>
9285 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9286 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9288 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9290 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9291 (fnma<mode>4): Likewise.
9292 (fms<mode>4): Likewise.
9293 (fnms<mode>4): Likewise.
9294 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9295 (aarch64_fnma<mode>4): Likewise.
9296 (aarch64_fms<mode>4): Likewise.
9297 (aarch64_fnms<mode>4): Likewise.
9298 (aarch64_fnmadd<mode>4): Likewise.
9300 2018-05-16 Jason Merrill <jason@redhat.com>
9302 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9304 2018-05-16 Richard Biener <rguenther@suse.de>
9306 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9307 (dump_stmt_cost): Declare.
9308 (add_stmt_cost): Dump cost we add.
9309 (add_stmt_costs): New function.
9310 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9312 (vect_analyze_stmt): Adjust prototype.
9313 (vectorizable_condition): Likewise.
9314 (vectorizable_live_operation): Likewise.
9315 (vectorizable_reduction): Likewise.
9316 (vectorizable_induction): Likewise.
9317 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9318 cost vector to pass to vectorizable_ and record afterwards.
9319 (vect_model_reduction_cost): Take cost vector argument and adjust.
9320 (vect_model_induction_cost): Likewise.
9321 (vectorizable_reduction): Likewise.
9322 (vectorizable_induction): Likewise.
9323 (vectorizable_live_operation): Likewise.
9324 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9325 SLP_TREE_NUMBER_OF_VEC_STMTS.
9326 (vect_analyze_slp_cost_1): Remove.
9327 (vect_analyze_slp_cost): Likewise.
9328 (vect_slp_analyze_node_operations): Take visited args and
9329 a target cost vector. Avoid processing already visited stmt sets.
9330 (vect_slp_analyze_operations): Use a local cost vector to gather
9331 costs and register those of non-discarded instances.
9332 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9333 (vect_schedule_slp_instance): Remove copying of
9334 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9336 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9337 adding cost. Record cost entry location.
9338 (vect_prologue_cost_for_slp_op): Function to compute cost of
9339 a constant or invariant generated for SLP vect in the prologue,
9340 split out from vect_analyze_slp_cost_1.
9341 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9342 (vect_model_promotion_demotion_cost): Likewise.
9343 (vect_model_store_cost): Likewise, make static.
9344 (vect_model_load_cost): Likewise.
9345 (vectorizable_bswap): Add cost vector arg and adjust.
9346 (vectorizable_call): Likewise.
9347 (vectorizable_simd_clone_call): Likewise.
9348 (vectorizable_conversion): Likewise.
9349 (vectorizable_assignment): Likewise.
9350 (vectorizable_shift): Likewise.
9351 (vectorizable_operation): Likewise.
9352 (vectorizable_store): Likewise.
9353 (vectorizable_load): Likewise.
9354 (vectorizable_condition): Likewise.
9355 (vectorizable_comparison): Likewise.
9356 (can_vectorize_live_stmts): Likewise.
9357 (vect_analyze_stmt): Likewise.
9358 (vect_transform_stmt): Adjust calls to vectorizable_*.
9359 * tree-vectorizer.c: Include gimple-pretty-print.h.
9360 (dump_stmt_cost): New function.
9362 2018-05-16 Richard Biener <rguenther@suse.de>
9364 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9365 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9366 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9367 (check_name): New callback.
9368 (dse_classify_store): Track cycles via a visited bitmap of PHI
9369 defs and simplify handling of in-loop and across loop dead stores
9370 and properly fail for loop-variant refs. Handle byte-tracking with
9371 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9374 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9376 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9377 (vect_get_mask_type_for_stmt): Likewise.
9378 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9380 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9381 to determine the statement's vector type and the vector type that
9382 should be used for calculating nunits. Deal with cases in which
9383 the type has to be deferred.
9384 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9385 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9386 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9387 (vect_determine_vf_for_stmt): New functions, split out from...
9388 (vect_determine_vectorization_factor): ...here.
9389 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9390 (vect_get_mask_type_for_stmt): New functions, split out from
9391 vect_determine_vectorization_factor.
9393 2018-05-16 Richard Biener <rguenther@suse.de>
9395 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9396 verify the [VEC_]COND_EXPR embedded comparison.
9398 2018-05-15 Martin Sebor <msebor@redhat.com>
9400 PR tree-optimization/85753
9401 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9402 RECORD_TYPE in addition to ARRAY_TYPE.
9404 2018-05-15 Martin Sebor <msebor@redhat.com>
9407 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9409 2018-05-15 Richard Biener <rguenther@suse.de>
9411 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9412 add by_clobber_p one. Change algorithm to collect all defs
9413 representing uses we need to walk and try reducing them to
9414 a single one before failing.
9415 (dse_dom_walker::dse_optimize_stmt): Adjust.
9417 2018-05-13 Mark Wielaard <mark@klomp.org>
9419 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9420 (size_of_loc_descr): Likewise.
9421 (output_loc_operands): Likewise.
9422 (output_loc_operands_raw): Likewise.
9423 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9424 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9425 (hash_loc_operands): Likewise.
9426 (compare_loc_operands): Likewise.
9428 2018-05-14 Mark Wielaard <mark@klomp.org>
9430 * dwarf2out.c (count_index_addrs): New function.
9431 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9433 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9435 PR tree-optimization/83648
9436 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9437 return value as malloc candidate.
9439 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9442 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9443 param as true in call to suggest_attribute.
9445 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9447 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9448 -mreadonly-in-sdata.
9450 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9452 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9454 (aarch64_crypto_aesd_fused): Likewise.
9456 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9458 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9459 (movsi_aarch64): Likewise.
9460 (load_pairsi): Likewise.
9461 (load_pairdi): Likewise.
9462 (store_pairsi): Likewise.
9463 (store_pairdi): Likewise.
9464 (load_pairsf): Likewise.
9465 (load_pairdf): Likewise.
9466 (store_pairsf): Likewise.
9467 (store_pairdf): Likewise.
9468 (zero_extend): Likewise.
9469 (trunc): Swap alternatives.
9470 (fcvt_target): Add '?' to prefer w over r.
9472 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9475 * config/i386/i386.md: Disallow non-commutative arithmetics in
9476 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9477 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9478 in the peephole2 before it.
9480 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9482 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9483 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9484 (ix86_handle_option): Handle -mcldemote.
9485 * config.gcc: New header.
9486 * config/i386/cldemoteintrin.h: New file.
9487 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9488 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9490 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9491 OPTION_MASK_ISA_CLDEMOTE.
9492 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9493 (ix86_valid_target_attribute_inner_p): Ditto.
9494 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9495 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9496 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9497 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9498 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9500 * config/i386/i386.opt: Add -mcldemote.
9501 * config/i386/x86intrin.h: New header.
9502 * doc/invoke.texi: Add -mcldemote.
9504 2018-05-14 Richard Biener <rguenther@suse.de>
9506 * doc/match-and-simplify.texi: Adjust :s documentation.
9508 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9510 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9511 intended memcpy size.
9512 (REORDER_45): Likewise.
9514 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9516 * sort.cc: New file.
9517 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9518 * vec.c (qsort_chk): Use gcc_qsort.
9519 * Makefile.in (OBJS-libcommon): Add sort.o.
9520 (build/sort.o): New target. Use it...
9521 (BUILD_RTL): ... here, and...
9522 (build/gencfn-macros): ... here, and...
9523 (build/genmatch): ... here.
9525 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9526 Chung-Ju Wu <jasonwucj@gmail.com>
9528 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9529 * config/nds32/nds32-graywolf.md: New file.
9530 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9531 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9533 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9534 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9535 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9536 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9537 * config/nds32/pipelines.md: Include n15 settings.
9539 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9540 Chung-Ju Wu <jasonwucj@gmail.com>
9542 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9543 * config/nds32/nds32-n13.md: New file.
9544 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9545 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9547 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9548 * config/nds32/nds32.md (pipeline_model): Add n13.
9549 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9550 * config/nds32/pipelines.md: Include n13 settings.
9552 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9553 Chung-Ju Wu <jasonwucj@gmail.com>
9555 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9556 * config/nds32/nds32-n10.md: New file.
9557 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9558 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9560 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9561 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9562 * config/nds32/nds32.md (pipeline_model): Add n10.
9563 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9564 * config/nds32/pipelines.md: Include n10 settings.
9566 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9567 Kito Cheng <kito.cheng@gmail.com>
9568 Chung-Ju Wu <jasonwucj@gmail.com>
9570 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9571 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9572 Add enum values for DSP extension instructions.
9573 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9575 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9576 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9578 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9579 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9580 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9581 * config/nds32/nds32-intrinsic.md: Likewise.
9582 * config/nds32/nds32_intrinsic.h: Likewise.
9583 * config/nds32/nds32-md-auxiliary.c: Likewise.
9584 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9585 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9586 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9587 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9588 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9589 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9590 TYPE_DMAC in switch statement.
9591 * config/nds32/nds32.c: New checking and implementation for DSP
9592 extension instructions.
9593 * config/nds32/nds32.h: Likewise.
9594 * config/nds32/nds32.md: Likewise.
9595 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9596 * config/nds32/predicates.md: Implement new predicates for DSP
9599 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9601 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9602 Reformat alternatives and attributes so it is easier to identify
9603 which constraints/attributes go with which instruction.
9604 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9605 (mov<mode>_softfloat32, FMOVE64): Likewise.
9606 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9607 (mov<mode>_softfloat64, FMOVE64): Likewise.
9609 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9611 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9613 (Basic PowerPC Built-in Functions): The new name of the
9614 subsection previously known as "PowerPC Built-in Functions".
9615 (Basic PowerPC Built-in Functions Available on all Configurations):
9617 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9618 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9619 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9620 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9622 2018-05-11 Martin Jambor <mjambor@suse.cz>
9625 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9628 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9631 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9633 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9635 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9636 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9637 (ix86_handle_option): Handle -mwaitpkg.
9638 * config.gcc: New header.
9639 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9640 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9641 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9643 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9644 OPTION_MASK_ISA_WAITPKG.
9645 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9646 (ix86_option_override_internal): Add PTA_WAITPKG.
9647 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9648 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9649 IX86_BUILTIN_TPAUSE.
9650 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9651 __builtin_ia32_umwait and __builtin_ia32_tpause.
9652 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9653 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9654 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9655 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9656 UNSPECV_TPAUSE): New.
9657 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9658 * config/i386/i386.opt: Add -mwaitpkg.
9659 * config/i386/waitpkgintrin.h: New file.
9660 * config/i386/x86intrin.h: New header.
9661 * doc/invoke.texi: Add -mwaitpkg.
9663 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9666 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9668 (cortex-m0): Use armv6s-m isa.
9669 (cortex-m0plus): Likewise.
9670 (cortex-m1): Likewise.
9671 (cortex-m0.small-multiply): Likewise.
9672 (cortex-m0plus.small-multiply): Likewise.
9673 (cortex-m1.small-multiply): Likewise.
9675 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9676 Jakub Jelinek <jakub@redhat.com>
9678 PR tree-optimization/85692
9679 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9680 source permute as well.
9682 2018-05-11 Martin Liska <mliska@suse.cz>
9685 * doc/extend.texi: Document LLVM style format for no_sanitize
9688 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9690 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9691 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9692 (mode_supports_vsx_dform_quad): Likewise.
9693 (mode_supports_vmx_dform): Move these functions to be next to the
9694 other mode_supports functions.
9695 (mode_supports_dq_form): Likewise.
9696 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9697 mode_supports_dq_form.
9698 (reg_offset_addressing_ok_p): Likewise.
9699 (offsettable_ok_by_alignment): Likewise.
9700 (rs6000_legitimate_offset_address_p): Likewise.
9701 (legitimate_lo_sum_address_p): Likewise.
9702 (rs6000_legitimize_address): Likewise.
9703 (rs6000_legitimize_reload_address): Likewise.
9704 (rs6000_secondary_reload_inner): Likewise.
9705 (rs6000_preferred_reload_class): Likewise.
9706 (rs6000_output_move_128bit): Likewise.
9708 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9710 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9711 Generate SImode target register for null target.
9712 <case IX86_BUILTIN_XGETBV>: Ditto.
9713 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9714 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9716 2018-05-10 Carl Love <cel@us.ibm.com>
9718 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9719 dcbtt and dcbtstt if operands[2] is 0.
9721 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9724 * config/i386/sse.md (usadv64qi): New expander.
9726 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9728 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9729 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9730 -maltivec=be support.
9731 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9732 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9733 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9734 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9735 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9736 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9737 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9738 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9739 altivec_vsumsws): Adjust.
9740 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9741 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9742 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9744 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9745 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9746 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9747 (altivec_lve<VI_char>x): Delete expand.
9748 (*altivec_lve<VI_char>x_internal): Rename to...
9749 (altivec_lve<VI_char>x): ... this.
9750 (altivec_lvxl_<mode>): Delete expand.
9751 (*altivec_lvxl_<mode>_internal): Rename to ...
9752 (altivec_lvxl_<mode>): ... this.
9753 (altivec_stvxl_<mode>): Delete expand.
9754 (*altivec_stvxl_<mode>_internal): Rename to ...
9755 (altivec_stvxl_<mode>): ... this.
9756 (altivec_stve<VI_char>x): Delete expand.
9757 (*altivec_stve<VI_char>x_internal): Rename to ...
9758 (altivec_stve<VI_char>x): ... this.
9759 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9760 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9761 reduc_plus_scal_<mode>): Adjust.
9762 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9764 (rs6000_cpu_cpp_builtins): Adjust.
9765 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9766 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9767 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9768 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9769 -maltivec=be support.
9770 (rs6000_split_vec_extract_var): Adjust.
9771 (rs6000_split_v4si_init): Adjust.
9772 (swap_selector_for_mode): Delete.
9773 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9774 altivec_expand_stvex_be): Delete.
9775 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9776 -maltivec=be support.
9777 (rs6000_gimple_fold_builtin): Ditto.
9778 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9780 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9781 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9782 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9783 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9784 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9785 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9786 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9787 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9788 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9789 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9790 anonymous split): Adjust.
9791 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9792 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9794 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9796 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9797 when --with-gxx-include-dir is also specified.
9798 * configure: Regenerate.
9800 2018-05-09 Jim Wilson <jimw@sifive.com>
9803 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9804 * config/riscv/t-withmultilib: New.
9805 * config/riscv/withmultilib.h: New.
9806 * doc/install.texi: Document RISC-V --with-multilib-list support.
9808 2018-05-09 Richard Biener <rguenther@suse.de>
9810 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9812 (vect_bb_vectorization_profitable_p): Adjust. Compute
9813 actual scalar cost using the cost vector and the add_stmt_cost
9816 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9818 PR rtl-optimization/85645
9819 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9820 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9822 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9824 PR rtl-optimization/85645
9825 * shrink-wrap.c (spread_components): Return a boolean saying if
9826 anything was changed.
9827 (try_shrink_wrapping_separate): Iterate spread_components until
9828 nothing changes anymore.
9830 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9832 PR rtl-optimization/85645
9833 * regrename.c (build_def_use): Also kill the chains that include the
9834 destination of a REG_CFA_REGISTER note.
9836 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9838 PR rtl-optimization/85645
9839 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9840 insn that has a REG_CFA_REGISTER note.
9842 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9844 * cfgexpand.c (expand_clobber): New function.
9845 (expand_gimple_stmt_1): Use it.
9846 * tree-vect-stmts.c (vect_clobber_variable): New function,
9848 (vectorizable_simd_clone_call): ...here.
9849 (vectorizable_store): Emit a clobber either side of an
9850 IFN_STORE_LANES sequence.
9851 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9853 2018-05-09 Tom de Vries <tom@codesourcery.com>
9856 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9857 (define_insn "trap_if_false"): Add exit after trap.
9859 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9861 PR rtl-optimization/85638
9862 * bb-reorder.c: Include common/common-target.h.
9863 (create_forwarder_block): New function extracted from...
9864 (fix_up_crossing_landing_pad): ...here. Rename into...
9865 (dw2_fix_up_crossing_landing_pad): ...this.
9866 (sjlj_fix_up_crossing_landing_pad): New function.
9867 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9868 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9869 from both partitions and exit the loop after one iteration.
9871 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9874 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9876 (Basic PowerPC Built-in Functions): The new name of the
9877 subsection previously known as "PowerPC Built-in Functions".
9878 (Basic PowerPC Built-in Functions Available on all Configurations):
9880 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9882 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9884 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9886 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9889 2018-05-08 Jim Wilson <jimw@sifive.com>
9891 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9892 (LD_EMUL_SUFFIX): New.
9893 (LINK_SPEC): Use it.
9895 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9897 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9899 (Basic PowerPC Built-in Functions): The new name of the
9900 subsection previously known as "PowerPC Built-in Functions".
9901 (Basic PowerPC Built-in Functions Available on all Configurations):
9903 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9905 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9907 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9909 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9912 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9915 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9916 after cmpelim optimization.
9918 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9920 * config.gcc: Support "goldmont".
9921 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9922 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9924 * config/i386/i386.c (m_GOLDMONT): Define.
9925 (processor_target_table): Add "goldmont".
9926 (PTA_GOLDMONT): Define.
9927 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9928 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9929 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9930 (fold_builtin_cpu): Add "goldmont".
9931 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9932 (ix86_option_override_internal): Add "goldmont".
9933 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9934 (processor_type): Add PROCESSOR_GOLDMONT.
9935 * config/i386/i386.md: Add CPU "glm".
9936 * config/i386/glm.md: New file.
9937 * config/i386/x86-tune.def: Add m_GOLDMONT.
9938 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9940 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9943 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9945 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9946 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9947 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9950 * config/i386/i386.c (ix86_fold_builtin): Handle
9951 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9954 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9955 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9957 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9960 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9961 (check_arch): Likewise.
9962 (check_fpu): Return the result rather than printing it.
9963 (end arch): Fix operator precedence.
9964 (end cpu): Likewise.
9965 (END): Print the result from check_fpu.
9967 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9968 Alan Hayward <alan.hayward@arm.com>
9969 David Sherwood <david.sherwood@arm.com>
9971 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9972 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9973 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9974 (*fcmuo<mode>_and): New patterns.
9976 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9978 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9979 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9980 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9981 (cmp_op, sve_imm_con): New code attributes.
9982 (SVE_COND_INT_CMP, imm_con): Delete.
9983 (cmp_op): Remove above unspecs from int attribute.
9984 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9986 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9987 comparison-specific unspecs.
9988 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9989 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9990 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9991 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9992 (*vec_fcm<cmp_op><mode>): Rename to...
9993 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9994 (*vec_fcmuo<mode>): Rename to...
9995 (*fcmuo<mode>): ...this and adjust likewise.
9996 (*pred_fcm<cmp_op><mode>): New pattern.
9997 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9998 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10000 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10002 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10003 (aarch64_emit_sve_predicated_cond): New function.
10004 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10005 (aarch64_emit_unspec_cond_or): Replace with...
10006 (aarch64_emit_sve_or_conds): ...this new function. Use
10007 aarch64_emit_sve_ptrue_op for the individual comparisons and
10008 aarch64_emit_binop to OR them together.
10009 (aarch64_emit_inverted_unspec_cond): Replace with...
10010 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10011 aarch64_emit_sve_ptrue_op for the comparison and
10012 aarch64_emit_unop to invert the result.
10013 (aarch64_expand_sve_vec_cmp_float): Update after the above
10014 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10016 2018-05-07 Nathan Sidwell <nathan@acm.org>
10018 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10019 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10020 (Backwards Compatibility): Likewise.
10022 2018-05-07 Luis Machado <luis.machado@linaro.org>
10026 2018-05-07 Luis Machado <luis.machado@linaro.org>
10028 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10029 <prefetch_dynamic_strides>: New const bool field.
10030 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10031 prefetch_dynamic_strides.
10032 (exynosm1_prefetch_tune): Likewise.
10033 (thunderxt88_prefetch_tune): Likewise.
10034 (thunderx_prefetch_tune): Likewise.
10035 (thunderx2t99_prefetch_tune): Likewise.
10036 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10038 (aarch64_override_options_internal): Update to set
10039 PARAM_PREFETCH_DYNAMIC_STRIDES.
10040 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10041 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10042 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10043 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10044 prefetch-dynamic-strides setting.
10046 2018-05-07 Luis Machado <luis.machado@linaro.org>
10048 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10049 <minimum_stride>: New const int field.
10050 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10051 minimum_stride field.
10052 (exynosm1_prefetch_tune): Likewise.
10053 (thunderxt88_prefetch_tune): Likewise.
10054 (thunderx_prefetch_tune): Likewise.
10055 (thunderx2t99_prefetch_tune): Likewise.
10056 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10057 (aarch64_override_options_internal): Update to set
10058 PARAM_PREFETCH_MINIMUM_STRIDE.
10059 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10060 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10061 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10062 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10063 stride is constant and is below the minimum stride threshold.
10065 2018-05-07 Luis Machado <luis.machado@linaro.org>
10067 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10070 2018-05-07 Luis Machado <luis.machado@linaro.org>
10072 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10073 <prefetch_dynamic_strides>: New const bool field.
10074 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10075 prefetch_dynamic_strides.
10076 (exynosm1_prefetch_tune): Likewise.
10077 (thunderxt88_prefetch_tune): Likewise.
10078 (thunderx_prefetch_tune): Likewise.
10079 (thunderx2t99_prefetch_tune): Likewise.
10080 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10082 (aarch64_override_options_internal): Update to set
10083 PARAM_PREFETCH_DYNAMIC_STRIDES.
10084 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10085 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10086 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10087 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10088 prefetch-dynamic-strides setting.
10090 2018-05-07 Luis Machado <luis.machado@linaro.org>
10092 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10093 <minimum_stride>: New const int field.
10094 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10095 minimum_stride field.
10096 (exynosm1_prefetch_tune): Likewise.
10097 (thunderxt88_prefetch_tune): Likewise.
10098 (thunderx_prefetch_tune): Likewise.
10099 (thunderx2t99_prefetch_tune): Likewise.
10100 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10101 (aarch64_override_options_internal): Update to set
10102 PARAM_PREFETCH_MINIMUM_STRIDE.
10103 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10104 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10105 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10106 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10107 stride is constant and is below the minimum stride threshold.
10109 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10112 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10113 the type is addressable. Don't force op into register if it has
10116 2018-05-05 Roland McGrath <mcgrathr@google.com>
10119 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10120 any section for which we don't know a specific type it should have,
10121 regardless of name. Previously this was done only for the exact
10122 names ".init_array", ".fini_array", and ".preinit_array".
10123 (default_elf_asm_named_section): Add comment about
10124 relationship with default_section_type_flags and SECTION_NOTYPE.
10125 (get_section): Don't consider it a type conflict if one side has
10126 SECTION_NOTYPE and the other doesn't, as long as neither has the
10127 SECTION_BSS et al used in the default_section_type_flags logic.
10129 2018-05-05 Tom de Vries <tom@codesourcery.com>
10132 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10133 (workaround_barsyncs): New function.
10134 (nvptx_reorg): Use workaround_barsyncs.
10135 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10136 (define_expand "nvptx_membar_cta"): New define_expand.
10137 (define_insn "*nvptx_membar_cta"): New insn.
10139 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10141 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10142 To improve optimization opportunities.
10143 * builtin-types.def: The new needed builtin types for the above.
10145 2018-05-04 Richard Biener <rguenther@suse.de>
10147 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10148 * gimple-ssa-store-merging.c
10149 (imm_store_chain_info::output_merged_store): Remove redundant create,
10150 release split_store vector contents on failure.
10151 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10152 scalar stmt vector on cache hit.
10154 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10156 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10158 * config.gcc (powerpc-xilinx-eabi*): Remove.
10159 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10161 (fusion_addis_mem_combo_load): Ditto.
10162 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10164 (rs6000_cpu_cpp_builtins): Ditto.
10165 * config/rs6000/rs6000-linux.c
10166 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10167 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10168 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10170 (rs6000_setup_reg_addr_masks): Ditto.
10171 (rs6000_init_hard_regno_mode_ok): Ditto.
10172 (rs6000_option_override_internal): Ditto.
10173 (legitimate_lo_sum_address_p): Ditto.
10174 (rs6000_legitimize_address): Ditto.
10175 (rs6000_legitimize_reload_address): Ditto.
10176 (rs6000_legitimate_address_p): Ditto.
10177 (abi_v4_pass_in_fpr): Ditto.
10178 (setup_incoming_varargs): Ditto.
10179 (rs6000_gimplify_va_arg): Ditto.
10180 (rs6000_split_multireg_move): Ditto.
10181 (rs6000_savres_strategy): Ditto.
10182 (rs6000_emit_prologue_components): Ditto.
10183 (rs6000_emit_epilogue_components): Ditto.
10184 (rs6000_emit_prologue): Ditto.
10185 (rs6000_emit_epilogue): Ditto.
10186 (rs6000_elf_file_end): Ditto.
10187 (rs6000_function_value): Ditto.
10188 (rs6000_libcall_value): Ditto.
10189 * config/rs6000/rs6000.h: Ditto.
10190 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10191 (TARGET_MINMAX): ... this. New.
10192 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10193 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10194 (*movsi_internal1_single): Delete.
10195 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10196 mfpu=, mxilinx-fpu): Delete.
10197 * config/rs6000/singlefp.h: Delete.
10198 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10199 * config/rs6000/t-rs6000: Ditto.
10200 * config/rs6000/t-xilinx: Delete.
10201 * config/rs6000/titan.md: Adjust for fp_type removal.
10202 * config/rs6000/vsx.md: Remove Xilinx FP support.
10203 (VStype_simple): Delete.
10204 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10205 * config/rs6000/xfpu.h: Delete.
10206 * config/rs6000/xfpu.md: Delete.
10207 * config/rs6000/xilinx.h: Delete.
10208 * config/rs6000/xilinx.opt: Delete.
10209 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10210 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10212 2018-05-04 Tom de Vries <tom@codesourcery.com>
10215 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10218 2018-05-04 Richard Biener <rguenther@suse.de>
10220 PR middle-end/85627
10221 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10222 (expand_complex_div_wide): Likewise.
10223 (expand_complex_operations_1): Likewise.
10224 (expand_complex_libcall): Preserve EH info of the original stmt.
10225 (tree_lower_complex): Handle removed blocks.
10226 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10227 on complex multiplication and division libcall builtins.
10229 2018-05-04 Richard Biener <rguenther@suse.de>
10231 PR middle-end/85574
10232 * fold-const.c (negate_expr_p): Restrict negation of operand
10233 zero of a division to when we know that can happen without
10235 (fold_negate_expr_1): Likewise.
10237 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10240 * real.h (real_nextafter): Declare.
10241 * real.c (real_nextafter): New function.
10242 * fold-const-call.c (fold_const_nextafter): New function.
10243 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10244 CASE_CFN_NEXTTOWARD.
10245 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10246 even when arg1_mode is different from arg0_mode.
10248 2018-05-03 Nathan Sidwell <nathan@acm.org>
10250 * doc/extend.texi (Deprecated Features): Remove
10251 -ffriend-injection.
10252 (Backwards Compatibility): Likewise.
10253 * doc/invoke.texi (C++ Language Options): Likewise.
10254 (C++ Dialect Options): Likewise.
10256 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10259 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10260 _mm512_mask_mullox_epi64): New intrinsics.
10262 2018-05-03 Tom de Vries <tom@codesourcery.com>
10265 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10266 dump files): Add offload-tree.
10268 2018-05-03 Richard Biener <rguenther@suse.de>
10270 PR tree-optimization/85615
10271 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10272 to loops not nested in BBs loop father to avoid creating multi-entry
10275 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10277 PR tree-optimization/70291
10278 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10279 arguments. Change return type to tree. Emit libcall as a new
10280 statement rather than replacing existing one when inplace_p is true.
10281 (expand_complex_multiplication_components): New function.
10282 (expand_complex_multiplication): Expand floating-point complex
10283 multiplication using the above.
10284 (expand_complex_division): Rename inner_type parameter to type.
10285 Update expand_complex_libcall call-site.
10286 (expand_complex_operations_1): Update expand_complex_multiplication
10287 and expand_complex_division call-sites.
10289 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10292 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10293 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10294 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10295 the highest significant bit of the shift count mask is clear. In
10296 check whether and[sq]i3 is needed verify that all significant bits
10297 of the shift count other than the highest are set.
10299 2018-05-02 Tom de Vries <tom@codesourcery.com>
10302 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10303 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10304 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10305 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10306 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10307 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10308 __builtin_goacc_parlevel_size.
10310 2018-05-02 Richard Biener <rguenther@suse.de>
10312 PR tree-optimization/85597
10313 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10314 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10317 2018-05-02 Tom de Vries <tom@codesourcery.com>
10320 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10321 dump files): Add ltrans-tree.
10323 2018-05-02 Tom de Vries <tom@codesourcery.com>
10326 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10327 dump files): Add wpa-ipa.
10329 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10331 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10332 powerpc*-*-linux*paired* target.
10333 * config/rs6000/750cl.h: Delete.
10334 * config/rs6000/paired.h: Delete.
10335 * config/rs6000/paired.md: Delete.
10336 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10338 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10339 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10340 comment. Remove paired float support.
10341 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10342 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10344 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10345 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10347 * config/rs6000/rs6000.c: Remove paired float support.
10348 (paired_expand_vector_init, paired_expand_vector_move,
10349 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10350 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10351 paired_expand_builtin, paired_expand_predicate_builtin,
10352 paired_init_builtins): Delete.
10353 * config/rs6000/rs6000.h: Remove paired float support.
10354 * config/rs6000/rs6000.md: Remove paired float support.
10355 (move_from_CR_ov_bit): Delete.
10356 * config/rs6000/rs6000.opt (mpaired): Delete.
10357 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10358 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10360 2018-05-02 Richard Biener <rguenther@suse.de>
10362 PR middle-end/85567
10363 * gimplify.c (gimplify_save_expr): When in SSA form allow
10364 SAVE_EXPRs to compute to SSA vars.
10366 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10369 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10370 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10371 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10372 clobber operands[2], instead use a new pseudo. Formatting fixes.
10374 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10376 PR tree-optimization/85586
10377 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10378 exit early for statements in the same group if the accesses are
10381 2018-05-02 Tom de Vries <tom@codesourcery.com>
10384 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10387 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10389 PR tree-optimization/85143
10390 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10392 2018-05-01 Tom de Vries <tom@codesourcery.com>
10395 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10396 not found" error message.
10398 2018-05-01 Tom de Vries <tom@codesourcery.com>
10401 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10402 * vec.c (test_ordered_remove_if): New function.
10403 (vec_c_tests): Call test_ordered_remove_if.
10404 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10405 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10406 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10407 VEC_ORDERED_REMOVE_IF.
10409 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10411 PR tree-optimization/82665
10412 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10413 pointer subtraction where arguments come from a memchr call.
10415 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10417 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10418 --push-state --as-needed and --pop-state instead of --as-needed and
10419 --no-as-needed if ld supports it.
10420 * configure: Regenerated.
10423 * doc/install.texi2html: Replace _002d with - and _002a with * in
10424 generated html files using sed.
10426 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10429 * gcc-rich-location.c (blank_line_before_p): New function.
10430 (use_new_line): New function.
10431 (gcc_rich_location::add_fixit_insert_formatted): New function.
10432 * gcc-rich-location.h
10433 (gcc_rich_location::add_fixit_insert_formatted): New function.
10435 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10437 * selftest.c (assert_streq): Rename "expected" and "actual" to
10438 "val1" and "val2". Extend NULL-handling to cover both inputs
10439 symmetrically, while still requiring both to be non-NULL for a pass.
10440 * selftest.h (assert_streq): Rename "expected" and "actual" to
10442 (ASSERT_EQ): Likewise.
10443 (ASSERT_EQ_AT): Likewise.
10444 (ASSERT_KNOWN_EQ): Likewise.
10445 (ASSERT_KNOWN_EQ_AT): Likewise.
10446 (ASSERT_NE): Likewise.
10447 (ASSERT_MAYBE_NE): Likewise.
10448 (ASSERT_MAYBE_NE_AT): Likewise.
10449 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10450 the assertion to pass.
10451 (ASSERT_STREQ_AT): Likewise.
10453 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10455 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10456 interaction with -pie.
10458 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10460 * selftest.h: Fix alphabetization of per-source-file selftest
10463 2018-04-30 Jason Merrill <jason@redhat.com>
10465 PR c++/61982 - dead stores to destroyed objects.
10466 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10469 2018-04-30 Jason Merrill <jason@redhat.com>
10471 * tree.c (build_clobber): New.
10472 * tree.h: Declare it.
10473 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10475 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10477 * diagnostic-show-locus.c (layout::layout): Update for
10478 location_get_source_line returning a char_span.
10479 (struct char_span): Move to input.h.
10480 (struct correction): Update for fields in char_span becoming
10482 (struct source_line): Update for location_get_source_line
10483 returning a char_span.
10484 (layout::print_line): Likewise.
10485 * edit-context.c (edited_file::print_content): Likewise.
10486 (edited_file::print_diff_hunk): Likewise.
10487 (edited_file::print_run_of_changed_lines): Likewise.
10488 (edited_file::get_num_lines): Likewise.
10489 (edited_line::edited_line): Likewise.
10490 * final.c (asm_show_source): Likewise.
10491 * input.c (location_get_source_line): Convert return type
10492 from const char * to char_span, losing the final "line_len"
10494 (dump_location_info): Update for the above.
10495 (get_substring_ranges_for_loc): Likewise. Use a char_span
10496 when handling the literal within the line.
10497 (test_reading_source_line): Update for location_get_source_line
10498 returning a char_span.
10499 * input.h (class char_span): Move here from
10500 diagnostic-show-locus.c, converting from a struct to a class.
10501 Make data members private.
10502 (char_span::operator bool): New.
10503 (char_span::length): New.
10504 (char_span::get_buffer): New.
10505 (char_span::operator[]): New.
10506 (char_span::subspan): Make const.
10507 (char_span::xstrdup): New.
10508 (location_get_source_line): Convert return type from const char *
10509 to char_span, losing the final "line_size" param.
10511 2018-04-30 Jan Hubicka <jh@suse.cz>
10513 * lto-wrapper.c (ltrans_priorities): New static var.
10514 (cmp_priority): New.
10515 (run_gcc): Read priorities and if doing parallel build order
10516 the Makefile by them.
10518 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10520 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10522 2018-04-30 Richard Biener <rguenther@suse.de>
10524 * tree-cfg.c (verify_address): Remove base argument, add
10525 flag whether to check TREE_ADDRESSABLE and do that.
10526 (verify_expr): Remove.
10527 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10528 (verify_gimple_assign_single): Likewise.
10529 (verify_gimple_switch): Likewise.
10530 (verify_expr_location_1): Dereference tp once. Add (disabled)
10531 piece from verify_expr.
10532 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10534 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10536 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10538 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10540 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10541 (small_data_pattern): Likewise.
10542 (arc_rewrite_small_data): Likewise.
10543 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10544 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10545 (get_symbol_alignment): New function.
10546 (legitimate_small_data_address_p): Likewise.
10547 (legitimate_scaled_address): Update, call
10548 legitimate_small_data_address_p.
10549 (output_sdata): New static variable.
10550 (arc_print_operand): Update how we handle small data operands.
10551 (arc_print_operand_address): Likewise.
10552 (arc_legitimate_address_p): Update, use
10553 legitimate_small_data_address_p.
10554 (arc_rewrite_small_data_p): Remove.
10555 (arc_rewrite_small_data_1): Likewise.
10556 (arc_rewrite_small_data): Likewise.
10557 (small_data_pattern): Likewise.
10558 (compact_sda_memory_operand): Update to use
10559 legitimate_small_data_address_p and get_symbol_alignment.
10560 (prepare_move_operands): Don't rewite sdata pattern.
10561 (prepare_extend_operands): Remove.
10562 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10564 (zero_extendqisi2): Likewise.
10565 (zero_extendhisi2): Likewise.
10566 (extendqihi2): Likewise.
10567 (extendqisi2): Likewise.
10568 (extendhisi2): Likewise.
10569 (addsi3): Likewise.
10570 (subsi3): Likewise.
10571 (andsi3): Likewise.
10572 * config/arc/constraints.md (Usd): Change it to memory constraint.
10574 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10576 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10577 as source of std instructions.
10578 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10579 allow 6-bit constants as source for store instructions.
10580 (movdi_insn): Update instruction pattern to allow 6-bit constants
10581 as source for store instructions.
10583 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10585 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10587 2018-04-30 Nathan Sidwell <nathan@acm.org>
10588 Sandra Loosemore <sandra@codesourcery.com>
10590 * dumpfile.c (dump_open): Allow '-' for stdout.
10591 * doc/invoke.texi (Developer Options): Document dump filename
10592 determination early. Document stdin/stdout selection.
10594 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10596 Microblaze Target: PIC data text relative
10598 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10599 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10601 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10602 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10603 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10604 New addressing mode for data-text relative position indepenedent code.
10605 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10606 'ADDRESS_SYMBOLIC_TXT_REL'.
10607 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10608 (microblaze_legitimate_pic_operand): Exclude function calls from
10609 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10610 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10612 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10613 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10614 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10615 for 'address + offset'.
10616 (microblaze_expand_prologue): Add new function prologue call for
10618 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10619 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10620 table in case of TARGET_PIC_DATA_TEXT_REL.
10621 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10622 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10623 Add new macros 'UNSPEC_TEXT',
10624 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10625 + exclude function calls from 'UNSPEC_PLT' in case of data text
10627 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10628 new target hook for generating address diff vector tables in case of
10630 * doc/tm.texi : Regenerate.
10631 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10632 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10633 of addr diff vector generation.
10634 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10635 target hook definition.
10636 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10637 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10638 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10639 option for data text relative.
10641 2018-04-30 Richard Biener <rguenther@suse.de>
10643 * tree-chrec.h (evolution_function_is_constant_p): Remove
10645 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10647 2018-04-30 Richard Biener <rguenther@suse.de>
10650 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10652 2018-04-30 Richard Biener <rguenther@suse.de>
10654 PR tree-optimization/28364
10655 PR tree-optimization/85275
10656 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10657 copying first exit test.
10659 2018-04-28 Mark Wielaard <mark@klomp.org>
10661 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10662 dwarf_version >= 5.
10663 (dwarf_AT): Handle DW_AT_addr_base.
10664 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10666 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10669 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10670 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10671 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10672 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10674 2018-04-28 Richard Biener <rguenther@suse.de>
10676 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10677 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10678 to reflect use. Only add interesting stmts.
10680 2018-04-27 Martin Jambor <mjambor@suse.cz>
10683 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10684 the jump function allows for passing through aggregate values.
10686 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10688 * input.h (in_system_header_at): Convert from macro to inline
10690 (from_macro_expansion_at): Likewise.
10691 (from_macro_definition_at): Likewise.
10693 2018-04-27 Jeff Law <law@redhat.com>
10695 * config.gcc: Mark tile* targets as deprecated/obsolete.
10697 2018-04-27 Richard Biener <rguenther@suse.de>
10699 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10702 2018-04-27 Richard Biener <rguenther@suse.de>
10704 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10706 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10708 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10709 with Yd constraint. Set "preferred_for_speed" attribute from
10710 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10711 with Yd constraint.
10712 (*movdi_internal): Ditto.
10713 (movti_interunit splitters): Remove
10714 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10715 (movdi_interunit splitters): Ditto.
10716 * config/i386/constraints.md (Ye): Remove.
10717 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10719 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10722 * config/aarch64/constraints.md (Usg): Limit to 31.
10723 (Usj): Limit to 63.
10725 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10727 PR tree-optimization/85529
10728 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10729 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10730 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10731 zero extension or masking of the MSB bit.
10732 (optimize_range_tests): Add FIRST_BB argument, pass it through
10733 to optimize_range_tests_var_bound.
10734 (maybe_optimize_range_tests, reassociate_bb): Adjust
10735 optimize_range_tests callers.
10737 2018-04-26 Richard Biener <rguenther@suse.de>
10738 Jakub Jelinek <jakub@redhat.com>
10740 * cgraph.h (symbol_table): Just declare debug method here.
10741 * symtab.c (symbol_table::debug): Define.
10743 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10745 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10747 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10749 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10750 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10751 (*movdi_internal): Substitute Yi and Yj constraint with x
10752 and Ym and Yn constraint with y constraint. Update "isa"
10753 attribute and set "preferred_for_speed" attribute from
10754 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10755 (*movsi_internal): Ditto.
10756 (*movdf_internal): Ditto.
10757 (*movsf_internal): Ditto.
10758 (*zero_extendsidi2): Ditto.
10759 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10760 (sse2_loadld): Ditto.
10761 (*vec_extract<ssevecmodelower>_0): Ditto.
10762 (*vec_extractv4si_0_zext_sse4): Ditto.
10763 (vec_concatv2di): Ditto.
10764 (*vec_dup<mode>): Ditto.
10765 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10766 * config/i386/constraints.md (Yi): Remove.
10771 2018-04-26 Nathan Sidwell <nathan@acm.org>
10773 * dumpfile.c (dump_open): New.
10774 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10775 (dump_finish): Detect stdio/stderr by value not name.
10777 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10779 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10781 2018-04-26 Tom de Vries <tom@codesourcery.com>
10784 * config/nvptx/nvptx.c (verify_neutering_jumps)
10785 (verify_neutering_labels): New function
10786 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10788 2018-04-26 Tom de Vries <tom@codesourcery.com>
10791 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10792 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10795 2018-04-26 Richard Biener <rguenther@suse.de>
10796 Tom de Vries <tom@codesourcery.com>
10799 * lto-streamer-out.c (output_function): Fixup loops if required to match
10800 discovery done in the reader.
10802 2018-04-26 Richard Biener <rguenther@suse.de>
10804 PR tree-optimization/85116
10805 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10806 have a loop exit from the single latch predecessor. Remove
10807 case of header with just condition.
10808 (ch_base::copy_headers): Exclude infinite loops from any
10810 (pass_ch::execute): Record exits.
10812 2018-04-26 Richard Biener <rguenther@suse.de>
10814 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10815 prologue cost vector and pass it to vect_get_load_cost.
10816 (vect_get_peeling_costs_all_drs): Likewise.
10817 (vect_peeling_hash_get_lowest_cost): Likewise.
10818 (vect_enhance_data_refs_alignment): Likewise.
10820 2018-04-26 Richard Biener <rguenther@suse.de>
10822 PR middle-end/85450
10823 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10824 checking of integer<->pointer conversions.
10825 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10826 sign-/zero-extending pointer types.
10827 (expand_omp_for_static_chunk): Likewise.
10829 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10830 Jean Lee <xiaoyur347@gmail.com>
10832 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10833 (TARGET_ASAN_SHADOW_OFFSET): Define.
10834 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10835 true for -fsanitize=address.
10837 2018-04-25 Mark Wielaard <mark@klomp.org>
10839 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10842 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10844 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10845 than "alu", remove explicit "memory" and "imm_disp" attributes.
10846 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10848 PR middle-end/85414
10849 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10850 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10851 gen_lowpart_no_emit.
10853 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10856 * config/i386/i386.c (ix86_expand_builtin): Change memory
10857 operand to XI, extend p0 to Pmode.
10858 * config/i386/i386.md: Change unspec volatile and operand
10859 1 mode to XI, change operand 0 mode to P.
10861 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10863 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10864 GET_MODE_MASK before any checking.
10865 (nds32_can_use_bset_p): Likewise.
10866 (nds32_can_use_btgl_p): Likewise.
10868 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10870 * config/nds32/nds32-doubleword.md: New define_split pattern for
10871 illegal register number.
10873 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10875 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10877 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10879 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10881 2018-04-25 Richard Biener <rguenther@suse.de>
10883 * lto-streamer.h (LTO_major_version): Bump to 8.
10885 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10887 * BASE-VER: Set to 9.0.0.
10889 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10891 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10892 in __abskf2 and __powikf2.
10894 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10897 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10898 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10899 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10900 Use the above on operand 2. Reindent.
10901 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10903 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10906 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10908 * config/i386/i386.opt (mcet): Removed.
10909 * doc/install.texi: Remove -mcet documentation.
10910 * doc/invoke.texi: Likewise.
10912 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10915 * doc/install.texi: Remove -mcet from bootstrap-cet.
10917 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10920 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10921 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10925 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10926 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10927 containing a CONST_VECTOR.
10929 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10931 * doc/install.texi: Update newlib dependency for nvptx.
10933 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10936 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10937 instead of INTVAL when shifting x left.
10939 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10941 PR tree-optimization/85478
10942 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10943 vect_grouped_store_supported for single element vectors.
10945 2018-04-24 Richard Biener <rguenther@suse.de>
10948 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10949 load cost increase to the case of non-constant step.
10951 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10954 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10955 destination if any_malformed_asm.
10957 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10959 PR middle-end/85496
10960 * expr.c (store_field): In the bitfield case, if the value comes from
10961 a function call and is returned in registers by means of a PARALLEL,
10962 do not change the mode of the temporary unless BLKmode and VOIDmode.
10964 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10966 PR rtl-optimization/85423
10967 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10968 dependencies to debug insns when the previous insn is non-debug.
10970 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10972 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10973 enums into a single definition.
10974 (fls): Fix predicates and printing.
10977 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10979 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10980 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10981 and short u6 immediate.
10982 (check_if_valid_sleep_operand): Remove.
10983 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10985 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10987 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10988 flag_always_save_lp condition.
10989 * config/nds32/nds32.opt (malways-save-lp): New option.
10991 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10993 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10994 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10995 * config/nds32/nds32.h
10996 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10997 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10999 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11001 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11002 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11004 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11005 Chung-Ju Wu <jasonwucj@gmail.com>
11007 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11009 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11010 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11012 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11014 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11016 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11018 * config/nds32/nds32-protos.h (nds32_data_alignment,
11019 nds32_local_alignment): Declare.
11020 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11021 nds32_local_alignment): New functions.
11022 (TARGET_CONSTANT_ALIGNMENT): Define.
11023 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11025 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11027 * config/nds32/nds32.c
11028 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11029 (TARGET_MODES_TIEABLE_P): Likewise.
11031 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11033 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11034 level Ofast and Og.
11036 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11037 Chung-Ju Wu <jasonwucj@gmail.com>
11039 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11040 for unaligned access.
11041 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11043 * config/nds32/nds32-intrinsic.md: Likewise.
11044 * config/nds32/nds32_intrinsic.h: Likewise.
11045 * config/nds32/nds32.h (nds32_builtins): Likewise.
11046 * config/nds32/nds32.opt (munaligned-access): New option.
11047 * config/nds32/nds32.c (nds32_asm_file_start): Display
11048 flag_unaligned_access status.
11050 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11052 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11053 -mno-relax is present.
11054 * config/riscv/linux.h (LINK_SPEC): Ditto.
11056 2018-04-20 Martin Sebor <msebor@redhat.com>
11059 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11061 (gimple_fold_builtin_stxcpy_chk): Same.
11062 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11064 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11067 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11068 __powikf2 when long double is IEEE 128-bit.
11070 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11072 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11073 step to make sure stack always aligned.
11075 2018-04-20 Carl Love <cel@us.ibm.com>
11078 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11079 size check for arg0.
11081 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11082 Tom de Vries <tom@codesourcery.com>
11085 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11086 Emit insns for calls too.
11087 (nvptx_find_par): Always look for worker-level predecessor insn.
11088 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11090 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11091 (nvptx_process_pars): Propagate frames for calls.
11093 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11096 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11098 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11099 (ix86_handle_option): Don't handle OPT_mibt.
11100 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11102 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11104 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11105 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11106 (ix86_target_macros): Define __CET__ with flag_cf_protection
11107 for -fcf-protection.
11108 * config/i386/i386.c (isa2_opts): Remove -mibt.
11109 * config/i386/i386.h (TARGET_IBT): Removed.
11110 (TARGET_IBT_P): Likewise.
11111 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11112 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11113 * config/i386/i386.opt (mcet): Update help message.
11114 (mshstk): Likewise.
11116 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11117 -mcet as an alias for -mshstk.
11119 2018-04-20 Richard Biener <rguenther@suse.de>
11121 PR middle-end/85475
11122 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11123 complexity by forcing a single use of the multiply operand.
11125 2018-04-20 Martin Jambor <mjambor@suse.cz>
11128 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11129 recursion dependency to only apply to non-clones.
11131 2018-04-20 Martin Jambor <mjambor@suse.cz>
11134 * ipa-cp.c (create_specialized_node): Check that clones of
11135 self-recursive edges exist during IPA-CP.
11137 2018-04-19 Toon Moene <toon@moene.org>
11139 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11142 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11144 PR tree-optimization/85467
11145 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11146 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11147 VECTOR_CST element to type.
11149 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11152 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11153 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11154 (builtin_longjmp): Likewise.
11155 (save_stack_nonlocal): New pattern.
11156 (restore_stack_nonlocal): Likewise.
11158 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11161 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11162 Replace ASM_OUTPUT_LABEL with fprintf.
11164 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11167 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11168 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11169 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11170 define __IBT__ and __SHSTK__ for -fcf-protection.
11171 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11173 (ix86_trampoline_init): Likewise.
11174 (x86_output_mi_thunk): Likewise.
11175 (ix86_notrack_prefixed_insn_p): Likewise.
11176 (ix86_option_override_internal): Don't disallow -fcf-protection.
11177 * config/i386/i386.md (rdssp<mode>): Also enable for
11179 (incssp<mode>): Likewise.
11180 (nop_endbr): Likewise.
11181 * config/i386/i386.opt (mcet): Change help message to built-in
11184 (mshstk): Likewise.
11185 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11186 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11187 enable CET built-in functions.
11189 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11191 * common/config/i386/i386-common.c
11192 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11193 OPTION_MASK_ISA_MOVDIRI_UNSET,
11194 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11195 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11196 * config.gcc (movdirintrin.h): New header.
11197 * config/i386/cpuid.h (bit_MOVDIRI,
11198 bit_MOVDIR64B): New bits.
11199 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11201 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11202 (VOID, PVOID, PCVOID)): New function types.
11203 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11204 __builtin_ia32_directstoreu_u64,
11205 __builtin_ia32_movdir64b): New builtins.
11206 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11207 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11209 (ix86_valid_target_attribute_inner_p): Ditto.
11210 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11211 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11212 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11213 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11214 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11215 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11216 (movdiri<mode>, movdir64b_<mode>): New.
11217 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11218 * config/i386/immintrin.h: Include movdirintrin.h.
11219 * config/i386/movdirintrin.h: New file.
11220 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11222 2018-04-19 Richard Biener <rguenther@suse.de>
11224 PR middle-end/85455
11225 * cfg.c (clear_bb_flags): When loop state says we have
11226 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11228 2018-04-19 Richard Biener <rguenther@suse.de>
11230 PR tree-optimization/84737
11231 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11232 copying restrict info.
11233 (vect_setup_realignment): Use it.
11234 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11235 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11236 the first DR to all generated stores.
11237 (vectorizable_load): Likewise for loads.
11239 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11241 PR tree-optimization/85446
11242 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11243 the integral and pointer types to have the same precision.
11245 * doc/install.texi: Document --disable-cet being the default and
11248 2018-04-18 Martin Liska <mliska@suse.cz>
11250 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11253 2018-04-18 Martin Liska <mliska@suse.cz>
11256 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11259 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11260 arguments if they are comparable.
11262 2018-04-18 Martin Liska <mliska@suse.cz>
11265 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11268 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11271 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11274 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11275 ENDBR after calling __morestack.
11277 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11280 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11281 by using gcc_base_ver to generate a gcc_driver_version, and use
11282 it when generating GCC_DRIVER_NAME.
11283 * configure: Regenerate.
11285 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11288 * config.gcc: Obsolete powerpc*-*-*spe*.
11290 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11293 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11294 (stabstr_D): Change type of unum from unsigned int to
11295 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11298 2018-04-17 Jim Wilson <jimw@sifive.com>
11301 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11302 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11303 Set arg_pointer_offset after using pretend_args_size.
11305 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11307 PR rtl-optimization/85431
11308 * dse.c (record_store): Ignore zero width stores.
11311 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11312 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11313 __builtin_stack_restore rather than after it.
11314 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11315 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11316 argument instead of virtual_dynamic_stack_rtx.
11318 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11320 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11322 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11323 Add note to error message to explain internal mapping of overloaded
11324 built-in function name to non-overloaded built-in function name.
11325 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11328 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11331 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11332 where the inputs overlap with the output.
11334 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11336 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11337 (=v, v) alternative and explicit "memory" attribute.
11338 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11339 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11341 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11342 "sselog1" type instead of "sselog".
11343 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11344 "sselog". Remove explicit "memory" attribute.
11345 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11346 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11348 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11349 "sselog1" type instead of "sselog". Remove explicit "memory"
11351 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11352 use "sselog1" type instead of "sselog". Remove explicit "memory"
11354 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11355 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11357 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11358 "sselog1" type instead of "sselog". Remove explicit "memory"
11360 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11361 use "sselog1" type instead of "sselog". Remove explicit "memory"
11365 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11367 PR middle-end/85414
11368 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11371 2018-04-17 Martin Jambor <mjambor@suse.cz>
11374 * ipa-cp.c (create_specialized_node): Call
11375 expand_all_artificial_thunks if necessary.
11377 2018-04-17 Martin Liska <mliska@suse.cz>
11380 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11381 in message, remote space in between '_G' and '('.
11383 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11386 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11387 avx512f_vmcmp<mode>3<round_saeonly_name>,
11388 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11389 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11390 avx512f_rndscale<mode><round_saeonly_name>,
11391 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11392 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11393 Use %<iptr>2 instead of %2 for -masm=intel.
11394 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11395 avx512f_vcvttss2usi<round_saeonly_name>,
11396 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11398 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11399 avx512f_vcvttsd2usi<round_saeonly_name>,
11400 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11401 Use %q1 instead of %1 for -masm=intel.
11402 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11403 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11404 of %3 for -masm=intel.
11405 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11407 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11409 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11411 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11412 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11414 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11416 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11417 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11418 %g1 and one with %0 and %1.
11419 (avx512er_vmrcp28<mode><round_saeonly_name>,
11420 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11421 %1 for -masm=intel.
11422 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11423 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11424 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11425 of %0 and %{%4%} for -masm=intel.
11426 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11427 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11428 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11429 order of %0 and %{%5%}%{z%} for -masm=intel.
11431 2018-04-17 Jan Hubicka <jh@suse.cz>
11434 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11436 2018-04-17 Martin Liska <mliska@suse.cz>
11439 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11440 for target_clone error message. Make default implementation
11441 clone to be a local declaration.
11442 (separate_attrs): Add new argument and check for an empty
11444 (expand_target_clones): Handle it.
11445 (ipa_target_clone): Make redirection just for target_clones
11448 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11449 Tom de Vries <tom@codesourcery.com>
11451 PR middle-end/84955
11452 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11453 tiled basic blocks without omp continue statements.
11455 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11458 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11459 vec_extract expression as having side effects to make sure it gets
11462 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11465 * config/i386/i386.c (get_builtin_code_for_version): Check
11468 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11471 * config.gcc: Support "skylake".
11472 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11474 * config/i386/i386.c (m_SKYLAKE): Define.
11475 (processor_target_table): Add "skylake".
11476 (ix86_option_override_internal): Add "skylake".
11477 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11478 PROCESSOR_CANNONLAKE.
11479 (get_builtin_code_for_version): Fix priority for
11480 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11481 PROCESSOR_SKYLAKE-AVX512.
11482 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11483 (processor_type): Add PROCESSOR_SKYLAKE.
11485 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11486 Jason Merrill <jason@redhat.com>
11489 * convert.c (convert_to_integer_1): Use direct recursion for
11490 enumeral types and types with a precision less than the number
11491 of bits in their mode.
11493 2018-04-16 Julia Koval <julia.koval@intel.com>
11496 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11497 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11499 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11502 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11503 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11504 and -mno-direct-move.
11506 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11509 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11510 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11511 Ensure negative shifts result in {0}.
11513 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11515 PR rtl-optimization/79916
11516 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11517 regs (if any) to define how to gnerate SD moves when LRA is in
11520 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11522 PR rtl-optimization/85393
11523 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11524 * except.c (expand_dw2_landing_pad_for_region): Make static.
11525 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11526 a label and unconditional jump to old_bb, rather than
11527 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11530 PR rtl-optimization/85376
11531 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11532 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11533 instead of a specific value.
11535 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11536 Bin Cheng <bin.cheng@arm.com>
11538 PR tree-optimization/82965
11539 PR tree-optimization/83991
11540 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11541 by_profile_only parameter.
11542 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11543 information if the loop was predicted to iterate too many times.
11544 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11546 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11549 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11552 2018-04-13 Martin Liska <mliska@suse.cz>
11553 Jakub Jelinek <jakub@redhat.com>
11555 PR middle-end/81657
11556 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11557 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11558 * builtins.c (expand_builtin_memory_copy_args): Use
11559 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11560 handle dest_addr == pc_rtx.
11562 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11565 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11566 asked to not generate direct moves.
11567 (fix_trunc<mode>si2_stfiwx): Similar.
11568 (fix_trunc<mode>si2_internal): Similar.
11570 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11573 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11574 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11575 lookup if dest in some wider mode is known to be const0_rtx and
11576 if so, record permanent equivalence for it to be ZERO_EXTEND of
11577 the narrower mode destination.
11579 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11581 * lto-streamer-out.c (output_function): Revert 259346.
11582 * omp-expand.c (expand_oacc_for): Likewise.
11584 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11586 PR rtl-optimization/85354
11587 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11588 * sel-sched.c (sel_global_init): ... here.
11590 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11593 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11594 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11595 mode for PE-COFF targets.
11596 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11597 (i386_pe_asm_lto_end): Likewise.
11598 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11599 (TARGET_ASM_LTO_END): Likewise.
11600 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11601 (i386_pe_asm_lto_start): New function.
11602 (i386_pe_asm_lto_end): Likewise.
11604 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11605 Richard Biener <rguenther@suse.de>
11607 PR middle-end/84955
11608 * lto-streamer-out.c (output_function): Fix CFG loop state before
11610 * omp-expand.c (expand_oacc_for): Handle calls to internal
11611 functions like regular functions.
11613 2018-04-12 Richard Biener <rguenther@suse.de>
11616 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11617 for the early LTO debug to properly generate references to it
11618 during DIE emission. Do not re-use that for the skeleton for
11620 (dwarf2out_early_finish): Likewise.
11622 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11625 * config/i386/sse.md
11626 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11627 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11628 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11629 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11630 and output is a reg, avoid creating invalid lowpart subreg, but
11631 instead split into a 512-bit move. Don't split if not AVX512VL,
11632 input is xmm16+ reg and output is a mem.
11633 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11634 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11635 xmm16+ reg and output is a mem.
11637 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11639 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11640 also for flag_dwarf2_cfi_asm.
11642 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11644 PR rtl-optimization/85342
11645 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11646 a bool scalar var inside of the loop instead. Don't try to update
11647 recog_data.operand after failed apply_change_group.
11649 2018-04-12 Tom de Vries <tom@codesourcery.com>
11652 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11653 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11654 array with flexible array member as array without given dimension.
11655 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11656 argument for undefined param to true.
11658 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11661 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11662 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11663 from PowerPC section.
11664 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11665 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11666 help text that is too long.
11667 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11668 help text that is too long.
11669 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11670 help text that is too long.
11672 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11674 * config/alpha/alpha.md (stack_probe_internal): Rename
11675 from "probe_stack". Update all callers.
11677 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11679 PR rtl-optimization/84566
11680 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11681 sched_macro_fuse_insns.
11683 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11686 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11687 (compute_block_dependences): ... from here.
11689 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11691 PR tree-optimization/85331
11692 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11693 from int to HOST_WIDE_INT.
11695 2018-04-11 Martin Jambor <mjambor@suse.cz>
11698 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11699 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11700 not the same as the source val.
11701 (cgraph_edge_brings_value_p): New parameter.
11702 (gather_edges_for_value): Pass destination value to
11703 cgraph_edge_brings_value_p.
11704 (perhaps_add_new_callers): Likewise.
11705 (get_info_about_necessary_edges): Likewise and exclude values brought
11706 only by self-recursive edges.
11707 (create_specialized_node): Redirect only clones of self-calling edges.
11708 (+self_recursive_pass_through_p): New function.
11709 (find_more_scalar_values_for_callers_subset): Use it.
11710 (find_aggregate_values_for_callers_subset): Likewise.
11711 (known_aggs_to_agg_replacement_list): Removed.
11712 (decide_whether_version_node): Re-calculate known constants for all
11713 remaining context clones.
11715 2018-04-11 Richard Biener <rguenther@suse.de>
11718 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11719 from early DWARF output.
11720 (dwarf2out_early_finish): Output line info unconditionally into
11721 early DWARF and add reference to it.
11723 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11726 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11727 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11728 other than V2DFmode using iptr mode attribute.
11729 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11731 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11733 PR rtl-optimization/84659
11734 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11736 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11739 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11741 (output_loc_list): Pass address of a dummy size variable even in the
11742 locview handling loop.
11743 (index_location_lists): Add comment on why skip_loc_list_entry can't
11746 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11749 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11752 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11755 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11756 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11757 and -mstring-compare-inline-limit.
11759 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11762 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11763 for stack clash protection in a register whenever we need it to be in
11766 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11768 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11769 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11771 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11774 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11776 (mlong-double-): Ditto.
11777 * config/rs6000/sysv4.opt (msdata=): Ditto.
11778 (mtls-size=): Ditto.
11780 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11782 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11783 erroneous entries for
11784 "vector int vec_ldl (int, long int *)", and
11785 "vector unsigned int vec_ldl (int, unsigned long int *)".
11786 Add comments and entries for
11787 "vector bool char vec_ldl (int, bool char *)",
11788 "vector bool short vec_ldl (int, bool short *)",
11789 "vector bool int vec_ldl (int, bool int *)",
11790 "vector bool long long vec_ldl (int, bool long long *)",
11791 "vector pixel vec_ldl (int, pixel *)",
11792 "vector long long vec_ldl (int, long long *)",
11793 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11794 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11795 type tree bool_long_long_type_node and correct definition of
11796 bool_V2DI_type_node to make reference to this new type tree.
11797 (rs6000_mangle_type): Replace erroneous reference to
11798 bool_long_type_node with bool_long_long_type_node.
11799 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11800 comments to emphasize sign distinctions for char and int types and
11801 replace RS6000_BTI_bool_long constant with
11802 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11803 use of RS6000_BTI_pixel.
11804 (bool_long_type_node): Remove this macro definition.
11805 (bool_long_long_type_node): New macro definition
11807 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11809 PR rtl-optimization/85300
11810 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11811 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11812 simplify_unary_operation fails.
11814 2018-04-10 Martin Liska <mliska@suse.cz>
11816 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11817 cgraph_edge and ipa_ref.
11819 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11823 * config/i386/sse.md
11824 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11825 computation of the VEC_MERGE selector from mask.
11826 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11827 Fix decoding of the VEC_MERGE selector into mask.
11829 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11831 PR tree-optimization/85286
11832 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11834 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11836 * final.c (final_1): Set insn_last_address as well as
11837 insn_current_address.
11839 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11842 * explow.c (emit_stack_probe): Call validize_mem on memory location
11843 before passing it to gen_probe_stack. Create address operand and
11844 legitimize it for the probe_stack_address case.
11846 2018-04-09 Jan Hubicka <jh@suse.cz>
11849 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11850 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11851 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11853 (free_lang_data): Rebuild type inheritance graph.
11855 2018-04-09 Martin Sebor <msebor@redhat.com>
11857 * invoke.texi (-finline-small-functions): Mention other optimization
11859 (-findirect-inlining, -fpartial-inlining): Same.
11860 (-finline-functions-called-once): Same.
11861 (-freorder-blocks-and-partition): Same.
11863 2018-04-09 Jan Hubicka <jh@suse.cz>
11866 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11867 jumps; choose last target that matches the criteria (i.e.
11868 no partition changes for non-crossing jumps).
11869 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11870 support for redirecting crossing jumps to non-crossing.
11872 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11874 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11875 also for naked functions.
11877 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11879 * config/arc/arc.md (add_shift): New pattern.
11880 (add_shift2): Likewise.
11881 (sub_shift): Likewise.
11882 (sub_shift_cmp0_noout): Likewise.
11883 (compare_si_ashiftsi): Likewise.
11884 (xbfu_cmp0_noout): New combine pattern.
11885 (xbfu_cmp0"): Likewise.
11886 (movsi_set_cc_insn): Place the predicable variant first.
11887 (commutative_binary_cmp0_noout): Remove clobber.
11888 (commutative_binary_cmp0): New pattern.
11889 (noncommutative_binary_cmp0): Likewise.
11890 (noncommutative_binary_cmp0_noout): Likewise.
11891 (noncommutative_binary_comparison_result_used): Removed.
11892 (rsub_cmp0): New pattern.
11893 (rsub_cmp0_noout): Likewise.
11894 (extzvsi): Changed, keep only meaningful variants.
11895 (SQH, SEZ): New iterators.
11896 (SQH_postfix): New mode attribute.
11897 (SEZ_prefix): New code attribute.
11898 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11899 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11900 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11901 of numerical value.
11902 (noncommutative_operator): Check the availability of barrel
11905 2018-04-09 Richard Biener <rguenther@suse.de>
11907 PR tree-optimization/85284
11908 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11909 Only use the niter constraining form of simple_iv when the exit
11910 is always executed.
11912 2018-04-09 Tom de Vries <tom@codesourcery.com>
11915 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11916 (define_expand "*memory_barrier"): New define_expand.
11917 (define_insn "memory_barrier"): New insn.
11919 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11921 PR rtl-optimization/80463
11922 PR rtl-optimization/83972
11923 PR rtl-optimization/83480
11925 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11926 correct producer for the insn.
11927 (tidy_control_flow): Fixup seqnos in case of debug insns.
11929 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11931 PR rtl-optimization/83913
11933 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11934 different sched-times when merging exprs.
11936 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11938 PR rtl-optimization/83962
11940 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11941 tidy_fallthru_edge and tidy_control_flow.
11943 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11945 PR rtl-optimization/83530
11947 * sel-sched.c (force_next_insn): New global variable.
11948 (remove_insn_for_debug): When force_next_insn is true, also leave only
11949 next insn in the ready list.
11950 (sel_sched_region): When the region wasn't scheduled, make another pass
11951 over it with force_next_insn set to 1.
11953 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11955 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11957 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11958 for interrupt control.
11959 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11960 functions for interrupt control.
11961 * config/nds32/nds32-intrinsic.md: Likewise.
11962 * config/nds32/nds32_intrinsic.h: Likewise.
11963 * config/nds32/nds32.h (nds32_builtins): Likewise.
11965 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11967 * config/nds32/nds32.c (nds32_init_machine_status,
11968 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11969 strict_aligned_p field.
11970 (nds32_expand_to_rtl_hook): New function.
11971 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11972 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11974 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11975 Chung-Ju Wu <jasonwucj@gmail.com>
11977 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11978 * config/nds32/nds32-n7.md: New file.
11979 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11980 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11982 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11983 * config/nds32/nds32.md (pipeline_model): Add n7.
11984 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11985 * config/nds32/pipelines.md: Include n7 settings.
11987 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11988 Chung-Ju Wu <jasonwucj@gmail.com>
11990 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11991 * config/nds32/nds32-e8.md: New file.
11992 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11993 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11995 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11996 * config/nds32/nds32.md (pipeline_model): Add e8.
11997 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11998 * config/nds32/pipelines.md: Include e8 settings.
12000 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12001 Chung-Ju Wu <jasonwucj@gmail.com>
12003 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12004 * config/nds32/nds32-n8.md: New file.
12005 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12006 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12008 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12009 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12010 * config/nds32/nds32.md (pipeline_model): Add n8.
12011 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12012 * config/nds32/pipelines.md: Include n8 settings.
12014 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12015 Chung-Ju Wu <jasonwucj@gmail.com>
12017 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12018 * config/nds32/nds32-n9-2r1w.md: New file.
12019 * config/nds32/nds32-n9-3r2w.md: New file.
12020 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12021 nds32_register_ports): New or modify for cpu n9.
12022 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12024 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12025 * config/nds32/nds32-utils.c: New file.
12026 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12027 TARGET_MUL_SLOW): Define.
12028 * config/nds32/nds32.md (pipeline_model): New attribute.
12029 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12030 New options that support cpu n9.
12031 * config/nds32/pipelines.md: Include n9 settings.
12032 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12034 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12036 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12037 information if necessary.
12038 (output_cond_branch_compare_zero): Likewise.
12039 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12040 (nds32_target_alignment): Refine for alignment.
12041 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12042 (FUNCTION_BOUNDARY): Modify.
12043 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12045 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12047 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12049 * config/nds32/constants.md (unspec_volatile_element): Add values for
12050 TLB operation and data prefetch.
12051 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12052 functions for TLB operation and data prefetch.
12053 * config/nds32/nds32-intrinsic.md: Likewise.
12054 * config/nds32/nds32_intrinsic.h: Likewise.
12055 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12056 (nds32_print_operand): Likewise.
12057 * config/nds32/nds32.h (nds32_builtins): Likewise.
12059 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12060 Andrew Pinski <pinsika@gcc.gnu.org>
12062 PR middle-end/82976
12063 * match.pd: Use constant_boolean_node of correct type instead of
12064 boolean_true_node or boolean_false_node for simplifying
12065 pointer comparisons to zero.
12067 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12069 PR tree-optimization/80021
12070 * tree.c (verify_type_variant): Make error call in verify_variant_match
12071 translatable and remove final full stop.
12073 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12075 * config/nds32/constants.md (unspec_volatile_element): Add
12076 UNSPEC_VOLATILE_EH_RETURN.
12077 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12078 nds32_output_stack_pop): Support dwarf exception handling process.
12079 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12080 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12081 exception handling process.
12082 (nds32_compute_stack_frame): Likewise.
12083 (nds32_return_addr_rtx): Likewise.
12084 (nds32_initial_elimination_offset): Likewise.
12085 (nds32_expand_prologue): Likewise.
12086 (nds32_expand_epilogue): Likewise.
12087 (nds32_dynamic_chain_address): New function.
12088 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12089 exception handling.
12090 (DYNAMIC_CHAIN_ADDRESS): Define.
12091 (EH_RETURN_DATA_REGNO): Define.
12092 (EH_RETURN_STACKADJ_RTX): Define.
12093 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12094 patterns for dwarf exception handling.
12096 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12098 * config/nds32/nds32.h: Clean up obsolete macros.
12100 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12102 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12103 Add enum values for particular instructions.
12104 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12105 particular intrinsic functions.
12106 * config/nds32/nds32-intrinsic.md: Likewise.
12107 * config/nds32/nds32_intrinsic.h: Likewise.
12108 * config/nds32/nds32.h (nds32_builtins): Likewise.
12109 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12110 (btst, ave): New patterns for particular instructions.
12112 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12114 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12115 Add enum values for atomic load/store and memory sync.
12116 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12118 * config/nds32/nds32-intrinsic.md: Likewise.
12119 * config/nds32/nds32_intrinsic.h: Likewise.
12120 * config/nds32/nds32.h (nds32_builtins): Likewise.
12122 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12124 PR tree-optimization/85257
12125 * fold-const.c (native_encode_vector): If not all elts could fit
12126 and off is -1, return 0 rather than offset.
12127 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12128 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12129 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12130 adjust buffer in native_interpret_expr call.
12132 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12134 * config/nds32/constants.md (unspec_volatile_element): Add cache
12135 control enum values.
12136 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12137 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12138 * config/nds32/nds32.c (nds32_cctl_names): New.
12139 (nds32_print_operand): Handle cache control register names.
12140 * config/nds32/nds32.h (nds32_builtins): New enum values.
12141 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12143 * config/nds32/nds32.md (type): Add mmu.
12144 * config/nds32/pipelines.md (simple_insn): Add mmu.
12146 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12148 * config/nds32/nds32.md (type): Remove call.
12149 * config/nds32/pipelines.md (simple_insn): Likewise.
12151 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12153 * config/nds32/constants.md (unspec_volatile_element): Add
12154 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12155 UNSPEC_VOLATILE_FMFCFG.
12156 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12157 description for fmfcfg and fmfcsr.
12158 (bdesc_1arg): Add fmtcsr.
12159 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12160 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12161 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12162 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12163 unspec_fmfcfg): New patterns.
12164 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12165 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12166 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12167 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12168 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12169 __nds32__fmfcfg): Define.
12171 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12173 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12174 intrinsic register names.
12175 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12176 intrinsic register enum values and macros.
12178 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12180 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12181 for load/store addressing form.
12182 (nds32_print_operand_address): Likewise.
12184 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12187 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12188 based on LABEL_REF. Remove useless assertion.
12189 (pic_address_needs_scratch): Fix formatting.
12190 (sparc_legitimize_pic_address): Minor tweaks.
12191 (sparc_delegitimize_address): Adjust assertion accordingly.
12192 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12193 into symbolic_operand.
12194 (movsi_high_pic_label_ref): Likewise.
12195 (movsi_lo_sum_pic_label_ref): Likewise.
12196 (movdi_pic_label_ref): Likewise.
12197 (movdi_high_pic_label_ref): Likewise.
12198 (movdi_lo_sum_pic_label_ref): Likewise.
12200 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12202 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12203 custom LIB_SPEC setup.
12205 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12206 Kito Cheng <kito.cheng@gmail.com>
12208 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12209 * config/riscv/freebsd.h: New.
12211 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12213 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12214 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12217 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12218 Kito Cheng <kito.cheng@gmail.com>
12220 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12221 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12222 * config/nds32/nds32-protos.h (nds32_output_call,
12223 nds32_output_return): Declare.
12224 * config/nds32/nds32.md: Refine all the call and return patterns.
12226 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12229 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12230 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12232 PR rtl-optimization/84872
12233 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12234 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12235 EDGE_CROSSING edge.
12237 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12239 * expr.c (copy_blkmode_to_reg): Revert 254862.
12240 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12242 2018-04-06 Richard Biener <rguenther@suse.de>
12244 PR middle-end/85244
12245 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12246 after seeing a component reference with an adjacent field. Treat
12247 refs to arrays at struct end of external decls similar to
12248 refs to unconstrained commons.
12250 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12253 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12254 look through SAVE_EXPRs with non-side-effects argument. Adjust
12256 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12259 2018-04-06 Richard Biener <rguenther@suse.de>
12261 PR middle-end/85180
12262 * alias.c (find_base_term): New wrapper around find_base_term
12263 unwinding CSELIB_VAL_PTR changes.
12264 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12267 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12269 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12271 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12272 constant definitions.
12273 ("nop"): lr 0,0 -> nopr r0
12274 ("nop_lr0", "nop_lr1"): New insn definitions.
12276 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12278 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12279 NDS32_V3PUSH_AVAILABLE_P macro.
12281 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12282 Chung-Ju Wu <jasonwucj@gmail.com>
12284 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12285 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12286 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12287 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12288 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12289 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12290 * config/nds32/constraints.md: New constraints and checking for hard
12291 float configuration.
12292 * config/nds32/iterators.md: New mode iterator and attribute for hard
12293 float configuration.
12294 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12296 * config/nds32/nds32-fpu.md: New file.
12297 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12298 deal with hard float code generation.
12299 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12301 (abi_type, float_reg_number): New enum type.
12302 * config/nds32/nds32-predicates.c: New predicates for hard float.
12303 * config/nds32/nds32-protos.h: Declare functions for hard float.
12304 * config/nds32/nds32.c: Implementation for hard float configuration.
12305 * config/nds32/nds32.h: Definitions for hard float configuration.
12306 * config/nds32/nds32.md: Include hard float machine description and
12307 modify patterns for hard float configuration.
12308 * config/nds32/nds32.opt: New options for hard float configuration.
12309 * config/nds32/predicates.md: New predicates for hard float
12312 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12314 * common/config/nds32/nds32-common.c
12315 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12317 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12319 PR middle-end/85195
12320 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12321 CONSTRUCTOR_ELT (ctor, ...)->value.
12323 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12326 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12328 2018-04-05 Tom de Vries <tom@codesourcery.com>
12331 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12334 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12335 Kito Cheng <kito.cheng@gmail.com>
12337 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12338 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12339 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12340 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12342 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12343 Kito Cheng <kito.cheng@gmail.com>
12345 * config/nds32/constraints.md (Ufe): New memory constraint.
12346 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12347 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12348 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12350 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12351 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12353 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12355 * config/nds32/nds32.md: Use optimize_size in the condition for
12356 alu-shift instructions.
12358 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12360 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12362 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12364 * config/nds32/nds32.md (negsi2): Refine pattern.
12366 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12367 Chung-Ju Wu <jasonwucj@gmail.com>
12369 * config/nds32/iterators.md (shift_rotate): New code iterator.
12370 (shift): New code attribute.
12371 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12372 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12373 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12374 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12375 bit-wise operations.
12376 (andsi3, *andsi3): Ditto.
12377 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12378 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12379 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12380 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12381 nds32_ior_operand, nds32_xor_operand): New predicates.
12383 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12385 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12386 (addsi3, subsi3): ... this.
12388 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12390 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12392 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12394 * config/nds32/nds32.md: Adjust indention.
12396 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12398 * config/nds32/nds32.md (feature): New attribute.
12400 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12402 * config/nds32/nds32.md (subtype): New attribute.
12404 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12407 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12408 expansion to perform a bitwise AND of the argument followed by a
12409 boolean negation of the result.
12411 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12413 PR rtl-optimization/84878
12414 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12415 the basic block. Assert the use reference is not artificial and that
12416 it has an associated insn.
12418 2018-04-04 Michael Matz <matz@suse.de>
12420 * builtins.c (compute_objsize): Pass correct operand
12421 to array_at_struct_end_p.
12423 2018-04-04 Richard Biener <rguenther@suse.de>
12426 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12427 from contexts for DINFO_LEVEL_TERSE and below.
12429 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12431 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12432 resiter_operand condition.
12433 * config/nds32/nds32.md (*move<mode>): Ditto.
12435 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12436 Monk Chiang <sh.chiang04@gmail.com>
12438 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12440 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12442 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12444 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12445 Kito Cheng <kito.cheng@gmail.com>
12447 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12448 nds32_cond_code_str, output_cond_branch,
12449 output_cond_branch_compare_zero, nds32_expand_cbranch,
12450 nds32_expand_cstore, nds32_expand_movcc,
12451 nds32_output_cbranchsi4_equality_zero,
12452 nds32_output_cbranchsi4_equality_reg,
12453 nds32_output_cbranchsi4_equality_reg_or_const_int,
12454 nds32_output_cbranchsi4_greater_less_zero: New functions.
12455 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12456 nds32_expand_cstore, nds32_expand_movcc,
12457 nds32_output_cbranchsi4_equality_zero,
12458 nds32_output_cbranchsi4_equality_reg,
12459 nds32_output_cbranchsi4_equality_reg_or_const_int,
12460 nds32_output_cbranchsi4_greater_less_zero): Declare.
12461 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12462 nds32_rimm11s_operand): New predicates.
12463 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12464 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12467 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12469 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12470 * config/nds32/nds32.md: Ditto.
12471 * config/nds32/pipelines.md: Ditto.
12473 2018-04-04 Richard Biener <rguenther@suse.de>
12475 PR tree-optimization/85168
12476 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12477 propagating abnormals.
12479 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12481 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12483 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12484 Kito Cheng <kito.cheng@gmail.com>
12486 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12487 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12488 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12489 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12490 * config/nds32/nds32.md (sibcall_internal): New.
12491 (sibcall_register): Remove.
12492 (sibcall_immediate): Remove.
12493 (sibcall_value_internal): New.
12494 (sibcall_value_register): Remove.
12495 (sibcall_value_immediate): Remove.
12496 * config/nds32/predicates.md (nds32_general_register_operand): New.
12497 (nds32_call_address_operand): New.
12499 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12501 PR rtl-optimization/85167
12502 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12503 bb_defs if *split_p, instead preinitialize it to NULL.
12505 PR tree-optimization/85156
12506 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12507 evaluating the argument multiple times.
12509 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12511 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12513 (_mm_cvtpd_ps): Likewise.
12514 (_mm_cvttpd_epi32): Likewise.
12515 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12516 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12517 vector, pixel, and bool following altivec.h include.
12519 2018-04-03 Martin Sebor <msebor@redhat.com>
12521 * doc/extend.texi (Common Function Attributes): Clarify.
12522 (const attribute): Likewise.
12523 (pure attribute): Likewise.
12525 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12528 * config/i386/i386.c (ix86_expand_vector_set): Use
12529 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12531 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12533 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12534 instructions when changing rounding bits to preserve precision bits
12535 in the x87 control word.
12537 2018-04-03 Martin Liska <mliska@suse.cz>
12539 PR tree-optimization/82491
12540 * rtl.h (strip_offset_and_add): Replace += suboffset with
12541 poly_uint64 () + suboffset.
12543 2018-03-29 Martin Liska <mliska@suse.cz>
12544 Martin Jambor <mjambor@suse.cz>
12547 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12548 param_type is not an integral or pointer type.
12550 2018-04-03 Richard Biener <rguenther@suse.de>
12552 * sese.h (recompute_all_dominators): Remove.
12554 2018-04-02 Martin Sebor <msebor@redhat.com>
12556 * doc/invoke.texi (-Wrestrict): Fix typos.
12558 2018-04-02 Jim Wilson <jimw@sifive.com>
12560 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12561 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12562 (<optab>di3, <optab>si3_extend): Likewise.
12563 (<optab>si3_mask, <optab>si3_mask_1): New.
12564 (<optab>di3_mask, <optab>di3_mask_1): New.
12565 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12566 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12567 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12569 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12571 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12574 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12576 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12577 (nds32_canonicalize_comparison): New function.
12579 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12580 Kito Cheng <kito.cheng@gmail.com>
12581 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12583 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12584 * config/nds32/constants.md (unspec_volatile_element): Add
12585 UNSPEC_VOLATILE_RELAX_GROUP.
12586 * config/nds32/nds32-relax-opt.c: New file.
12587 * config/nds32/nds32-predicates.c
12588 (nds32_symbol_load_store_p): New function.
12589 * config/nds32/nds32-protos.h
12590 (nds32_symbol_load_store_p): Declare function.
12591 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12592 * config/nds32/nds32.c
12593 (nds32_register_pass): New function to register pass.
12594 (nds32_register_passes): New function to register passes.
12595 * config/nds32/nds32.md (relax_group): New pattern.
12596 * config/nds32/nds32.opt (mrelax-hint): New option.
12597 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12599 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12601 * config/nds32/t-nds32: Modify files dependency.
12603 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12605 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12606 (PROFILE_HOOK): Define its implementation.
12608 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12610 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12611 type and 32-bit size.
12613 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12615 PR middle-end/85090
12616 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12617 (V_128_256): New mode iterator.
12618 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12619 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12620 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12622 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12623 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12625 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12628 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12629 NaN inputs correctly.
12631 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12634 * config/rs6000/vsx.md (??r): New mode attribute.
12635 (*vsx_mov<mode>_64bit): Use it.
12636 (*vsx_mov<mode>_32bit): Likewise.
12638 2018-03-30 Martin Sebor <msebor@redhat.com>
12640 PR tree-optimization/84818
12641 * builtins.c (check_access): Use warning_n.
12643 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12646 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12648 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12651 2018-03-30 Julia Koval <julia.koval@intel.com>
12654 * x86-tune.def (movx, partial_reg_dependency): Enable for
12657 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12659 PR inline-asm/84985
12660 * lra-constraints.c (process_alt_operands): Move setting
12661 this_alternative_matches below.
12663 2018-03-29 Martin Liska <mliska@suse.cz>
12666 * doc/invoke.texi: Document how LTO works with debug info.
12667 Describe auto-load support of binutils. Mention 'x86-64'
12668 as valid option value of -march option.
12670 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12672 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12675 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12676 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12677 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12680 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12683 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12684 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12685 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12686 for RS6000_BTM_POWERPC64.
12687 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12688 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12689 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12692 (DIVDEU): Likewise.
12694 2018-03-28 Carl Love <cel@us.ibm.com>
12697 2017-09-27 Carl Love <cel@us.ibm.com>
12699 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12700 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12701 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12704 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12706 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12707 instead of __vector bool.
12708 (_mm_max_pu8): Likewise.
12709 (_mm_min_pi16): Likewise.
12711 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12714 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12715 (DIVWEUO): Likewise.
12716 (DIVDEO): Likewise.
12717 (DIVDEUO): Likewise.
12718 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12719 DIVWEUO and DIVDEUO.
12720 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12721 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12722 (div_extend): Likewise.
12723 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12725 (__builtin_divweuo): Likewise.
12726 (__builtin_divdeo): Likewise.
12727 (__builtin_divdeuo): Likewise.
12729 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12732 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12733 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12735 PR tree-optimization/82004
12736 * gimple-match-head.c (optimize_pow_to_exp): New function.
12737 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12738 Don't fold to exp if optimize_pow_to_exp is false.
12740 2018-03-28 Martin Liska <mliska@suse.cz>
12743 * calls.c (initialize_argument_information): Fix trailing space.
12744 * common.opt: Fix typo and provide better explanation for
12745 -fsanitize-coverage option.
12746 * config/i386/i386.opt: Fix typo.
12748 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12749 Martin Liska <mliska@suse.cz>
12752 * gimplify.c (asan_poison_variable): Don't do the check for
12753 gimplify_omp_ctxp here.
12754 (gimplify_decl_expr): Do it here.
12755 (gimplify_target_expr): Likewise.
12757 2018-03-28 Martin Liska <mliska@suse.cz>
12760 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12761 chkp_type_bounds_count if MPX is not enabled.
12763 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12765 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12767 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12770 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12771 function to create the function decl for complex long double
12772 multiply and divide for -mabi=ieeelongdouble.
12773 (init_float128_ieee): Call it.
12775 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12778 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12779 -fcf-protection=branch -mibt.
12780 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12782 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12785 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12786 arm_word_relocations.
12788 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12791 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12792 extern array declarations.
12794 2018-03-27 Richard Biener <rguenther@suse.de>
12796 PR middle-end/84067
12797 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12798 explicit single_use checks.
12800 2018-03-27 Richard Biener <rguenther@suse.de>
12802 PR tree-optimization/85082
12803 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12806 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12808 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12809 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12810 Turn on fasynchronous-unwind-tables and funwind-tables.
12812 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12815 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12816 (*bmi_blsr_<mode>_ccz): Ditto.
12818 2018-03-26 Tom de Vries <tom@codesourcery.com>
12820 PR tree-optimization/85063
12821 * omp-general.c (offloading_function_p): New function. Factor out
12823 * omp-offload.c (pass_omp_target_link::gate): ... here.
12824 * omp-general.h (offloading_function_p): Declare.
12825 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12826 with attribute omp declare target for offloading functions.
12828 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12830 PR tree-optimization/84005
12831 * tree-data-ref.h (get_base_for_alignment): Declare.
12832 * tree-data-ref.c (get_base_for_alignment_1): New function.
12833 (get_base_for_alignment): Likewise.
12834 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12835 get_base_for_alignment to find a suitable base object, instead
12836 of always using drb->base_address.
12838 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12840 PR inline-asm/85022
12841 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12842 known size by default.
12844 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12846 PR inline-asm/85030
12847 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12848 and non BLKmode operands.
12850 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12853 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12854 Clean up attributes.
12856 2018-03-23 Richard Biener <rguenther@suse.de>
12859 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12860 we are going to emit early debug for LTO.
12862 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12864 PR inline-asm/85034
12865 * function.c (match_asm_constraints_1): Don't optimize if input
12866 doesn't satisfy general_operand predicate for output's mode.
12868 PR inline-asm/85022
12869 * alias.c (write_dependence_p): Don't require for x_canonicalized
12870 non-VOIDmode if x has VOIDmode.
12873 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12874 just don't try to optimize it rather than assert it never happens.
12876 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12878 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12879 macro expansions for definition of ST_INTERNAL_<mode> and
12880 LD_INTERNAL_<mode> builtins.
12881 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12883 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12885 (altivec_expand_st_builtin): Likewise.
12886 (altivec_expand_builtin): Remove calls to deleted functions.
12887 (rs6000_address_for_altivec): Delete this function.
12888 * config/rs6000/vector.md: Remove expands for
12889 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12891 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12894 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12895 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12896 re-computing once computed.
12897 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12898 (arm_init_machine_status): Initialize
12899 machine->static_chain_stack_bytes.
12901 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12904 * doc/extend.texi: Add four new prototypes for vec_ld.
12905 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12906 definitions for more logical presentation.
12907 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12908 entries for V1TI variants of __builtin_altivec_ld builtin.
12909 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12910 handling of V1TI variant of LVX icode pattern.
12911 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12912 (rs6000_gimple_fold_builtin): Likewise.
12913 (altivec_init_builtins): Add code to define
12914 __builtin_altivec_lvx_v1ti function.
12916 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12918 PR inline-asm/84941
12919 * function.c (match_asm_constraints_1): Don't do the optimization
12920 if input isn't a REG, SUBREG, MEM or constant.
12922 2018-03-22 Tom de Vries <tom@codesourcery.com>
12924 PR tree-optimization/84956
12925 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12926 bb_has_abnormal_pred.
12928 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12931 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12932 DECL_INITIAL (decl) to decl at the end.
12933 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12934 adjust the comment.
12936 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12938 * doc/extend.texi (__builtin_tgmath): Document when complex
12939 integer types are treated as _Complex _Float64.
12941 2018-03-21 Tom de Vries <tom@codesourcery.com>
12943 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12945 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12947 PR tree-optimization/84960
12948 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12949 if it is ENTRY block, move them into single succ of ENTRY in that case.
12951 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12953 PR tree-optimization/84811
12954 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12955 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12956 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12957 (known_subrange_p): Update accordingly. Cast each value involved
12958 in the size comparison, rather than casting the result of the
12961 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12963 PR tree-optimization/84982
12964 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12965 by flipping the least significant bit rather than all bits from
12966 bitpos to bitpos + bitsize - 1.
12968 2018-03-21 Nathan Sidwell <nathan@acm.org>
12970 * doc/extend.texi (Deprecated Features): Remove mention of
12971 long-deleted deprecations.
12973 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12976 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12977 * configure: Regenerate.
12979 2018-03-21 Tom de Vries <tom@codesourcery.com>
12981 PR tree-optimization/83126
12982 * tree-parloops.c (num_phis): New function.
12983 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12985 2018-03-21 Nathan Sidwell <nathan@acm.org>
12987 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12988 mention anon-struct/union members and trailing attributes.
12990 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12992 PR tree-optimization/84969
12993 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12994 builtin memset partitions if they set different rhs values.
12996 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12998 PR rtl-optimization/84989
12999 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13000 VEC_DUPLICATE with scalar result mode.
13002 2018-03-21 Martin Liska <mliska@suse.cz>
13005 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13006 not intended return statement.
13008 2018-03-21 Martin Liska <mliska@suse.cz>
13011 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13012 (chkp_find_bound_slots_1): Limit number of iterations.
13014 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13017 * Minor grammar fixes for x86 options.
13019 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13022 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13023 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13025 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13028 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13029 (altivec_lvx_<mode>_1op): Likewise.
13030 (altivec_stvx_<mode>_2op): Likewise.
13031 (altivec_stvx_<mode>_1op): Likewise.
13032 (altivec_lvx_<VM2:mode>): New define_expand.
13033 (altivec_stvx_<VM2:mode>): Likewise.
13034 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13035 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13036 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13037 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13038 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13039 (rs6000_gen_lvx): Likewise.
13040 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13041 (altivec_expand_stv_builtin): Likewise.
13042 (altivec_expand_builtin): Likewise.
13043 * config/rs6000/vector.md: Likewise.
13045 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13048 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13051 2018-03-20 Richard Biener <rguenther@suse.de>
13054 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13055 sign-conversions as zero, fall back to standard scalar_stmt
13058 2018-03-20 Martin Liska <mliska@suse.cz>
13061 * predict.c (rebuild_frequencies): Handle case when we have
13062 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13064 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13067 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13068 flag_section_anchors.
13069 * varasm.c (use_blocks_for_decl_p): Remove hack for
13070 dw2_force_const_mem.
13073 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13075 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13076 be created, use lowpart_subreg of operands[0] rather than operands[0]
13078 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13079 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13080 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13081 and n constraint instead of aarch64_shift_imm_di and Usd.
13082 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13083 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13085 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13088 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13089 to favor GPR over NEON registers.
13090 (<shift>di3_neon): Likewise.
13092 2018-03-20 Tom de Vries <tom@codesourcery.com>
13095 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13096 (nvptx_process_pars): Emit bar.sync asap and alap.
13098 2018-03-20 Tom de Vries <tom@codesourcery.com>
13101 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13102 seen_label if seen_label is already set.
13104 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13107 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13108 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13109 Use 1U instead of 1. Formatting fixes.
13112 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13113 instead of TREE_TYPE (s1) for the return value.
13115 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13117 PR tree-optimization/84946
13118 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13119 bitsize + bitsize in poly_uint64 rather than poly_int64.
13122 * dwarf2asm.c: Include fold-const.c.
13123 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13124 of decl rather than decl itself.
13126 PR rtl-optimization/84643
13127 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13129 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13132 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13133 calling assemble_variable.
13135 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13138 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13139 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13141 2018-03-19 Jim Wilson <jimw@sifive.com>
13144 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13145 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13146 (riscv_first_stack_step): Likewise.
13147 (riscv_option_override): Use STACK_BOUNDARY instead of
13148 MIN_STACK_BOUNDARY.
13149 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13150 MIN_STACK_BOUNDARY.
13151 (BIGGEST_ALIGNMENT): Set to 128.
13152 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13153 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13156 2018-03-19 Richard Biener <rguenther@suse.de>
13158 PR tree-optimization/84933
13159 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13160 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13162 2018-03-19 Richard Biener <rguenther@suse.de>
13164 PR tree-optimization/84859
13165 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13166 (cond_if_else_store_replacement): Perform sinking operation on
13167 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13168 Generalize what a BB with a single eligible store is.
13170 2018-03-19 Richard Biener <rguenther@suse.de>
13172 PR tree-optimization/84929
13173 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13174 chrec_is_positive against non-chrec arg.
13176 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13179 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13181 2018-03-18 Martin Liska <mliska@suse.cz>
13183 PR rtl-optimization/84635
13184 * regrename.c (build_def_use): Use matches_mode only when
13187 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13189 PR tree-optimization/84913
13190 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13191 vectorize chains of COND_EXPRs.
13193 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13195 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13197 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13199 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13201 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13203 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13205 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13206 Kito Cheng <kito.cheng@gmail.com>
13208 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13209 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13210 (nds32_adjust_reg_alloc_order): New function.
13211 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13213 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13215 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13216 nds32_print_operand, nds32_print_operand_address): Use
13217 HOST_WIDE_INT_PRINT_DEC instead.
13219 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13221 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13223 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13226 * config/i386/i386.c (initial_ix86_tune_features,
13227 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13228 unsigned long long.
13229 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13230 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13231 rather than 1u << ix86_tune. Formatting fix.
13232 (ix86_option_override_internal): Change ix86_arch_mask from
13233 unsigned int to unsigned HOST_WIDE_INT, initialize to
13234 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13235 (ix86_function_specific_restore): Likewise.
13237 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13240 * postreload.c (reload_combine_recognize_pattern): Perform
13241 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13242 truncate_int_for_mode the result for the destination's mode.
13245 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13246 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13248 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13251 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13254 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13255 regno_allocno_class_array and sorted_pseudos.
13256 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13257 insns where regno is used.
13259 2018-03-16 Martin Liska <mliska@suse.cz>
13262 * multiple_target.c (create_dispatcher_calls): Redirect
13263 reference in the symbol table.
13265 2018-03-16 Martin Liska <mliska@suse.cz>
13268 * multiple_target.c (create_dispatcher_calls): Redirect also
13271 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13275 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13276 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13277 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13279 2018-03-16 Julia Koval <julia.koval@intel.com>
13281 * doc/invoke.texi (Skylake Server): Add CLWB.
13282 Cannonlake): Remove CLWB.
13284 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13286 PR tree-optimization/84841
13287 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13289 (FLOAT_ONE_CONST_TYPE): Define.
13290 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13291 (sort_by_operand_rank): Put entries with higher constant_type last
13292 rather than first to match comments.
13294 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13296 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13299 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13302 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13303 check and use address of target always.
13305 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13308 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13309 (indirect_thunk_bnd_needed): Likewise.
13310 (indirect_thunks_used): Likewise.
13311 (indirect_thunks_bnd_used): Likewise.
13312 (indirect_return_needed): New.
13313 (indirect_return_bnd_needed): Likewise.
13314 (output_indirect_thunk_function): Add a bool argument for
13316 (output_indirect_thunk_function): Don't generate alias for
13317 function return thunk.
13318 (ix86_code_end): Call output_indirect_thunk_function to generate
13319 function return thunks.
13320 (ix86_output_function_return): Set indirect_return_bnd_needed
13321 and indirect_return_needed instead of indirect_thunk_bnd_needed
13322 and indirect_thunk_needed.
13324 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13326 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13327 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13328 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13330 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13331 Paul Hua <paul.hua.gm@gmail.com>
13334 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13336 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13338 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13339 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13340 resp. SFmode cases.
13342 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13345 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13346 instead of GET_MODE_SIZE when comparing Units.
13348 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13351 * varasm.c (hash_section): Return an unchangeble hash value
13352 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13353 Return !aarch64_can_use_per_function_literal_pools_p ().
13355 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13358 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13359 rather than address of cmode as last argument to prepare_cmp_insn.
13361 2018-03-15 Julia Koval <julia.koval@intel.com>
13363 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13364 F_AVX512VNNI, F_AVX512BITALG): New.
13366 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13369 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13370 insn for floating-point loads and stores.
13372 2018-03-14 Carl Love <cel@us.ibm.com>
13374 * config/rs6000/rs6000-c.c: Add macro definitions for
13375 ALTIVEC_BUILTIN_VEC_PERMXOR.
13376 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13377 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13378 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13379 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13381 * config/doc/extend.texi: Add prototypes for vec_permxor.
13383 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13386 * diagnostic-show-locus.c (class layout_point): Convert m_line
13387 from int to linenum_type.
13388 (line_span::comparator): Use linenum "compare" function when
13389 comparing line numbers.
13390 (test_line_span): New function.
13391 (layout_range::contains_point): Convert param "row" from int to
13393 (layout_range::intersects_line_p): Likewise.
13394 (layout::will_show_line_p): Likewise.
13395 (layout::print_source_line): Likewise.
13396 (layout::should_print_annotation_line_p): Likewise.
13397 (layout::print_annotation_line): Likewise.
13398 (layout::print_leading_fixits): Likewise.
13399 (layout::annotation_line_showed_range_p): Likewise.
13400 (struct line_corrections): Likewise for field m_row.
13401 (line_corrections::line_corrections): Likewise for param "row".
13402 (layout::print_trailing_fixits): Likewise.
13403 (layout::get_state_at_point): Likewise.
13404 (layout::get_x_bound_for_row): Likewise.
13405 (layout::print_line): Likewise.
13406 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13407 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13408 * input.c (selftest::test_linenum_comparisons): New function.
13409 (selftest::input_c_tests): Call it.
13410 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13411 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13412 * selftest.h (ASSERT_GT): New macro.
13413 (ASSERT_GT_AT): New macro.
13414 (ASSERT_LT): New macro.
13415 (ASSERT_LT_AT): New macro.
13417 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13419 PR rtl-optimization/84780
13420 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13422 2018-03-14 Martin Liska <mliska@suse.cz>
13424 * tree.c (record_node_allocation_statistics): Use
13425 get_stats_node_kind.
13426 (get_stats_node_kind): New function extracted from
13427 record_node_allocation_statistics.
13428 (free_node): Use get_stats_node_kind.
13430 2018-03-14 Richard Biener <rguenther@suse.de>
13432 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13433 that the value-set of ANTIC_IN doesn't grow.
13436 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13438 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13439 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13441 2018-03-14 Julia Koval <julia.koval@intel.com>
13443 * config.gcc (icelake-client, icelake-server): New.
13445 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13446 (initial_ix86_arch_features): Ditto.
13447 (PTA_SKYLAKE): Add SGX.
13448 (PTA_ICELAKE): Remove.
13449 (PTA_ICELAKE_CLIENT): New.
13450 (PTA_ICELAKE_SERVER): New.
13451 (ix86_option_override_internal): Split up icelake on icelake client and
13453 (get_builtin_code_for_version): Ditto.
13454 (fold_builtin_cpu): Ditto.
13455 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13456 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13457 * config/i386/i386.h (processor_type): Ditto.
13458 * doc/invoke.texi: Ditto.
13460 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13463 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13464 INTEGER_CST offset, add it together with bitpos / 8 and
13465 sign extend based on POINTER_SIZE.
13469 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13472 * config/i386/constraints.md (Yc): New register constraint.
13473 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13474 Use Yc constraint for alternative 2 of operand 0. Remove
13475 preferred_for_speed attribute.
13477 2018-03-14 Richard Biener <rguenther@suse.de>
13479 PR tree-optimization/84830
13480 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13481 with the old one to avoid oscillations.
13483 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13486 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13488 (assign_by_spills): Return a flag of reload assignment failure.
13489 Do not process the reload assignment failures. Do not spill other
13490 reload pseudos if they has the same reg class. Update n if
13492 (lra_assign): Add a return arg. Set up from the result of
13493 assign_by_spills call.
13494 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13495 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13496 usage_insns if it is not NULL.
13497 (spill_hard_reg_in_range): New function.
13498 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13499 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13500 function prototypes.
13501 (lra_assign): Change prototype.
13502 * lra.c (lra): Add code to deal with fails by splitting hard reg
13505 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13507 * config/riscv/riscv.opt (mrelax): New option.
13508 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13509 "norelax" when riscv_mrelax is disabled.
13510 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13512 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13515 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13516 reassociation for int modes.
13518 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13520 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13521 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13523 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13524 * config/aarch64/aarch64-sve.md
13525 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13526 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13527 (*extend<mode><Vwide>2): Rename to...
13528 (aarch64_sve_extend<mode><Vwide>2): ...this.
13529 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13530 renaming the old pattern to...
13531 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13533 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13534 define_expand, renaming the old pattern to...
13535 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13536 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13537 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13538 account when deciding which SVE instruction the optab should use.
13539 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13541 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13543 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13544 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13545 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13546 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13547 (tlsdesc_small_<mode>): Turn a define_expand and use
13548 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13549 (tlsdesc_small_advsimd_<mode>): ...this.
13550 (tlsdesc_small_sve_<mode>): New pattern.
13552 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13554 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13555 (UNSPEC_UMUL_HIGHPART): New constants.
13556 (MUL_HIGHPART): New int iteraor.
13557 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13558 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13560 (*<su>mul<mode>3_highpart): New define_insn.
13562 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13565 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13568 2018-03-13 Martin Liska <mliska@suse.cz>
13571 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13573 (sem_item_optimizer::~sem_item_optimizer): Release it.
13574 (sem_item_optimizer::merge_classes): Register variable aliases.
13575 (sem_item_optimizer::fixup_pt_set): New function.
13576 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13577 * ipa-icf.h: Declare new variables and functions.
13579 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13581 PR middle-end/84834
13582 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13583 integer_pow2p@2 and test integer_pow2p in condition.
13584 (A < 0 ? C : 0): Similarly for @1.
13586 PR middle-end/84831
13587 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13588 characters starting at p contain '\0' character, don't look beyond
13592 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13593 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13596 * reg-stack.c (change_stack): Change update_end var from int to
13597 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13598 also call set_block_for_insn on the newly added insns and rescan.
13601 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13602 on the last operand.
13605 * tree.c (stabilize_reference_1): Return save_expr (e) for
13606 STATEMENT_LIST even if it doesn't have side-effects.
13608 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13610 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13612 2018-03-12 Renlin Li <renlin.li@arm.com>
13614 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13615 aarch64_output_scalar_simd_mov_immediate.
13617 2018-03-12 Martin Sebor <msebor@redhat.com>
13619 PR tree-optimization/83456
13620 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13621 for perfectly overlapping calls to memcpy.
13622 (gimple_fold_builtin_memory_chk): Same.
13623 (gimple_fold_builtin_strcpy): Handle no-warning.
13624 (gimple_fold_builtin_stxcpy_chk): Same.
13625 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13627 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13629 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13630 parameter. Use it for SFmode.
13631 (rs6000_function_arg_advance_1): Adjust.
13632 (rs6000_function_arg): Adjust.
13633 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13635 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13637 PR rtl-optimization/84169
13638 PR rtl-optimization/84780
13639 * combine.c (can_combine_p): Check for a 2-insn combination whether
13640 the destination register is used between the two insns, too.
13642 2018-03-12 Richard Biener <rguenther@suse.de>
13644 PR tree-optimization/84803
13645 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13646 for refs DR analysis didn't process.
13648 2018-03-12 Richard Biener <rguenther@suse.de>
13650 PR tree-optimization/84777
13651 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13652 force-vectorize loops ignore whether we are optimizing for size.
13654 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13656 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13657 (TARGET_MD_ASM_ADJUST): Define.
13659 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13660 Kito Cheng <kito.cheng@gmail.com>
13661 Chung-Ju Wu <jasonwucj@gmail.com>
13663 * config/nds32/nds32.c (nds32_compute_stack_frame,
13664 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13665 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13666 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13667 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13668 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13669 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13670 * config/nds32/nds32.md (prologue, epilogue): Use macro
13671 NDS32_V3PUSH_AVAILABLE_P to do checking.
13673 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13676 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13677 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13678 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13679 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13680 addition of most attributes on !orig_type_die or the attribute not
13681 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13683 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13684 Chung-Ju Wu <jasonwucj@gmail.com>
13686 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13687 __NDS32_VH__ macro.
13688 * config/nds32/nds32.opt (mvh): New option.
13690 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13691 Chung-Ju Wu <jasonwucj@gmail.com>
13693 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13695 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13696 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13699 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13700 Chung-Ju Wu <jasonwucj@gmail.com>
13702 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13704 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13705 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13707 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13708 Kito Cheng <kito.cheng@gmail.com>
13709 Chung-Ju Wu <jasonwucj@gmail.com>
13711 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13712 UNSPEC_FFMISM and UNSPEC_FLMISM.
13713 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13714 for ffb, ffmism and flmism.
13715 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13716 (unspec_ffmism): Ditto.
13717 (unspec_flmism): Ditto.
13718 (nds32_expand_builtin_impl): Check if string extension is available.
13719 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13720 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13722 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13725 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13728 * lra-assigns.c (assign_by_spills): Return a flag of reload
13729 assignment failure. Do not process the reload assignment
13730 failures. Do not spill other reload pseudos if they has the same
13732 (lra_assign): Add a return arg. Set up from the result of
13733 assign_by_spills call.
13734 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13735 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13736 usage_insns if it is not NULL.
13737 (spill_hard_reg_in_range): New function.
13738 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13739 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13740 function prototypes.
13741 (lra_assign): Change prototype.
13742 * lra.c (lra): Add code to deal with fails by splitting hard reg
13745 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13748 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13750 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13753 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13754 (dw_val_node): Add val_symbolic_view.
13755 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13756 (symview_upper_bound): New.
13757 (new_line_info_table): Initialize symviews_since_reset.
13758 (dwarf2out_source_line): Count symviews_since_reset and set
13759 symview_upper_bound.
13760 (dw_val_equal_p): Handle symview.
13761 (add_AT_symview): New.
13762 (print_dw_val): Handle symview.
13763 (attr_checksum, attr_checksum_ordered): Likewise.
13764 (same_dw_val_p, size_of_die): Likewise.
13765 (value_format, output_die): Likewise.
13766 (add_high_low_attributes): Use add_AT_symview for entry_view.
13767 (dwarf2out_finish): Reset symview_upper_bound, clear
13770 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13773 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13774 Add strict argument and use it.
13775 (rs6000_split_multireg_move): Update for new strict argument.
13776 (mem_operand_gpr): Disallow all non-offsettable addresses.
13777 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13779 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13782 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13783 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13784 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13787 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13788 decl, use remap_type if we want to use the type.
13790 2018-03-09 Martin Sebor <msebor@redhat.com>
13792 PR tree-optimization/84526
13793 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13795 (builtin_access::generic_overlap): Be prepared to handle non-array
13798 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13800 PR rtl-optimization/84682
13801 * lra-constraints.c (process_address_1): Check is_address flag
13802 for address constraints.
13803 (process_alt_operands): Likewise.
13804 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13805 preprocess_constraints.
13806 * recog.h (preprocess_constraints): Add oploc parameter.
13808 * recog.c (preprocess_constraints): Test address_operand for
13809 CT_ADDRESS constraints.
13811 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13814 * lra-assigns.c (assign_by_spills): Return a flag of reload
13815 assignment failure. Do not process the reload assignment
13816 failures. Do not spill other reload pseudos if they has the same
13818 (lra_assign): Add a return arg. Set up from the result of
13819 assign_by_spills call.
13820 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13821 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13822 usage_insns if it is not NULL.
13823 (spill_hard_reg_in_range): New function.
13824 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13825 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13826 function prototypes.
13827 (lra_assign): Change prototype.
13828 * lra.c (lra): Add code to deal with fails by splitting hard reg
13831 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13834 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13835 Accept complain bool parameter. Only emit errors if it is true.
13836 (arm_parse_cpu_option_name): Likewise.
13837 (arm_target_thumb_only): Adjust callers of the above.
13838 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13839 prototype to take a default true bool parameter.
13840 (arm_parse_arch_option_name): Likewise.
13842 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13843 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13847 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13848 * configure: Regenerate.
13849 * configure.ac ("linker --version-script option"): New.
13850 ("linker soname option"): New.
13852 2018-03-09 Richard Biener <rguenther@suse.de>
13854 PR tree-optimization/84775
13855 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13856 immediate uses of predicate stmts and mark them modified.
13859 PR tree-optimization/84178
13860 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13862 (version_loop_for_if_conversion): Delay update_ssa call.
13863 (tree_if_conversion): Delay update_ssa until after predicate
13866 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13869 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13870 when the function accesses prior frames.
13872 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13875 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13876 gen_llsym, otherwise call maybe_gen_llsym.
13878 PR inline-asm/84742
13879 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13880 has ',' character inside of it.
13882 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13885 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13886 as clobbering CC_REGNUM.
13888 2018-03-08 Richard Biener <rguenther@suse.de>
13890 PR middle-end/84552
13891 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13892 (follow_copies_to_constant): Do not follow SSA names registered
13895 2018-03-08 Richard Biener <rguenther@suse.de>
13897 PR tree-optimization/84178
13898 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13900 (version_loop_for_if_conversion): Delay update_ssa call.
13901 (tree_if_conversion): Delay update_ssa until after predicate
13904 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13906 PR tree-optimization/84178
13907 * tree-if-conv.c (release_bb_predicate): Remove the
13908 the assertion that the stmts have NULL use_ops.
13909 Discard the statements, asserting that they haven't
13910 yet been added to a BB.
13912 2018-03-08 Richard Biener <rguenther@suse.de>
13914 PR tree-optimization/84746
13915 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13916 (phi_translate): Pass in destination ANTIC_OUT set.
13917 (phi_translate_1): Likewise. For a simplified result lookup
13918 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13919 (phi_translate_set): Adjust.
13920 (do_pre_regular_insertion): Likewise.
13921 (do_pre_partial_partial_insertion): Likewise.
13923 2018-03-08 Martin Liska <mliska@suse.cz>
13925 PR gcov-profile/84735
13926 * doc/gcov.texi: Document usage of profile files.
13927 * gcov-io.h: Document changes in the format.
13929 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13933 * dwarf2out.c (struct dw_line_info_table): Update comments for
13935 (FORCE_RESET_NEXT_VIEW): New.
13936 (FORCE_RESETTING_VIEW_P): New.
13937 (RESETTING_VIEW_P): Check for -1 too.
13938 (ZERO_VIEW_P): Likewise.
13939 (new_line_info_table): Force-reset next view.
13940 (dwarf2out_begin_function): Likewise.
13941 (dwarf2out_source_line): Simplify zero_view_p initialization.
13942 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13943 view directly. Omit view when omitting .loc at line 0.
13945 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13947 PR tree-optimization/84740
13948 * tree-switch-conversion.c (process_switch): Call build_constructors
13949 only if info.phi_count is non-zero.
13951 PR tree-optimization/84739
13952 * tree-tailcall.c (find_tail_calls): Check call arguments against
13953 DECL_ARGUMENTS (current_function_decl) rather than
13954 DECL_ARGUMENTS (func) when checking for tail recursion.
13956 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13958 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13959 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13960 Volker Reichelt's entry and add entries for people that perform
13961 GCC fuzzy testing and report numerous bugs.
13963 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13966 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13967 readonly data in sdata, if that is disabled.
13968 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13969 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13970 -mreadonly-in-sdata option.
13972 2018-03-07 Martin Sebor <msebor@redhat.com>
13974 PR tree-optimization/84468
13975 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13976 basic block when looking for nul assignment.
13978 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13981 * except.h (output_function_exception_table): Adjust prototype.
13982 * except.c (output_function_exception_table): Remove FNNAME parameter
13983 and add SECTION parameter. Ouput one part of the table at a time.
13984 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13985 the first part of the exception table and emit unwind directives.
13986 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13987 (i386_pe_seh_cold_init): Likewise.
13988 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13989 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13990 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13991 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13992 * config/i386/winnt.c: Include except.h.
13993 (struct seh_frame_state): Add reg_offset, after_prologue and
13994 in_cold_section fields.
13995 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13996 (i386_pe_seh_cold_init): New function.
13997 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13998 to seh->in_cold_section.
13999 (seh_emit_push): Record the offset of the push.
14000 (seh_emit_save): Record the offet of the save.
14001 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14002 Test seh->after_prologue to disregard the epilogue.
14003 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14004 (i386_pe_end_cold_function): New function.
14006 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14009 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14010 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14013 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14015 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14016 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14018 PR middle-end/84723
14019 * multiple_target.c: Include tree-inline.h and intl.h.
14020 (expand_target_clones): Diagnose and fail if node->definition and
14021 !tree_versionable_function_p (node->decl).
14023 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14025 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14027 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14028 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14029 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14031 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14034 * combine.c (try_combine): Use reg_or_subregno instead of handling
14035 just paradoxical SUBREGs and REGs.
14037 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14039 * config/arc/arc.c (arc_finalize_pic): Remove function.
14040 (arc_must_save_register): We use single base PIC register, remove
14041 checks to save/restore the PIC register.
14042 (arc_expand_prologue): Likewise.
14043 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14045 (arc_verify_short): Likewise.
14046 (arc_attr_type): Likewise.
14047 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14048 (walk_stores): Likewise.
14049 (arc_address_cost): Make it static.
14050 (arc_verify_short): Likewise.
14051 (branch_dest): Likewise.
14052 (arc_attr_type): Likewise.
14053 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14054 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14055 (arc_final_prescan_insn): Remove inserting the nops due to
14056 hardware hazards. It is done in reorg step.
14057 (insn_length_variant_t): Remove.
14058 (insn_length_parameters_t): Likewise.
14059 (arc_insn_length_parameters): Likewise.
14060 (arc_get_insn_variants): Likewise.
14061 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14063 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14065 PR inline-asm/84683
14066 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14069 PR tree-optimization/84687
14070 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14072 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14074 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14076 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14077 Rename to ppc_speculation_barrier.
14078 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14079 __builtin_ppc_speculation_barrier.
14081 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14084 * combine.c (combine_simplify_rtx): Don't try to simplify if
14085 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14088 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14090 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14091 to 32 bytes when compiling for POWER9.
14093 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14096 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14097 regparm >= 3 with no arg reg available also for calls with
14098 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14101 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14103 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14105 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14108 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14110 2018-03-05 Richard Biener <rguenther@suse.de>
14112 PR tree-optimization/84486
14113 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14114 When inserting a __builtin_assume_aligned call set the LHS
14115 SSA name alignment info accordingly.
14117 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14119 PR tree-optimization/84114
14120 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14121 Avoid reassociation of FLOAT_MODE addition.
14123 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14125 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14126 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14127 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14128 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14129 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14130 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14131 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14133 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14134 __builtin_ia32_wbinvd): New builtins.
14135 (SPECIAL_ARGS2): New.
14136 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14137 (SPECIAL_ARGS2): New.
14138 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14139 (ix86_valid_target_attribute_inner_p): Ditto.
14140 (ix86_init_mmx_sse_builtins): Add special_args2.
14141 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14142 TARGET_WBNOINVD_P): New.
14143 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14144 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14145 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14146 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14147 * config/i386/pconfigintrin.h: New file.
14148 * config/i386/wbnoinvdintrin.h: Ditto.
14149 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14151 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14153 2018-03-05 Richard Biener <rguenther@suse.de>
14155 PR tree-optimization/84670
14156 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14158 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14159 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14160 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14161 doesn't grow if all successors (recursively) were visited at least
14164 2018-03-05 Richard Biener <rguenther@suse.de>
14166 PR tree-optimization/84650
14167 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14168 if executed in the loop pipeline.
14170 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14172 * doc/configfiles.texi (Configuration Files): Move info about
14173 conditionalizing $target-protos.h to...
14174 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14175 differs from $target-protos.h.
14177 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14178 Chung-Ju Wu <jasonwucj@gmail.com>
14180 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14181 * config/nds32/nds32-multiple.md (setmemsi): Define.
14182 * config/nds32/nds32-memory-manipulation.c
14183 (nds32_gen_dup_4_byte_to_word_value): New.
14184 (emit_setmem_word_loop): New.
14185 (emit_setmem_byte_loop): New.
14186 (nds32_expand_setmem_loop): New.
14187 (nds32_expand_setmem_loop_v3m): New.
14188 (nds32_expand_setmem_unroll): New.
14189 (nds32_expand_setmem): New.
14191 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14192 Chung-Ju Wu <jasonwucj@gmail.com>
14194 * config/nds32/nds32-memory-manipulation.c
14195 (nds32_emit_load_store): New.
14196 (nds32_emit_post_inc_load_store): New.
14197 (nds32_emit_mem_move): New.
14198 (nds32_emit_mem_move_block): New.
14199 (nds32_expand_movmemsi_loop_unknown_size): New.
14200 (nds32_expand_movmemsi_loop_known_size): New.
14201 (nds32_expand_movmemsi_loop): New.
14202 (nds32_expand_movmemsi_unroll): New.
14203 (nds32_expand_movmemqi): Rename ...
14204 (nds32_expand_movmemsi): ... to this.
14205 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14206 (movmemsi): ... to this.
14207 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14208 (nds32_expand_movmemsi): ... to this.
14210 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14211 Monk Chiang <sh.chiang04@gmail.com>
14212 Chung-Ju Wu <jasonwucj@gmail.com>
14214 * config/nds32/nds32-protos.h
14215 (nds32_expand_load_multiple): New arguments.
14216 (nds32_expand_store_multiple): Ditto.
14217 (nds32_valid_multiple_load_store): Rename ...
14218 (nds32_valid_multiple_load_store_p): ... to this.
14219 * config/nds32/nds32-memory-manipulation.c
14220 (nds32_expand_load_multiple): Refine implementation.
14221 (nds32_expand_store_multiple): Ditto.
14222 * config/nds32/nds32-multiple.md
14223 (load_multiple): Update nds32_expand_load_multiple interface.
14224 (store_multiple): Update nds32_expand_store_multiple interface.
14225 * config/nds32/nds32-predicates.c
14226 (nds32_valid_multiple_load_store): Rename ...
14227 (nds32_valid_multiple_load_store_p): ... to this and refine
14229 * config/nds32/predicates.md
14230 (nds32_load_multiple_and_update_address_operation): New predicate.
14231 (nds32_store_multiple_and_update_address_operation): New predicate.
14233 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14234 Chung-Ju Wu <jasonwucj@gmail.com>
14236 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14237 (combo): New attribute.
14238 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14240 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14242 * config/nds32/nds32.opt: Change -mcmodel= default value.
14244 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14245 Monk Chiang <sh.chiang04@gmail.com>
14246 Chung-Ju Wu <jasonwucj@gmail.com>
14248 * config/nds32/constants.md (unspec_element): New enum.
14249 * config/nds32/constraints.md (Umw): New constraint.
14250 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14251 * config/nds32/nds32-intrinsic.md: Likewise.
14252 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14253 (nds32_valid_smw_lwm_base_p): New.
14254 (nds32_output_smw_single_word): New.
14255 (nds32_output_lmw_single_word): New.
14256 (nds32_expand_unaligned_load): New.
14257 (nds32_expand_unaligned_store): New.
14258 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14259 (nds32_output_smw_single_word): Declare.
14260 (nds32_output_lmw_single_word): Declare.
14261 (nds32_expand_unaligned_load): Declare.
14262 (nds32_expand_unaligned_store): Declare.
14263 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14264 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14265 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14266 NDS32_BUILTIN_UASTORE_DW.
14267 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14270 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14271 Kito Cheng <kito.cheng@gmail.com>
14272 Chung-Ju Wu <jasonwucj@gmail.com>
14274 * config/nds32/nds32-intrinsic.c
14275 (nds32_expand_builtin_null_ftype_reg): Delete.
14276 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14277 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14278 (nds32_read_argument): New.
14279 (nds32_legitimize_target): Ditto.
14280 (nds32_legitimize_argument): Ditto.
14281 (nds32_check_constant_argument): Ditto.
14282 (nds32_expand_unop_builtin): Ditto.
14283 (nds32_expand_unopimm_builtin): Ditto.
14284 (nds32_expand_binop_builtin): Ditto.
14285 (nds32_builtin_decl_impl): Ditto.
14286 (builtin_description): Ditto.
14287 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14288 (nds32_init_builtins_impl): Ditto.
14289 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14290 (nds32_builtin_decl): New.
14291 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14292 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14294 2018-03-02 Jeff Law <law@redhat.com>
14296 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14297 (redundant_insn, fill_simple_delay_slots): Likewise.
14298 (fill_slots_from_thread): Likewise.
14299 * resource.c (mark_referenced_resources): Likewise.
14300 (mark_set_resources, find_dead_or_set_registers): Likewise.
14302 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14304 * substring-locations.h (format_warning_va): Formatting fix for
14305 ATTRIBUTE_GCC_DIAG.
14306 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14308 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14309 * substring-locations.c: Include intl.h.
14310 (format_warning_va): Turned into small wrapper around
14311 format_warning_n_va, renamed to ...
14312 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14313 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14315 (format_warning_at_substring_n): New function.
14316 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14317 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14318 format_warning_at_substring with just a shorter name instead of
14319 const function pointer.
14320 (fmtwarn_n): New function.
14321 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14322 appropriate, get rid of all the fmtstr temporaries, move conditionals
14323 with G_() wrapped string literals directly into fmtwarn arguments,
14324 cast dir.len to (int), formatting fixes.
14326 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14328 * doc/invoke.texi: Remove "Cilk Plus" references.
14330 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14331 Richard Biener <rguenther@suse.de>
14334 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14335 for error or warning attributes if CALL_FROM_THUNK_P is set.
14338 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14341 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14342 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14345 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14346 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14348 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14349 instead of -1U in last predictors element's probability member.
14351 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14354 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14355 arguments if they are comparable.
14357 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14359 PR tree-optimization/84634
14360 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14361 masks and masked_loop_p with a single loop_masks, making sure it's
14362 null for bb vectorization.
14364 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14366 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14367 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14368 loop->force_vectorize to check whether there is no alias.
14370 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14373 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14375 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14377 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14378 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14379 instead of a loop around prev_real_insn.
14380 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14383 PR inline-asm/84625
14384 * config/i386/i386.c (ix86_print_operand): Use conditional
14385 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14388 2018-03-02 Richard Biener <rguenther@suse.de>
14390 PR tree-optimization/84427
14391 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14392 (bitmap_set_subtract_values): Rewrite to handle multiple
14395 (prune_clobbered_mems): Likewise.
14396 (phi_translate): Take edge instead of pred/phiblock.
14397 (phi_translate_1): Likewise.
14398 (phi_translate_set): Likewise. Insert all translated
14399 exprs for a value into the set, keeping possibly multiple
14400 expressions per value.
14401 (compute_antic_aux): Adjust for phi_translate changes.
14402 When intersecting union the expressions and prune those
14403 not in the final value set, keeping possibly multiple
14404 expressions per value. Do not use value-insertion
14405 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14406 all expressions. Add verification that the value-sets
14407 only shrink during iteration.
14408 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14409 (do_pre_regular_insertion): Likewise.
14410 (do_pre_partial_partial_insertion): Likewise.
14412 2018-03-02 Richard Biener <rguenther@suse.de>
14415 * config/darwin.c (saved_debug_info_level): New static global.
14416 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14417 (darwin_asm_lto_end): Restore debug info generation settings.
14419 2018-03-01 Martin Liska <mliska@suse.cz>
14422 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14423 volatile arguments.
14425 2018-03-01 Richard Biener <rguenther@suse.de>
14428 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14429 type annotation with LTO when debug was disabled at compile-time.
14431 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14433 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14435 (mips_final_postscan_insn): Likewise.
14437 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14439 PR rtl-optimization/84528
14440 * alias.c (init_alias_target): Add commentary.
14441 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14442 a unique base value if the frame pointer is not eliminated
14443 to the stack pointer.
14445 2018-03-01 Tom de Vries <tom@codesourcery.com>
14447 PR rtl-optimization/83327
14448 * lra-int.h (hard_regs_spilled_into): Declare.
14449 * lra.c (hard_regs_spilled_into): Define.
14450 (init_reg_info): Init hard_regs_spilled_into.
14451 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14452 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14453 (process_bb_lives): Handle hard_regs_spilled_into.
14454 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14455 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14457 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14459 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14460 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14461 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14462 * config/rs6000/aix72.h: New file.
14464 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14466 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14467 instead of warning_at with conditional singular and plural messages
14471 * stor-layout.c (update_alignment_for_field): For
14472 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14473 && !DECL_PACKED (field), do the alignment update, just use
14474 only desired_align instead of MAX (type_align, desired_align)
14476 (place_field): Don't do known_align < desired_align handling
14477 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14478 is non-NULL, instead do it after rli->prev_field handling and
14479 only if not within a bitfield word. For DECL_PACKED (field)
14480 use type_align of BITS_PER_UNIT.
14482 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14484 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14485 superfluous parentheses and trailing spaces.
14487 2018-02-28 Richard Biener <rguenther@suse.de>
14489 PR tree-optimization/84584
14490 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14491 SCoPs with fake exit edge.
14493 2018-02-28 Martin Liska <mliska@suse.cz>
14496 * timevar.c (timer::print): Fix format to properly print 100%
14499 2018-02-28 Richard Biener <rguenther@suse.de>
14501 PR middle-end/84607
14502 * genmatch.c (capture_info::walk_match): Do not mark
14503 captured expressions without operands as expr_p given
14504 they act more like predicates and should be subject to
14505 "lost tail" side-effect preserving.
14507 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14509 PR rtl-optimization/81611
14510 * auto-inc-dec.c (attempt_change): Move dead note from
14511 mem_insn if it's the next use of regno
14512 (find_address): Take address use of reg holding
14513 non-incremented value. Add parm to limit search to the named
14515 (merge_in_block): Attempt to use a mem insn that is the next
14516 use of the original regno.
14518 2018-02-27 Martin Sebor <msebor@redhat.com>
14521 * doc/invoke.texi (-Wmissing-attributes): New option.
14522 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14524 2018-02-27 Martin Sebor <msebor@redhat.com>
14526 PR translation/84207
14527 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14528 n argument to unsigned HOST_WIDE_INT.
14529 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14530 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14531 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14532 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14534 2018-02-27 Richard Biener <rguenther@suse.de>
14536 PR tree-optimization/84512
14537 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14538 Do not use the estimate returned from record_stmt_cost for
14539 the scalar iteration cost but sum properly using add_stmt_cost.
14541 2018-02-27 Richard Biener <rguenther@suse.de>
14543 PR tree-optimization/84466
14544 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14545 Adjust last change to less strictly validate use operands.
14547 2018-02-27 Martin Liska <mliska@suse.cz>
14549 PR gcov-profile/84548
14550 * gcov.c (process_file): Allow partial overlap and consider it
14551 also as group functions.
14552 (output_lines): Properly calculate range of lines for a group.
14554 2018-02-27 Martin Liska <mliska@suse.cz>
14556 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14557 'ggc' suffixes. Change first column width.
14558 (timer::print): Fix formatting of the column.
14560 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14562 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14563 preserve inline entry blocks for the sake of debug inline
14564 entry point markers alone.
14565 (remove_unused_locals): Suggest in comments a better place to
14566 force the preservation of inline entry blocks that are
14567 otherwise unused, but do not preserve them.
14569 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14571 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14573 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14576 * config/i386/constraints.md (Bs): Replace
14577 ix86_indirect_branch_register with
14578 TARGET_INDIRECT_BRANCH_REGISTER.
14580 * config/i386/i386.md (indirect_jump): Likewise.
14581 (tablejump): Likewise.
14582 (*sibcall_memory): Likewise.
14583 (*sibcall_value_memory): Likewise.
14584 Peepholes of indirect call and jump via memory: Likewise.
14585 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14586 (*sibcall_value_GOT_32): Likewise.
14587 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14588 (GOT_memory_operand): Likewise.
14589 (call_insn_operand): Likewise.
14590 (sibcall_insn_operand): Likewise.
14591 (GOT32_symbol_operand): Likewise.
14592 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14594 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14596 PR rtl-optimization/83496
14597 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14598 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14599 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14600 redundant insn, if any.
14601 (relax_delay_slots): Likewise.
14602 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14604 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14606 PR tree-optimization/83965
14607 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14608 that grouped statements are part of a reduction chain. Return
14609 true if the statement is not marked as a reduction itself but
14610 is part of a group.
14611 (vect_recog_dot_prod_pattern): Don't check whether the statement
14612 is part of a group here.
14613 (vect_recog_sad_pattern): Likewise.
14614 (vect_recog_widen_sum_pattern): Likewise.
14616 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14619 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14621 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14624 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14626 (ix86_output_indirect_function_return): New prototype.
14627 (ix86_split_simple_return_pop_internal): Likewise.
14628 * config/i386/i386.c (indirect_return_via_cx): New.
14629 (indirect_return_via_cx_bnd): Likewise.
14630 (indirect_thunk_name): Handle return va CX_REG.
14631 (output_indirect_thunk_function): Create alias for
14632 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14633 (ix86_output_indirect_jmp): Remove the bool argument.
14634 (ix86_output_indirect_function_return): New function.
14635 (ix86_split_simple_return_pop_internal): Likewise.
14636 * config/i386/i386.md (*indirect_jump): Don't pass false
14637 to ix86_output_indirect_jmp.
14638 (*tablejump_1): Likewise.
14639 (simple_return_pop_internal): Change it to define_insn_and_split.
14640 Call ix86_split_simple_return_pop_internal to split it for
14641 -mfunction-return=.
14642 (simple_return_indirect_internal): Call
14643 ix86_output_indirect_function_return instead of
14644 ix86_output_indirect_jmp.
14646 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14649 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14650 memset and value initialization afterwards.
14652 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14654 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14656 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14659 * common/config/aarch64/aarch64-common.c
14660 (aarch_option_optimization_table[]): Switch
14661 off fomit-frame-pointer
14663 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14664 Chung-Ju Wu <jasonwucj@gmail.com>
14666 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14668 (store_multiple): Ditto.
14670 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14672 * config.gcc: Add --with-cpu support for nds32 target.
14673 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14674 * config/nds32/nds32.opt: Add -mcpu= option.
14676 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14678 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14679 isel=yes): Warn for these deprecated options.
14681 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14683 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14684 ISA_2_5_MASKS_EMBEDDED.
14686 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14688 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14689 p->max as pointers rather than using iterative_hash_expr.
14691 2018-02-23 Carl Love <cel@us.ibm.com>
14693 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14694 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14696 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14697 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14698 P8V_BUILTIN_VEC_VUNSIGNED2.
14700 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14703 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14704 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14706 * lra-constraints.c (curr_insn_transform): Set up
14707 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14709 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14710 * lra-eliminations.c (spill_pseudos): Ditto.
14711 (process_insn_for_elimination): Ditto.
14712 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14713 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14714 LRA_NON_CLOBBERED_ALT.
14716 2018-02-22 Martin Sebor <msebor@redhat.com>
14718 PR tree-optimization/84480
14719 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14720 to maybe_diag_stxncpy_trunc. Call it.
14721 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14722 from gimple_fold_builtin_strcpy. Print inlining stack.
14723 (handle_builtin_stxncpy): Print inlining stack.
14724 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14726 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14729 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14730 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14731 and -fcheck-pointer-bounds are used together.
14732 (indirect_thunk_prefix): New enum.
14733 (indirect_thunk_need_prefix): New function.
14734 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14735 "_nt" instead of "_bnd" for NOTRACK prefix.
14736 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14737 (output_indirect_thunk_function): Likewise.
14739 (ix86_code_end): Update output_indirect_thunk_function calls.
14740 (ix86_output_indirect_branch_via_reg): Replace
14741 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14742 (ix86_output_indirect_branch_via_push): Likewise.
14743 (ix86_output_function_return): Likewise.
14744 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14745 incompatible with -fcf-protection=branch and
14746 -fcheck-pointer-bounds.
14748 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14751 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14752 Change gcc_assert call to output_operand_lossage.
14754 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14756 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14758 2018-02-22 DJ Delorie <dj@redhat.com>
14759 Sebastian Perta <sebastian.perta@renesas.com>
14760 Oleg Endo <olegendo@gcc.gnu.org>
14762 * config/rx/rx.c (rx_rtx_costs): New function.
14763 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14765 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14767 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14769 2018-02-22 Martin Liska <mliska@suse.cz>
14772 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14773 Add "native" as a possible value.
14775 2018-02-22 Martin Liska <mliska@suse.cz>
14778 * config/i386/i386.c (ix86_option_override_internal):
14779 Add "native" as a possible value for -march and -mtune.
14781 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14784 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14785 to all type variants.
14787 PR tree-optimization/84503
14788 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14789 width as info->bitpos + info->bitsize - start.
14790 (merged_store_group::merge_overlapping): Simplify width computation.
14791 (check_no_overlap): New function.
14792 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14793 start + width and last_order of the group, fail if check_no_overlap
14795 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14796 to group if check_no_overlap fails.
14798 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14800 * config/rs6000/altivec.md: Delete contraint arguments to
14801 define_expand, define_split, and define_peephole2, and in
14802 define_insn_and_split if always unused.
14803 * config/rs6000/darwin.md: Ditto.
14804 * config/rs6000/dfp.md: Ditto.
14805 * config/rs6000/rs6000.md: Ditto.
14806 * config/rs6000/sync.md: Ditto.
14807 * config/rs6000/vector.md: Ditto.
14808 * config/rs6000/vsx.md: Ditto.
14810 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14812 * config/rs6000/altivec.md: Write output control strings as braced
14813 blocks instead of double-quoted strings.
14814 * config/rs6000/darwin.md: Ditto.
14815 * config/rs6000/rs6000.md: Ditto.
14816 * config/rs6000/vector.md: Ditto.
14817 * config/rs6000/vsx.md: Ditto.
14819 2018-02-21 Jason Merrill <jason@redhat.com>
14821 PR c++/84314 - ICE with templates and fastcall attribute.
14822 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14824 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14826 * ipa-cp.c (determine_versionability): Fix comment typos.
14828 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14831 * ipa-cp.c (determine_versionability): Do not version functions caling
14834 2018-02-21 Martin Liska <mliska@suse.cz>
14837 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14838 Add "native" as a possible value.
14839 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14840 the macro when native cpu detection is available.
14842 2018-02-21 Martin Liska <mliska@suse.cz>
14845 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14846 Add "native" as a possible value.
14847 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14848 when native cpu detection is available.
14850 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14851 Martin Sebor <msebor@redhat.com>
14853 PR tree-optimization/84478
14854 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14856 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14857 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14858 support which is conservatively correct, for 2 only stay conservative
14859 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14860 argument to the 2 argument get_range_strlen, adjust 6 arg
14861 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14863 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14864 (gimple_fold_builtin_strlen): Pass true as last argument to
14867 2018-02-20 Martin Sebor <msebor@redhat.com>
14869 PR middle-end/84095
14870 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14871 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14872 (builtin_memref::builtin_memref): Factor out parts into
14873 set_base_and_offset and call it.
14875 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14877 PR middle-end/84406
14878 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14879 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14880 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14881 search at the associated MODE_INT.
14883 2018-02-20 Jeff Law <law@redhat.com>
14885 PR middle-end/82123
14886 PR tree-optimization/81592
14887 PR middle-end/79257
14888 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14889 for range data rather than using global data.
14890 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14891 range data rather than using global data.
14892 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14893 pass it to children as needed.
14894 (struct directive::fmtresult): Similarly.
14895 (struct directive::set_width): Similarly.
14896 (struct directive::set_precision): Similarly.
14897 (format_integer, format_directive, parse_directive): Similarly.
14898 (format_none): Accept unnamed vr_values parameter.
14899 (format_percent, format_floating, format_character): Similarly.
14900 (format_string, format_plain): Similarly.
14901 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14902 the EVRP range analyzer for range data rather than using global data.
14903 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14904 gimple-ssa-evrp-analyze.h
14905 (class sprintf_dom_walker): Add after_dom_children member function.
14906 Add evrp_range_analyzer member.
14907 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14908 range analyzer as needed.
14909 (sprintf_dom_walker::after_dom_children): New member function.
14910 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14912 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14913 (evrp_range_analyzer::pop_to_marker): Likewise.
14915 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14917 PR tree-optimization/84419
14918 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14919 with the required type if its current type is compatible but
14922 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14924 PR middle-end/82004
14925 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14926 after vectorization.
14928 2018-02-20 Martin Liska <mliska@suse.cz>
14931 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14932 possible values if we don't have a hint.
14934 2018-02-20 Martin Liska <mliska@suse.cz>
14938 * final.c (shorten_branches): Build align_tab array with one
14940 * opts.c (finish_options): Add alignment option limit check.
14941 (MAX_CODE_ALIGN): Likewise.
14942 (MAX_CODE_ALIGN_VALUE): Likewise.
14943 * doc/invoke.texi: Document maximum allowed option value for
14944 all -falign-* options.
14946 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14949 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14950 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14951 * var-tracking.c (emit_note_insn_var_location): Remove all references
14952 to NOTE_INSN_CALL_ARG_LOCATION.
14953 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14954 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14955 Use copy_rtx_if_shared.
14956 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14957 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14958 (dwarf2out_var_location): Remove handling of
14959 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14961 * final.c (final_scan_insn): Remove all references to
14962 NOTE_INSN_CALL_ARG_LOCATION.
14963 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14964 before dumping final insns.
14965 * except.c (emit_note_eh_region_end): Remove all references to
14966 NOTE_INSN_CALL_ARG_LOCATION.
14967 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14968 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14969 * config/arc/arc.c (hwloop_optimize): Likewise.
14970 * config/arm/arm.c (create_fix_barrier): Likewise.
14971 * config/s390/s390.c (s390_chunkify_start): Likewise.
14972 * config/sh/sh.c (find_barrier): Likewise.
14973 * config/i386/i386.c (rest_of_insert_endbranch,
14974 ix86_seh_fixup_eh_fallthru): Likewise.
14975 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14976 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14977 * config/frv/frv.c (frv_function_prologue): Likewise.
14978 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14980 (note_outside_basic_block_p): Remove all references to
14981 NOTE_INSN_CALL_ARG_LOCATION.
14982 * gengtype.c (adjust_field_rtx_def): Likewise.
14983 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14985 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14986 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14989 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14992 PR tree-optimization/84452
14993 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14994 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14997 2018-02-19 Martin Liska <mliska@suse.cz>
15000 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15002 2018-02-19 Martin Liska <mliska@suse.cz>
15003 Richard Sandiford <richard.sandiford@linaro.org>
15005 PR tree-optimization/82491
15006 * gimple-fold.c (get_base_constructor): Make earlier bail out
15009 2018-02-19 Carl Love <cel@us.ibm.com>
15011 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15012 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15014 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15015 P8V_BUILTIN_VEC_NEG.
15017 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15019 * config/rl78/rl78.md (movdf): New define expand.
15021 2018-02-19 Martin Liska <mliska@suse.cz>
15024 * doc/invoke.texi: Fix typo.
15025 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15027 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15029 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15030 handle rs6000_single_float and rs6000_double_float specially for
15033 2018-02-16 Jeff Law <law@redhat.com>
15035 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15036 (pop_regs): Use it.
15038 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15041 * ipa-inline.c (inline_small_functions): Fix a typo.
15043 2018-02-16 Nathan Sidwell <nathan@acm.org>
15045 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15047 2018-02-16 Carl Love <cel@us.ibm.com>
15049 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15050 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15051 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15052 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15053 expansion to P8V_BUILTIN_VEC_FLOAT2.
15055 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15057 PR rtl-optimization/70023
15058 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15059 src_regno into account.
15061 2018-02-16 Carl Love <cel@us.ibm.com>
15063 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15064 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15065 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15066 * config/rs6000/rs6000.c: Remove case statements for
15067 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15068 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15069 and P9V_BUILTIN_VEC_VINSERT4B.
15070 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15071 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15072 * config/rs6000/vsx.md:
15073 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15076 2018-02-16 Carl Love <cel@us.ibm.com>
15078 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15080 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15082 * config/rs6000/rs6000-c.c: Add the definitions for
15083 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15084 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15085 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15086 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15087 definition for insert4b and define insn *insert3b_internal.
15088 * doc/extend.texi: Add documentation for vec_extract4b.
15090 2018-02-16 Nathan Sidwell <nathan@acm.org>
15092 * doc/extend.texi (Backwards Compatibility): Mention friend
15093 injection. Note for-scope is deprecated.
15094 * doc/invoke.texi (-ffriend-injection): Deprecate.
15096 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15098 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15099 that moved to I2, also allow destinations that are a paradoxical
15100 subreg (instead of a normal reg).
15102 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15105 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15108 2018-02-16 Richard Biener <rguenther@suse.de>
15110 PR tree-optimization/84037
15111 PR tree-optimization/84016
15113 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15114 Adjust vec_construct for the fact we need additional higher latency
15115 128bit inserts for AVX256 and AVX512 vector builds.
15116 (ix86_add_stmt_cost): Scale vector construction cost for
15119 2018-02-16 Richard Biener <rguenther@suse.de>
15121 PR tree-optimization/84417
15122 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15123 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15124 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15126 2018-02-16 Martin Liska <mliska@suse.cz>
15129 * internal-fn.def (ASAN_CHECK): Set proper flags.
15130 (ASAN_MARK): Likewise.
15132 2018-02-16 Julia Koval <julia.koval@intel.com>
15134 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15135 from PTA_CANNONLAKE.
15137 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15140 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15141 Use ++iter rather than iter++ for std::list iterators.
15142 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15143 defer deleting them until all nodes in the forest are processed. Do
15144 free even leaf nodes. Change to_process into auto_vec.
15147 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15148 * vec.h (vec_default_construct): Use memset instead of placement new
15149 if BROKEN_VALUE_INITIALIZATION is defined.
15150 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15151 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15154 PR rtl-optimization/83723
15155 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15156 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15157 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15159 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15161 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15163 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15165 PR rtl-optimization/81443
15166 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15167 from inner REGs to paradoxical SUBREGs.
15169 2018-02-16 Richard Biener <rguenther@suse.de>
15171 PR tree-optimization/84399
15172 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15173 For operands we can analyze at their definition make sure we can
15174 analyze them at each use as well.
15176 2018-02-16 Richard Biener <rguenther@suse.de>
15178 PR tree-optimization/84190
15179 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15180 volatile accesses if the decl isn't volatile.
15182 2018-02-15 Jason Merrill <jason@redhat.com>
15184 PR c++/84314 - ICE with templates and fastcall attribute.
15185 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15186 TYPE_CANONICAL on an existing type.
15188 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15190 PR tree-optimization/84383
15191 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15192 dstoff nor call operand_equal_p if dstbase is NULL.
15194 PR tree-optimization/84334
15195 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15196 also a CONSTANT_CLASS_P, punt.
15198 2018-02-14 Jim Wilson <jimw@sifive.com>
15200 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15201 first SMALL_OPERAND check. New local min_second_step. Move assert
15202 to where locals are set. Add TARGET_RVC support.
15203 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15205 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15207 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15209 2018-02-14 Martin Sebor <msebor@redhat.com>
15211 PR tree-optimization/83698
15212 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15213 arrays constrain the offset range to their bounds.
15214 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15215 (builtin_access::overlap): Avoid setting the size of overlap if it's
15217 (maybe_diag_overlap): Also consider arrays when deciding what values
15218 of offsets to include in diagnostics.
15220 2018-02-14 Martin Sebor <msebor@redhat.com>
15223 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15224 that correspond to the kind of a declaration.
15226 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15229 * config/pa/pa.md: Load address of PIC label using the linkage table
15230 if the label is nonlocal.
15232 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15234 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15235 warning message if user requests -maltivec=be.
15236 * doc/invoke.texi: Document deprecation of -maltivec=be.
15238 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15241 * config/rs6000/rs6000-c.c: Update definitions for
15242 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15243 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15245 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15248 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15249 add _get_ssp intrinsics. Remove argument from
15250 __builtin_ia32_rdssp[d|q].
15251 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15252 * config/i386/i386-builtin.def: Remove argument from
15253 __builtin_ia32_rdssp[d|q].
15254 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15255 ix86_expand_special_args_builtin for _rdssp[d|q].
15256 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15257 Clear register before usage.
15258 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15259 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15261 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15263 PR tree-optimization/84357
15264 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15265 operand 1 of an ARRAY_REF too.
15267 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15270 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15271 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15273 (set_of_reg): New struct.
15274 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15275 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15276 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15278 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15279 Split into bitclr, bitset, bitinvert patterns if appropriate.
15280 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15281 use rx_fuse_in_memory_bitop.
15282 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15283 to named insn, correct maximum insn length.
15285 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15288 * machmode.def: Define a complex mode for PARTIAL_INT.
15289 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15291 * doc/rtl.texi: Document CSPImode.
15292 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15294 (msp430_hard_regno_nregs_with_padding): Likewise.
15296 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15299 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15301 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15303 PR rtl-optimization/84169
15304 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15305 we generated a parallel as new i3 and we split that to new i2 and i3
15306 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15307 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15308 those to i2, not i1. Partially rewrite this scan code.
15310 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15313 * stor-layout.c (place_field): For variable length fields, adjust
15314 offset_align afterwards not just based on the field's alignment,
15315 but also on the size.
15317 PR middle-end/84309
15318 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15319 of exps and logs in the use_exp2 case.
15321 2018-02-13 Jeff Law <law@redhat.com>
15323 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15324 entry for "vector".
15326 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15329 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15333 * common.opt (gas-loc-support, gas-locview-support): New.
15334 (ginline-points, ginternal-reset-location-views): New.
15335 * doc/invoke.texi: Document them. Use @itemx where intended.
15336 (gvariable-location-views): Adjust.
15337 * target.def (reset_location_view): New.
15338 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15339 (TARGET_RESET_LOCATION_VIEW): New.
15340 * doc/tm.texi: Rebuilt.
15341 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15342 (dwarf2out_default_as_locview_support): New.
15343 (output_asm_line_debug_info): Use option variables.
15344 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15345 (output_loc_list): Likewise.
15346 (add_high_low_attributes): Check option variables.
15347 Don't output entry view attribute in strict mode.
15348 (gen_inlined_subroutine_die): Check option variables.
15349 (dwarf2out_inline_entry): Likewise.
15350 (init_sections_and_labels): Likewise.
15351 (dwarf2out_early_finish): Likewise.
15352 (maybe_reset_location_view): New, from...
15353 (dwarf2out_var_location): ... here. Call it.
15354 * debug.h (dwarf2out_default_as_loc_support): Declare.
15355 (dwarf2out_default_as_locview_support): Declare.
15356 * hooks.c (hook_int_rtx_insn_0): New.
15357 * hooks.h (hook_int_rtx_insn_0): Declare.
15358 * toplev.c (process_options): Take -gas-loc-support and
15359 -gas-locview-support from dwarf2out. Enable
15360 -gvariable-location-views by default only with locview
15361 assembler support. Enable -ginternal-reset-location-views by
15362 default only if the target defines the corresponding hook.
15363 Enable -ginline-points by default if location views are
15364 enabled; force it disabled if statement frontiers are
15366 * tree-inline.c (expand_call_inline): Check option variables.
15367 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15369 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15371 PR tree-optimization/84321
15372 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15373 handling. Also check whether the anti-range contains any values
15374 that satisfy the mask; switch to a VR_RANGE if not.
15376 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15379 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15381 2018-02-13 Martin Jambor <mjambor@suse.cz>
15384 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15385 of call statements, also set location of a load to a temporary.
15387 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15389 * config/rl78/rl78.c (add_vector_labels): New function.
15390 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15391 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15392 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15393 which checks that no arguments are passed.
15394 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15395 * doc/extend.texi: Documentation for the new attribute.
15397 2018-02-13 Andreas Schwab <schwab@suse.de>
15399 * config/riscv/linux.h (CPP_SPEC): Define.
15401 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15404 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15405 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15406 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15407 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15408 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15409 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15410 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15411 temporarily for AES and PCLMUL builtins.
15413 PR tree-optimization/84339
15414 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15415 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15418 PR middle-end/84309
15419 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15420 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15421 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15423 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15425 * omp-simd-clone.h: New file.
15426 * omp-simd-clone.c: Include omp-simd-clone.h.
15427 (expand_simd_clones): No longer static.
15428 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15429 cgraph.h and omp-simd-clone.h.
15430 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15431 (vect_recog_widen_shift_pattern): Formatting fix.
15432 (vect_pattern_recog_1): Don't check optab for calls.
15435 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15436 operands[2] into a REG before using gen_lowpart on it.
15438 2018-02-12 Jeff Law <law@redhat.com>
15441 * config/sh/sh.c (find_barrier): Consider a sibling call
15444 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15445 successfully back substituting a reg.
15447 2018-02-12 Richard Biener <rguenther@suse.de>
15449 PR tree-optimization/84037
15450 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15451 parameter, move visited init to caller.
15452 (vect_slp_analyze_operations): Separate cost from validity
15453 check, initialize visited once for all instances.
15454 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15456 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15458 (vect_model_promotion_demotion_cost): Likewise.
15459 (vectorizable_bswap): Guard cost modeling with !slp_node
15460 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15462 (vectorizable_call): Likewise.
15463 (vectorizable_conversion): Likewise.
15464 (vectorizable_assignment): Likewise.
15465 (vectorizable_shift): Likewise.
15466 (vectorizable_operation): Likewise.
15467 (vectorizable_store): Likewise.
15468 (vectorizable_load): Likewise.
15469 (vectorizable_condition): Likewise.
15470 (vectorizable_comparison): Likewise.
15472 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15475 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15476 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15477 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15479 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15481 PR middle-end/83665
15482 * params.def (inline-min-speedup): Increase from 8 to 15.
15483 (max-inline-insns-auto): Decrease from 40 to 30.
15484 * ipa-split.c (consider_split): Add some buffer for function to
15485 be considered inlining candidate.
15486 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15489 2018-02-12 Richard Biener <rguenther@suse.de>
15491 PR tree-optimization/84037
15492 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15493 matched stmts if we cannot swap the non-matched ones.
15495 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15497 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15498 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15499 _mm_maskz_scalef_round_ss): New intrinsics.
15500 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15501 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15502 __builtin_ia32_scalefss_round): Remove.
15503 (__builtin_ia32_scalefsd_mask_round,
15504 __builtin_ia32_scalefss_mask_round): New intrinsics.
15505 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15506 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15507 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15508 "<round_constraint>")): Changed to ...
15509 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15510 "<round_scalar_constraint>")): ... this.
15511 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15512 %0, %1, %2<round_op3>}"): Changed to ...
15513 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15514 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15515 %2<round_scalar_mask_op3>}"): ... this.
15516 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15518 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15520 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15521 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15522 (_mm_maskz_sqrt_round_ss): New intrinsics.
15523 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15524 (__builtin_ia32_sqrtsd_mask_round)
15525 (__builtin_ia32_sqrtss_mask_round): New builtins.
15526 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15527 (__builtin_ia32_sqrtss_round): Remove.
15528 (__builtin_ia32_sqrtsd_mask_round)
15529 (__builtin_ia32_sqrtss_mask_round): New builtins.
15530 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15531 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15532 ((match_operand:VF_128 1 "vector_operand"
15533 "xBm,<round_constraint>")): Changed to ...
15534 ((match_operand:VF_128 1 "vector_operand"
15535 "xBm,<round_scalar_constraint>")): ... this.
15536 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15537 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15538 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15539 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15540 %<iptr>1<round_scalar_mask_op3>}): ... this.
15541 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15542 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15544 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15547 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15548 Cast vec_cmpeq result to correct type.
15549 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15550 Cast vec_cmpgt result to correct type.
15552 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15554 * final.c (final_scan_insn_1): Renamed from...
15555 (final_scan_insn): ... this. New wrapper, to recover
15556 seen from the outermost call in recursive ones.
15557 * config/sparc/sparc.c (output_return): Drop seen from call.
15558 (output_sibcall): Likewise.
15559 * config/visium/visium.c (output_branch): Likewise.
15561 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15563 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15566 2018-02-10 Alan Modra <amodra@gmail.com>
15569 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15570 Specify LR as an input.
15572 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15575 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15576 remove_member_access_dummy_vars): New functions.
15577 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15578 lower_omp_1, execute_lower_omp): Use them.
15580 PR rtl-optimization/84308
15581 * shrink-wrap.c (spread_components): Release todo vector.
15583 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15585 PR rtl-optimization/57193
15586 * ira-color.c (struct allocno_color_data): Add member
15587 conflict_allocno_hard_prefs.
15588 (update_conflict_allocno_hard_prefs): New.
15589 (bucket_allocno_compare_func): Add a preference based on
15590 conflict_allocno_hard_prefs.
15591 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15592 (color_allocnos): Remove a dead code. Initiate
15593 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15595 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15598 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15599 constraint from =wa to wa. Avoid a subreg on the output operand,
15600 instead use a pseudo and subreg it in a move.
15601 (p9_xxbrd_<mode>): Changed to ...
15602 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15603 (p9_xxbrd_v2df): New expander.
15604 (p9_xxbrw_<mode>): Changed to ...
15605 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15606 (p9_xxbrw_v4sf): New expander.
15608 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15610 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15612 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15615 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15616 multiply in 32-bit mode.
15617 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15618 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15621 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15623 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15624 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15625 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15626 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15628 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15631 * dwarf2out.c (is_trivial_indirect_ref): New function.
15632 (dwarf2out_late_global_decl): Do not generate a location
15633 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15634 and that are not defined in the current unit.
15636 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15638 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15639 instead of a libcall for UNORDERED.
15641 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15644 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15645 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15647 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15650 * config/s390/s390.c (s390_set_current_function): Invoke
15651 s390_indirect_branch_settings also if fndecl didn't change.
15653 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15655 * config/rs6000/rs6000.md (blockage): Set length to zero.
15657 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15659 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15661 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15664 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15665 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15669 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15670 PARALLEL incoming that failed vt_get_decl_and_offset check.
15672 PR middle-end/84237
15673 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15674 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15676 (get_variable_section): For decls in named .bss* sections pass true as
15677 second argument to bss_initializer_p.
15679 2018-02-09 Marek Polacek <polacek@redhat.com>
15680 Jakub Jelinek <jakub@redhat.com>
15683 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15684 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15685 Sync some changes from cxx_fold_indirect_ref.
15687 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15689 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15691 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15692 (BLOCK_INLINE_ENTRY_LABEL): New.
15693 (dwarf2out_var_location): Disregard inline entry markers.
15694 (inline_entry_data): New struct.
15695 (inline_entry_data_hasher): New hashtable type.
15696 (inline_entry_data_hasher::hash): New.
15697 (inline_entry_data_hasher::equal): New.
15698 (inline_entry_data_table): New variable.
15699 (add_high_low_attributes): Add DW_AT_entry_pc and
15700 DW_AT_GNU_entry_view attributes if a pending entry is found
15701 in inline_entry_data_table. Add old entry_pc attribute only
15702 if debug nonbinding markers are disabled.
15703 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15704 markers are enabled.
15705 (block_within_block_p, dwarf2out_inline_entry): New.
15706 (dwarf2out_finish): Check that no entries remained in
15707 inline_entry_data_table.
15708 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15709 (final_scan_insn, notice_source_line): Likewise.
15710 (rest_of_clean_state): Skip inline entry markers.
15711 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15713 * gimple.c (gimple_build_debug_inline_entry): New.
15714 * gimple.h (enum gimple_debug_subcode): Add
15715 GIMPLE_DEBUG_INLINE_ENTRY.
15716 (gimple_build_debug_inline_entry): Declare.
15717 (gimple_debug_inline_entry_p): New.
15718 (gimple_debug_nonbind_marker_p): Adjust.
15719 * insn-notes.def (INLINE_ENTRY): New.
15720 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15721 inline entry marker notes.
15722 (print_insn): Likewise.
15723 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15724 (INSN_DEBUG_MARKER_KIND): Likewise.
15725 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15726 * tree-inline.c (expand_call_inline): Build and insert
15727 debug_inline_entry stmt.
15728 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15729 inline entry blocks early, if nonbind markers are enabled.
15730 (dump_scope_block): Dump fragment info.
15731 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15732 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15733 (gimple_build_debug_inline_entry): New.
15734 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15735 Enable/disable inline entry points too.
15736 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15737 (DEBUG_INSN): Describe inline entry markers.
15739 * common.opt (gvariable-location-views): New.
15740 (gvariable-location-views=incompat5): New.
15741 * config.in: Rebuilt.
15742 * configure: Rebuilt.
15743 * configure.ac: Test assembler for view support.
15744 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15745 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15746 * dwarf2out.c (var_loc_view): New typedef.
15747 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15748 (dwarf2out_locviews_in_attribute): New.
15749 (dwarf2out_locviews_in_loclist): New.
15750 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15751 (enum dw_line_info_opcode): Add LI_adv_address.
15752 (struct dw_line_info_table): Add view.
15753 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15754 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15755 (zero_view_p): New variable.
15756 (ZERO_VIEW_P): New macro.
15757 (output_asm_line_debug_info): New.
15758 (struct var_loc_node): Add view.
15759 (add_AT_view_list, AT_loc_list): New.
15760 (add_var_loc_to_decl): Add view param. Test it against last.
15761 (new_loc_list): Add view params. Record them.
15762 (AT_loc_list_ptr): Handle loc and view lists.
15763 (view_list_to_loc_list_val_node): New.
15764 (print_dw_val): Handle dw_val_class_view_list.
15765 (size_of_die): Likewise.
15766 (value_format): Likewise.
15767 (loc_list_has_views): New.
15768 (gen_llsym): Set vl_symbol too.
15769 (maybe_gen_llsym, skip_loc_list_entry): New.
15770 (dwarf2out_maybe_output_loclist_view_pair): New.
15771 (output_loc_list): Output view list or entries too.
15772 (output_view_list_offset): New.
15773 (output_die): Handle dw_val_class_view_list.
15774 (output_dwarf_version): New.
15775 (output_compilation_unit_header): Use it.
15776 (output_skeleton_debug_sections): Likewise.
15777 (output_rnglists, output_line_info): Likewise.
15778 (output_pubnames, output_aranges): Update version comments.
15779 (output_one_line_info_table): Output view numbers in asm comments.
15780 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15781 Call maybe_gen_llsym.
15782 (loc_list_from_tree_1): Adjust.
15783 (add_AT_location_description): Create view list attribute if
15784 needed, check it's absent otherwise.
15785 (convert_cfa_to_fb_loc_list): Adjust.
15786 (maybe_emit_file): Call output_asm_line_debug_info for test.
15787 (dwarf2out_var_location): Reset views as needed. Precompute
15788 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15789 attribute. Set view.
15790 (new_line_info_table): Reset next view.
15791 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15792 (dwarf2out_source_line): Likewise. Output view resets and labels to
15793 the assembler, or select appropriate line info opcodes.
15794 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15795 (optimize_string_length): Catch it. Adjust.
15796 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15797 dw_val_class_view_list, and remove it if no longer needed.
15798 (hash_loc_list): Hash view numbers.
15799 (loc_list_hasher::equal): Compare them.
15800 (optimize_location_lists): Check whether a view list symbol is
15801 needed, and whether the locview attribute is present, and
15802 whether they match. Remove the locview attribute if no longer
15804 (index_location_lists): Call skip_loc_list_entry for test.
15805 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15806 Use output_dwarf_version.
15807 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15808 (struct dw_val_node): Add val_view_list.
15809 * final.c (SEEN_NEXT_VIEW): New.
15810 (set_next_view_needed): New.
15811 (clear_next_view_needed): New.
15812 (maybe_output_next_view): New.
15813 (final_start_function): Rename to...
15814 (final_start_function_1): ... this. Take pointer to FIRST,
15815 add SEEN parameter. Emit param bindings in the initial view.
15816 (final_start_function): Reintroduce SEEN-less interface.
15817 (final): Rename to...
15818 (final_1): ... this. Take SEEN parameter. Output final pending
15819 next view at the end.
15820 (final): Reintroduce seen-less interface.
15821 (final_scan_insn): Output pending next view before switching
15822 sections or ending a block. Mark the next view as needed when
15823 outputting variable locations. Notify debug backend of section
15824 changes, and of location view changes.
15825 (rest_of_handle_final): Adjust.
15826 * toplev.c (process_options): Autodetect value for debug variable
15827 location views option. Warn on incompat5 without -gdwarf-5.
15828 * doc/invoke.texi (gvariable-location-views): New.
15829 (gvariable-location-views=incompat5): New.
15830 (gno-variable-location-views): New.
15832 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15834 PR tree-optimization/84136
15835 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15836 that the result of find_edge is non-NULL.
15838 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15841 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15842 storing integer register in SImode. Fix cost of 256 and 512
15843 byte aligned SSE register store.
15845 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15847 * config/i386/i386.c (ix86_multiplication_cost): Fix
15848 multiplication cost for TARGET_AVX512DQ.
15850 2018-02-08 Marek Polacek <polacek@redhat.com>
15852 PR tree-optimization/84238
15853 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15856 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15858 PR tree-optimization/84265
15859 * tree-vect-stmts.c (vectorizable_store): Don't treat
15860 VMAT_CONTIGUOUS accesses as grouped.
15861 (vectorizable_load): Likewise.
15863 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15865 PR tree-optimization/81635
15866 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15867 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15868 (test_round_for_mask): New functions.
15869 (wide_int_cc_tests): Call test_round_for_mask.
15870 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15871 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15872 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15873 range returned by get_range_info.
15875 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15878 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15879 * symtab.c: Include builtins.h
15880 (symtab_node::output_to_lto_symbol_table_p): Move here
15881 from lto-streamer-out.c:output_symbol_p.
15882 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15883 (output_symbol_p): Move all logic to symtab.c
15884 (produce_symtab): Update.
15886 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15888 * config/s390/s390-opts.h (enum indirect_branch): Define.
15889 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15890 (s390_indirect_branch_via_thunk)
15891 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15892 (enum s390_indirect_branch_type): Define.
15893 * config/s390/s390.c (struct s390_frame_layout, struct
15894 machine_function): Remove.
15895 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15896 (indirect_branch_table_label_no, indirect_branch_table_name):
15898 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15899 (enum s390_indirect_branch_option): Define.
15900 (s390_return_addr_from_memory): New function.
15901 (s390_handle_string_attribute): New function.
15902 (s390_attribute_table): Add new attribute handler.
15903 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15904 (s390_indirect_branch_via_thunk): New function.
15905 (s390_indirect_branch_via_inline_thunk): New function.
15906 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15907 sibling call optimization for non z10 compiles.
15908 (s390_emit_call): Force indirect branch target to be a single
15909 register. Add r1 clobber for non-z10 compiles.
15910 (s390_emit_epilogue): Emit return jump via return_use expander.
15911 (s390_reorg): Handle JUMP_INSNs as execute targets.
15912 (s390_option_override_internal): Perform validity checks for the
15913 new command line options.
15914 (s390_indirect_branch_attrvalue): New function.
15915 (s390_indirect_branch_settings): New function.
15916 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15917 (s390_output_indirect_thunk_function): New function.
15918 (s390_code_end): Implement target hook.
15919 (s390_case_values_threshold): Implement target hook.
15920 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15922 * config/s390/s390.h (struct s390_frame_layout)
15923 (struct machine_function): Move here from s390.c.
15924 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15925 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15926 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15927 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15928 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15929 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15930 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15931 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15932 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15933 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15934 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15935 (mnemonic attribute): Add values which aren't recognized
15937 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15938 pattern for branch conversion. Fix mnemonic attribute.
15939 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15940 indirect branch via thunk if requested.
15941 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15942 ("*indirect_jump"): Disable for branch conversion using out of
15944 ("indirect_jump_via_thunk<mode>_z10")
15945 ("indirect_jump_via_thunk<mode>")
15946 ("indirect_jump_via_inlinethunk<mode>_z10")
15947 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15948 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15949 ("casesi_jump_via_inlinethunk<mode>_z10")
15950 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15951 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15952 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15953 ("*indirect2_jump"): Disable for branch conversion.
15954 ("casesi_jump"): Turn into expander and expand patterns for branch
15956 ("return_use"): New expander.
15957 ("*return"): Emit return via thunk and rename it to ...
15958 ("*return<mode>"): ... this one.
15959 * config/s390/s390.opt: Add new options and and enum for the
15962 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15964 * lra-constraints.c (match_reload): Unconditionally use
15965 gen_lowpart_SUBREG, rather than selecting between that
15966 and equivalent gen_rtx_SUBREG code.
15968 2018-02-08 Richard Biener <rguenther@suse.de>
15970 PR tree-optimization/84233
15971 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15972 changed flag instead of boguously re-using phi_inserted.
15974 2018-02-08 Martin Jambor <mjambor@suse.cz>
15976 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15977 static local variables.
15979 2018-02-08 Richard Biener <rguenther@suse.de>
15981 PR tree-optimization/84278
15982 * tree-vect-stmts.c (vectorizable_store): When looking for
15983 smaller vector types to perform grouped strided loads/stores
15984 make sure the mode is supported by the target.
15985 (vectorizable_load): Likewise.
15987 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15989 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15990 Increase LDP/STP opportunities by adding adjacent callee-saves.
15992 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15994 PR rtl-optimization/84068
15995 PR rtl-optimization/83459
15996 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15998 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16000 PR tree-optimization/84224
16001 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16002 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16003 non-zero arguments.
16005 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16008 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16009 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16010 count, remove one USE.
16012 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16014 * doc/install.texi (Configuration): Document the
16015 --with-long-double-format={ibm,ieee} PowerPC configuration
16019 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16020 Convert from define_expand to be define_insn_and_split. Rework
16021 float/double/_Float128 conversions to QI/HI/SImode to work with
16022 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16023 conversions to QI/HImode types did a store and then a load to
16024 truncate the value. For conversions to VSX registers, don't split
16025 the insn, instead emit the code directly. Use the code iterator
16026 any_fix to combine signed and unsigned conversions.
16027 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16028 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16029 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16030 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16031 (fix_<mode>di2_hw): Likewise.
16032 (fixuns_<mode>di2_hw): Likewise.
16033 (fix_<mode>si2_hw): Likewise.
16034 (fixuns_<mode>si2_hw): Likewise.
16035 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16036 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16037 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16038 fix<uns>_trunc<SFDF:mode>si2_p8.
16039 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16040 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16041 (fix<uns>_<mode>_mem): Likewise.
16042 (fctiw<u>z_<mode>_mem): Likewise.
16043 (fix<uns>_<mode>_mem): Likewise.
16044 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16045 the register allocator from doing a direct move to the GPRs to do
16046 a store, and instead use the ISA 3.0 store byte/half-word from
16047 vector register instruction. For IEEE 128-bit floating point,
16048 also optimize stores of 32-bit ints.
16049 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16051 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16053 * genextract.c (push_pathstr_operand): New function to support
16055 (walk_rtx): Call push_pathstr_operand.
16056 (print_path): Support [a-zA-Z].
16058 2018-02-07 Richard Biener <rguenther@suse.de>
16060 PR tree-optimization/84037
16061 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16062 (cse_and_gimplify_to_preheader): Declare.
16063 (vect_get_place_in_interleaving_chain): Likewise.
16064 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16066 (_loop_vec_info::~_loop_vec_info): Delete it.
16067 (cse_and_gimplify_to_preheader): New function.
16068 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16069 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16070 (vectorizable_load): Likewise. For grouped stores always base
16071 the IV on the first element.
16072 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16073 condition before gimplifying.
16075 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16077 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16078 *DIV_EXPR and *MOD_EXPR.
16080 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16083 * config/i386/i386.c (ix86_option_override_internal): Mask out
16084 the CF_SET bit when checking -fcf-protection.
16086 2018-02-07 Tom de Vries <tom@codesourcery.com>
16089 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16092 2018-02-07 Richard Biener <rguenther@suse.de>
16094 PR tree-optimization/84204
16095 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16098 PR tree-optimization/84205
16099 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16100 special-case isl_ast_op_zdiv_r.
16102 PR tree-optimization/84223
16103 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16104 Only add conditions from within the region.
16105 (gather_bbs::after_dom_children): Adjust.
16107 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16110 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16111 * config/avr/avr.md: Only post-reload split REG-REG moves if
16112 either register is GENERAL_REG_P.
16114 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16116 PR tree-optimization/84235
16117 * tree-ssa-scopedtables.c
16118 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16119 if the subtraction is performed in floating point type where NaNs are
16120 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16121 build 1. Formatting fix.
16123 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16126 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16127 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16128 and skip it regardless of bb boundaries. Use CALL_P macro,
16129 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16130 unnecessarily, formatting fix.
16132 2018-02-06 Michael Collison <michael.collison@arm.com>
16134 * config/arm/thumb2.md:
16135 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16136 (*thumb_mov_notscc): Ditto.
16138 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16141 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16142 unsigned_fix, not "s".
16144 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16146 * configure.ac (gcc_fn_eh_frame_ro): New function.
16147 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16148 correct .eh_frame permissions.
16149 * configure: Regenerate.
16151 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16153 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16154 irrelevant options.
16156 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16158 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16159 Display warning message for -mno-speculate-indirect-jumps.
16161 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16163 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16165 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16167 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16169 PR tree-optimization/84225
16170 * tree-eh.c (find_trapping_overflow): Only call
16171 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16173 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16176 * config/i386/i386.c: Reimplement the check of possible options
16177 -mibt/-mshstk conbination. Change error messages.
16178 * doc/invoke.texi: Fix a typo: remove extra '='.
16180 2018-02-06 Marek Polacek <polacek@redhat.com>
16182 PR tree-optimization/84228
16183 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16185 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16188 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16189 emitted arch directives.
16190 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16191 __ARM_FEATURE_COPROC before changing architectures.
16193 2018-02-06 Richard Biener <rguenther@suse.de>
16195 * config/i386/i386.c (print_reg): Fix typo.
16196 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16198 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16200 * configure: Regenerate.
16202 2018-02-05 Martin Sebor <msebor@redhat.com>
16204 PR tree-optimization/83369
16205 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16208 2018-02-05 Martin Liska <mliska@suse.cz>
16210 * doc/invoke.texi: Cherry-pick upstream r323995.
16212 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16214 * ira.c (ira_init_register_move_cost): Adjust comment.
16216 2018-02-05 Martin Liska <mliska@suse.cz>
16218 PR gcov-profile/84137
16219 * doc/gcov.texi: Fix typo in documentation.
16221 2018-02-05 Martin Liska <mliska@suse.cz>
16223 PR gcov-profile/83879
16224 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16225 using dlopen functionality.
16227 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16229 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16230 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16231 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16232 _mm_maskz_range_round_ss): New intrinsics.
16233 (__builtin_ia32_rangesd128_round)
16234 (__builtin_ia32_rangess128_round): Remove.
16235 (__builtin_ia32_rangesd128_mask_round,
16236 __builtin_ia32_rangess128_mask_round): New builtins.
16237 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16238 __builtin_ia32_rangess128_round): Remove.
16239 (__builtin_ia32_rangesd128_mask_round,
16240 __builtin_ia32_rangess128_mask_round): New builtins.
16241 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16242 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16243 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16244 "<round_saeonly_constraint>")): Changed to ...
16245 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16246 "<round_saeonly_scalar_constraint>")): ... this.
16247 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16248 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16249 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16250 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16251 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16253 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16255 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16257 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16258 Remove all values except native, 8540 and 8548.
16260 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16262 * config/i386/i386.c (ix86_output_function_return): Pass
16263 INVALID_REGNUM, instead of -1, as invalid register number to
16264 indirect_thunk_name and output_indirect_thunk.
16266 2018-02-02 Julia Koval <julia.koval@intel.com>
16268 * config.gcc: Add -march=icelake.
16269 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16270 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16271 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16272 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16273 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16274 (processor_target_table): Add icelake.
16275 (ix86_option_override_internal): Handle new PTAs.
16276 (get_builtin_code_for_version): Handle icelake.
16277 (M_INTEL_COREI7_ICELAKE): New.
16278 (fold_builtin_cpu): Handle icelake.
16279 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16280 * doc/invoke.texi: Add -march=icelake.
16282 2018-02-02 Julia Koval <julia.koval@intel.com>
16284 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16285 to wide_int_bitmask.
16286 * wide-int-bitmask.h: New.
16288 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16291 * config/i386/i386.md: Replace Pmode with word_mode in
16292 builtin_setjmp_setup and builtin_longjmp to support x32.
16294 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16298 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16300 (rs6000_supported_cpu_names): New static variable.
16301 (linux_cpu_translation_table): Likewise.
16302 (elf_platform) <cpu>: Define new static variable and use it.
16303 Translate kernel AT_PLATFORM name to canonical name if needed.
16304 Error if platform name is unknown.
16306 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16309 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16311 2018-02-01 Jeff Law <law@redhat.com>
16314 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16315 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16316 the scratch if RELEASE_VIA_POP is false.
16317 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16318 If we have to save a temporary register, decrement SIZE appropriately.
16319 Pass new arguments to release_scratch_register_on_entry.
16320 (ix86_adjust_stack_and_probe): Likewise.
16321 (ix86_emit_probe_stack_range): Pass new arguments to
16322 release_scratch_register_on_entry.
16324 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16326 PR rtl-optimization/84157
16327 * combine.c (change_zero_ext): Use REG_P predicate in
16328 front of HARD_REGISTER_P predicate.
16330 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16332 * config/avr/avr.c (avr_option_override): Move disabling of
16333 -fdelete-null-pointer-checks to...
16334 * common/config/avr/avr-common.c (avr_option_optimization_table):
16337 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16339 PR tree-optimization/81635
16340 * tree-data-ref.c (split_constant_offset_1): For types that
16341 wrap on overflow, try to use range info to prove that wrapping
16344 2018-02-01 Renlin Li <renlin.li@arm.com>
16347 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16348 TAILCALL_ADDR_REGS.
16349 (aarch64_register_move_cost): Likewise.
16350 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16351 TAILCALL_ADDR_REGS.
16352 (REG_CLASS_NAMES): Likewise.
16353 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16354 TAILCALL_ADDR_REGS. Remove IP registers.
16355 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16357 2018-02-01 Richard Biener <rguenther@suse.de>
16359 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16360 for specifying RPO order and allow NULL for that.
16361 * domwalk.c (dom_walker::dom_walker): Likewise.
16362 (dom_walker::walk): Handle NULL RPO order.
16363 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16365 (rewrite_update_dom_walker): Likewise.
16366 (mark_def_dom_walker): Likewise.
16368 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16370 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16371 (aarch64_maybe_expand_sve_subreg_move): Declare.
16372 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16373 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16375 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16376 that are semantically a reverse operation.
16377 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16378 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16379 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16381 (aarch64_can_change_mode_class): For big-endian, forbid changes
16382 between two SVE modes if they have different element sizes.
16384 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16386 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16387 the TImode handling for big-endian targets.
16389 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16391 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16392 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16394 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16395 Remove BSWAP handing for big-endian targets and use the form of
16396 LD1RQ appropariate for the mode.
16398 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16400 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16401 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16402 duplicated element.
16404 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16407 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16408 check for operands that need to go through aarch64_sve_reload_be.
16410 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16412 PR tree-optimization/81661
16413 PR tree-optimization/84117
16414 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16415 * tree-eh.c: Include gimplify.h.
16416 (find_trapping_overflow, replace_trapping_overflow,
16417 rewrite_to_non_trapping_overflow): New functions.
16418 * tree-vect-loop.c: Include tree-eh.h.
16419 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16420 * tree-data-ref.c: Include tree-eh.h.
16421 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16423 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16425 PR rtl-optimization/84123
16426 * combine.c (change_zero_ext): Check if hard register satisfies
16427 can_change_dest_mode before calling gen_lowpart_SUBREG.
16429 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16432 * ira.c (ira_init_register_move_cost): Remove assert.
16434 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16436 PR rtl-optimization/84071
16437 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16438 * doc/tm.texi: Regenerate.
16440 2018-01-31 Richard Biener <rguenther@suse.de>
16442 PR tree-optimization/84132
16443 * tree-data-ref.c (analyze_miv_subscript): Properly
16444 check whether evolution_function_is_affine_multivariate_p
16445 before calling gcd_of_steps_may_divide_p.
16447 2018-01-31 Julia Koval <julia.koval@intel.com>
16450 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16451 * config/i386/i386.md (rdpid_rex64) New.
16452 (rdpid): Make 32bit only.
16454 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16457 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16458 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16460 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16463 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16465 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16467 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16469 PR rtl-optimization/84071
16470 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16471 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16473 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16475 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16476 (arc_attribute_table): Add 'aux' attribute.
16477 (arc_in_small_data_p): Consider aux like variables.
16478 (arc_is_aux_reg_p): New function.
16479 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16480 (arc_get_aux_arg): New function.
16481 (prepare_move_operands): Handle aux-register access.
16482 (arc_handle_aux_attribute): New function.
16483 * doc/extend.texi (ARC Variable attributes): Add subsection.
16485 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16487 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16488 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16489 (arc_attribute_table): Add 'uncached' attribute.
16490 (arc_print_operand): Print '.di' flag for uncached memory
16492 (arc_in_small_data_p): Do not consider for small data the uncached
16494 (arc_is_uncached_mem_p): New function.
16495 * config/arc/predicates.md (compact_store_memory_operand): Check
16496 for uncached memory accesses.
16497 (nonvol_nonimm_operand): Likewise.
16498 * doc/extend.texi (ARC Type Attribute): New subsection.
16500 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16503 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16504 falign-loops=): Add Optimization flag.
16506 2018-01-30 Jeff Law <law@redhat.com>
16509 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16510 INT_REGISTERS_SAVED. Check it prior to calling
16511 get_scratch_register_on_entry.
16512 (ix86_adjust_stack_and_probe): Similarly.
16513 (ix86_emit_probe_stack_range): Similarly.
16514 (ix86_expand_prologue): Corresponding changes.
16516 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16519 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16520 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16522 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16525 * lra-constraints.c (curr_insn_transform): Process AND in the
16528 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16530 PR rtl-optimization/83986
16531 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16532 dependence against last_pending_memory_flush in addition to
16533 pending_jump_insns.
16535 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16537 PR tree-optimization/81611
16538 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16541 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16544 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16547 2018-01-30 Richard Biener <rguenther@suse.de>
16548 Jakub Jelinek <jakub@redhat.com>
16550 PR tree-optimization/84111
16551 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16552 inner loops added during recursion, as they don't have up-to-date
16555 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16558 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16559 (can_inline_edge_by_limits_p): ... here.
16560 (can_early_inline_edge_p, check_callers,
16561 update_caller_keys, update_callee_keys, recursive_inlining,
16562 add_new_edges_to_heap, speculation_useful_p,
16563 inline_small_functions,
16564 inline_small_functions, flatten_function,
16565 inline_to_all_callers_1): Update.
16567 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16569 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16572 2018-01-30 Richard Biener <rguenther@suse.de>
16574 PR tree-optimization/83008
16575 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16576 invariant and constant vector uses in stmts when they need
16577 more than one stmt.
16579 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16582 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16583 * configure: Regenerate.
16585 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16587 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16589 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16590 Use gen_rtx_REG rather than gen_lowpart.
16592 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16594 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16595 rather than 0 when creating partial subregs.
16597 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16599 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16602 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16605 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16606 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16607 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16608 flags. This restores the settings used before the 2017-07-24.
16609 Turning off pre increment/decrement/modify allows IVOPTS to
16610 optimize DF/SF loops where the index is an int.
16612 2018-01-29 Richard Biener <rguenther@suse.de>
16613 Kelvin Nilsen <kelvin@gcc.gnu.org>
16616 * tree-vect-stmts.c (vectorizable_call): Don't call
16617 targetm.vectorize_builtin_md_vectorized_function if callee is
16620 2018-01-22 Carl Love <cel@us.ibm.com>
16622 * doc/extend.tex: Fix typo in second arg in
16623 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16625 2018-01-29 Richard Biener <rguenther@suse.de>
16627 PR tree-optimization/84086
16628 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16629 (flush_ssaname_freelist): When SSA names were released reset
16630 the SCEV hash table.
16632 2018-01-29 Richard Biener <rguenther@suse.de>
16634 PR tree-optimization/84057
16635 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16636 removed paths when removing edges.
16638 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16640 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16641 -mfunction-return=@var{choice}.
16643 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16645 PR diagnostic/84034
16646 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16647 Handle CR like TAB.
16648 (layout::print_source_line): Likewise.
16649 (test_get_line_width_without_trailing_whitespace): Add test cases.
16651 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16653 PR middle-end/84040
16654 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16657 2018-01-26 Jim Wilson <jimw@sifive.com>
16659 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16661 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16664 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16666 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16667 and CMP + SUB-immediate -> SUBS.
16669 2018-01-26 Martin Sebor <msebor@redhat.com>
16671 PR tree-optimization/83896
16672 * tree-ssa-strlen.c (get_string_len): Rename...
16673 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16674 Avoid assuming length is constant.
16675 (handle_char_store): Use HOST_WIDE_INT for string length.
16677 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16680 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16681 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16683 2018-01-26 Richard Biener <rguenther@suse.de>
16685 PR rtl-optimization/84003
16686 * dse.c (record_store): Only record redundant stores when
16687 the earlier store aliases at least all accesses the later one does.
16689 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16691 PR rtl-optimization/83985
16692 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16693 REG_CFA_RESTORE insns.
16694 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16695 REG_CFA_RESTORE insns here.
16698 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16699 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16701 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16703 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16704 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16705 (arc_init): Likewise.
16706 (arc_override_options): Likewise.
16707 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16709 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16711 * config/arc/arc.h (TARGET_DBNZ): Define.
16712 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16713 properly set the tune attribute.
16714 (dbnz): Use TARGET_DBNZ guard.
16715 * config/arc/arc.opt (mtune): Add core3 option.
16717 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16719 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16720 recognize new pic like addresses.
16721 (arc_delegitimize_address): Clean up.
16723 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16725 * config/arc/arc-arches.def: Option mrf16 valid for all
16727 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16728 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16729 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16730 * config/arc/arc-tables.opt: Regenerate.
16731 * config/arc/arc.c (arc_conditional_register_usage): Handle
16732 reduced register file case.
16733 (arc_file_start): Set must have build attributes.
16734 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16735 mrf16 option value.
16736 * config/arc/arc.opt (mrf16): Add new option.
16737 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16738 * config/arc/genmultilib.awk: Handle new mrf16 option.
16739 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16740 * config/arc/t-multilib: Regenerate.
16741 * doc/invoke.texi (ARC Options): Document mrf16 option.
16743 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16745 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16746 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16747 (arc_attribute_table): Add 'secure_call' attribute.
16748 (arc_print_operand): Print secure call operand.
16749 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16751 (arc_is_secure_call_p): New function. * config/arc/arc.md
16752 (call_i): Add support for sjli instruction.
16753 (call_value_i): Likewise.
16754 * config/arc/constraints.md (Csc): New constraint.
16756 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16757 John Eric Martin <John.Martin@emmicro-us.com>
16759 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16760 * config/arc/arc.c (_arc_jli_section): New struct.
16761 (arc_jli_section): New type.
16762 (rc_jli_sections): New static variable.
16763 (arc_handle_jli_attribute): New function.
16764 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16765 (arc_file_end): New function.
16766 (TARGET_ASM_FILE_END): Define.
16767 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16768 (arc_add_jli_section): New function.
16769 (jli_call_scan): Likewise.
16770 (arc_reorg): Call jli_call_scan.
16771 (arc_output_addsi): Remove 'S' from printing asm operand.
16772 (arc_is_jli_call_p): New function.
16773 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16775 (movhi_insn): Likewise.
16776 (movsi_insn): Likewise.
16777 (movsi_set_cc_insn): Likewise.
16778 (loadqi_update): Likewise.
16779 (load_zeroextendqisi_update): Likewise.
16780 (load_signextendqisi_update): Likewise.
16781 (loadhi_update): Likewise.
16782 (load_zeroextendhisi_update): Likewise.
16783 (load_signextendhisi_update): Likewise.
16784 (loadsi_update): Likewise.
16785 (loadsf_update): Likewise.
16786 (movsicc_insn): Likewise.
16787 (bset_insn): Likewise.
16788 (bxor_insn): Likewise.
16789 (bclr_insn): Likewise.
16790 (bmsk_insn): Likewise.
16791 (bicsi3_insn): Likewise.
16792 (cmpsi_cc_c_insn): Likewise.
16793 (movsi_ne): Likewise.
16794 (movsi_cond_exec): Likewise.
16795 (clrsbsi2): Likewise.
16796 (norm_f): Likewise.
16806 (call_i): Remove 'S' asm letter, add jli instruction.
16807 (call_value_i): Likewise.
16808 * config/arc/arc.op (mjli-always): New option.
16809 * config/arc/constraints.md (Cji): New constraint.
16810 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16812 (subsf3_fpx): Likewise.
16813 (mulsf3_fpx): Likewise.
16814 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16816 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16817 function attrbutes.
16818 * doc/invoke.texi (ARC): Document mjli-always option.
16820 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16822 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16823 avoid addition with 0 and use incw and decw where possible.
16825 2018-01-26 Richard Biener <rguenther@suse.de>
16827 PR tree-optimization/81082
16828 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16829 association if it requires casting to unsigned.
16830 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16831 from fold_plusminus_mult_expr to catch important cases late when
16832 range info is available.
16834 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16836 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16837 * configure.ac (hidden_linkonce): New test.
16838 * configure: Regenerate.
16839 * config.in: Regenerate.
16841 2018-01-26 Julia Koval <julia.koval@intel.com>
16843 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16844 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16845 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16846 _mm_mask_bitshuffle_epi64_mask): Fix type.
16847 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16848 USI_FTYPE_V4DI_V4DI_USI): Remove.
16849 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16850 __builtin_ia32_vpshufbitqmb256_mask,
16851 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16852 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16853 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16855 2018-01-26 Alan Modra <amodra@gmail.com>
16858 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16859 UNSPEC_VBPERMQ. Sort other unspecs.
16861 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16863 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16865 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16867 PR middle-end/83055
16868 * predict.c (drop_profile): Do not push/pop cfun; update also
16870 (handle_missing_profiles): Fix logic looking for zero profiles.
16872 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16874 PR middle-end/83977
16875 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16876 on functions with #pragma omp declare simd or functions with simd
16878 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16879 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16880 Remove trailing \n from warning_at calls.
16882 2018-01-25 Tom de Vries <tom@codesourcery.com>
16885 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16886 for neutered workers.
16888 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16891 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16892 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16894 2018-01-24 Jeff Law <law@redhat.com>
16897 * i386.c (get_probe_interval): Move to earlier point.
16898 (ix86_compute_frame_layout): If -fstack-clash-protection and
16899 the frame is larger than the probe interval, then use pushes
16900 to save registers rather than reg->mem moves.
16901 (ix86_expand_prologue): Remove conditional for int_registers_saved
16904 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16907 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16908 min/max for never referenced object.
16910 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16912 PR middle-end/83977
16913 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16915 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16916 attributes from DECL_ATTRIBUTES (decl) without affecting
16917 DECL_ATTRIBUTES (current_function_decl).
16918 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16919 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16921 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16923 PR tree-optimization/83979
16924 * fold-const.c (fold_comparison): Use constant_boolean_node
16925 instead of boolean_{true,false}_node.
16927 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16929 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16932 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16934 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16935 Simplify the clause that sets the length attribute.
16936 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16937 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16938 clause that sets the length attribute.
16939 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16941 2018-01-24 Tom de Vries <tom@codesourcery.com>
16944 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16945 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16946 Add strict parameter.
16947 (prevent_branch_around_nothing): Insert dummy insn between branch to
16948 label and label with no ptx insn inbetween.
16949 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16951 2018-01-24 Tom de Vries <tom@codesourcery.com>
16954 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16955 for neutered threads in warp.
16956 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16958 2018-01-24 Richard Biener <rguenther@suse.de>
16960 PR tree-optimization/83176
16961 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16964 2018-01-24 Richard Biener <rguenther@suse.de>
16966 PR tree-optimization/82819
16967 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16968 code generating pluses that are no-ops in the target precision.
16970 2018-01-24 Richard Biener <rguenther@suse.de>
16972 PR middle-end/84000
16973 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16975 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16977 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16978 to merge probabilities.
16979 * predict.c (probably_never_executed): Also mark as cold functions
16980 with global 0 profile and guessed local profile.
16981 * profile-count.c (profile_probability::combine_with_count): New
16983 * profile-count.h (profile_probability::operator*,
16984 profile_probability::operator*=, profile_probability::operator/,
16985 profile_probability::operator/=): Reduce precision to adjusted
16986 and set value to guessed on contradictory divisions.
16987 (profile_probability::combine_with_freq): Remove.
16988 (profile_probability::combine_wiht_count): Declare.
16989 (profile_count::force_nonzero):: Set to adjusted.
16990 (profile_count::probability_in):: Set quality to adjusted.
16991 * tree-ssa-tail-merge.c (replace_block_by): Use
16992 combine_with_count.
16994 2018-01-23 Andrew Waterman <andrew@sifive.com>
16995 Jim Wilson <jimw@sifive.com>
16997 * config/riscv/riscv.c (riscv_stack_boundary): New.
16998 (riscv_option_override): Set riscv_stack_boundary. Handle
16999 riscv_preferred_stack_boundary_arg.
17000 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17001 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17002 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17003 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17004 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17005 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17007 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17010 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17011 of struct ix86_frame.
17012 (ix86_expand_epilogue): Likewise. Add a local variable for
17013 the reg_save_offset field in struct ix86_frame.
17015 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17017 PR tree-optimization/82604
17018 * tree-loop-distribution.c (enum partition_kind): New enum item
17019 PKIND_PARTIAL_MEMSET.
17020 (partition_builtin_p): Support above new enum item.
17021 (generate_code_for_partition): Ditto.
17022 (compute_access_range): Differentiate cases that equality can be
17023 proven at all loops, the innermost loops or no loops.
17024 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17025 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17026 (finalize_partitions, distribute_loop): Don't fuse partition of
17027 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17028 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17029 parloop is enabled.
17031 2018-01-23 Martin Liska <mliska@suse.cz>
17033 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17034 order to ignore the predictor.
17035 (PRED_POLYMORPHIC_CALL): Likewise.
17036 (PRED_RECURSIVE_CALL): Likewise.
17038 2018-01-23 Martin Liska <mliska@suse.cz>
17040 * tree-profile.c (tree_profiling): Print function header to
17041 aware reader which function we are working on.
17042 * value-prof.c (gimple_find_values_to_profile): Do not print
17043 not interesting value histograms.
17045 2018-01-23 Martin Liska <mliska@suse.cz>
17047 * profile-count.h (enum profile_quality): Add
17048 profile_uninitialized as the first value. Do not number values
17049 as they are zero based.
17050 (profile_count::verify): Update sanity check.
17051 (profile_probability::verify): Likewise.
17053 2018-01-23 Nathan Sidwell <nathan@acm.org>
17055 * doc/invoke.texi (ffor-scope): Deprecate.
17057 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17059 PR tree-optimization/83510
17060 * domwalk.c (set_all_edges_as_executable): New function.
17061 (dom_walker::dom_walker): Convert bool param
17062 "skip_unreachable_blocks" to enum reachability. Move setup of
17063 edge flags to set_all_edges_as_executable and only do it when
17064 reachability is REACHABLE_BLOCKS.
17065 * domwalk.h (enum dom_walker::reachability): New enum.
17066 (dom_walker::dom_walker): Convert bool param
17067 "skip_unreachable_blocks" to enum reachability.
17068 (set_all_edges_as_executable): New decl.
17069 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17070 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17072 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17073 but converting true to REACHABLE_BLOCKS.
17074 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17076 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17077 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17078 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17080 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17081 if check_all_array_refs will be called.
17083 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17085 * tree.c (selftest::test_location_wrappers): Add more test
17088 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17090 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17091 (selftest::test_bit_in_range): Likewise.
17093 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17096 * doc/sourcebuild.texi (vect_float): Say that the selector
17097 only describes the situation when -funsafe-math-optimizations is on.
17098 (vect_float_strict): Document.
17100 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17102 PR tree-optimization/83965
17103 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17104 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17105 instead of checking only for a reduction.
17106 (vect_recog_widen_sum_pattern): Likewise.
17108 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17110 * predict.c (probably_never_executed): Only use precise profile info.
17111 (compute_function_frequency): Skip after inlining hack since we now
17112 have quality checking.
17114 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17116 * profile-count.h (profile_probability::very_unlikely,
17117 profile_probability::unlikely, profile_probability::even): Set
17118 precision to guessed.
17120 2018-01-23 Richard Biener <rguenther@suse.de>
17122 PR tree-optimization/83963
17123 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17124 Properly terminate dominator walk when crossing the exit edge not
17125 when visiting its source block.
17127 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17130 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17131 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17133 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17135 PR tree-optimization/83957
17136 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17137 semicolon after for body surrounded by braces.
17139 PR tree-optimization/83081
17140 * profile-count.h (profile_probability::split): New method.
17141 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17142 Use profile_probability::split.
17143 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17144 when splitting a single conditional jump into 2.
17146 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17148 PR tree-optimization/69452
17149 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17152 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17154 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17155 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17156 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17158 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17160 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17162 * config/rl78/rl78.md (movdi): New define_expand.
17163 * config/rl78/rl78.c (rl78_split_movdi): New function.
17165 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17168 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17170 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17171 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17172 128-bit to produce an UNSPEC move to get the double word with the
17173 signbit and then a shift directly to do signbit.
17174 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17175 implementation with a new version that just does either a direct
17176 move or a regular move. Move memory interface to separate insns.
17177 Move insns so they are next to the expander.
17178 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17179 with signbit move. Split big and little endian case.
17180 (signbit<mode>2_dm_mem_le): Likewise.
17181 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17182 (signbit<mode>2_dm2): Likewise.
17184 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17186 * config/rl78/rl78.md (anddi3): New define_expand.
17188 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17190 * config/rl78/rl78.md (umindi3): New define_expand.
17192 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17194 * config/rl78/rl78.md (smindi3): New define_expand.
17196 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17198 * config/rl78/rl78.md (smaxdi3): New define_expand.
17200 2018-01-22 Carl Love <cel@us.ibm.com>
17202 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17203 LVX_V1TI): Add macro expansion.
17204 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17205 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17206 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17207 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17208 Change check to determine if the instruction is a byte reversing
17209 entry. Fix typo in comment.
17210 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17211 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17212 Add def_builtin calls for new builtins.
17213 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17214 Add define_insn expansion.
17216 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17218 * config/rl78/rl78.md (umaxdi3): New define_expand.
17220 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17222 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17223 for non-QImode registers.
17225 2018-01-22 Richard Biener <rguenther@suse.de>
17227 PR tree-optimization/83963
17228 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17229 including the loop exit block.
17230 (scop_detection::merge_sese): Likewise.
17231 (scop_detection::add_scop): Do it here instead.
17233 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17235 * doc/sourcebuild.texi (arm_softfloat): Document.
17237 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17240 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17241 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17242 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17244 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17245 David Edelsohn <dje.gcc@gmail.com>
17248 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17249 Change "crset eq" to "crset 2".
17250 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17251 (*call_indirect_aix<mode>_nospec): Likewise.
17252 (*call_value_indirect_aix<mode>_nospec): Likewise.
17253 (*call_indirect_elfv2<mode>_nospec): Likewise.
17254 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17255 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17256 change assembly output from . to $.
17257 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17258 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17259 (*tablejump<mode>_internal1_nospec): Likewise.
17261 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17264 * config/sh/sh_optimize_sett_clrt.cc:
17265 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17267 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17269 PR tree-optimization/83940
17270 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17271 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17272 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17273 use it to pass back the definition type.
17274 (vect_check_store_rhs): Likewise rhs_dt_out.
17275 (vect_build_gather_load_calls): Add a mask_dt argument and use
17276 it instead of a call to vect_is_simple_use.
17277 (vectorizable_store): Update calls to vect_check_load_store_mask
17278 and vect_check_store_rhs. Use the dt returned by the latter instead
17279 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17280 instead of calls to vect_is_simple_use. Pass the scalar rather
17281 than the vector operand to vect_is_simple_use when handling
17282 second and subsequent copies of an rhs value.
17283 (vectorizable_load): Update calls to vect_check_load_store_mask
17284 and vect_build_gather_load_calls. Use the cached mask_dt and
17285 gs_info.offset_dt instead of calls to vect_is_simple_use.
17287 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17289 PR middle-end/83945
17290 * tree-emutls.c: Include gimplify.h.
17291 (lower_emutls_2): New function.
17292 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17293 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17294 it before further processing.
17297 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17298 UINTVAL (trueop1) instead of INTVAL (op1).
17300 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17304 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17305 INCOMING_FRAME_SP_OFFSET if not defined.
17306 (scan_trace): Add ENTRY argument. If true and
17307 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17308 emit a note to adjust the CFA offset.
17309 (create_cfi_notes): Adjust scan_trace callers.
17310 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17311 INCOMING_FRAME_SP_OFFSET in the CIE.
17312 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17313 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17315 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17316 * doc/tm.texi: Regenerated.
17318 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17320 PR rtl-optimization/83147
17321 * lra-constraints.c (remove_inheritance_pseudos): Use
17322 lra_substitute_pseudo_within_insn.
17324 2018-01-19 Tom de Vries <tom@codesourcery.com>
17325 Cesar Philippidis <cesar@codesourcery.com>
17328 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17330 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17333 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17334 spaces for function labels.
17336 2018-01-19 Martin Liska <mliska@suse.cz>
17338 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17339 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17340 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17341 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17342 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17343 (PRED_CONST_RETURN): Change from 69 to 65.
17344 (PRED_NULL_RETURN): Change from 91 to 71.
17345 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17346 (PRED_LOOP_GUARD): Change from 66 to 73.
17348 2018-01-19 Martin Liska <mliska@suse.cz>
17350 * predict.c (predict_insn_def): Add new assert.
17351 (struct branch_predictor): Change type to signed integer.
17352 (test_prediction_value_range): Amend test to cover
17353 PROB_UNINITIALIZED.
17354 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17355 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17356 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17357 (PRED_LOOP_IV_COMPARE): Likewise.
17358 * predict.h (PROB_UNINITIALIZED): Define new constant.
17360 2018-01-19 Martin Liska <mliska@suse.cz>
17362 * predict.c (dump_prediction): Add new format for
17363 analyze_brprob.py script which is enabled with -details
17365 * profile-count.h (precise_p): New function.
17367 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17369 PR tree-optimization/83922
17370 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17371 there are no statements that need masking.
17372 (vect_active_double_reduction_p): New function.
17373 (vect_analyze_loop_operations): Use it when handling phis that
17374 are not in the loop header.
17376 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17378 PR tree-optimization/83914
17379 * tree-vect-loop.c (vectorizable_induction): Don't convert
17380 init_expr or apply the peeling adjustment for inductions
17381 that are nested within the vectorized loop.
17383 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17385 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17388 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17392 * function.h (gimplify_parameters): Add gimple_seq * argument.
17393 * function.c: Include gimple.h and options.h.
17394 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17395 for the added local temporaries if needed.
17396 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17397 if there are any parameter cleanups, wrap whole body into a
17398 try/finally with the cleanups.
17400 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17403 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17404 Use GET_MODE_CLASS for scalar floating point.
17406 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17410 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17411 Fix call of call_cgraph_insertion_hooks.
17413 2018-01-18 Martin Sebor <msebor@redhat.com>
17415 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17417 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17420 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17423 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17426 * common.opt: (-ffile-prefix-map): New option.
17427 * opts.c (common_handle_option): Defer it.
17428 * opts-global.c (handle_common_deferred_options): Handle it.
17429 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17430 * file-prefix-map.h: New file.
17431 (remap_debug_filename, add_debug_prefix_map): ...here.
17432 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17433 * final.c (debug_prefix_map, add_debug_prefix_map
17434 remap_debug_filename): Move to...
17435 * file-prefix-map.c: New file.
17436 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17437 generalize, get rid of alloca(), use strrchr() instead of strchr().
17438 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17439 Implement in terms of add_prefix_map().
17440 (remap_macro_filename, remap_debug_filename): Implement in term of
17442 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17443 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17444 * dbxout.c: Include file-prefix-map.h.
17445 * varasm.c: Likewise.
17446 * vmsdbgout.c: Likewise.
17447 * xcoffout.c: Likewise.
17448 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17449 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17450 * doc/invoke.texi (-ffile-prefix-map): Document.
17451 (-fdebug-prefix-map): Update description.
17453 2018-01-18 Martin Liska <mliska@suse.cz>
17455 * config/i386/i386.c (indirect_thunk_name): Document that also
17457 (output_indirect_thunk): Document why both instructions
17458 (pause and lfence) are generated.
17460 2018-01-18 Richard Biener <rguenther@suse.de>
17462 PR tree-optimization/83887
17463 * graphite-scop-detection.c
17464 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17465 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17466 (scop_detection::merge_sese): Re-implement with a flood-fill
17467 algorithm that properly finds a SESE region if it exists.
17469 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17472 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17473 pointer_diff optimizations use view_convert instead of convert.
17475 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17477 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17478 Generate different code for -mno-speculate-indirect-jumps.
17479 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17480 (*call_indirect_aix<mode>): Disable for
17481 -mno-speculate-indirect-jumps.
17482 (*call_indirect_aix<mode>_nospec): New define_insn.
17483 (*call_value_indirect_aix<mode>): Disable for
17484 -mno-speculate-indirect-jumps.
17485 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17486 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17487 -mno-speculate-indirect-jumps.
17488 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17490 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17492 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17493 long double type, set the flags for noting the default long double
17494 type, even if we don't pass or return a long double type.
17496 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17499 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17502 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17504 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17505 support for merge[hl].
17506 (fold_mergehl_helper): New helper function.
17507 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17508 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17509 (altivec_vmrglw_direct): Add xxmrglw insn.
17511 2018-01-17 Andrew Waterman <andrew@sifive.com>
17513 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17514 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17516 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17519 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17520 call the lto_location_cache before reading the
17521 DECL_SOURCE_LOCATION of the types.
17523 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17524 Richard Sandiford <richard.sandiford@linaro.org>
17526 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17527 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17528 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17529 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17530 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17532 * config/aarch64/constraints.md (aarch64_movti_operand):
17534 * config/aarch64/predicates.md (Uti): Add new constraint.
17536 2018-01-17 Carl Love <cel@us.ibm.com>
17538 * config/rs6000/vsx.md (define_expand xl_len_r,
17539 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17540 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17542 (define_expand, define_insn): Move the shift left from the
17543 define_insn to the define_expand for lxvl and stxvl instructions.
17544 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17545 and XL_LEN_R definitions to PURE.
17547 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17549 * config/i386/i386.c (indirect_thunk_name): Declare regno
17550 as unsigned int. Compare regno with INVALID_REGNUM.
17551 (output_indirect_thunk): Ditto.
17552 (output_indirect_thunk_function): Ditto.
17553 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17554 in the call to output_indirect_thunk_function.
17556 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17558 PR middle-end/83884
17559 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17560 rather than the size of inner_type to determine the stack slot size
17561 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17563 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17566 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17569 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17571 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17572 endian Linux systems to optionally enable multilibs for selecting
17573 the long double type if the user configured an explicit type.
17574 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17575 have no long double multilibs if not defined.
17576 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17577 warn if the user used -mabi={ieee,ibm}longdouble and we built
17578 multilibs for long double.
17579 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17580 appropriate multilib option.
17581 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17583 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17584 for building long double multilibs.
17585 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17587 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17589 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17592 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17594 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17597 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17600 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17603 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17605 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17606 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17608 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17610 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17611 different rtl trees depending on TARGET_64BIT.
17612 (rs6000_gen_lvx): Likewise.
17614 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17616 * config/visium/visium.md (nop): Tweak comment.
17617 (hazard_nop): Likewise.
17619 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17621 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17622 -mspeculate-indirect-jumps.
17623 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17624 for -mno-speculate-indirect-jumps.
17625 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17626 (*call_value_indirect_elfv2<mode>): Disable for
17627 -mno-speculate-indirect-jumps.
17628 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17629 (indirect_jump): Emit different RTL for
17630 -mno-speculate-indirect-jumps.
17631 (*indirect_jump<mode>): Disable for
17632 -mno-speculate-indirect-jumps.
17633 (*indirect_jump<mode>_nospec): New define_insn.
17634 (tablejump): Emit different RTL for
17635 -mno-speculate-indirect-jumps.
17636 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17637 (tablejumpsi_nospec): New define_expand.
17638 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17639 (tablejumpdi_nospec): New define_expand.
17640 (*tablejump<mode>_internal1): Disable for
17641 -mno-speculate-indirect-jumps.
17642 (*tablejump<mode>_internal1_nospec): New define_insn.
17643 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17646 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17648 * caller-save.c (insert_save): Drop unnecessary parameter. All
17651 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17652 Richard Biener <rguenth@suse.de>
17655 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17656 return early, inline manually is_gimple_sizepos. Make sure if we
17657 call gimplify_expr we don't end up with a gimple constant.
17658 * tree.c (variably_modified_type_p): Don't return true for
17659 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17660 * gimplify.h (is_gimple_sizepos): Remove.
17662 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17664 PR tree-optimization/83857
17665 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17666 vectorizable_live_operation for pure SLP statements.
17667 (vectorizable_live_operation): Handle PHIs.
17669 2018-01-16 Richard Biener <rguenther@suse.de>
17671 PR tree-optimization/83867
17672 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17673 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17675 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17678 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17679 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17680 If off is not INTEGER_CST, issue a may not be aligned warning
17681 rather than isn't aligned. Use isn%'t rather than isn't.
17682 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17684 <case MULT_EXPR>: Improve the case when bottom and one of the
17685 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17686 operand, in that case check if the other operand is multiple of
17687 bottom divided by the INTEGER_CST operand.
17689 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17692 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17693 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17694 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17695 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17696 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17697 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17698 (pa_function_arg_size): New function.
17700 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17702 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17703 in a separate statement.
17705 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17707 PR tree-optimization/83847
17708 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17709 group gathers and scatters.
17711 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17713 PR rtl-optimization/86620
17714 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17716 PR rtl-optimization/83213
17717 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17718 to last if both are JUMP_INSNs.
17720 PR tree-optimization/83843
17721 * gimple-ssa-store-merging.c
17722 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17723 store_immediate_info for bswap/nop orig_stores.
17725 2018-01-15 Andrew Waterman <andrew@sifive.com>
17727 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17729 <UDIV>: Increase cost if !TARGET_DIV.
17731 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17733 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17734 (define_attr "cr_logical_3op"): New.
17735 (cceq_ior_compare): Adjust.
17736 (cceq_ior_compare_complement): Adjust.
17737 (*cceq_rev_compare): Adjust.
17738 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17739 (is_cracked_insn): Adjust.
17740 (insn_must_be_first_in_group): Adjust.
17741 * config/rs6000/40x.md: Adjust.
17742 * config/rs6000/440.md: Adjust.
17743 * config/rs6000/476.md: Adjust.
17744 * config/rs6000/601.md: Adjust.
17745 * config/rs6000/603.md: Adjust.
17746 * config/rs6000/6xx.md: Adjust.
17747 * config/rs6000/7450.md: Adjust.
17748 * config/rs6000/7xx.md: Adjust.
17749 * config/rs6000/8540.md: Adjust.
17750 * config/rs6000/cell.md: Adjust.
17751 * config/rs6000/e300c2c3.md: Adjust.
17752 * config/rs6000/e500mc.md: Adjust.
17753 * config/rs6000/e500mc64.md: Adjust.
17754 * config/rs6000/e5500.md: Adjust.
17755 * config/rs6000/e6500.md: Adjust.
17756 * config/rs6000/mpc.md: Adjust.
17757 * config/rs6000/power4.md: Adjust.
17758 * config/rs6000/power5.md: Adjust.
17759 * config/rs6000/power6.md: Adjust.
17760 * config/rs6000/power7.md: Adjust.
17761 * config/rs6000/power8.md: Adjust.
17762 * config/rs6000/power9.md: Adjust.
17763 * config/rs6000/rs64.md: Adjust.
17764 * config/rs6000/titan.md: Adjust.
17766 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17768 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17769 ix86_indirect_branch_register logic.
17771 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17773 * config/i386/constraints.md (Bs): Update
17774 ix86_indirect_branch_register check. Don't check
17775 ix86_indirect_branch_register with GOT_memory_operand.
17777 * config/i386/predicates.md (GOT_memory_operand): Don't check
17778 ix86_indirect_branch_register here.
17779 (GOT32_symbol_operand): Likewise.
17781 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17783 * config/i386/predicates.md (constant_call_address_operand):
17784 Rewrite ix86_indirect_branch_register logic.
17785 (sibcall_insn_operand): Likewise.
17787 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17789 * config/i386/constraints.md (Bs): Replace
17790 ix86_indirect_branch_thunk_register with
17791 ix86_indirect_branch_register.
17793 * config/i386/i386.md (indirect_jump): Likewise.
17794 (tablejump): Likewise.
17795 (*sibcall_memory): Likewise.
17796 (*sibcall_value_memory): Likewise.
17797 Peepholes of indirect call and jump via memory: Likewise.
17798 * config/i386/i386.opt: Likewise.
17799 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17800 (GOT_memory_operand): Likewise.
17801 (call_insn_operand): Likewise.
17802 (sibcall_insn_operand): Likewise.
17803 (GOT32_symbol_operand): Likewise.
17805 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17807 PR middle-end/83837
17808 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17809 type rather than type addr's type points to.
17810 (expand_omp_atomic_mutex): Likewise.
17811 (expand_omp_atomic): Likewise.
17813 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17816 * config/i386/i386.c (output_indirect_thunk_function): Use
17817 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17818 for __x86_return_thunk.
17820 2018-01-15 Richard Biener <rguenther@suse.de>
17822 PR middle-end/83850
17823 * expmed.c (extract_bit_field_1): Fix typo.
17825 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17828 * config/arm/iterators.md (VF): New mode iterator.
17829 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17830 Remove integer-related logic from pattern.
17831 (neon_vabd<mode>_3): Likewise.
17833 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17835 PR middle-end/82694
17836 * common.opt (fstrict-overflow): No longer an alias.
17837 (fwrapv-pointer): New option.
17838 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17839 also for pointer types based on flag_wrapv_pointer.
17840 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17841 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17842 opts->x_flag_wrapv got set.
17843 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17844 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17845 POINTER_TYPE_OVERFLOW_UNDEFINED.
17846 * match.pd: Likewise in address comparison pattern.
17847 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17849 2018-01-15 Richard Biener <rguenther@suse.de>
17852 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17853 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17854 Reset type names to their identifier if their TYPE_DECL doesn't
17855 have linkage (and thus is used for ODR and devirt).
17856 (save_debug_info_for_decl): Remove.
17857 (save_debug_info_for_type): Likewise.
17858 (add_tree_to_fld_list): Adjust.
17859 * tree-pretty-print.c (dump_generic_node): Make dumping of
17860 type names more robust.
17862 2018-01-15 Richard Biener <rguenther@suse.de>
17864 * BASE-VER: Bump to 8.0.1.
17866 2018-01-14 Martin Sebor <msebor@redhat.com>
17869 * builtins.c (check_access): Avoid warning when the no-warning bit
17872 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17874 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17875 * ira-color (allocno_hard_regs_compare): Likewise.
17877 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17880 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17881 Use .pushsection/.popsection.
17883 2018-01-14 Martin Sebor <msebor@redhat.com>
17886 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17888 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17890 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17891 entry from extra_headers.
17892 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17893 extra_headers, make the list bitwise identical to the i?86-*-* one.
17895 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17897 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17898 -mcmodel=large with -mindirect-branch=thunk,
17899 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17900 -mfunction-return=thunk-extern.
17901 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17902 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17903 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17905 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17907 * config/i386/i386.c (print_reg): Print the name of the full
17908 integer register without '%'.
17909 (ix86_print_operand): Handle 'V'.
17910 * doc/extend.texi: Document 'V' modifier.
17912 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17914 * config/i386/constraints.md (Bs): Disallow memory operand for
17915 -mindirect-branch-register.
17917 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17918 (GOT_memory_operand): Likewise.
17919 (call_insn_operand): Likewise.
17920 (sibcall_insn_operand): Likewise.
17921 (GOT32_symbol_operand): Likewise.
17922 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17923 for -mindirect-branch-register.
17924 (tablejump): Likewise.
17925 (*sibcall_memory): Likewise.
17926 (*sibcall_value_memory): Likewise.
17927 Disallow peepholes of indirect call and jump via memory for
17928 -mindirect-branch-register.
17929 (*call_pop): Replace m with Bw.
17930 (*call_value_pop): Likewise.
17931 (*sibcall_pop_memory): Replace m with Bs.
17932 * config/i386/i386.opt (mindirect-branch-register): New option.
17933 * doc/invoke.texi: Document -mindirect-branch-register option.
17935 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17937 * config/i386/i386-protos.h (ix86_output_function_return): New.
17938 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17939 set function_return_type.
17940 (indirect_thunk_name): Add ret_p to indicate thunk for function
17942 (output_indirect_thunk_function): Pass false to
17943 indirect_thunk_name.
17944 (ix86_output_indirect_branch_via_reg): Likewise.
17945 (ix86_output_indirect_branch_via_push): Likewise.
17946 (output_indirect_thunk_function): Create alias for function
17947 return thunk if regno < 0.
17948 (ix86_output_function_return): New function.
17949 (ix86_handle_fndecl_attribute): Handle function_return.
17950 (ix86_attribute_table): Add function_return.
17951 * config/i386/i386.h (machine_function): Add
17952 function_return_type.
17953 * config/i386/i386.md (simple_return_internal): Use
17954 ix86_output_function_return.
17955 (simple_return_internal_long): Likewise.
17956 * config/i386/i386.opt (mfunction-return=): New option.
17957 (indirect_branch): Mention -mfunction-return=.
17958 * doc/extend.texi: Document function_return function attribute.
17959 * doc/invoke.texi: Document -mfunction-return= option.
17961 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17963 * config/i386/i386-opts.h (indirect_branch): New.
17964 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17965 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17966 with local indirect jump when converting indirect call and jump.
17967 (ix86_set_indirect_branch_type): New.
17968 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17969 (indirectlabelno): New.
17970 (indirect_thunk_needed): Likewise.
17971 (indirect_thunk_bnd_needed): Likewise.
17972 (indirect_thunks_used): Likewise.
17973 (indirect_thunks_bnd_used): Likewise.
17974 (INDIRECT_LABEL): Likewise.
17975 (indirect_thunk_name): Likewise.
17976 (output_indirect_thunk): Likewise.
17977 (output_indirect_thunk_function): Likewise.
17978 (ix86_output_indirect_branch_via_reg): Likewise.
17979 (ix86_output_indirect_branch_via_push): Likewise.
17980 (ix86_output_indirect_branch): Likewise.
17981 (ix86_output_indirect_jmp): Likewise.
17982 (ix86_code_end): Call output_indirect_thunk_function if needed.
17983 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17985 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17986 (ix86_attribute_table): Add indirect_branch.
17987 * config/i386/i386.h (machine_function): Add indirect_branch_type
17988 and has_local_indirect_jump.
17989 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17991 (tablejump): Likewise.
17992 (*indirect_jump): Use ix86_output_indirect_jmp.
17993 (*tablejump_1): Likewise.
17994 (simple_return_indirect_internal): Likewise.
17995 * config/i386/i386.opt (mindirect-branch=): New option.
17996 (indirect_branch): New.
17999 (thunk-inline): Likewise.
18000 (thunk-extern): Likewise.
18001 * doc/extend.texi: Document indirect_branch function attribute.
18002 * doc/invoke.texi: Document -mindirect-branch= option.
18004 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18007 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18009 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18011 * ipa-inline.c (want_inline_small_function_p): Return false if
18012 inlining has already failed with CIF_FINAL_ERROR.
18013 (update_caller_keys): Call want_inline_small_function_p before
18015 (update_callee_keys): Likewise.
18017 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18019 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18021 (rs6000_quadword_masked_address_p): Likewise.
18022 (quad_aligned_load_p): Likewise.
18023 (quad_aligned_store_p): Likewise.
18024 (const_load_sequence_p): Add comment to describe the outer-most loop.
18025 (mimic_memory_attributes_and_flags): New function.
18026 (rs6000_gen_stvx): Likewise.
18027 (replace_swapped_aligned_store): Likewise.
18028 (rs6000_gen_lvx): Likewise.
18029 (replace_swapped_aligned_load): Likewise.
18030 (replace_swapped_load_constant): Capitalize argument name in
18031 comment describing this function.
18032 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18033 and stores that access quad-word aligned addresses and replace
18034 with stvx or lvx instructions when appropriate.
18035 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18036 New function prototype.
18037 (rs6000_quadword_masked_address_p): Likewise.
18038 (rs6000_gen_lvx): Likewise.
18039 (rs6000_gen_stvx): Likewise.
18040 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18041 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18042 when memory address is aligned.
18043 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18044 this split to select lvx instruction when memory address is aligned.
18045 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18046 instruction when memory address is aligned.
18047 (*vsx_le_perm_load_v16qi): Likewise.
18048 (four unnamed splitters): Modify to select the stvx instruction
18049 when memory is aligned.
18051 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18053 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18054 which appears in the queue multiple times.
18056 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18057 Alan Hayward <alan.hayward@arm.com>
18058 David Sherwood <david.sherwood@arm.com>
18060 * tree-vectorizer.h (vec_lower_bound): New structure.
18061 (_loop_vec_info): Add check_nonzero and lower_bounds.
18062 (LOOP_VINFO_CHECK_NONZERO): New macro.
18063 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18064 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18065 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18066 fields. Make seg_len the distance travelled, not including the
18068 (dr_direction_indicator): Declare.
18069 (dr_zero_step_indicator): Likewise.
18070 (dr_known_forward_stride_p): Likewise.
18071 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18073 (runtime_alias_check_p): Allow runtime alias checks with
18075 (operator ==): Compare access_size and align.
18076 (prune_runtime_alias_test_list): Rework for new distinction between
18077 the access_size and seg_len.
18078 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18080 (get_segment_min_max): New function.
18081 (create_intersect_range_checks): Use it.
18082 (dr_step_indicator): New function.
18083 (dr_direction_indicator): Likewise.
18084 (dr_zero_step_indicator): Likewise.
18085 (dr_known_forward_stride_p): Likewise.
18086 * tree-loop-distribution.c (data_ref_segment_size): Return
18087 DR_STEP * (niters - 1).
18088 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18090 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18091 (vect_preserves_scalar_order_p): New function, split out from...
18092 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18093 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18094 (vect_vfa_access_size): New function.
18095 (vect_vfa_align): Likewise.
18096 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18097 (dump_lower_bound): New function.
18098 (vect_check_lower_bound): Likewise.
18099 (vect_small_gap_p): Likewise.
18100 (vectorizable_with_step_bound_p): Likewise.
18101 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18102 depencies if the vectorization factor is 1. Convert the checks
18103 for nonzero steps into checks on the bounds of DR_STEP. Try using
18104 a bunds check for variable steps if the minimum required step is
18105 relatively small. Update calls to the dr_with_seg_len
18106 constructor and to vect_compile_time_alias.
18107 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18109 (vect_loop_versioning): Call it.
18110 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18112 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18114 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18115 Alan Hayward <alan.hayward@arm.com>
18116 David Sherwood <david.sherwood@arm.com>
18118 * doc/sourcebuild.texi (vect_scatter_store): Document.
18119 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18121 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18123 * genopinit.c (main): Add supports_vec_scatter_store and
18124 supports_vec_scatter_store_cached to target_optabs.
18125 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18126 IFN_MASK_SCATTER_STORE.
18127 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18129 * internal-fn.h (internal_store_fn_p): Declare.
18130 (internal_fn_stored_value_index): Likewise.
18131 * internal-fn.c (scatter_store_direct): New macro.
18132 (expand_scatter_store_optab_fn): New function.
18133 (direct_scatter_store_optab_supported_p): New macro.
18134 (internal_store_fn_p): New function.
18135 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18136 IFN_MASK_SCATTER_STORE.
18137 (internal_fn_mask_index): Likewise.
18138 (internal_fn_stored_value_index): New function.
18139 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18140 for scatter stores.
18141 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18142 * optabs-query.c (supports_vec_scatter_store_p): New function.
18143 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18144 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18145 true for scatter stores.
18146 (vect_gather_scatter_fn_p): Handle scatter stores too.
18147 (vect_check_gather_scatter): Consider using scatter stores if
18148 supports_vec_scatter_store_p.
18149 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18150 scatter stores too.
18151 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18152 internal_fn_stored_value_index.
18153 (check_load_store_masking): Handle scatter stores too.
18154 (vect_get_store_rhs): Make public.
18155 (vectorizable_call): Use internal_store_fn_p.
18156 (vectorizable_store): Handle scatter store internal functions.
18157 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18158 when deciding whether the end of the group has been reached.
18159 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18160 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18161 (mask_scatter_store<mode>): New insns.
18163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18164 Alan Hayward <alan.hayward@arm.com>
18165 David Sherwood <david.sherwood@arm.com>
18167 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18168 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18169 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18171 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18172 Use vect_truncate_gather_scatter_offset if we can't treat the
18173 operation as a normal gather load or scatter store.
18174 (get_group_load_store_type): Take the gather_scatter_info
18175 as argument. Try using a gather load or scatter store for
18176 single-element groups.
18177 (get_load_store_type): Update calls to get_group_load_store_type
18178 and vect_use_strided_gather_scatters_p.
18180 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18181 Alan Hayward <alan.hayward@arm.com>
18182 David Sherwood <david.sherwood@arm.com>
18184 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18185 optional tree argument.
18186 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18188 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18189 but continue to use the current value as a fallback.
18190 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18191 to compare the updates.
18192 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18193 (get_load_store_type): Use it when handling a strided access.
18194 (vect_get_strided_load_store_ops): New function.
18195 (vect_get_data_ptr_increment): Likewise.
18196 (vectorizable_load): Handle strided gather loads. Always pass
18197 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18199 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18200 Alan Hayward <alan.hayward@arm.com>
18201 David Sherwood <david.sherwood@arm.com>
18203 * doc/md.texi (gather_load@var{m}): Document.
18204 (mask_gather_load@var{m}): Likewise.
18205 * genopinit.c (main): Add supports_vec_gather_load and
18206 supports_vec_gather_load_cached to target_optabs.
18207 * optabs-tree.c (init_tree_optimization_optabs): Use
18208 ggc_cleared_alloc to allocate target_optabs.
18209 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18210 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18212 * internal-fn.h (internal_load_fn_p): Declare.
18213 (internal_gather_scatter_fn_p): Likewise.
18214 (internal_fn_mask_index): Likewise.
18215 (internal_gather_scatter_fn_supported_p): Likewise.
18216 * internal-fn.c (gather_load_direct): New macro.
18217 (expand_gather_load_optab_fn): New function.
18218 (direct_gather_load_optab_supported_p): New macro.
18219 (direct_internal_fn_optab): New function.
18220 (internal_load_fn_p): Likewise.
18221 (internal_gather_scatter_fn_p): Likewise.
18222 (internal_fn_mask_index): Likewise.
18223 (internal_gather_scatter_fn_supported_p): Likewise.
18224 * optabs-query.c (supports_at_least_one_mode_p): New function.
18225 (supports_vec_gather_load_p): Likewise.
18226 * optabs-query.h (supports_vec_gather_load_p): Declare.
18227 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18228 and memory_type field.
18229 (NUM_PATTERNS): Bump to 15.
18230 * tree-vect-data-refs.c: Include internal-fn.h.
18231 (vect_gather_scatter_fn_p): New function.
18232 (vect_describe_gather_scatter_call): Likewise.
18233 (vect_check_gather_scatter): Try using internal functions for
18234 gather loads. Recognize existing calls to a gather load function.
18235 (vect_analyze_data_refs): Consider using gather loads if
18236 supports_vec_gather_load_p.
18237 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18238 (vect_get_gather_scatter_offset_type): Likewise.
18239 (vect_convert_mask_for_vectype): Likewise.
18240 (vect_add_conversion_to_patterm): Likewise.
18241 (vect_try_gather_scatter_pattern): Likewise.
18242 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18243 (vect_vect_recog_func_ptrs): Add it.
18244 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18245 internal_fn_mask_index and internal_gather_scatter_fn_p.
18246 (check_load_store_masking): Take the gather_scatter_info as an
18247 argument and handle gather loads.
18248 (vect_get_gather_scatter_ops): New function.
18249 (vectorizable_call): Check internal_load_fn_p.
18250 (vectorizable_load): Likewise. Handle gather load internal
18252 (vectorizable_store): Update call to check_load_store_masking.
18253 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18254 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18255 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18256 (aarch64_gather_scale_operand_d): New predicates.
18257 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18258 (mask_gather_load<mode>): New insns.
18260 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18261 Alan Hayward <alan.hayward@arm.com>
18262 David Sherwood <david.sherwood@arm.com>
18264 * optabs.def (fold_left_plus_optab): New optab.
18265 * doc/md.texi (fold_left_plus_@var{m}): Document.
18266 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18267 * internal-fn.c (fold_left_direct): Define.
18268 (expand_fold_left_optab_fn): Likewise.
18269 (direct_fold_left_optab_supported_p): Likewise.
18270 * fold-const-call.c (fold_const_fold_left): New function.
18271 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18272 * tree-parloops.c (valid_reduction_p): New function.
18273 (gather_scalar_reductions): Use it.
18274 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18275 (vect_finish_replace_stmt): Declare.
18276 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18277 (needs_fold_left_reduction_p): New function, split out from...
18278 (vect_is_simple_reduction): ...here. Accept reductions that
18279 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18280 (vect_force_simple_reduction): Also store the reduction type in
18281 the assignment's STMT_VINFO_REDUC_TYPE.
18282 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18283 (merge_with_identity): New function.
18284 (vect_expand_fold_left): Likewise.
18285 (vectorize_fold_left_reduction): Likewise.
18286 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18287 scalar phi in place for it. Check for target support and reject
18288 cases that would reassociate the operation. Defer the transform
18289 phase to vectorize_fold_left_reduction.
18290 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18291 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18292 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18294 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18296 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18297 call to ifc_temp_var.
18299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18300 Alan Hayward <alan.hayward@arm.com>
18301 David Sherwood <david.sherwood@arm.com>
18303 * target.def (legitimize_address_displacement): Take the original
18304 offset as a poly_int.
18305 * targhooks.h (default_legitimize_address_displacement): Update
18307 * targhooks.c (default_legitimize_address_displacement): Likewise.
18308 * doc/tm.texi: Regenerate.
18309 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18310 as an argument, moving assert of ad->disp == ad->disp_term to...
18311 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18312 Try calling targetm.legitimize_address_displacement before expanding
18313 the address rather than afterwards, and adjust for the new interface.
18314 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18315 Match the new hook interface. Handle SVE addresses.
18316 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18317 new hook interface.
18319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18321 * Makefile.in (OBJS): Add early-remat.o.
18322 * target.def (select_early_remat_modes): New hook.
18323 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18324 * doc/tm.texi: Regenerate.
18325 * targhooks.h (default_select_early_remat_modes): Declare.
18326 * targhooks.c (default_select_early_remat_modes): New function.
18327 * timevar.def (TV_EARLY_REMAT): New timevar.
18328 * passes.def (pass_early_remat): New pass.
18329 * tree-pass.h (make_pass_early_remat): Declare.
18330 * early-remat.c: New file.
18331 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18333 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18335 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18336 Alan Hayward <alan.hayward@arm.com>
18337 David Sherwood <david.sherwood@arm.com>
18339 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18340 vfm1 with a bound_epilog parameter.
18341 (vect_do_peeling): Update calls accordingly, and move the prologue
18342 call earlier in the function. Treat the base bound_epilog as 0 for
18343 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18344 this base when peeling for gaps.
18345 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18346 with fully-masked loops.
18347 (vect_estimate_min_profitable_iters): Handle the single peeled
18348 iteration in that case.
18350 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18351 Alan Hayward <alan.hayward@arm.com>
18352 David Sherwood <david.sherwood@arm.com>
18354 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18355 single-element interleaving even if the size is not a power of 2.
18356 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18357 accesses for single-element interleaving if the group size is
18360 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18361 Alan Hayward <alan.hayward@arm.com>
18362 David Sherwood <david.sherwood@arm.com>
18364 * doc/md.texi (fold_extract_last_@var{m}): Document.
18365 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18366 * optabs.def (fold_extract_last_optab): New optab.
18367 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18368 * internal-fn.c (fold_extract_direct): New macro.
18369 (expand_fold_extract_optab_fn): Likewise.
18370 (direct_fold_extract_optab_supported_p): Likewise.
18371 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18372 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18373 EXTRACT_LAST_REDUCTION.
18374 (get_initial_def_for_reduction): Do not create an initial vector
18375 for EXTRACT_LAST_REDUCTION reductions.
18376 (vectorizable_reduction): Leave the scalar phi in place for
18377 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18378 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18379 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18380 transform phase to vectorizable_condition.
18381 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18383 (vect_finish_stmt_generation): ...here.
18384 (vect_finish_replace_stmt): New function.
18385 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18386 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18388 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18390 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18391 Alan Hayward <alan.hayward@arm.com>
18392 David Sherwood <david.sherwood@arm.com>
18394 * doc/md.texi (extract_last_@var{m}): Document.
18395 * optabs.def (extract_last_optab): New optab.
18396 * internal-fn.def (EXTRACT_LAST): New internal function.
18397 * internal-fn.c (cond_unary_direct): New macro.
18398 (expand_cond_unary_optab_fn): Likewise.
18399 (direct_cond_unary_optab_supported_p): Likewise.
18400 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18401 loops using EXTRACT_LAST.
18402 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18403 (extract_last_<mode>): ...this optab.
18404 (vec_extract<mode><Vel>): Update accordingly.
18406 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18407 Alan Hayward <alan.hayward@arm.com>
18408 David Sherwood <david.sherwood@arm.com>
18410 * target.def (empty_mask_is_expensive): New hook.
18411 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18412 * doc/tm.texi: Regenerate.
18413 * targhooks.h (default_empty_mask_is_expensive): Declare.
18414 * targhooks.c (default_empty_mask_is_expensive): New function.
18415 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18416 if the target says that empty masks are expensive.
18417 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18419 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18421 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18422 Alan Hayward <alan.hayward@arm.com>
18423 David Sherwood <david.sherwood@arm.com>
18425 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18426 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18427 (vect_use_loop_mask_for_alignment_p): New function.
18428 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18429 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18430 niters_skip argument. Make sure that the first niters_skip elements
18431 of the first iteration are inactive.
18432 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18433 Update call to vect_set_loop_masks_directly.
18434 (get_misalign_in_elems): New function, split out from...
18435 (vect_gen_prolog_loop_niters): ...here.
18436 (vect_update_init_of_dr): Take a code argument that specifies whether
18437 the adjustment should be added or subtracted.
18438 (vect_update_init_of_drs): Likewise.
18439 (vect_prepare_for_masked_peels): New function.
18440 (vect_do_peeling): Skip prologue peeling if we're using a mask
18441 instead. Update call to vect_update_inits_of_drs.
18442 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18444 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18445 alignment. Do not include the number of peeled iterations in
18446 the minimum threshold in that case.
18447 (vectorizable_induction): Adjust the start value down by
18448 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18449 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18450 Take the number of skipped iterations into account when calculating
18452 * tree-vect-stmts.c (vect_gen_while_not): New function.
18454 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18455 Alan Hayward <alan.hayward@arm.com>
18456 David Sherwood <david.sherwood@arm.com>
18458 * doc/sourcebuild.texi (vect_fully_masked): Document.
18459 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18460 default value to 0.
18461 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18463 (vect_analyze_loop_2): ...here. Don't check the vectorization
18464 factor against the number of loop iterations if the loop is
18467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18468 Alan Hayward <alan.hayward@arm.com>
18469 David Sherwood <david.sherwood@arm.com>
18471 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18472 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18473 (dump_groups): Update accordingly.
18474 (iv_use::mem_type): New member variable.
18475 (address_p): New function.
18476 (record_use): Add a mem_type argument and initialize the new
18478 (record_group_use): Add a mem_type argument. Use address_p.
18479 Remove obsolete null checks of base_object. Update call to record_use.
18480 (find_interesting_uses_op): Update call to record_group_use.
18481 (find_interesting_uses_cond): Likewise.
18482 (find_interesting_uses_address): Likewise.
18483 (get_mem_type_for_internal_fn): New function.
18484 (find_address_like_use): Likewise.
18485 (find_interesting_uses_stmt): Try find_address_like_use before
18486 calling find_interesting_uses_op.
18487 (addr_offset_valid_p): Use the iv mem_type field as the type
18488 of the addressed memory.
18489 (add_autoinc_candidates): Likewise.
18490 (get_address_cost): Likewise.
18491 (split_small_address_groups_p): Use address_p.
18492 (split_address_groups): Likewise.
18493 (add_iv_candidate_for_use): Likewise.
18494 (autoinc_possible_for_pair): Likewise.
18495 (rewrite_groups): Likewise.
18496 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18497 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18498 (get_alias_ptr_type_for_ptr_address): New function.
18499 (rewrite_use_address): Rewrite address uses in calls that were
18500 identified by find_address_like_use.
18502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18503 Alan Hayward <alan.hayward@arm.com>
18504 David Sherwood <david.sherwood@arm.com>
18506 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18508 * gimple-expr.h (is_gimple_addressable: Likewise.
18509 * gimple-expr.c (is_gimple_address): Likewise.
18510 * internal-fn.c (expand_call_mem_ref): New function.
18511 (expand_mask_load_optab_fn): Use it.
18512 (expand_mask_store_optab_fn): Likewise.
18514 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18515 Alan Hayward <alan.hayward@arm.com>
18516 David Sherwood <david.sherwood@arm.com>
18518 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18519 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18520 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18521 (cond_umax@var{mode}): Document.
18522 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18523 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18524 (cond_umin_optab, cond_umax_optab): New optabs.
18525 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18526 (COND_IOR, COND_XOR): New internal functions.
18527 * internal-fn.h (get_conditional_internal_fn): Declare.
18528 * internal-fn.c (cond_binary_direct): New macro.
18529 (expand_cond_binary_optab_fn): Likewise.
18530 (direct_cond_binary_optab_supported_p): Likewise.
18531 (get_conditional_internal_fn): New function.
18532 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18533 Cope with reduction statements that are vectorized as calls rather
18535 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18536 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18537 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18538 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18539 (UNSPEC_COND_EOR): New unspecs.
18540 (optab): Add mappings for them.
18541 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18542 (sve_int_op, sve_fp_op): New int attributes.
18544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18545 Alan Hayward <alan.hayward@arm.com>
18546 David Sherwood <david.sherwood@arm.com>
18548 * optabs.def (while_ult_optab): New optab.
18549 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18550 * internal-fn.def (WHILE_ULT): New internal function.
18551 * internal-fn.h (direct_internal_fn_supported_p): New override
18552 that takes two types as argument.
18553 * internal-fn.c (while_direct): New macro.
18554 (expand_while_optab_fn): New function.
18555 (convert_optab_supported_p): Likewise.
18556 (direct_while_optab_supported_p): New macro.
18557 * wide-int.h (wi::udiv_ceil): New function.
18558 * tree-vectorizer.h (rgroup_masks): New structure.
18559 (vec_loop_masks): New typedef.
18560 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18561 and fully_masked_p.
18562 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18563 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18564 (vect_max_vf): New function.
18565 (slpeel_make_loop_iterate_ntimes): Delete.
18566 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18567 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18568 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18569 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18570 internal-fn.h, stor-layout.h and optabs-query.h.
18571 (vect_set_loop_mask): New function.
18572 (add_preheader_seq): Likewise.
18573 (add_header_seq): Likewise.
18574 (interleave_supported_p): Likewise.
18575 (vect_maybe_permute_loop_masks): Likewise.
18576 (vect_set_loop_masks_directly): Likewise.
18577 (vect_set_loop_condition_masked): Likewise.
18578 (vect_set_loop_condition_unmasked): New function, split out from
18579 slpeel_make_loop_iterate_ntimes.
18580 (slpeel_make_loop_iterate_ntimes): Rename to..
18581 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18582 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18583 (vect_do_peeling): Update call accordingly.
18584 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18586 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18587 mask_compare_type, can_fully_mask_p and fully_masked_p.
18588 (release_vec_loop_masks): New function.
18589 (_loop_vec_info): Use it to free the loop masks.
18590 (can_produce_all_loop_masks_p): New function.
18591 (vect_get_max_nscalars_per_iter): Likewise.
18592 (vect_verify_full_masking): Likewise.
18593 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18594 retries, and free the mask rgroups before retrying. Check loop-wide
18595 reasons for disallowing fully-masked loops. Make the final decision
18596 about whether use a fully-masked loop or not.
18597 (vect_estimate_min_profitable_iters): Do not assume that peeling
18598 for the number of iterations will be needed for fully-masked loops.
18599 (vectorizable_reduction): Disable fully-masked loops.
18600 (vectorizable_live_operation): Likewise.
18601 (vect_halve_mask_nunits): New function.
18602 (vect_double_mask_nunits): Likewise.
18603 (vect_record_loop_mask): Likewise.
18604 (vect_get_loop_mask): Likewise.
18605 (vect_transform_loop): Handle the case in which the final loop
18606 iteration might handle a partial vector. Call vect_set_loop_condition
18607 instead of slpeel_make_loop_iterate_ntimes.
18608 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18609 (check_load_store_masking): New function.
18610 (prepare_load_store_mask): Likewise.
18611 (vectorizable_store): Handle fully-masked loops.
18612 (vectorizable_load): Likewise.
18613 (supportable_widening_operation): Use vect_halve_mask_nunits for
18615 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18616 (vect_gen_while): New function.
18617 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18618 (aarch64_uqdec<mode>): New insn.
18620 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18621 Alan Hayward <alan.hayward@arm.com>
18622 David Sherwood <david.sherwood@arm.com>
18624 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18625 (reduc_xor_scal_optab): New optabs.
18626 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18627 (reduc_xor_scal_@var{m}): Document.
18628 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18629 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18630 internal functions.
18631 * fold-const-call.c (fold_const_call): Handle them.
18632 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18633 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18634 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18635 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18636 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18637 (UNSPEC_XORV): New unspecs.
18638 (optab): Add entries for them.
18639 (BITWISEV): New int iterator.
18640 (bit_reduc_op): New int attributes.
18642 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18643 Alan Hayward <alan.hayward@arm.com>
18644 David Sherwood <david.sherwood@arm.com>
18646 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18647 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18648 * optabs.def (vec_shl_insert_optab): New optab.
18649 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18650 (duplicate_and_interleave): Likewise.
18651 * tree-vect-loop.c: Include internal-fn.h.
18652 (neutral_op_for_slp_reduction): New function, split out from
18653 get_initial_defs_for_reduction.
18654 (get_initial_def_for_reduction): Handle option 2 for variable-length
18655 vectors by loading the neutral value into a vector and then shifting
18656 the initial value into element 0.
18657 (get_initial_defs_for_reduction): Replace the code argument with
18658 the neutral value calculated by neutral_op_for_slp_reduction.
18659 Use gimple_build_vector for constant-length vectors.
18660 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18661 but the first group_size elements have a neutral value.
18662 Use duplicate_and_interleave otherwise.
18663 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18664 Update call to get_initial_defs_for_reduction. Handle SLP
18665 reductions for variable-length vectors by creating one vector
18666 result for each scalar result, with the elements associated
18667 with other scalar results stubbed out with the neutral value.
18668 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18669 Require IFN_VEC_SHL_INSERT for double reductions on
18670 variable-length vectors, or SLP reductions that have
18671 a neutral value. Require can_duplicate_and_interleave_p
18672 support for variable-length unchained SLP reductions if there
18673 is no neutral value, such as for MIN/MAX reductions. Also require
18674 the number of vector elements to be a multiple of the number of
18675 SLP statements when doing variable-length unchained SLP reductions.
18676 Update call to vect_create_epilog_for_reduction.
18677 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18678 and remove initial values.
18679 (duplicate_and_interleave): Make public.
18680 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18681 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18683 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18684 Alan Hayward <alan.hayward@arm.com>
18685 David Sherwood <david.sherwood@arm.com>
18687 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18688 (can_duplicate_and_interleave_p): New function.
18689 (vect_get_and_check_slp_defs): Take the vector of statements
18690 rather than just the current one. Remove excess parentheses.
18691 Restriction rejectinon of vect_constant_def and vect_external_def
18692 for variable-length vectors to boolean types, or types for which
18693 can_duplicate_and_interleave_p is false.
18694 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18695 (duplicate_and_interleave): New function.
18696 (vect_get_constant_vectors): Use gimple_build_vector for
18697 constant-length vectors and suitable variable-length constant
18698 vectors. Use duplicate_and_interleave for other variable-length
18699 vectors. Don't defer the update when inserting new statements.
18701 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18702 Alan Hayward <alan.hayward@arm.com>
18703 David Sherwood <david.sherwood@arm.com>
18705 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18706 min_profitable_iters doesn't go negative.
18708 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18709 Alan Hayward <alan.hayward@arm.com>
18710 David Sherwood <david.sherwood@arm.com>
18712 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18713 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18714 * optabs.def (vec_mask_load_lanes_optab): New optab.
18715 (vec_mask_store_lanes_optab): Likewise.
18716 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18717 (MASK_STORE_LANES): Likewise.
18718 * internal-fn.c (mask_load_lanes_direct): New macro.
18719 (mask_store_lanes_direct): Likewise.
18720 (expand_mask_load_optab_fn): Handle masked operations.
18721 (expand_mask_load_lanes_optab_fn): New macro.
18722 (expand_mask_store_optab_fn): Handle masked operations.
18723 (expand_mask_store_lanes_optab_fn): New macro.
18724 (direct_mask_load_lanes_optab_supported_p): Likewise.
18725 (direct_mask_store_lanes_optab_supported_p): Likewise.
18726 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18728 (vect_load_lanes_supported): Likewise.
18729 * tree-vect-data-refs.c (strip_conversion): New function.
18730 (can_group_stmts_p): Likewise.
18731 (vect_analyze_data_ref_accesses): Use it instead of checking
18732 for a pair of assignments.
18733 (vect_store_lanes_supported): Take a masked_p parameter.
18734 (vect_load_lanes_supported): Likewise.
18735 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18736 vect_store_lanes_supported and vect_load_lanes_supported.
18737 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18738 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18739 parameter. Don't allow gaps for masked accesses.
18740 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18741 and vect_load_lanes_supported.
18742 (get_load_store_type): Take a masked_p parameter and update
18743 call to get_group_load_store_type.
18744 (vectorizable_store): Update call to get_load_store_type.
18745 Handle IFN_MASK_STORE_LANES.
18746 (vectorizable_load): Update call to get_load_store_type.
18747 Handle IFN_MASK_LOAD_LANES.
18749 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18750 Alan Hayward <alan.hayward@arm.com>
18751 David Sherwood <david.sherwood@arm.com>
18753 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18755 * config/aarch64/aarch64-protos.h
18756 (aarch64_sve_struct_memory_operand_p): Declare.
18757 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18758 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18759 (VPRED, vpred): Handle SVE structure modes.
18760 * config/aarch64/constraints.md (Utx): New constraint.
18761 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18762 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18763 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18764 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18765 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18766 structure modes. Split into pieces after RA.
18767 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18768 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18770 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18771 SVE structure modes.
18772 (aarch64_classify_address): Likewise.
18773 (sizetochar): Move earlier in file.
18774 (aarch64_print_operand): Handle SVE register lists.
18775 (aarch64_array_mode): New function.
18776 (aarch64_sve_struct_memory_operand_p): Likewise.
18777 (TARGET_ARRAY_MODE): Redefine.
18779 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18780 Alan Hayward <alan.hayward@arm.com>
18781 David Sherwood <david.sherwood@arm.com>
18783 * target.def (array_mode): New target hook.
18784 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18785 * doc/tm.texi: Regenerate.
18786 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18787 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18788 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18789 targetm.array_mode.
18790 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18793 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18794 Alan Hayward <alan.hayward@arm.com>
18795 David Sherwood <david.sherwood@arm.com>
18797 * fold-const.c (fold_binary_loc): Check the argument types
18798 rather than the result type when testing for a vector operation.
18800 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18802 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18803 * doc/tm.texi: Regenerate.
18805 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18806 Alan Hayward <alan.hayward@arm.com>
18807 David Sherwood <david.sherwood@arm.com>
18809 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18810 (sve): Document new AArch64 extension.
18811 * doc/md.texi (w): Extend the description of the AArch64
18812 constraint to include SVE vectors.
18813 (Upl, Upa): Document new AArch64 predicate constraints.
18814 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18816 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18817 (msve-vector-bits=): New option.
18818 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18819 SVE when these are disabled.
18820 (sve): New extension.
18821 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18822 modes. Adjust their number of units based on aarch64_sve_vg.
18823 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18824 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18825 aarch64_addr_query_type.
18826 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18827 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18828 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18829 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18830 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18831 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18832 (aarch64_simd_imm_zero_p): Delete.
18833 (aarch64_check_zero_based_sve_index_immediate): Declare.
18834 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18835 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18836 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18837 (aarch64_sve_float_mul_immediate_p): Likewise.
18838 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18839 rather than an rtx.
18840 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18841 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18842 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18843 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18844 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18845 (aarch64_regmode_natural_size): Likewise.
18846 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18847 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18849 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18850 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18851 for VG and the SVE predicate registers.
18852 (V_ALIASES): Add a "z"-prefixed alias.
18853 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18854 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18855 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18856 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18857 (REG_CLASS_NAMES): Add entries for them.
18858 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18859 and the predicate registers.
18860 (aarch64_sve_vg): Declare.
18861 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18862 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18863 (REGMODE_NATURAL_SIZE): Define.
18864 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18866 * config/aarch64/aarch64.c: Include cfgrtl.h.
18867 (simd_immediate_info): Add a constructor for series vectors,
18868 and an associated step field.
18869 (aarch64_sve_vg): New variable.
18870 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18871 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18872 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18873 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18874 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18875 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18876 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18877 (aarch64_get_mask_mode): New functions.
18878 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18879 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18880 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18881 predicate modes and predicate registers. Explicitly restrict
18882 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18883 to store a vector mode if it is recognized by
18884 aarch64_classify_vector_mode.
18885 (aarch64_regmode_natural_size): New function.
18886 (aarch64_hard_regno_caller_save_mode): Return the original mode
18888 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18889 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18890 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18891 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18893 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18894 does not overlap dest if the function is frame-related. Handle
18896 (aarch64_split_add_offset): New function.
18897 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18898 them aarch64_add_offset.
18899 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18900 and update call to aarch64_sub_sp.
18901 (aarch64_add_cfa_expression): New function.
18902 (aarch64_expand_prologue): Pass extra temporary registers to the
18903 functions above. Handle the case in which we need to emit new
18904 DW_CFA_expressions for registers that were originally saved
18905 relative to the stack pointer, but now have to be expressed
18906 relative to the frame pointer.
18907 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18909 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18910 IP0 and IP1 values for SVE frames.
18911 (aarch64_expand_vec_series): New function.
18912 (aarch64_expand_sve_widened_duplicate): Likewise.
18913 (aarch64_expand_sve_const_vector): Likewise.
18914 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18915 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18916 into the register, rather than emitting a SET directly.
18917 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18918 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18919 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18920 (offset_9bit_signed_scaled_p): New functions.
18921 (aarch64_replicate_bitmask_imm): New function.
18922 (aarch64_bitmask_imm): Use it.
18923 (aarch64_cannot_force_const_mem): Reject expressions involving
18924 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18925 (aarch64_classify_index): Handle SVE indices, by requiring
18926 a plain register index with a scale that matches the element size.
18927 (aarch64_classify_address): Handle SVE addresses. Assert that
18928 the mode of the address is VOIDmode or an integer mode.
18929 Update call to aarch64_classify_symbol.
18930 (aarch64_classify_symbolic_expression): Update call to
18931 aarch64_classify_symbol.
18932 (aarch64_const_vec_all_in_range_p): New function.
18933 (aarch64_print_vector_float_operand): Likewise.
18934 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18935 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18936 and the FP immediates 1.0 and 0.5.
18937 (aarch64_print_address_internal): Handle SVE addresses.
18938 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18939 (aarch64_regno_regclass): Handle predicate registers.
18940 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18942 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18943 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18944 (aarch64_convert_sve_vector_bits): New function.
18945 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18946 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18947 rather than an rtx.
18948 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18949 Handle SVE vector and predicate modes. Accept VL-based constants
18950 that need only one temporary register, and VL offsets that require
18951 no temporary registers.
18952 (aarch64_conditional_register_usage): Mark the predicate registers
18953 as fixed if SVE isn't available.
18954 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18955 Return true for SVE vector and predicate modes.
18956 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18957 rather than an unsigned int. Handle SVE modes.
18958 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18960 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18962 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18963 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18964 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18965 (aarch64_sve_float_mul_immediate_p): New functions.
18966 (aarch64_sve_valid_immediate): New function.
18967 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18968 Explicitly reject structure modes. Check for INDEX constants.
18969 Handle PTRUE and PFALSE constants.
18970 (aarch64_check_zero_based_sve_index_immediate): New function.
18971 (aarch64_simd_imm_zero_p): Delete.
18972 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18973 vector modes. Accept constants in the range of CNT[BHWD].
18974 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18975 ask for an Advanced SIMD mode.
18976 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18977 (aarch64_simd_vector_alignment): Handle SVE predicates.
18978 (aarch64_vectorize_preferred_vector_alignment): New function.
18979 (aarch64_simd_vector_alignment_reachable): Use it instead of
18981 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18982 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18984 (MAX_VECT_LEN): Delete.
18985 (expand_vec_perm_d): Add a vec_flags field.
18986 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18987 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18988 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18990 (aarch64_evpc_rev): Rename to...
18991 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18992 (aarch64_evpc_rev_global): New function.
18993 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18994 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18996 (aarch64_evpc_sve_tbl): New function.
18997 (aarch64_expand_vec_perm_const_1): Update after rename of
18998 aarch64_evpc_rev. Handle SVE permutes too, trying
18999 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19000 than aarch64_evpc_tbl.
19001 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19002 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19003 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19004 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19005 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19006 (aarch64_expand_sve_vcond): New functions.
19007 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19008 of aarch64_vector_mode_p.
19009 (aarch64_dwarf_poly_indeterminate_value): New function.
19010 (aarch64_compute_pressure_classes): Likewise.
19011 (aarch64_can_change_mode_class): Likewise.
19012 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19013 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19014 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19015 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19016 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19017 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19018 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19019 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19021 (Dn, Dl, Dr): Accept const as well as const_vector.
19022 (Dz): Likewise. Compare against CONST0_RTX.
19023 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19024 of "vector" where appropriate.
19025 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19026 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19027 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19028 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19029 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19030 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19031 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19032 (v_int_equiv): Extend to SVE modes.
19033 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19035 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19036 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19037 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19038 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19039 (SVE_COND_FP_CMP): New int iterators.
19040 (perm_hilo): Handle the new unpack unspecs.
19041 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19043 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19044 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19045 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19046 (aarch64_equality_operator, aarch64_constant_vector_operand)
19047 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19048 (aarch64_sve_nonimmediate_operand): Likewise.
19049 (aarch64_sve_general_operand): Likewise.
19050 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19051 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19052 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19053 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19054 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19055 (aarch64_sve_float_arith_immediate): Likewise.
19056 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19057 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19058 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19059 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19060 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19061 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19062 (aarch64_sve_float_arith_operand): Likewise.
19063 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19064 (aarch64_sve_float_mul_operand): Likewise.
19065 (aarch64_sve_vec_perm_operand): Likewise.
19066 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19067 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19068 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19069 as well as const_vector.
19070 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19071 in file. Use CONST0_RTX and CONSTM1_RTX.
19072 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19073 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19074 Use aarch64_simd_imm_zero.
19075 * config/aarch64/aarch64-sve.md: New file.
19076 * config/aarch64/aarch64.md: Include it.
19077 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19078 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19079 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19080 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19081 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19082 (sve): New attribute.
19083 (enabled): Disable instructions with the sve attribute unless
19085 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19086 aarch64_expand_mov_immediate.
19087 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19088 CNT[BHSD] immediates.
19089 (movti): Split CONST_POLY_INT moves into two halves.
19090 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19091 Split additions that need a temporary here if the destination
19092 is the stack pointer.
19093 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19094 (*add<mode>3_poly_1): New instruction.
19095 (set_clobber_cc): New expander.
19097 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19099 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19100 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19101 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19102 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19103 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19104 Change innermode from fixed_mode_size to machine_mode.
19105 (simplify_subreg): Update call accordingly. Handle a constant-sized
19106 subreg of a variable-length CONST_VECTOR.
19108 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19109 Alan Hayward <alan.hayward@arm.com>
19110 David Sherwood <david.sherwood@arm.com>
19112 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19113 (add_offset_to_base): New function, split out from...
19114 (create_mem_ref): ...here. When handling a scale other than 1,
19115 check first whether the address is valid without the offset.
19116 Add it into the base if so, leaving the index and scale as-is.
19118 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19121 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19122 fold_for_warn before checking if arg2 is INTEGER_CST.
19124 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19126 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19127 (store_multiple_operation): Delete.
19128 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19129 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19130 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19131 guarded by TARGET_STRING.
19132 (rs6000_output_load_multiple): Delete.
19133 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19134 OPTION_MASK_STRING / TARGET_STRING handling.
19135 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19136 (const rs6000_opt_masks) <"string">: Change mask to 0.
19137 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19138 (MASK_STRING): Delete.
19139 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19141 (load_multiple): Delete.
19148 (store_multiple): Delete.
19155 (movmemsi_8reg): Delete.
19156 (corresponding unnamed define_insn): Delete.
19157 (movmemsi_6reg): Delete.
19158 (corresponding unnamed define_insn): Delete.
19159 (movmemsi_4reg): Delete.
19160 (corresponding unnamed define_insn): Delete.
19161 (movmemsi_2reg): Delete.
19162 (corresponding unnamed define_insn): Delete.
19163 (movmemsi_1reg): Delete.
19164 (corresponding unnamed define_insn): Delete.
19165 * config/rs6000/rs6000.opt (mno-string): New.
19166 (mstring): Replace by deprecation warning stub.
19167 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19169 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19171 * regrename.c (regrename_do_replace): If replacing the same
19172 reg multiple times, try to reuse last created gen_raw_REG.
19175 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19176 main to workaround a bug in GDB.
19178 2018-01-12 Tom de Vries <tom@codesourcery.com>
19181 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19183 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19185 PR rtl-optimization/80481
19186 * ira-color.c (get_cap_member): New function.
19187 (allocnos_conflict_by_live_ranges_p): Use it.
19188 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19189 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19191 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19194 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19195 (*saddl_se_1): Ditto.
19196 (*ssubsi_1): Ditto.
19197 (*ssubl_se_1): Ditto.
19199 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19201 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19202 rather than wi::to_widest for DR_INITs.
19203 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19204 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19205 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19207 (vect_analyze_group_access_1): Note that here.
19209 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19211 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19212 polynomial type sizes.
19214 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19216 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19217 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19218 (gimple_add_tmp_var): Likewise.
19220 2018-01-12 Martin Liska <mliska@suse.cz>
19222 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19223 (gimple_alloc_sizes): Likewise.
19224 (dump_gimple_statistics): Use PRIu64 in printf format.
19225 * gimple.h: Change uint64_t to int.
19227 2018-01-12 Martin Liska <mliska@suse.cz>
19229 * tree-core.h: Use uint64_t instead of int.
19230 * tree.c (tree_node_counts): Likewise.
19231 (tree_node_sizes): Likewise.
19232 (dump_tree_statistics): Use PRIu64 in printf format.
19234 2018-01-12 Martin Liska <mliska@suse.cz>
19236 * Makefile.in: As qsort_chk is implemented in vec.c, add
19237 vec.o to linkage of gencfn-macros.
19238 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19239 passing the info to record_node_allocation_statistics.
19240 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19242 * ggc-common.c (struct ggc_usage): Add operator== and use
19243 it in operator< and compare function.
19244 * mem-stats.h (struct mem_usage): Likewise.
19245 * vec.c (struct vec_usage): Remove operator< and compare
19246 function. Can be simply inherited.
19248 2018-01-12 Martin Jambor <mjambor@suse.cz>
19251 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19252 * tree-ssa-math-opts.c: Include domwalk.h.
19253 (convert_mult_to_fma_1): New function.
19254 (fma_transformation_info): New type.
19255 (fma_deferring_state): Likewise.
19256 (cancel_fma_deferring): New function.
19257 (result_of_phi): Likewise.
19258 (last_fma_candidate_feeds_initial_phi): Likewise.
19259 (convert_mult_to_fma): Added deferring logic, split actual
19260 transformation to convert_mult_to_fma_1.
19261 (math_opts_dom_walker): New type.
19262 (math_opts_dom_walker::after_dom_children): New method, body moved
19263 here from pass_optimize_widening_mul::execute, added deferring logic
19265 (pass_optimize_widening_mul::execute): Moved most of code to
19266 math_opts_dom_walker::after_dom_children.
19267 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19268 * config/i386/i386.c (ix86_option_override_internal): Added
19269 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19271 2018-01-12 Richard Biener <rguenther@suse.de>
19274 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19275 inline instance vars.
19277 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19280 * config/rx/rx.c (rx_is_restricted_memory_address):
19281 Handle SUBREG case.
19283 2018-01-12 Richard Biener <rguenther@suse.de>
19285 PR tree-optimization/80846
19286 * target.def (split_reduction): New target hook.
19287 * targhooks.c (default_split_reduction): New function.
19288 * targhooks.h (default_split_reduction): Declare.
19289 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19290 target requests first reduce vectors by combining low and high
19292 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19293 (get_vectype_for_scalar_type_and_size): Export.
19294 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19295 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19296 * doc/tm.texi: Regenerate.
19297 * config/i386/i386.c (ix86_split_reduction): Implement
19298 TARGET_VECTORIZE_SPLIT_REDUCTION.
19300 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19303 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19304 in PIC mode except for TARGET_VXWORKS_RTP.
19305 * config/sparc/sparc.c: Include cfgrtl.h.
19306 (TARGET_INIT_PIC_REG): Define.
19307 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19308 (sparc_pic_register_p): New predicate.
19309 (sparc_legitimate_address_p): Use it.
19310 (sparc_legitimize_pic_address): Likewise.
19311 (sparc_delegitimize_address): Likewise.
19312 (sparc_mode_dependent_address_p): Likewise.
19313 (gen_load_pcrel_sym): Remove 4th parameter.
19314 (load_got_register): Adjust call to above. Remove obsolete stuff.
19315 (sparc_expand_prologue): Do not call load_got_register here.
19316 (sparc_flat_expand_prologue): Likewise.
19317 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19318 (sparc_use_pseudo_pic_reg): New function.
19319 (sparc_init_pic_reg): Likewise.
19320 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19321 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19323 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19325 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19326 Add item for branch_cost.
19328 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19330 PR rtl-optimization/83565
19331 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19332 not extend the result to a larger mode for rotate operations.
19333 (num_sign_bit_copies1): Likewise.
19335 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19338 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19340 Use values-Xc.o for -pedantic.
19341 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19343 2018-01-12 Martin Liska <mliska@suse.cz>
19346 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19348 (possible_polymorphic_call_targets): Use it.
19349 (ipa_devirt): Likewise.
19351 2018-01-12 Martin Liska <mliska@suse.cz>
19353 * profile-count.h (enum profile_quality): Use 0 as invalid
19354 enum value of profile_quality.
19356 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19358 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19359 -mext-string options.
19361 2018-01-12 Richard Biener <rguenther@suse.de>
19363 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19364 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19365 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19367 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19369 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19371 * configure.ac (--with-long-double-format): Add support for the
19372 configuration option to change the default long double format on
19374 * config.gcc (powerpc*-linux*-*): Likewise.
19375 * configure: Regenerate.
19376 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19377 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19378 used without modification.
19380 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19382 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19383 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19384 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19385 MISC_BUILTIN_SPEC_BARRIER.
19386 (rs6000_init_builtins): Likewise.
19387 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19389 (speculation_barrier): New define_insn.
19390 * doc/extend.texi: Document __builtin_speculation_barrier.
19392 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19395 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19396 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19397 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19399 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19400 integral modes instead of "ss" and "sd".
19401 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19402 vectors with 32-bit and 64-bit elements.
19403 (vecdupssescalarmodesuffix): New mode attribute.
19404 (vec_dup<mode>): Use it.
19406 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19409 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19410 frame if argument is passed on stack.
19412 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19415 * ree.c (combine_reaching_defs): Optimize also
19416 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19417 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19419 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19421 PR middle-end/83189
19422 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19424 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19426 PR middle-end/83718
19427 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19428 after they are computed.
19430 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19432 PR tree-optimization/83695
19433 * gimple-loop-linterchange.cc
19434 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19435 reset cached scev information after interchange.
19436 (pass_linterchange::execute): Remove call to scev_reset_htab.
19438 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19440 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19441 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19442 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19443 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19444 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19445 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19446 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19447 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19448 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19449 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19450 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19451 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19452 (V_lane_reg): Likewise.
19453 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19455 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19456 (vfmal_lane_low<mode>_intrinsic,
19457 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19458 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19459 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19460 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19461 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19462 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19464 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19466 * config/arm/arm-cpus.in (fp16fml): New feature.
19467 (ALL_SIMD): Add fp16fml.
19468 (armv8.2-a): Add fp16fml as an option.
19469 (armv8.3-a): Likewise.
19470 (armv8.4-a): Add fp16fml as part of fp16.
19471 * config/arm/arm.h (TARGET_FP16FML): Define.
19472 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19474 * config/arm/arm-modes.def (V2HF): Define.
19475 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19476 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19477 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19478 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19479 vfmsl_low, vfmsl_high): New set of builtins.
19480 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19481 (vfml_op): New code attribute.
19482 (VFMLHALVES): New int iterator.
19483 (VFML, VFMLSEL): New mode attributes.
19484 (V_reg): Define mapping for V2HF.
19485 (V_hi, V_lo): New mode attributes.
19486 (VF_constraint): Likewise.
19487 (vfml_half, vfml_half_selector): New int attributes.
19488 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19490 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19491 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19493 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19494 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19495 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19496 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19498 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19499 Document new effective target and option set.
19501 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19503 * config/arm/arm-cpus.in (armv8_4): New feature.
19504 (ARMv8_4a): New fgroup.
19505 (armv8.4-a): New arch.
19506 * config/arm/arm-tables.opt: Regenerate.
19507 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19508 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19509 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19510 Add matching rules for -march=armv8.4-a and extensions.
19511 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19513 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19516 * config/rx/rx.md (BW): New mode attribute.
19517 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19519 2018-01-11 Richard Biener <rguenther@suse.de>
19521 PR tree-optimization/83435
19522 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19523 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19524 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19526 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19527 Alan Hayward <alan.hayward@arm.com>
19528 David Sherwood <david.sherwood@arm.com>
19530 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19532 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19533 (aarch64_print_address_internal): Use it to check for a zero offset.
19535 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19536 Alan Hayward <alan.hayward@arm.com>
19537 David Sherwood <david.sherwood@arm.com>
19539 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19540 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19541 Return a poly_int64 rather than a HOST_WIDE_INT.
19542 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19543 rather than a HOST_WIDE_INT.
19544 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19545 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19546 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19547 final_offset from HOST_WIDE_INT to poly_int64.
19548 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19549 to_constant when getting the number of units in an Advanced SIMD
19551 (aarch64_builtin_vectorized_function): Check for a constant number
19553 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19555 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19556 attribute instead of GET_MODE_NUNITS.
19557 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19558 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19559 GET_MODE_SIZE for fixed-size registers.
19560 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19561 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19562 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19563 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19564 (aarch64_print_operand, aarch64_print_address_internal)
19565 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19566 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19567 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19568 Handle polynomial GET_MODE_SIZE.
19569 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19570 wider than SImode without modification.
19571 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19572 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19573 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19574 passing and returning SVE modes.
19575 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19576 rather than GEN_INT.
19577 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19578 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19579 (aarch64_allocate_and_probe_stack_space): Likewise.
19580 (aarch64_layout_frame): Cope with polynomial offsets.
19581 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19582 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19583 polynomial offsets.
19584 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19585 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19586 poly_int64 rather than a HOST_WIDE_INT.
19587 (aarch64_get_separate_components, aarch64_process_components)
19588 (aarch64_expand_prologue, aarch64_expand_epilogue)
19589 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19590 (aarch64_anchor_offset): New function, split out from...
19591 (aarch64_legitimize_address): ...here.
19592 (aarch64_builtin_vectorization_cost): Handle polynomial
19593 TYPE_VECTOR_SUBPARTS.
19594 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19596 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19597 number of elements from the PARALLEL rather than the mode.
19598 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19599 rather than GET_MODE_BITSIZE.
19600 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19601 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19602 (aarch64_expand_vec_perm_const_1): Handle polynomial
19603 d->perm.length () and d->perm elements.
19604 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19605 Apply to_constant to d->perm elements.
19606 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19607 polynomial CONST_VECTOR_NUNITS.
19608 (aarch64_move_pointer): Take amount as a poly_int64 rather
19610 (aarch64_progress_pointer): Avoid temporary variable.
19611 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19612 the mode attribute instead of GET_MODE.
19614 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19615 Alan Hayward <alan.hayward@arm.com>
19616 David Sherwood <david.sherwood@arm.com>
19618 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19619 x exists before using it.
19620 (aarch64_add_constant_internal): Rename to...
19621 (aarch64_add_offset_1): ...this. Replace regnum with separate
19622 src and dest rtxes. Handle the case in which they're different,
19623 including when the offset is zero. Replace scratchreg with an rtx.
19624 Use 2 additions if there is no spare register into which we can
19625 move a 16-bit constant.
19626 (aarch64_add_constant): Delete.
19627 (aarch64_add_offset): Replace reg with separate src and dest
19628 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19629 Use aarch64_add_offset_1.
19630 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19631 an rtx rather than an int. Take the delta as a poly_int64
19632 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19633 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19634 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19635 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19636 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19637 and aarch64_add_sp.
19638 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19639 aarch64_add_constant.
19641 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19643 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19644 Use scalar_float_mode.
19646 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19648 * config/aarch64/aarch64-simd.md
19649 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19650 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19651 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19652 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19653 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19654 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19655 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19656 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19657 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19658 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19660 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19663 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19664 targ_options->x_arm_arch_string is non NULL.
19666 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19668 * config/aarch64/aarch64.h
19669 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19671 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19674 * expmed.c (emit_store_flag_force): Swap if const op0
19675 and change VOIDmode to mode of op0.
19677 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19679 PR rtl-optimization/83761
19680 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19681 than bytes to mode_for_size.
19683 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19685 PR middle-end/83189
19686 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19687 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19690 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19692 PR middle-end/83575
19693 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19694 when in layout mode.
19695 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19696 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19699 2018-01-10 Michael Collison <michael.collison@arm.com>
19701 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19702 * config/aarch64/aarch64-option-extension.def: Add
19703 AARCH64_OPT_EXTENSION of 'fp16fml'.
19704 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19705 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19706 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19707 * config/aarch64/constraints.md (Ui7): New constraint.
19708 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19709 (VFMLA_SEL_W): Ditto.
19712 (VFMLA16_LOW): New int iterator.
19713 (VFMLA16_HIGH): Ditto.
19714 (UNSPEC_FMLAL): New unspec.
19715 (UNSPEC_FMLSL): Ditto.
19716 (UNSPEC_FMLAL2): Ditto.
19717 (UNSPEC_FMLSL2): Ditto.
19718 (f16mac): New code attribute.
19719 * config/aarch64/aarch64-simd-builtins.def
19720 (aarch64_fmlal_lowv2sf): Ditto.
19721 (aarch64_fmlsl_lowv2sf): Ditto.
19722 (aarch64_fmlalq_lowv4sf): Ditto.
19723 (aarch64_fmlslq_lowv4sf): Ditto.
19724 (aarch64_fmlal_highv2sf): Ditto.
19725 (aarch64_fmlsl_highv2sf): Ditto.
19726 (aarch64_fmlalq_highv4sf): Ditto.
19727 (aarch64_fmlslq_highv4sf): Ditto.
19728 (aarch64_fmlal_lane_lowv2sf): Ditto.
19729 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19730 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19731 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19732 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19733 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19734 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19735 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19736 (aarch64_fmlal_lane_highv2sf): Ditto.
19737 (aarch64_fmlsl_lane_highv2sf): Ditto.
19738 (aarch64_fmlal_laneq_highv2sf): Ditto.
19739 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19740 (aarch64_fmlalq_lane_highv4sf): Ditto.
19741 (aarch64_fmlsl_lane_highv4sf): Ditto.
19742 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19743 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19744 * config/aarch64/aarch64-simd.md:
19745 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19746 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19747 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19748 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19749 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19750 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19751 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19752 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19753 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19754 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19755 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19756 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19757 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19758 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19759 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19760 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19761 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19762 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19763 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19764 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19765 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19766 (vfmlsl_low_u32): Ditto.
19767 (vfmlalq_low_u32): Ditto.
19768 (vfmlslq_low_u32): Ditto.
19769 (vfmlal_high_u32): Ditto.
19770 (vfmlsl_high_u32): Ditto.
19771 (vfmlalq_high_u32): Ditto.
19772 (vfmlslq_high_u32): Ditto.
19773 (vfmlal_lane_low_u32): Ditto.
19774 (vfmlsl_lane_low_u32): Ditto.
19775 (vfmlal_laneq_low_u32): Ditto.
19776 (vfmlsl_laneq_low_u32): Ditto.
19777 (vfmlalq_lane_low_u32): Ditto.
19778 (vfmlslq_lane_low_u32): Ditto.
19779 (vfmlalq_laneq_low_u32): Ditto.
19780 (vfmlslq_laneq_low_u32): Ditto.
19781 (vfmlal_lane_high_u32): Ditto.
19782 (vfmlsl_lane_high_u32): Ditto.
19783 (vfmlal_laneq_high_u32): Ditto.
19784 (vfmlsl_laneq_high_u32): Ditto.
19785 (vfmlalq_lane_high_u32): Ditto.
19786 (vfmlslq_lane_high_u32): Ditto.
19787 (vfmlalq_laneq_high_u32): Ditto.
19788 (vfmlslq_laneq_high_u32): Ditto.
19789 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19790 (AARCH64_FL_FOR_ARCH8_4): New.
19791 (AARCH64_ISA_F16FML): New ISA flag.
19792 (TARGET_F16FML): New feature flag for fp16fml.
19793 (doc/invoke.texi): Document new fp16fml option.
19795 2018-01-10 Michael Collison <michael.collison@arm.com>
19797 * config/aarch64/aarch64-builtins.c:
19798 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19799 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19800 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19801 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19802 (AARCH64_ISA_SHA3): New ISA flag.
19803 (TARGET_SHA3): New feature flag for sha3.
19804 * config/aarch64/iterators.md (sha512_op): New int attribute.
19805 (CRYPTO_SHA512): New int iterator.
19806 (UNSPEC_SHA512H): New unspec.
19807 (UNSPEC_SHA512H2): Ditto.
19808 (UNSPEC_SHA512SU0): Ditto.
19809 (UNSPEC_SHA512SU1): Ditto.
19810 * config/aarch64/aarch64-simd-builtins.def
19811 (aarch64_crypto_sha512hqv2di): New builtin.
19812 (aarch64_crypto_sha512h2qv2di): Ditto.
19813 (aarch64_crypto_sha512su0qv2di): Ditto.
19814 (aarch64_crypto_sha512su1qv2di): Ditto.
19815 (aarch64_eor3qv8hi): Ditto.
19816 (aarch64_rax1qv2di): Ditto.
19817 (aarch64_xarqv2di): Ditto.
19818 (aarch64_bcaxqv8hi): Ditto.
19819 * config/aarch64/aarch64-simd.md:
19820 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19821 (aarch64_crypto_sha512su0qv2di): Ditto.
19822 (aarch64_crypto_sha512su1qv2di): Ditto.
19823 (aarch64_eor3qv8hi): Ditto.
19824 (aarch64_rax1qv2di): Ditto.
19825 (aarch64_xarqv2di): Ditto.
19826 (aarch64_bcaxqv8hi): Ditto.
19827 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19828 (vsha512h2q_u64): Ditto.
19829 (vsha512su0q_u64): Ditto.
19830 (vsha512su1q_u64): Ditto.
19831 (veor3q_u16): Ditto.
19832 (vrax1q_u64): Ditto.
19833 (vxarq_u64): Ditto.
19834 (vbcaxq_u16): Ditto.
19835 * config/arm/types.md (crypto_sha512): New type attribute.
19836 (crypto_sha3): Ditto.
19837 (doc/invoke.texi): Document new sha3 option.
19839 2018-01-10 Michael Collison <michael.collison@arm.com>
19841 * config/aarch64/aarch64-builtins.c:
19842 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19843 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19844 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19845 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19846 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19847 (AARCH64_ISA_SM4): New ISA flag.
19848 (TARGET_SM4): New feature flag for sm4.
19849 * config/aarch64/aarch64-simd-builtins.def
19850 (aarch64_sm3ss1qv4si): Ditto.
19851 (aarch64_sm3tt1aq4si): Ditto.
19852 (aarch64_sm3tt1bq4si): Ditto.
19853 (aarch64_sm3tt2aq4si): Ditto.
19854 (aarch64_sm3tt2bq4si): Ditto.
19855 (aarch64_sm3partw1qv4si): Ditto.
19856 (aarch64_sm3partw2qv4si): Ditto.
19857 (aarch64_sm4eqv4si): Ditto.
19858 (aarch64_sm4ekeyqv4si): Ditto.
19859 * config/aarch64/aarch64-simd.md:
19860 (aarch64_sm3ss1qv4si): Ditto.
19861 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19862 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19863 (aarch64_sm4eqv4si): Ditto.
19864 (aarch64_sm4ekeyqv4si): Ditto.
19865 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19866 (sm3part_op): Ditto.
19867 (CRYPTO_SM3TT): Ditto.
19868 (CRYPTO_SM3PART): Ditto.
19869 (UNSPEC_SM3SS1): New unspec.
19870 (UNSPEC_SM3TT1A): Ditto.
19871 (UNSPEC_SM3TT1B): Ditto.
19872 (UNSPEC_SM3TT2A): Ditto.
19873 (UNSPEC_SM3TT2B): Ditto.
19874 (UNSPEC_SM3PARTW1): Ditto.
19875 (UNSPEC_SM3PARTW2): Ditto.
19876 (UNSPEC_SM4E): Ditto.
19877 (UNSPEC_SM4EKEY): Ditto.
19878 * config/aarch64/constraints.md (Ui2): New constraint.
19879 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19880 * config/arm/types.md (crypto_sm3): New type attribute.
19881 (crypto_sm4): Ditto.
19882 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19883 (vsm3tt1aq_u32): Ditto.
19884 (vsm3tt1bq_u32): Ditto.
19885 (vsm3tt2aq_u32): Ditto.
19886 (vsm3tt2bq_u32): Ditto.
19887 (vsm3partw1q_u32): Ditto.
19888 (vsm3partw2q_u32): Ditto.
19889 (vsm4eq_u32): Ditto.
19890 (vsm4ekeyq_u32): Ditto.
19891 (doc/invoke.texi): Document new sm4 option.
19893 2018-01-10 Michael Collison <michael.collison@arm.com>
19895 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19896 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19897 (AARCH64_FL_FOR_ARCH8_4): New.
19898 (AARCH64_FL_V8_4): New flag.
19899 (doc/invoke.texi): Document new armv8.4-a option.
19901 2018-01-10 Michael Collison <michael.collison@arm.com>
19903 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19904 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19905 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19906 * config/aarch64/aarch64-option-extension.def: Add
19907 AARCH64_OPT_EXTENSION of 'sha2'.
19908 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19909 (crypto): Disable sha2 and aes if crypto disabled.
19910 (crypto): Enable aes and sha2 if enabled.
19911 (simd): Disable sha2 and aes if simd disabled.
19912 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19914 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19915 (TARGET_SHA2): New feature flag for sha2.
19916 (TARGET_AES): New feature flag for aes.
19917 * config/aarch64/aarch64-simd.md:
19918 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19919 conditional on TARGET_AES.
19920 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19921 (aarch64_crypto_sha1hsi): Make pattern conditional
19923 (aarch64_crypto_sha1hv4si): Ditto.
19924 (aarch64_be_crypto_sha1hv4si): Ditto.
19925 (aarch64_crypto_sha1su1v4si): Ditto.
19926 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19927 (aarch64_crypto_sha1su0v4si): Ditto.
19928 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19929 (aarch64_crypto_sha256su0v4si): Ditto.
19930 (aarch64_crypto_sha256su1v4si): Ditto.
19931 (doc/invoke.texi): Document new aes and sha2 options.
19933 2018-01-10 Martin Sebor <msebor@redhat.com>
19935 PR tree-optimization/83781
19936 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19939 2018-01-11 Martin Sebor <msebor@gmail.com>
19940 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19942 PR tree-optimization/83501
19943 PR tree-optimization/81703
19945 * tree-ssa-strlen.c (get_string_cst): Rename...
19946 (get_string_len): ...to this. Handle global constants.
19947 (handle_char_store): Adjust.
19949 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19950 Jim Wilson <jimw@sifive.com>
19952 * config/riscv/riscv-protos.h (riscv_output_return): New.
19953 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19954 (riscv_attribute_table, riscv_output_return),
19955 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19956 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19957 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19959 (riscv_expand_prologue): Add early return for naked function.
19960 (riscv_expand_epilogue): Likewise.
19961 (riscv_function_ok_for_sibcall): Return false for naked function.
19962 (riscv_set_current_function): New.
19963 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19964 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19965 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19966 * doc/extend.texi (RISC-V Function Attributes): New.
19968 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19970 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19971 check for 128-bit long double before checking TCmode.
19972 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19973 128-bit long doubles before checking TFmode or TCmode.
19974 (FLOAT128_IBM_P): Likewise.
19976 2018-01-10 Martin Sebor <msebor@redhat.com>
19978 PR tree-optimization/83671
19979 * builtins.c (c_strlen): Unconditionally return zero for the empty
19981 Use -Warray-bounds for warnings.
19982 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19983 for non-constant array indices with COMPONENT_REF, arrays of
19984 arrays, and pointers to arrays.
19985 (gimple_fold_builtin_strlen): Determine and set length range for
19986 non-constant character arrays.
19988 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19990 PR middle-end/81897
19991 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19994 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19996 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19998 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20001 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20002 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20003 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20004 indexed_or_indirect_operand predicate.
20005 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20006 (*vsx_le_perm_load_v8hi): Likewise.
20007 (*vsx_le_perm_load_v16qi): Likewise.
20008 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20009 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20010 (*vsx_le_perm_store_v8hi): Likewise.
20011 (*vsx_le_perm_store_v16qi): Likewise.
20012 (eight unnamed splitters): Likewise.
20014 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20016 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20017 * config/rs6000/emmintrin.h: Likewise.
20018 * config/rs6000/mmintrin.h: Likewise.
20019 * config/rs6000/xmmintrin.h: Likewise.
20021 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20024 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20026 * tree.c (tree_nop_conversion): Return true for location wrapper
20028 (maybe_wrap_with_location): New function.
20029 (selftest::check_strip_nops): New function.
20030 (selftest::test_location_wrappers): New function.
20031 (selftest::tree_c_tests): Call it.
20032 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20033 (maybe_wrap_with_location): New decl.
20034 (EXPR_LOCATION_WRAPPER_P): New macro.
20035 (location_wrapper_p): New inline function.
20036 (tree_strip_any_location_wrapper): New inline function.
20038 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20041 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20042 stack_realign_offset for the largest alignment of stack slot
20044 (ix86_find_max_used_stack_alignment): New function.
20045 (ix86_finalize_stack_frame_flags): Use it. Set
20046 max_used_stack_alignment if we don't realign stack.
20047 * config/i386/i386.h (machine_function): Add
20048 max_used_stack_alignment.
20050 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20052 * config/arm/arm.opt (-mbranch-cost): New option.
20053 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20056 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20059 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20060 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20062 2018-01-10 Richard Biener <rguenther@suse.de>
20065 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20066 early out so it also covers the case where we have a non-NULL
20069 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20071 PR tree-optimization/83753
20072 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20073 for non-strided grouped accesses if the number of elements is 1.
20075 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20078 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20079 * i386.h (TARGET_USE_GATHER): Define.
20080 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20082 2018-01-10 Martin Liska <mliska@suse.cz>
20085 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20086 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20088 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20089 CLEANUP_NO_PARTITIONING is not set.
20091 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20093 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20094 for vectors, as a partial revert of r254296.
20095 * rtl.h (const_vec_p): Delete.
20096 (const_vec_duplicate_p): Don't test for vector CONSTs.
20097 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20098 * expmed.c (make_tree): Likewise.
20101 * common.md (E, F): Use CONSTANT_P instead of checking for
20103 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20104 checking for CONST_VECTOR.
20106 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20108 PR middle-end/83575
20109 * predict.c (force_edge_cold): Handle in more sane way edges
20110 with no prediction.
20112 2018-01-09 Carl Love <cel@us.ibm.com>
20114 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20116 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20117 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20118 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20119 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20120 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20121 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20122 * config/rs6000/rs6000-protos.h: Add extern defition for
20123 rs6000_generate_float2_double_code.
20124 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20126 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20127 (float2_v2df): Add define_expand.
20129 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20132 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20133 op_mode in the force_to_mode call.
20135 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20137 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20138 instead of checking each element individually.
20139 (aarch64_evpc_uzp): Likewise.
20140 (aarch64_evpc_zip): Likewise.
20141 (aarch64_evpc_ext): Likewise.
20142 (aarch64_evpc_rev): Likewise.
20143 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20144 instead of checking each element individually. Return true without
20146 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20147 whether all selected elements come from the same input, instead of
20148 checking each element individually. Remove calls to gen_rtx_REG,
20149 start_sequence and end_sequence and instead assert that no rtl is
20152 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20154 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20155 order of HIGH and CONST checks.
20157 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20159 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20160 if the destination isn't an SSA_NAME.
20162 2018-01-09 Richard Biener <rguenther@suse.de>
20164 PR tree-optimization/83668
20165 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20167 (canonicalize_loop_form): ... here, renamed from ...
20168 (canonicalize_loop_closed_ssa_form): ... this and amended to
20169 swap successor edges for loop exit blocks to make us use
20170 the RPO order we need for initial schedule generation.
20172 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20174 PR tree-optimization/64811
20175 * match.pd: When optimizing comparisons with Inf, avoid
20176 introducing or losing exceptions from comparisons with NaN.
20178 2018-01-09 Martin Liska <mliska@suse.cz>
20181 * asan.c (shadow_mem_size): Add gcc_assert.
20183 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20185 Don't save registers in main().
20188 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20189 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20190 * config/avr/avr.c (avr_set_current_function): Don't error if
20191 naked, OS_task or OS_main are specified at the same time.
20192 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20194 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20196 * common/config/avr/avr-common.c (avr_option_optimization_table):
20197 Switch on -mmain-is-OS_task for optimizing compilations.
20199 2018-01-09 Richard Biener <rguenther@suse.de>
20201 PR tree-optimization/83572
20202 * graphite.c: Include cfganal.h.
20203 (graphite_transform_loops): Connect infinite loops to exit
20204 and remove fake edges at the end.
20206 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20208 * ipa-inline.c (edge_badness): Revert accidental checkin.
20210 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20213 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20214 symbols; not inline clones.
20216 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20219 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20220 hard registers. Formatting fixes.
20222 PR preprocessor/83722
20223 * gcc.c (try_generate_repro): Pass
20224 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20225 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20228 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20229 Kito Cheng <kito.cheng@gmail.com>
20231 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20232 (riscv_leaf_function_p): Delete.
20233 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20235 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20237 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20239 (do_ifelse): New function.
20240 (do_isel): New function.
20241 (do_sub3): New function.
20242 (do_add3): New function.
20243 (do_load_mask_compare): New function.
20244 (do_overlap_load_compare): New function.
20245 (expand_compare_loop): New function.
20246 (expand_block_compare): Call expand_compare_loop() when appropriate.
20247 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20248 option description.
20249 (-mblock-compare-inline-loop-limit): New option.
20251 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20254 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20255 Reverse order of second and third operands in first alternative.
20256 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20257 of first and second elements in UNSPEC_VPERMR vector.
20258 (altivec_expand_vec_perm_le): Likewise.
20260 2018-01-08 Jeff Law <law@redhat.com>
20262 PR rtl-optimizatin/81308
20263 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20264 (process_switch): If group_case_labels makes a change, then set
20266 (pass_convert_switch::execute): If a switch is converted, then
20267 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20269 PR rtl-optimization/81308
20270 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20273 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20275 PR target/83663 - Revert r255946
20276 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20277 generation for cases where splatting a value is not useful.
20278 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20279 across a vec_duplicate and a paradoxical subreg forming a vector
20280 mode to a vec_concat.
20282 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20284 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20285 -march=armv8.3-a variants.
20286 * config/arm/t-multilib: Likewise.
20287 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20289 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20291 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20293 (cceq_ior_compare_complement): Give it a name so I can use it, and
20294 change boolean_or_operator predicate to boolean_operator so it can
20295 be used to generate a crand.
20296 (eqne): New code iterator.
20297 (bd/bd_neg): New code_attrs.
20298 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20299 a single define_insn.
20300 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20301 decrement (bdnzt/bdnzf/bdzt/bdzf).
20302 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20303 with the new names of the branch decrement patterns, and added the
20304 names of the branch decrement conditional patterns.
20306 2018-01-08 Richard Biener <rguenther@suse.de>
20308 PR tree-optimization/83563
20309 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20312 2018-01-08 Richard Biener <rguenther@suse.de>
20314 PR middle-end/83713
20315 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20317 2018-01-08 Richard Biener <rguenther@suse.de>
20319 PR tree-optimization/83685
20320 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20321 references to abnormals.
20323 2018-01-08 Richard Biener <rguenther@suse.de>
20326 * dwarf2out.c (output_indirect_strings): Handle empty
20327 skeleton_debug_str_hash.
20328 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20330 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20332 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20333 (emit_store_direct): Likewise.
20334 (arc_trampoline_adjust_address): Likewise.
20335 (arc_asm_trampoline_template): New function.
20336 (arc_initialize_trampoline): Use asm_trampoline_template.
20337 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20338 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20339 * config/arc/arc.md (flush_icache): Delete pattern.
20341 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20343 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20344 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20347 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20350 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20351 by not USED_FOR_TARGET.
20352 (make_pass_resolve_sw_modes): Likewise.
20354 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20356 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20359 2018-01-08 Richard Biener <rguenther@suse.de>
20361 PR middle-end/83580
20362 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20364 2018-01-08 Richard Biener <rguenther@suse.de>
20366 PR middle-end/83517
20367 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20369 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20371 PR middle-end/81897
20372 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20373 basic blocks with a small number of successors.
20374 (convert_control_dep_chain_into_preds): Improve handling of
20376 (dump_predicates): Split apart into...
20377 (dump_pred_chain): ...here...
20378 (dump_pred_info): ...and here.
20379 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20380 (can_chain_union_be_invalidated_p): Improve check for invalidation
20382 (uninit_uses_cannot_happen): Avoid unnecessary if
20383 convert_control_dep_chain_into_preds yielded nothing.
20385 2018-01-06 Martin Sebor <msebor@redhat.com>
20387 PR tree-optimization/83640
20388 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20389 subtracting negative offset from size.
20390 (builtin_access::overlap): Adjust offset bounds of the access to fall
20391 within the size of the object if possible.
20393 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20395 PR rtl-optimization/83699
20396 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20397 extract_bit_field_as_subreg to cases in which the extracted
20398 value is also a vector.
20400 * lra-constraints.c (process_alt_operands): Test for the equivalence
20401 substitutions when detecting a possible reload cycle.
20403 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20406 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20407 by default if flag_selective_schedling{,2}. Formatting fixes.
20409 PR rtl-optimization/83682
20410 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20411 if it has non-VECTOR_MODE element mode.
20412 (vec_duplicate_p): Likewise.
20414 PR middle-end/83694
20415 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20416 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20418 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20421 * config/i386/i386-builtin.def
20422 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20423 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20424 Require also OPTION_MASK_ISA_AVX512F in addition to
20425 OPTION_MASK_ISA_GFNI.
20426 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20427 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20428 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20429 to OPTION_MASK_ISA_GFNI.
20430 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20431 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20432 OPTION_MASK_ISA_AVX512BW.
20433 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20434 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20435 addition to OPTION_MASK_ISA_GFNI.
20436 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20437 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20438 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20439 to OPTION_MASK_ISA_GFNI.
20440 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20441 a requirement for all ISAs rather than any of them with a few
20443 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20445 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20446 bitmasks to be enabled with 3 exceptions, instead of requiring any
20447 enabled ISA with lots of exceptions.
20448 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20449 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20450 Change avx512bw in isa attribute to avx512f.
20451 * config/i386/sgxintrin.h: Add license boilerplate.
20452 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20453 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20454 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20455 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20457 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20458 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20459 temporarily sse2 rather than sse if not enabled already.
20462 * config/i386/sse.md (VI248_VLBW): Rename to ...
20463 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20464 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20465 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20466 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20467 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20468 mode iterator instead of VI248_VLBW.
20470 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20472 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20473 (record_modified): Skip clobbers; add debug output.
20474 (param_change_prob): Use sreal frequencies.
20476 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20478 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20479 punt for user-aligned variables.
20481 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20483 * tree-chrec.c (chrec_contains_symbols): Return true for
20486 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20489 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20490 of (x|y) == x for BICS pattern.
20492 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20494 PR tree-optimization/83605
20495 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20496 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20499 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20501 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20502 * config/epiphany/rtems.h: New file.
20504 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20505 Uros Bizjak <ubizjak@gmail.com>
20508 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20509 QIreg_operand instead of register_operand predicate.
20510 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20511 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20512 comments instead of -fmitigate[-_]rop.
20514 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20517 * cgraphunit.c (symbol_table::compile): Switch to text_section
20518 before calling assembly_start debug hook.
20519 * run-rtl-passes.c (run_rtl_passes): Likewise.
20522 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20524 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20525 range_int_cst_p rather than !symbolic_range_p before calling
20526 extract_range_from_multiplicative_op_1.
20528 2018-01-04 Jeff Law <law@redhat.com>
20530 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20531 redundant test in assertion.
20533 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20535 * doc/rtl.texi: Document machine_mode wrapper classes.
20537 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20539 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20540 using tree_to_uhwi.
20542 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20544 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20545 the VEC_PERM_EXPR fold to fail.
20547 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20550 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20551 to switched_sections.
20553 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20556 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20557 test for d.testing.
20559 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20562 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20563 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20565 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20568 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20569 is BLKmode and bitpos not zero or mode change is needed.
20571 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20574 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20577 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20580 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20581 instead of MULT rtx. Update all corresponding splitters.
20582 (*saddl_se): Ditto.
20583 (*ssub<modesuffix>): Ditto.
20584 (*ssubl_se): Ditto.
20585 (*cmp_sadd_di): Update split patterns.
20586 (*cmp_sadd_si): Ditto.
20587 (*cmp_sadd_sidi): Ditto.
20588 (*cmp_ssub_di): Ditto.
20589 (*cmp_ssub_si): Ditto.
20590 (*cmp_ssub_sidi): Ditto.
20591 * config/alpha/predicates.md (const23_operand): New predicate.
20592 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20593 Look for ASHIFT, not MULT inner operand.
20594 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20596 2018-01-04 Martin Liska <mliska@suse.cz>
20598 PR gcov-profile/83669
20599 * gcov.c (output_intermediate_file): Add version to intermediate
20601 * doc/gcov.texi: Document new field 'version' in intermediate
20602 file format. Fix location of '-k' option of gcov command.
20604 2018-01-04 Martin Liska <mliska@suse.cz>
20607 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20609 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20611 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20613 2018-01-03 Martin Sebor <msebor@redhat.com>
20615 PR tree-optimization/83655
20616 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20617 checking calls with invalid arguments.
20619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20621 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20622 (vectorizable_mask_load_store): Delete.
20623 (vectorizable_call): Return false for masked loads and stores.
20624 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20625 instead of gimple_assign_rhs1.
20626 (vectorizable_load): Handle IFN_MASK_LOAD.
20627 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20631 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20633 (vectorizable_mask_load_store): ...here.
20634 (vectorizable_load): ...and here.
20636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20638 * tree-vect-stmts.c (vect_build_all_ones_mask)
20639 (vect_build_zero_merge_argument): New functions, split out from...
20640 (vectorizable_load): ...here.
20642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20644 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20646 (vectorizable_mask_load_store): ...here.
20647 (vectorizable_store): ...and here.
20649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20651 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20653 (vectorizable_mask_load_store): ...here.
20655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20657 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20658 (vect_model_store_cost): Take a vec_load_store_type instead of a
20660 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20661 (vect_model_store_cost): Take a vec_load_store_type instead of a
20663 (vectorizable_mask_load_store): Update accordingly.
20664 (vectorizable_store): Likewise.
20665 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20669 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20670 IFN_MASK_LOAD calls here rather than...
20671 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20674 Alan Hayward <alan.hayward@arm.com>
20675 David Sherwood <david.sherwood@arm.com>
20677 * expmed.c (extract_bit_field_1): For vector extracts,
20678 fall back to extract_bit_field_as_subreg if vec_extract
20681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20682 Alan Hayward <alan.hayward@arm.com>
20683 David Sherwood <david.sherwood@arm.com>
20685 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20686 they are variable or constant sized.
20687 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20688 slots for constant-sized data.
20690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20691 Alan Hayward <alan.hayward@arm.com>
20692 David Sherwood <david.sherwood@arm.com>
20694 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20695 handling COND_EXPRs with boolean comparisons, try to find a better
20696 basis for the mask type than the boolean itself.
20698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20700 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20701 is calculated and how it can be overridden.
20702 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20703 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20705 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20709 Alan Hayward <alan.hayward@arm.com>
20710 David Sherwood <david.sherwood@arm.com>
20712 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20713 Remove the mode argument.
20714 (aarch64_simd_valid_immediate): Remove the mode and inverse
20716 * config/aarch64/iterators.md (bitsize): New iterator.
20717 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20718 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20719 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20720 aarch64_simd_valid_immediate.
20721 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20722 (aarch64_reg_or_bic_imm): Likewise.
20723 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20724 with an insn_type enum and msl with a modifier_type enum.
20725 Replace element_width with a scalar_mode. Change the shift
20726 to unsigned int. Add constructors for scalar_float_mode and
20727 scalar_int_mode elements.
20728 (aarch64_vect_float_const_representable_p): Delete.
20729 (aarch64_can_const_movi_rtx_p)
20730 (aarch64_simd_scalar_immediate_valid_for_move)
20731 (aarch64_simd_make_constant): Update call to
20732 aarch64_simd_valid_immediate.
20733 (aarch64_advsimd_valid_immediate_hs): New function.
20734 (aarch64_advsimd_valid_immediate): Likewise.
20735 (aarch64_simd_valid_immediate): Remove mode and inverse
20736 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20737 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20738 and aarch64_float_const_representable_p on the result.
20739 (aarch64_output_simd_mov_immediate): Remove mode argument.
20740 Update call to aarch64_simd_valid_immediate and use of
20741 simd_immediate_info.
20742 (aarch64_output_scalar_simd_mov_immediate): Update call
20745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20746 Alan Hayward <alan.hayward@arm.com>
20747 David Sherwood <david.sherwood@arm.com>
20749 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20750 (mode_nunits): Likewise CONST_MODE_NUNITS.
20751 * machmode.def (ADJUST_NUNITS): Document.
20752 * genmodes.c (mode_data::need_nunits_adj): New field.
20753 (blank_mode): Update accordingly.
20754 (adj_nunits): New variable.
20755 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20757 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20758 listed in adj_nunits.
20759 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20760 listed in adj_nunits. Don't emit case statements for such modes.
20761 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20762 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20763 nothing if adj_nunits is nonnull.
20764 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20765 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20766 (emit_mode_fbit): Update use of print_maybe_const_decl.
20767 (emit_move_size): Likewise. Treat the array as non-const
20769 (emit_mode_adjustments): Handle adj_nunits.
20771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20773 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20774 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20775 (VECTOR_MODES): Use it.
20776 (make_vector_modes): Take the prefix as an argument.
20778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20779 Alan Hayward <alan.hayward@arm.com>
20780 David Sherwood <david.sherwood@arm.com>
20782 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20783 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20784 for MODE_VECTOR_BOOL.
20785 * machmode.def (VECTOR_BOOL_MODE): Document.
20786 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20787 (make_vector_bool_mode): New function.
20788 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20790 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20791 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20793 * stor-layout.c (int_mode_for_mode): Likewise.
20794 * tree.c (build_vector_type_for_mode): Likewise.
20795 * varasm.c (output_constant_pool_2): Likewise.
20796 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20797 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20798 for MODE_VECTOR_BOOL.
20799 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20800 of mode class checks.
20801 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20802 instead of a list of mode class checks.
20803 (expand_vector_scalar_condition): Likewise.
20804 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20807 Alan Hayward <alan.hayward@arm.com>
20808 David Sherwood <david.sherwood@arm.com>
20810 * machmode.h (mode_size): Change from unsigned short to
20812 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20813 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20814 or if measurement_type is not polynomial.
20815 (fixed_size_mode::includes_p): Check for constant-sized modes.
20816 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20817 return a poly_uint16 rather than an unsigned short.
20818 (emit_mode_size): Change the type of mode_size from unsigned short
20819 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20820 (emit_mode_adjustments): Cope with polynomial vector sizes.
20821 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20823 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20825 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20826 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20827 * caller-save.c (setup_save_areas): Likewise.
20828 (replace_reg_with_saved_mem): Likewise.
20829 * calls.c (emit_library_call_value_1): Likewise.
20830 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20831 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20832 (gen_lowpart_for_combine): Likewise.
20833 * convert.c (convert_to_integer_1): Likewise.
20834 * cse.c (equiv_constant, cse_insn): Likewise.
20835 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20836 (cselib_subst_to_values): Likewise.
20837 * dce.c (word_dce_process_block): Likewise.
20838 * df-problems.c (df_word_lr_mark_ref): Likewise.
20839 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20840 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20841 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20842 (rtl_for_decl_location): Likewise.
20843 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20844 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20845 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20846 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20847 (expand_expr_real_1): Likewise.
20848 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20849 (pad_below): Likewise.
20850 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20851 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20852 * ira.c (get_subreg_tracking_sizes): Likewise.
20853 * ira-build.c (ira_create_allocno_objects): Likewise.
20854 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20855 (ira_sort_regnos_for_alter_reg): Likewise.
20856 * ira-costs.c (record_operand_costs): Likewise.
20857 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20858 (resolve_simple_move): Likewise.
20859 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20860 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20861 (lra_constraints): Likewise.
20862 (CONST_POOL_OK_P): Reject variable-sized modes.
20863 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20864 (add_pseudo_to_slot, lra_spill): Likewise.
20865 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20866 * optabs-query.c (get_best_extraction_insn): Likewise.
20867 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20868 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20869 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20870 * recog.c (offsettable_address_addr_space_p): Likewise.
20871 * regcprop.c (maybe_mode_change): Likewise.
20872 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20873 * regrename.c (build_def_use): Likewise.
20874 * regstat.c (dump_reg_info): Likewise.
20875 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20876 (find_reloads, find_reloads_subreg_address): Likewise.
20877 * reload1.c (eliminate_regs_1): Likewise.
20878 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20879 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20880 (simplify_binary_operation_1, simplify_subreg): Likewise.
20881 * targhooks.c (default_function_arg_padding): Likewise.
20882 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20883 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20884 (verify_gimple_assign_ternary): Likewise.
20885 * tree-inline.c (estimate_move_cost): Likewise.
20886 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20887 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20888 (get_address_cost_ainc): Likewise.
20889 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20890 (vect_supportable_dr_alignment): Likewise.
20891 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20892 (vectorizable_reduction): Likewise.
20893 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20894 (vectorizable_operation, vectorizable_load): Likewise.
20895 * tree.c (build_same_sized_truth_vector_type): Likewise.
20896 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20897 * var-tracking.c (emit_note_insn_var_location): Likewise.
20898 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20899 (ADDR_VEC_ALIGN): Likewise.
20901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20902 Alan Hayward <alan.hayward@arm.com>
20903 David Sherwood <david.sherwood@arm.com>
20905 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20907 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20908 or if measurement_type is polynomial.
20909 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20910 * combine.c (make_extraction): Likewise.
20911 * dse.c (find_shift_sequence): Likewise.
20912 * dwarf2out.c (mem_loc_descriptor): Likewise.
20913 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20914 (extract_bit_field, extract_low_bits): Likewise.
20915 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20916 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20917 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20918 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20919 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20920 * reload.c (find_reloads): Likewise.
20921 * reload1.c (alter_reg): Likewise.
20922 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20923 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20924 * tree-if-conv.c (predicate_mem_writes): Likewise.
20925 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20926 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20927 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20928 * valtrack.c (dead_debug_insert_temp): Likewise.
20929 * varasm.c (mergeable_constant_section): Likewise.
20930 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20932 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20933 Alan Hayward <alan.hayward@arm.com>
20934 David Sherwood <david.sherwood@arm.com>
20936 * expr.c (expand_assignment): Cope with polynomial mode sizes
20937 when assigning to a CONCAT.
20939 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20940 Alan Hayward <alan.hayward@arm.com>
20941 David Sherwood <david.sherwood@arm.com>
20943 * machmode.h (mode_precision): Change from unsigned short to
20945 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20947 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20948 or if measurement_type is not polynomial.
20949 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20950 in which the mode is already known to be a scalar_int_mode.
20951 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20952 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20954 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20955 for GET_MODE_PRECISION.
20956 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20957 for GET_MODE_PRECISION.
20958 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20960 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20961 (expand_field_assignment, make_extraction): Likewise.
20962 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20963 (get_last_value): Likewise.
20964 * convert.c (convert_to_integer_1): Likewise.
20965 * cse.c (cse_insn): Likewise.
20966 * expr.c (expand_expr_real_1): Likewise.
20967 * lra-constraints.c (simplify_operand_subreg): Likewise.
20968 * optabs-query.c (can_atomic_load_p): Likewise.
20969 * optabs.c (expand_atomic_load): Likewise.
20970 (expand_atomic_store): Likewise.
20971 * ree.c (combine_reaching_defs): Likewise.
20972 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20973 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20974 * tree.h (type_has_mode_precision_p): Likewise.
20975 * ubsan.c (instrument_si_overflow): Likewise.
20977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20978 Alan Hayward <alan.hayward@arm.com>
20979 David Sherwood <david.sherwood@arm.com>
20981 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20982 polynomial numbers of units.
20983 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20984 (valid_vector_subparts_p): New function.
20985 (build_vector_type): Remove temporary shim and take the number
20986 of units as a poly_uint64 rather than an int.
20987 (build_opaque_vector_type): Take the number of units as a
20988 poly_uint64 rather than an int.
20989 * tree.c (build_vector_from_ctor): Handle polynomial
20990 TYPE_VECTOR_SUBPARTS.
20991 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20992 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20993 (build_vector_from_val): If the number of units is variable,
20994 use build_vec_duplicate_cst for constant operands and
20995 VEC_DUPLICATE_EXPR otherwise.
20996 (make_vector_type): Remove temporary is_constant ().
20997 (build_vector_type, build_opaque_vector_type): Take the number of
20998 units as a poly_uint64 rather than an int.
20999 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21001 * cfgexpand.c (expand_debug_expr): Likewise.
21002 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21003 (store_constructor, expand_expr_real_1): Likewise.
21004 (const_scalar_mask_from_tree): Likewise.
21005 * fold-const-call.c (fold_const_reduction): Likewise.
21006 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21007 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21008 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21009 (fold_relational_const): Likewise.
21010 (native_interpret_vector): Likewise. Change the size from an
21011 int to an unsigned int.
21012 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21013 TYPE_VECTOR_SUBPARTS.
21014 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21015 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21016 duplicating a non-constant operand into a variable-length vector.
21017 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21018 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21019 * ipa-icf.c (sem_variable::equals): Likewise.
21020 * match.pd: Likewise.
21021 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21022 * print-tree.c (print_node): Likewise.
21023 * stor-layout.c (layout_type): Likewise.
21024 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21025 * tree-cfg.c (verify_gimple_comparison): Likewise.
21026 (verify_gimple_assign_binary): Likewise.
21027 (verify_gimple_assign_ternary): Likewise.
21028 (verify_gimple_assign_single): Likewise.
21029 * tree-pretty-print.c (dump_generic_node): Likewise.
21030 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21031 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21032 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21033 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21034 (vect_shift_permute_load_chain): Likewise.
21035 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21036 (expand_vector_condition, optimize_vector_constructor): Likewise.
21037 (lower_vec_perm, get_compute_type): Likewise.
21038 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21039 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21040 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21041 (vect_recog_mask_conversion_pattern): Likewise.
21042 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21043 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21044 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21045 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21046 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21047 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21048 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21049 (supportable_widening_operation): Likewise.
21050 (supportable_narrowing_operation): Likewise.
21051 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21053 * varasm.c (output_constant): Likewise.
21055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21056 Alan Hayward <alan.hayward@arm.com>
21057 David Sherwood <david.sherwood@arm.com>
21059 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21060 so that both the length == 3 and length != 3 cases set up their
21061 own permute vectors. Add comments explaining why we know the
21062 number of elements is constant.
21063 (vect_permute_load_chain): Likewise.
21065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21066 Alan Hayward <alan.hayward@arm.com>
21067 David Sherwood <david.sherwood@arm.com>
21069 * machmode.h (mode_nunits): Change from unsigned char to
21071 (ONLY_FIXED_SIZE_MODES): New macro.
21072 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21073 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21074 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21076 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21077 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21078 or if measurement_type is not polynomial.
21079 * genmodes.c (ZERO_COEFFS): New macro.
21080 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21082 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21083 Use ZERO_COEFFS when emitting initializers.
21084 * data-streamer.h (bp_pack_poly_value): New function.
21085 (bp_unpack_poly_value): Likewise.
21086 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21087 for GET_MODE_NUNITS.
21088 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21089 for GET_MODE_NUNITS.
21090 * tree.c (make_vector_type): Remove temporary shim and make
21091 the real function take the number of units as a poly_uint64
21092 rather than an int.
21093 (build_vector_type_for_mode): Handle polynomial nunits.
21094 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21095 * emit-rtl.c (const_vec_series_p_1): Likewise.
21096 (gen_rtx_CONST_VECTOR): Likewise.
21097 * fold-const.c (test_vec_duplicate_folding): Likewise.
21098 * genrecog.c (validate_pattern): Likewise.
21099 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21100 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21101 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21102 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21103 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21104 * rtlanal.c (subreg_get_info): Likewise.
21105 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21106 (vect_grouped_load_supported): Likewise.
21107 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21108 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21109 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21110 (simplify_const_unary_operation, simplify_binary_operation_1)
21111 (simplify_const_binary_operation, simplify_ternary_operation)
21112 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21113 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21114 instead of CONST_VECTOR_NUNITS.
21115 * varasm.c (output_constant_pool_2): Likewise.
21116 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21117 explicit-encoded elements in the XVEC for variable-length vectors.
21119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21121 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21124 Alan Hayward <alan.hayward@arm.com>
21125 David Sherwood <david.sherwood@arm.com>
21127 * coretypes.h (fixed_size_mode): Declare.
21128 (fixed_size_mode_pod): New typedef.
21129 * builtins.h (target_builtins::x_apply_args_mode)
21130 (target_builtins::x_apply_result_mode): Change type to
21131 fixed_size_mode_pod.
21132 * builtins.c (apply_args_size, apply_result_size, result_vector)
21133 (expand_builtin_apply_args_1, expand_builtin_apply)
21134 (expand_builtin_return): Update accordingly.
21136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21138 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21139 * cselib.c (cselib_hash_rtx): Likewise.
21140 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21141 CONST_VECTOR encoding.
21143 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21144 Jeff Law <law@redhat.com>
21147 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21148 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21149 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21150 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21153 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21154 explicitly probe *sp in a noreturn function if there were any callee
21155 register saves or frame pointer is needed.
21157 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21160 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21161 BLKmode for ternary, binary or unary expressions.
21164 * var-tracking.c (delete_vta_debug_insn): New inline function.
21165 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21166 insns from get_insns () to NULL instead of each bb separately.
21167 Use delete_vta_debug_insn. No longer static.
21168 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21169 delete_vta_debug_insns callers.
21170 * rtl.h (delete_vta_debug_insns): Declare.
21171 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21172 instead of variable_tracking_main.
21174 2018-01-03 Martin Sebor <msebor@redhat.com>
21176 PR tree-optimization/83603
21177 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21178 arguments past the endof the argument list in functions declared
21179 without a prototype.
21180 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21181 Avoid checking when arguments are null.
21183 2018-01-03 Martin Sebor <msebor@redhat.com>
21186 * doc/extend.texi (attribute const): Fix a typo.
21187 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21188 issuing -Wsuggest-attribute for void functions.
21190 2018-01-03 Martin Sebor <msebor@redhat.com>
21192 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21193 offset_int::from instead of wide_int::to_shwi.
21194 (maybe_diag_overlap): Remove assertion.
21195 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21196 * gimple-ssa-sprintf.c (format_directive): Same.
21197 (parse_directive): Same.
21198 (sprintf_dom_walker::compute_format_length): Same.
21199 (try_substitute_return_value): Same.
21201 2018-01-03 Jeff Law <law@redhat.com>
21203 PR middle-end/83654
21204 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21205 non-constant residual for zero at runtime and avoid probing in
21206 that case. Reorganize code for trailing problem to mirror handling
21209 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21211 PR tree-optimization/83501
21212 * tree-ssa-strlen.c (get_string_cst): New.
21213 (handle_char_store): Call get_string_cst.
21215 2018-01-03 Martin Liska <mliska@suse.cz>
21217 PR tree-optimization/83593
21218 * tree-ssa-strlen.c: Include tree-cfg.h.
21219 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21220 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21221 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21223 (strlen_dom_walker::before_dom_children): Call
21224 gimple_purge_dead_eh_edges. Dump tranformation with details
21226 (strlen_dom_walker::before_dom_children): Update call by adding
21227 new argument cleanup_eh.
21228 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21230 2018-01-03 Martin Liska <mliska@suse.cz>
21233 * cif-code.def (VARIADIC_THUNK): New enum value.
21234 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21237 2018-01-03 Jan Beulich <jbeulich@suse.com>
21239 * sse.md (mov<mode>_internal): Tighten condition for when to use
21240 vmovdqu<ssescalarsize> for TI and OI modes.
21242 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21244 Update copyright years.
21246 2018-01-03 Martin Liska <mliska@suse.cz>
21249 * ipa-visibility.c (function_and_variable_visibility): Skip
21250 functions with noipa attribure.
21252 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21254 * gcc.c (process_command): Update copyright notice dates.
21255 * gcov-dump.c (print_version): Ditto.
21256 * gcov.c (print_version): Ditto.
21257 * gcov-tool.c (print_version): Ditto.
21258 * gengtype.c (create_file): Ditto.
21259 * doc/cpp.texi: Bump @copying's copyright year.
21260 * doc/cppinternals.texi: Ditto.
21261 * doc/gcc.texi: Ditto.
21262 * doc/gccint.texi: Ditto.
21263 * doc/gcov.texi: Ditto.
21264 * doc/install.texi: Ditto.
21265 * doc/invoke.texi: Ditto.
21267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21269 * vector-builder.h (vector_builder::m_full_nelts): Change from
21270 unsigned int to poly_uint64.
21271 (vector_builder::full_nelts): Update prototype accordingly.
21272 (vector_builder::new_vector): Likewise.
21273 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21274 (vector_builder::operator ==): Likewise.
21275 (vector_builder::finalize): Likewise.
21276 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21277 Take the number of elements as a poly_uint64 rather than an
21279 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21280 from unsigned int to poly_uint64.
21281 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21282 (vec_perm_indices::new_vector): Likewise.
21283 (vec_perm_indices::length): Likewise.
21284 (vec_perm_indices::nelts_per_input): Likewise.
21285 (vec_perm_indices::input_nelts): Likewise.
21286 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21287 number of elements per input as a poly_uint64 rather than an
21288 unsigned int. Use the original encoding for variable-length
21289 vectors, rather than clamping each individual element.
21290 For the second and subsequent elements in each pattern,
21291 clamp the step and base before clamping their sum.
21292 (vec_perm_indices::series_p): Handle polynomial element counts.
21293 (vec_perm_indices::all_in_range_p): Likewise.
21294 (vec_perm_indices_to_tree): Likewise.
21295 (vec_perm_indices_to_rtx): Likewise.
21296 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21297 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21298 (tree_vector_builder::new_binary_operation): Handle polynomial
21299 element counts. Return false if we need to know the number
21300 of elements at compile time.
21301 * fold-const.c (fold_vec_perm): Punt if the number of elements
21302 isn't known at compile time.
21304 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21306 * vec-perm-indices.h (vec_perm_builder): Change element type
21307 from HOST_WIDE_INT to poly_int64.
21308 (vec_perm_indices::element_type): Update accordingly.
21309 (vec_perm_indices::clamp): Handle polynomial element_types.
21310 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21311 (vec_perm_indices::all_in_range_p): Likewise.
21312 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21314 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21315 polynomial vec_perm_indices element types.
21316 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21317 * fold-const.c (fold_vec_perm): Likewise.
21318 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21319 * tree-vect-generic.c (lower_vec_perm): Likewise.
21320 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21321 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21322 element type to HOST_WIDE_INT.
21324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21325 Alan Hayward <alan.hayward@arm.com>
21326 David Sherwood <david.sherwood@arm.com>
21328 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21329 rather than an int. Use plus_constant.
21330 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21331 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21333 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21334 Alan Hayward <alan.hayward@arm.com>
21335 David Sherwood <david.sherwood@arm.com>
21337 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21338 a HOST_WIDE_INT to a poly_int64.
21340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21341 Alan Hayward <alan.hayward@arm.com>
21342 David Sherwood <david.sherwood@arm.com>
21344 * calls.c (load_register_parameters): Cope with polynomial
21345 mode sizes. Require a constant size for BLKmode parameters
21346 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21347 forces a parameter to be padded at the lsb end in order to
21348 fill a complete number of words, require the parameter size
21349 to be ordered wrt UNITS_PER_WORD.
21351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21352 Alan Hayward <alan.hayward@arm.com>
21353 David Sherwood <david.sherwood@arm.com>
21355 * reload1.c (spill_stack_slot_width): Change element type
21356 from unsigned int to poly_uint64_pod.
21357 (alter_reg): Treat mode sizes as polynomial.
21359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21360 Alan Hayward <alan.hayward@arm.com>
21361 David Sherwood <david.sherwood@arm.com>
21363 * reload.c (complex_word_subreg_p): New function.
21364 (reload_inner_reg_of_subreg, push_reload): Use it.
21366 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21367 Alan Hayward <alan.hayward@arm.com>
21368 David Sherwood <david.sherwood@arm.com>
21370 * lra-constraints.c (process_alt_operands): Reject matched
21371 operands whose sizes aren't ordered.
21372 (match_reload): Refer to this check here.
21374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21375 Alan Hayward <alan.hayward@arm.com>
21376 David Sherwood <david.sherwood@arm.com>
21378 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21379 that the mode size is in the set {1, 2, 4, 8, 16}.
21381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21382 Alan Hayward <alan.hayward@arm.com>
21383 David Sherwood <david.sherwood@arm.com>
21385 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21386 Use plus_constant instead of gen_rtx_PLUS.
21388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21389 Alan Hayward <alan.hayward@arm.com>
21390 David Sherwood <david.sherwood@arm.com>
21392 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21393 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21394 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21395 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21396 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21397 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21398 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21399 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21400 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21401 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21403 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21404 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21405 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21406 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21407 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21408 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21409 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21410 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21411 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21412 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21414 * expr.c (emit_move_resolve_push): Treat the input and result
21415 of PUSH_ROUNDING as a poly_int64.
21416 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21417 (emit_push_insn): Likewise.
21418 * lra-eliminations.c (mark_not_eliminable): Likewise.
21419 * recog.c (push_operand): Likewise.
21420 * reload1.c (elimination_effects): Likewise.
21421 * rtlanal.c (nonzero_bits1): Likewise.
21422 * calls.c (store_one_arg): Likewise. Require the padding to be
21423 known at compile time.
21425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21426 Alan Hayward <alan.hayward@arm.com>
21427 David Sherwood <david.sherwood@arm.com>
21429 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21430 Use plus_constant instead of gen_rtx_PLUS.
21432 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21433 Alan Hayward <alan.hayward@arm.com>
21434 David Sherwood <david.sherwood@arm.com>
21436 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21437 rather than an int.
21439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21440 Alan Hayward <alan.hayward@arm.com>
21441 David Sherwood <david.sherwood@arm.com>
21443 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21444 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21445 via stack temporaries. Treat the mode size as polynomial too.
21447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21448 Alan Hayward <alan.hayward@arm.com>
21449 David Sherwood <david.sherwood@arm.com>
21451 * expr.c (expand_expr_real_2): When handling conversions involving
21452 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21453 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21454 as a poly_uint64 too.
21456 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21457 Alan Hayward <alan.hayward@arm.com>
21458 David Sherwood <david.sherwood@arm.com>
21460 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
21467 REGMODE_NATURAL_SIZE.
21468 * expmed.c (store_bit_field_1): Likewise.
21469 * expr.c (store_constructor): Likewise.
21470 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21471 and polynomial REGMODE_NATURAL_SIZE.
21472 (gen_lowpart_common): Likewise.
21473 * reginfo.c (record_subregs_of_mode): Likewise.
21474 * rtlanal.c (read_modify_subreg_p): Likewise.
21476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21477 Alan Hayward <alan.hayward@arm.com>
21478 David Sherwood <david.sherwood@arm.com>
21480 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21481 numbers of elements.
21483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21484 Alan Hayward <alan.hayward@arm.com>
21485 David Sherwood <david.sherwood@arm.com>
21487 * match.pd: Cope with polynomial numbers of vector elements.
21489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21490 Alan Hayward <alan.hayward@arm.com>
21491 David Sherwood <david.sherwood@arm.com>
21493 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21494 in a POINTER_PLUS_EXPR.
21496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21497 Alan Hayward <alan.hayward@arm.com>
21498 David Sherwood <david.sherwood@arm.com>
21500 * omp-simd-clone.c (simd_clone_subparts): New function.
21501 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21502 (ipa_simd_modify_function_body): Likewise.
21504 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21505 Alan Hayward <alan.hayward@arm.com>
21506 David Sherwood <david.sherwood@arm.com>
21508 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21509 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21510 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21511 (expand_vector_condition, vector_element): Likewise.
21512 (subparts_gt): New function.
21513 (get_compute_type): Use subparts_gt.
21514 (count_type_subparts): Delete.
21515 (expand_vector_operations_1): Use subparts_gt instead of
21516 count_type_subparts.
21518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21519 Alan Hayward <alan.hayward@arm.com>
21520 David Sherwood <david.sherwood@arm.com>
21522 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21523 (vect_compile_time_alias): ...this new function. Do the calculation
21524 on poly_ints rather than trees.
21525 (vect_prune_runtime_alias_test_list): Update call accordingly.
21527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21528 Alan Hayward <alan.hayward@arm.com>
21529 David Sherwood <david.sherwood@arm.com>
21531 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21533 (vect_schedule_slp_instance): Likewise.
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 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21540 constant and extern definitions for variable-length vectors.
21541 (vect_get_constant_vectors): Note that the number of units
21542 is known to be constant.
21544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21545 Alan Hayward <alan.hayward@arm.com>
21546 David Sherwood <david.sherwood@arm.com>
21548 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21549 of units as polynomial. Choose between WIDE and NARROW based
21552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21553 Alan Hayward <alan.hayward@arm.com>
21554 David Sherwood <david.sherwood@arm.com>
21556 * tree-vect-stmts.c (simd_clone_subparts): New function.
21557 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21564 vectors as polynomial. Use build_index_vector for
21565 IFN_GOMP_SIMD_LANE.
21567 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21568 Alan Hayward <alan.hayward@arm.com>
21569 David Sherwood <david.sherwood@arm.com>
21571 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21572 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21573 for variable-length vectors.
21574 (vectorizable_mask_load_store): Treat the number of units as
21575 polynomial, asserting that it is constant if the condition has
21576 already been enforced.
21577 (vectorizable_store, vectorizable_load): 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 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21584 of units as polynomial. Punt if we can't tell at compile time
21585 which vector contains the final result.
21587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21588 Alan Hayward <alan.hayward@arm.com>
21589 David Sherwood <david.sherwood@arm.com>
21591 * tree-vect-loop.c (vectorizable_induction): Treat the number
21592 of units as polynomial. Punt on SLP inductions. Use an integer
21593 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21594 cast of such a series for variable-length floating-point
21597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21598 Alan Hayward <alan.hayward@arm.com>
21599 David Sherwood <david.sherwood@arm.com>
21601 * tree.h (build_index_vector): Declare.
21602 * tree.c (build_index_vector): New function.
21603 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21604 of units as polynomial, forcibly converting it to a constant if
21605 vectorizable_reduction has already enforced the condition.
21606 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21607 to create a {1,2,3,...} vector.
21608 (vectorizable_reduction): Treat the number of units as polynomial.
21609 Choose vectype_in based on the largest scalar element size rather
21610 than the smallest number of units. Enforce the restrictions
21613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21614 Alan Hayward <alan.hayward@arm.com>
21615 David Sherwood <david.sherwood@arm.com>
21617 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21618 number of units as polynomial.
21620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21621 Alan Hayward <alan.hayward@arm.com>
21622 David Sherwood <david.sherwood@arm.com>
21624 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21625 * target.def (autovectorize_vector_sizes): Return the vector sizes
21626 by pointer, using vector_sizes rather than a bitmask.
21627 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21628 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21629 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21631 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21632 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21633 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21634 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21635 * omp-general.c (omp_max_vf): Likewise.
21636 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21637 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21638 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21639 * tree-vect-slp.c (vect_slp_bb): Likewise.
21640 * doc/tm.texi: Regenerate.
21641 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21643 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21644 the vector size as a poly_uint64 rather than an unsigned int.
21645 (current_vector_size): Change from an unsigned int to a poly_uint64.
21646 (get_vectype_for_scalar_type): Update accordingly.
21647 * tree.h (build_truth_vector_type): Take the size and number of
21648 units as a poly_uint64 rather than an unsigned int.
21649 (build_vector_type): Add a temporary overload that takes
21650 the number of units as a poly_uint64 rather than an unsigned int.
21651 * tree.c (make_vector_type): Likewise.
21652 (build_truth_vector_type): Take the number of units as a poly_uint64
21653 rather than an unsigned int.
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 * target.def (get_mask_mode): Take the number of units and length
21660 as poly_uint64s rather than unsigned ints.
21661 * targhooks.h (default_get_mask_mode): Update accordingly.
21662 * targhooks.c (default_get_mask_mode): Likewise.
21663 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21664 * doc/tm.texi: Regenerate.
21666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21667 Alan Hayward <alan.hayward@arm.com>
21668 David Sherwood <david.sherwood@arm.com>
21670 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21671 * omp-general.c (omp_max_vf): Likewise.
21672 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21673 (expand_omp_simd): Handle polynomial safelen.
21674 * omp-low.c (omplow_simd_context): Add a default constructor.
21675 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21676 (lower_rec_simd_input_clauses): Update accordingly.
21677 (lower_rec_input_clauses): Likewise.
21679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21680 Alan Hayward <alan.hayward@arm.com>
21681 David Sherwood <david.sherwood@arm.com>
21683 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21684 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21685 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21686 (vect_analyze_slp_cost): Likewise.
21687 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21688 (vect_model_load_cost): Likewise.
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-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21695 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21696 from an unsigned int * to a poly_uint64_pod *.
21697 (calculate_unrolling_factor): New function.
21698 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
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-vectorizer.h (_slp_instance::unrolling_factor): Change
21705 from an unsigned int to a poly_uint64.
21706 (_loop_vec_info::slp_unrolling_factor): Likewise.
21707 (_loop_vec_info::vectorization_factor): Change from an int
21709 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21710 (vect_get_num_vectors): New function.
21711 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21712 (vect_get_num_copies): Use vect_get_num_vectors.
21713 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21714 to an unsigned int *.
21715 (vect_analyze_data_refs): Change min_vf from an int * to a
21717 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21718 than an unsigned HOST_WIDE_INT.
21719 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21720 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21721 to an unsigned int *.
21722 (vect_analyze_data_ref_dependences): Likewise.
21723 (vect_compute_data_ref_alignment): Handle polynomial vf.
21724 (vect_enhance_data_refs_alignment): Likewise.
21725 (vect_prune_runtime_alias_test_list): Likewise.
21726 (vect_shift_permute_load_chain): Likewise.
21727 (vect_supportable_dr_alignment): Likewise.
21728 (dependence_distance_ge_vf): Take the vectorization factor as a
21729 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21730 (vect_analyze_data_refs): Change min_vf from an int * to a
21732 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21733 vfm1 as a poly_uint64 rather than an int. Make the same change
21734 for the returned bound_scalar.
21735 (vect_gen_vector_loop_niters): Handle polynomial vf.
21736 (vect_do_peeling): Likewise. Update call to
21737 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21738 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21740 * tree-vect-loop.c (vect_determine_vectorization_factor)
21741 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21742 (vect_get_known_peeling_cost): Likewise.
21743 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21744 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21745 (vect_transform_loop): Likewise. Use the lowest possible VF when
21746 updating the upper bounds of the loop.
21747 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21748 rather than an int.
21749 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21750 polynomial unroll factors.
21751 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21752 (vect_make_slp_decision): Likewise.
21753 (vect_supported_load_permutation_p): Likewise, and polynomial
21755 (vect_analyze_slp_cost): Handle polynomial vf.
21756 (vect_slp_analyze_node_operations): Likewise.
21757 (vect_slp_analyze_bb_1): Likewise.
21758 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21759 than an unsigned HOST_WIDE_INT.
21760 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21761 (vectorizable_load): Handle polynomial vf.
21762 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21764 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21767 Alan Hayward <alan.hayward@arm.com>
21768 David Sherwood <david.sherwood@arm.com>
21770 * match.pd: Handle bit operations involving three constants
21771 and try to fold one pair.
21773 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21775 * tree-vect-loop-manip.c: Include gimple-fold.h.
21776 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21777 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21778 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21779 Add a path that uses a step of VF instead of 1, but disable it
21781 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21782 and niters_no_overflow parameters. Update calls to
21783 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21784 Create a new SSA name if the latter choses to use a ste other
21785 than zero, and return it via niters_vector_mult_vf_var.
21786 * tree-vect-loop.c (vect_transform_loop): Update calls to
21787 vect_do_peeling, vect_gen_vector_loop_niters and
21788 slpeel_make_loop_iterate_ntimes.
21789 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21790 (vect_gen_vector_loop_niters): Update declarations after above changes.
21792 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21794 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21795 128-bit round to integer instructions.
21796 (ceil<mode>2): Likewise.
21797 (btrunc<mode>2): Likewise.
21798 (round<mode>2): Likewise.
21800 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21802 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21803 unaligned VSX load/store on P8/P9.
21804 (expand_block_clear): Allow the use of unaligned VSX
21805 load/store on P8/P9.
21807 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21809 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21811 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21812 swap associated with both a load and a store.
21814 2018-01-02 Andrew Waterman <andrew@sifive.com>
21816 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21817 * config/riscv/riscv.md (clear_cache): Use it.
21819 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21821 * web.c: Remove out-of-date comment.
21823 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21825 * expr.c (fixup_args_size_notes): Check that any existing
21826 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21827 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21828 (emit_single_push_insn): ...here.
21830 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21832 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21833 (const_vector_encoded_nelts): New function.
21834 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21835 (const_vector_int_elt, const_vector_elt): Declare.
21836 * emit-rtl.c (const_vector_int_elt_1): New function.
21837 (const_vector_elt): Likewise.
21838 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21839 of CONST_VECTOR_ELT.
21841 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21843 * expr.c: Include rtx-vector-builder.h.
21844 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21845 directly on the tree encoding.
21846 (const_vector_from_tree): Likewise.
21847 * optabs.c: Include rtx-vector-builder.h.
21848 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21849 sequence of "u" values.
21850 * vec-perm-indices.c: Include rtx-vector-builder.h.
21851 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21852 directly on the vec_perm_indices encoding.
21854 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21856 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21857 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21858 * rtx-vector-builder.h: New file.
21859 * rtx-vector-builder.c: Likewise.
21860 * rtl.h (rtx_def::u2): Add a const_vector field.
21861 (CONST_VECTOR_NPATTERNS): New macro.
21862 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21863 (CONST_VECTOR_DUPLICATE_P): Likewise.
21864 (CONST_VECTOR_STEPPED_P): Likewise.
21865 (CONST_VECTOR_ENCODED_ELT): Likewise.
21866 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21867 (unwrap_const_vec_duplicate): Likewise.
21868 (const_vec_series_p): Check for a non-duplicated vector encoding.
21869 Say that the function only returns true for integer vectors.
21870 * emit-rtl.c: Include rtx-vector-builder.h.
21871 (gen_const_vec_duplicate_1): Delete.
21872 (gen_const_vector): Call gen_const_vec_duplicate instead of
21873 gen_const_vec_duplicate_1.
21874 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21875 (gen_const_vec_duplicate): Use rtx_vector_builder.
21876 (gen_const_vec_series): Likewise.
21877 (gen_rtx_CONST_VECTOR): Likewise.
21878 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21879 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21880 Build a new vector rather than modifying a CONST_VECTOR in-place.
21881 (handle_special_swappables): Update call accordingly.
21882 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21883 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21884 Build a new vector rather than modifying a CONST_VECTOR in-place.
21885 (handle_special_swappables): Update call accordingly.
21887 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21889 * simplify-rtx.c (simplify_const_binary_operation): Use
21890 CONST_VECTOR_ELT instead of XVECEXP.
21892 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21894 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21895 the selector elements to be different from the data elements
21896 if the selector is a VECTOR_CST.
21897 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21898 ssizetype for the selector.
21900 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21902 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21903 before testing each element individually.
21904 * tree-vect-generic.c (lower_vec_perm): Likewise.
21906 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21908 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21909 * selftest-run-tests.c (selftest::run_tests): Call it.
21910 * vector-builder.h (vector_builder::operator ==): New function.
21911 (vector_builder::operator !=): Likewise.
21912 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21913 (vec_perm_indices::all_from_input_p): New function.
21914 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21915 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21916 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21917 instead of reading the VECTOR_CST directly. Detect whether both
21918 vector inputs are the same before constructing the vec_perm_indices,
21919 and update the number of inputs argument accordingly. Use the
21920 utility functions added above. Only construct sel2 if we need to.
21922 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21924 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21925 the broadcast of the low byte.
21926 (expand_mult_highpart): Use an explicit encoding for the permutes.
21927 * optabs-query.c (can_mult_highpart_p): Likewise.
21928 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21929 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21930 (vectorizable_bswap): Likewise.
21931 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21932 explicit encoding for the power-of-2 permutes.
21933 (vect_permute_store_chain): Likewise.
21934 (vect_grouped_load_supported): Likewise.
21935 (vect_permute_load_chain): Likewise.
21937 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21939 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21940 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21941 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21942 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21943 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21944 (vect_gen_perm_mask_any): Likewise.
21946 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21948 * int-vector-builder.h: New file.
21949 * vec-perm-indices.h: Include int-vector-builder.h.
21950 (vec_perm_indices): Redefine as an int_vector_builder.
21951 (auto_vec_perm_indices): Delete.
21952 (vec_perm_builder): Redefine as a stand-alone class.
21953 (vec_perm_indices::vec_perm_indices): New function.
21954 (vec_perm_indices::clamp): Likewise.
21955 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21956 (vec_perm_indices::new_vector): New function.
21957 (vec_perm_indices::new_expanded_vector): Update for new
21958 vec_perm_indices class.
21959 (vec_perm_indices::rotate_inputs): New function.
21960 (vec_perm_indices::all_in_range_p): Operate directly on the
21961 encoded form, without computing elided elements.
21962 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21963 encoding. Update for new vec_perm_indices class.
21964 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21965 the given vec_perm_builder.
21966 (expand_vec_perm_var): Update vec_perm_builder constructor.
21967 (expand_mult_highpart): Use vec_perm_builder instead of
21968 auto_vec_perm_indices.
21969 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21970 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21971 or double series encoding as appropriate.
21972 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21973 vec_perm_indices instead of auto_vec_perm_indices.
21974 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21975 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21976 (vect_permute_store_chain): Likewise.
21977 (vect_grouped_load_supported): Likewise.
21978 (vect_permute_load_chain): Likewise.
21979 (vect_shift_permute_load_chain): Likewise.
21980 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21981 (vect_transform_slp_perm_load): Likewise.
21982 (vect_schedule_slp_instance): Likewise.
21983 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21984 (vectorizable_mask_load_store): Likewise.
21985 (vectorizable_bswap): Likewise.
21986 (vectorizable_store): Likewise.
21987 (vectorizable_load): Likewise.
21988 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21989 vec_perm_indices instead of auto_vec_perm_indices. Use
21990 tree_to_vec_perm_builder to read the vector from a tree.
21991 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21992 vec_perm_builder instead of a vec_perm_indices.
21993 (have_whole_vector_shift): Use vec_perm_builder and
21994 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21995 truncation to calc_vec_perm_mask_for_shift.
21996 (vect_create_epilog_for_reduction): Likewise.
21997 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21998 from auto_vec_perm_indices to vec_perm_indices.
21999 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22000 instead of changing individual elements.
22001 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22002 the vector in d.perm.
22003 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22004 from auto_vec_perm_indices to vec_perm_indices.
22005 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22006 instead of changing individual elements.
22007 (arm_vectorize_vec_perm_const): Use new_vector to install
22008 the vector in d.perm.
22009 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22010 Update vec_perm_builder constructor.
22011 (rs6000_expand_interleave): Likewise.
22012 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22013 (rs6000_expand_interleave): Likewise.
22015 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22017 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22018 to qimode could truncate the indices.
22019 * optabs.c (expand_vec_perm_var): Likewise.
22021 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22023 * Makefile.in (OBJS): Add vec-perm-indices.o.
22024 * vec-perm-indices.h: New file.
22025 * vec-perm-indices.c: Likewise.
22026 * target.h (vec_perm_indices): Replace with a forward class
22028 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22029 * optabs.h: Include vec-perm-indices.h.
22030 (expand_vec_perm): Delete.
22031 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22032 (expand_vec_perm_const): Declare.
22033 * target.def (vec_perm_const_ok): Replace with...
22034 (vec_perm_const): ...this new hook.
22035 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22036 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22037 * doc/tm.texi: Regenerate.
22038 * optabs.def (vec_perm_const): Delete.
22039 * doc/md.texi (vec_perm_const): Likewise.
22040 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22041 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22042 expand_vec_perm for constant permutation vectors. Assert that
22043 the mode of variable permutation vectors is the integer equivalent
22044 of the mode that is being permuted.
22045 * optabs-query.h (selector_fits_mode_p): Declare.
22046 * optabs-query.c: Include vec-perm-indices.h.
22047 (selector_fits_mode_p): New function.
22048 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22049 is defined, instead of checking whether the vec_perm_const_optab
22050 exists. Use targetm.vectorize.vec_perm_const instead of
22051 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22052 fit in the vector mode before using a variable permute.
22053 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22054 vec_perm_indices instead of an rtx.
22055 (expand_vec_perm): Replace with...
22056 (expand_vec_perm_const): ...this new function. Take the selector
22057 as a vec_perm_indices rather than an rtx. Also take the mode of
22058 the selector. Update call to shift_amt_for_vec_perm_mask.
22059 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22060 Use vec_perm_indices::new_expanded_vector to expand the original
22061 selector into bytes. Check whether the indices fit in the vector
22062 mode before using a variable permute.
22063 (expand_vec_perm_var): Make global.
22064 (expand_mult_highpart): Use expand_vec_perm_const.
22065 * fold-const.c: Includes vec-perm-indices.h.
22066 * tree-ssa-forwprop.c: Likewise.
22067 * tree-vect-data-refs.c: Likewise.
22068 * tree-vect-generic.c: Likewise.
22069 * tree-vect-loop.c: Likewise.
22070 * tree-vect-slp.c: Likewise.
22071 * tree-vect-stmts.c: Likewise.
22072 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22074 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22075 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22076 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22077 (aarch64_vectorize_vec_perm_const): ...this new function.
22078 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22079 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22080 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22081 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22082 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22083 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22084 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22086 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22087 check for NEON modes.
22088 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22089 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22090 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22091 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22093 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22094 the old VEC_PERM_CONST conditions.
22095 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22096 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22097 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22098 (ia64_vectorize_vec_perm_const_ok): Merge into...
22099 (ia64_vectorize_vec_perm_const): ...this new function.
22100 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22101 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22102 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22103 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22104 * config/mips/mips.c (mips_expand_vec_perm_const)
22105 (mips_vectorize_vec_perm_const_ok): Merge into...
22106 (mips_vectorize_vec_perm_const): ...this new function.
22107 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22108 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22109 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22110 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22111 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22112 (rs6000_expand_vec_perm_const): Delete.
22113 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22115 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22116 (altivec_expand_vec_perm_const_le): Take each operand individually.
22117 Operate on constant selectors rather than rtxes.
22118 (altivec_expand_vec_perm_const): Likewise. Update call to
22119 altivec_expand_vec_perm_const_le.
22120 (rs6000_expand_vec_perm_const): Delete.
22121 (rs6000_vectorize_vec_perm_const_ok): Delete.
22122 (rs6000_vectorize_vec_perm_const): New function.
22123 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22124 an element count and rtx array.
22125 (rs6000_expand_extract_even): Update call accordingly.
22126 (rs6000_expand_interleave): Likewise.
22127 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22128 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22129 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22130 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22131 (rs6000_expand_vec_perm_const): Delete.
22132 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22133 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22134 (altivec_expand_vec_perm_const_le): Take each operand individually.
22135 Operate on constant selectors rather than rtxes.
22136 (altivec_expand_vec_perm_const): Likewise. Update call to
22137 altivec_expand_vec_perm_const_le.
22138 (rs6000_expand_vec_perm_const): Delete.
22139 (rs6000_vectorize_vec_perm_const_ok): Delete.
22140 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22141 reference to the SPE evmerge intructions.
22142 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22143 an element count and rtx array.
22144 (rs6000_expand_extract_even): Update call accordingly.
22145 (rs6000_expand_interleave): Likewise.
22146 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22147 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22149 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22151 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22153 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22154 vector mode and that that mode matches the mode of the data
22156 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22157 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22158 directly using expand_vec_perm_1 when forcing selectors into
22160 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22162 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22164 * optabs-query.h (can_vec_perm_p): Delete.
22165 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22166 * optabs-query.c (can_vec_perm_p): Split into...
22167 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22168 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22169 particular selector is valid.
22170 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22171 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22172 (vect_grouped_load_supported): Likewise.
22173 (vect_shift_permute_load_chain): Likewise.
22174 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22175 (vect_transform_slp_perm_load): Likewise.
22176 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22177 (vectorizable_bswap): Likewise.
22178 (vect_gen_perm_mask_checked): Likewise.
22179 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22180 implementations of variable permutation vectors into account
22181 when deciding which selector to use.
22182 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22183 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22184 with a false third argument.
22185 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22186 to test whether the constant selector is valid and can_vec_perm_var_p
22187 to test whether a variable selector is valid.
22189 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22191 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22192 * optabs-query.c (can_vec_perm_p): Likewise.
22193 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22194 instead of vec_perm_indices.
22195 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22196 (vect_gen_perm_mask_checked): Likewise,
22197 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22198 (vect_gen_perm_mask_checked): Likewise,
22200 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22202 * optabs-query.h (qimode_for_vec_perm): Declare.
22203 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22204 (qimode_for_vec_perm): ...this new function.
22205 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22207 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22209 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22210 does not have a conditional at the top.
22212 2018-01-02 Richard Biener <rguenther@suse.de>
22214 * ipa-inline.c (big_speedup_p): Fix expression.
22216 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22219 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22222 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22226 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22227 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22228 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22229 cond_taken_branch_cost 3->4.
22231 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22233 PR tree-optimization/83581
22234 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22235 TODO_cleanup_cfg if any changes have been made.
22237 PR middle-end/83608
22238 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22239 convert_modes if target mode has the right side, but different mode
22242 PR middle-end/83609
22243 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22244 last argument when extracting from CONCAT. If either from_real or
22245 from_imag is NULL, use expansion through memory. If result is not
22246 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22247 the parts directly to inner mode, if even that fails, use expansion
22250 PR middle-end/83623
22251 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22252 check for bswap in mode rather than HImode and use that in expand_unop
22255 Copyright (C) 2018 Free Software Foundation, Inc.
22257 Copying and distribution of this file, with or without modification,
22258 are permitted in any medium without royalty provided the copyright
22259 notice and this notice are preserved.